-
Notifications
You must be signed in to change notification settings - Fork 572
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom Url configuration #1128
Custom Url configuration #1128
Conversation
{ | ||
if (string.IsNullOrEmpty(_apiBase)) | ||
{ | ||
_apiBase = "https://api.stripe.com/v1"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than hardcoding the default value here, could you instead use a constant? E.g. Urls.DefaultBaseUrl
.
{ | ||
if (string.IsNullOrEmpty(_uploadsBase)) | ||
{ | ||
_uploadsBase = "https://uploads.stripe.com/v1"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
{ | ||
if (string.IsNullOrEmpty(_connectBase)) | ||
{ | ||
_connectBase = "https://connect.stripe.com"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And here.
@@ -14,7 +14,7 @@ internal static class Urls | |||
|
|||
public static string Coupons => BaseUrl + "/coupons"; | |||
|
|||
public static string Plans => BaseUrl + "/plans"; | |||
public static string Plans => BaseUrl + "/plans"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have some unnecessary whitespace here.
Hi @jamesmckenzie, thanks a lot for the PR! Overall this looks fairly solid to me. I left a few comments, could you take a look? |
Thanks for taking a look. I've made the requested changes - let me know if there's anything else |
and mistake fixed! |
Thanks @jamesmckenzie! This looks good to me. Can I bother you to squash the 3 commits into a single one before I pull this in? |
a850325
to
59ec275
Compare
not a problem, done! |
Perfect! Pulling this in. |
#1102
allows consumers of the library to easily override the base urls for the stripe api to allow for easier testing (for example, with the stripe-mock service)