-
-
Notifications
You must be signed in to change notification settings - Fork 195
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
Stripe API upgrade #8405
base: develop
Are you sure you want to change the base?
Stripe API upgrade #8405
Conversation
https://docs.stripe.com/changelog/2019-03-14/renames-date-field-invoices-created
Need to change
Should also add test examples to catch this. |
https://docs.stripe.com/changelog/2018-02-05/plans-link-individual-products-several-fields-moved
Need to change
Should also add test examples to catch this. |
https://docs.stripe.com/changelog/2018-07-27/coupons-use-floats-specify-percent-off
Need to check the calculations in alaveteli/app/models/alaveteli_pro/subscription_with_discount.rb Lines 74 to 80 in fb4d9f5
|
Use Stripe mocks instead of doubles. Ideally this would mean if the attributes change upstream we get test failures, unfortunately this doesn't appear to happen due to how stripe-ruby-mock works.
Bumps the API version to the latest version support by stripe-ruby-mock. Also remove gem lock allowing us to upgrade both stripe-ruby-mock and the main stripe gem. Fixes broken tests and other changes which aren't testable, such as: 1. Invoice#date being rename Invoice#created 2. Plan#name being moved to Plan#product & Product#name and not loaded/ expanded automatically.
These have been replaced with calls to `create` or `update`.
75cc85b
to
499acb0
Compare
The above comments have been addressed. While I can write failing tests for them (stripe-ruby-mock doesn't enforce valid attributes, and it does expand Stripe resources) I have ensured they are all fixed. |
What does this do?
Upgrades the Stripe API version used.
Why was this needed?
To hopefully help in migrating from Stripe plans to prices which in turn will help us add new prices and change existing subscriptions.