-
Notifications
You must be signed in to change notification settings - Fork 10
feat: Add billing rate and base unit price fields to account details scheduledPhase payload #569
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #569 +/- ##
=======================================
Coverage 93.85% 93.85%
=======================================
Files 1284 1284
Lines 46428 46446 +18
Branches 1524 1524
=======================================
+ Hits 43574 43593 +19
+ Misses 2545 2544 -1
Partials 309 309
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Adding "billing rate" and "base unit price" fields to the account-details endpoint's
scheduledPhasepayload to give frontend the necessary information to fix https://linear.app/getsentry/issue/CCMRG-1859/billing-display-mismatch with an accurate calculation. To fix the calculation for the cases where the upcoming plan has a different billing rate or price (like if they switch plans), we will need to use the next billing cycle's billing rate and price in the calculation. We are currently incorrectly using the current plan's information instead of upcoming.Note
Adds
billing_rateandbase_unit_pricetoschedule_detail.scheduled_phase, caches plan lookups, and gracefully handles missing plans with a warning; updates tests accordingly.StripeScheduledPhaseSerializer:billing_ratefield derived fromPlan.billing_rate.base_unit_pricefield derived fromPlan.base_unit_price.Planlookup via_get_plan_object.Noneforplanandbilling_rateif Stripe plan not found; log warning.billing_rateinschedule_detail.scheduled_phase.Nonefields and logs warning).Written by Cursor Bugbot for commit 522d998. This will update automatically on new commits. Configure here.