-
-
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 refactorings #8407
Closed
Closed
Stripe refactorings #8407
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gbp
force-pushed
the
stripe-prices-refactor
branch
2 times, most recently
from
October 21, 2024 08:45
479c599
to
3604552
Compare
gbp
force-pushed
the
stripe-prices-refactor
branch
2 times, most recently
from
November 5, 2024 15:56
d1e9029
to
a030c3c
Compare
Merged
dracos
reviewed
Nov 7, 2024
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.
Looks good :) I left a few tiny comments is all.
gbp
force-pushed
the
stripe-prices-refactor
branch
2 times, most recently
from
November 11, 2024 12:44
c61fd03
to
7ada4b3
Compare
gbp
force-pushed
the
stripe-prices-refactor
branch
from
November 11, 2024 12:51
7ada4b3
to
0994a53
Compare
Replacing wrapped Stripe objects with new Pro Plan which includes Taxable. Pro Plan will be expanded in later commits while refactoring the checkout process.
We're always returning integers there is no need to convert to floats and back again. This can introduce rounding errors.
Check in object respond to the method before forwarding. This is needed to fix exceptions such as: private method `BigDecimal' called for #<Stripe::Subscription...
Load and cache subscription.plan, automatically wrapping in our Pro Plan class.
Automatically include Pro SubscriptionWithDiscount so we don't have to manually wrap the instances in the controller.
This really isn't needed now this module is included in Pro Subscription.
Use whole integers instead of floats which can cause rounding errors.
Change to `#discounted_amount` to better represent when this method is returning.
Move Discount module under Pro Subscription namespace.
- Show discount price and name instead of coupon code - Remove leading space around billing date - Minor CSS layout changes to ensure subscription sign up and subscription show views are consistent.
Improve billing frequency helper method: 1. accept Stripe Plan as and argument 2. take into account plans interval count 3. work with all interval types Add billing interval helper method to output `per user, per month` or `per user, every 2 months` depending on how the Stripe Plan has been configured.
Handle strings correctly irrespective of whether they start with the namespace or not.
Allowing us to simplify the controller actions so we're always dealing with Plan objects.
Again simplify controllers by moving coupons loading into delegated classes.
Further simplification of controllers by moving default source handling into a delegated class.
gbp
force-pushed
the
stripe-api-upgrade
branch
from
November 18, 2024 15:20
eb0f277
to
157d9bf
Compare
gbp
force-pushed
the
stripe-prices-refactor
branch
from
November 18, 2024 15:20
0994a53
to
d3f4625
Compare
Merged in 63bba9f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this do?
Refactor Stripe wrappers classes and minor template updates.
Why was this needed?
Help with future migration to Stripe Prices.
[skip changelog]