Skip to content
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

Add support for the most recent API version #639

Merged
merged 1 commit into from
Jul 30, 2018

Conversation

remi-stripe
Copy link
Contributor

This ensures the most recent API version is set in stripe-go as there were a few breaking changes.

  • Move to API version 2018-07-27
  • Remove SKUs list on the product
  • Remove the ability to pass a Source on subscription creation/update
  • Change percent_off on the coupon from int to float

r? @brandur-stripe
cc @stripe/api-libraries

coupon.go Outdated
Name *string `form:"name"`
PercentOff *int64 `form:"percent_off"`
RedeemBy *int64 `form:"redeem_by"`
AmountOff *float64 `form:"amount_off"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was changing AmountOff and not PercentOff in parameters intentional? It kind of looks like they should both be the same (and I would've thought they'd be floats themselves, but integers seem to still be recommended in the docs).

ptal @remi-stripe

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@brandur-stripe Sorry, I changed the wrong one I think. Only percent_off should be a float. It's for the latest API version we did: https://stripe.com/docs/upgrades#2018-07-27

The percent_off field of coupons was changed from Integer to Float, with a precision of two decimal places.

* Move to API version 2018-07-27
* Remove SKUs list on the product
* Remove the ability to pass a Source on subscription creation/update
* Change percent_off on the coupon from int to float
@remi-stripe remi-stripe force-pushed the remi-add-latest-api-version branch from 58c63cb to 258c75a Compare July 30, 2018 15:49
@remi-stripe
Copy link
Contributor Author

@brandur-stripe Sorry for the mixup, I fixed the issue and changed percent_off as expected. amount_off is still an int64 since it's always the amount in the smallest denomination for the currency

@brandur-stripe
Copy link
Contributor

Ah yes, that looks right now. Thanks!

@brandur-stripe brandur-stripe merged commit 42322ef into master Jul 30, 2018
@brandur-stripe brandur-stripe deleted the remi-add-latest-api-version branch July 30, 2018 18:26
@brandur-stripe
Copy link
Contributor

Released as 37.0.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants