Add subscription quantity support#200
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (9)
📝 WalkthroughWalkthroughSubscription contracts, Stripe provider calls, and subscription-service flows now carry quantity through checkout, direct subscription changes, scheduled activation, webhook reconciliation, and stored subscription updates. Schema and service tests cover the new quantity handling. ChangesSubscription quantity propagation
Sequence Diagram(s)sequenceDiagram
participant subscribeToPlan
participant handleQuantityChange
participant PaymentProvider
participant PayKitDatabase
subscribeToPlan->>handleQuantityChange: same plan, different quantity
handleQuantityChange->>PaymentProvider: updateSubscription(quantity)
PaymentProvider-->>handleQuantityChange: updated subscription data
handleQuantityChange->>PayKitDatabase: sync quantity and billing state
handleQuantityChange-->>subscribeToPlan: subscribe result
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Superseded by #201 with a cleaner branch name. |
Summary
Out of scope
Test Plan
Summary by cubic
Add end-to-end subscription quantity support. Quantity flows from the subscribe API through Stripe Checkout/create/update/scheduled changes, and is stored and synced in the local subscription.
New Features
Migration
createSubscriptionCheckout,createSubscription,updateSubscription, andscheduleSubscriptionChange. Update custom providers/callers accordingly.subscribeendpoint, no changes are required (quantity defaults to 1).Written for commit e7a75e8. Summary will update on new commits.
Summary by CodeRabbit