-
Notifications
You must be signed in to change notification settings - Fork 460
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
Create plans and products using 2017-12-01 API version format #496
Create plans and products using 2017-12-01 API version format #496
Conversation
This is going to remain a work-in-progress until we've released a new API version and can push updates to |
Thanks for pushing this along @jhoon-stripe! Let us know how those server-side changes come along. Happy to review this in more detail when it's ready to come in. |
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.
minor comments
product.go
Outdated
@@ -27,6 +27,8 @@ type ProductParams struct { | |||
Name string `form:"name"` | |||
PackageDimensions *PackageDimensions `form:"package_dimensions"` | |||
Shippable *bool `form:"shippable"` | |||
Statement string `form:"statement_descriptor"` |
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.
can you name it StatementDescriptor
? I'm working on renaming all properties in #459 to ensure they match, as best as possible, the API name
product.go
Outdated
@@ -27,6 +27,8 @@ type ProductParams struct { | |||
Name string `form:"name"` | |||
PackageDimensions *PackageDimensions `form:"package_dimensions"` | |||
Shippable *bool `form:"shippable"` | |||
Statement string `form:"statement_descriptor"` | |||
Type string `form:"type"` |
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.
Type
should likely be using const instead of just a string
. Example: on Account's Type
here
product.go
Outdated
@@ -47,8 +49,10 @@ type Product struct { | |||
PackageDimensions *PackageDimensions `json:"package_dimensions"` | |||
Shippable bool `json:"shippable"` | |||
Skus *SKUList `json:"skus"` | |||
Statement string `json:"statement_descriptor"` |
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 as above
product.go
Outdated
URL string `json:"url"` | ||
Updated int64 `json:"updated"` | ||
Type string `json:"type"` |
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 as above
… => StatementDescriptor
Should close this in favor of: #518 |
👍 |
Summary
This PR implements upcoming changes to the way in which plan objects are created in the Stripe API. Specifically, it:
Testing
Tested against
stripe-mock
using as-yet unreleased spec- and fixture updates.r? @brandur-stripe @tmaxwell-stripe
cc @stripe/api-libraries