-
-
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
Open
gbp
wants to merge
18
commits into
stripe-api-upgrade
Choose a base branch
from
stripe-prices-refactor
base: stripe-api-upgrade
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
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
Replacing wrapped Stripe objects with new Pro Plan which includes Taxable. Pro Plan will be expanded in later commits while refactoring the checkout process.
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 if they start with the namespace or not.
gbp
force-pushed
the
stripe-prices-refactor
branch
from
October 18, 2024 10:32
0cd3bde
to
479c599
Compare
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-prices-refactor
branch
from
October 21, 2024 08:45
479c599
to
3604552
Compare
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]