Repository navigation
feat: add subscription proration and the preview endpoint - #13
Conversation
Regenerated from OpenAPI v1.12.1: prorate and next_payment_at on update, last_proration and last_proration_at on Subscription, and subscriptions.preview().
Optional request bodies are keyword arguments, and refund_reason needs the PaymentRefundReason model with an enum value.
|
Understand this PR’s impact Explore downstream dependencies and potential security impact with Blast Radius. Warning Review limit reached
This review includes 119 billable files and costs up to $29.75.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 15 minutes for your next included review. View limit detailsLimit details: You’ve used all 5 included reviews currently available. Your 18 included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Essentials Run ID: 📒 Files selected for processing (119)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Essentials Run ID: 📒 Files selected for processing (126)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
Included review availability: 0 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour. 📝 WalkthroughWalkthroughThe SDK updates generated OpenAPI metadata to version 1.12.1 and adds subscription preview models, endpoint support, proration fields, exports, manifests, and tests. It also updates payment expiration documentation and the refund example. ChangesSubscription preview and proration
Generated package metadata
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Feature 🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✨ Finishing Touches✨ Simplify code
Comment |
Documents the remaining prorate rejections: Bizum, prorate with nothing to settle, an interval change over a pending cancel/pause/skip, and a refund on an account with refunds disabled.
Regenerated from OpenAPI v1.12.1.
prorateandnext_payment_atonUpdateSubscriptionRequestlast_prorationandlast_proration_atonSubscriptionsubscriptions.preview(id, PreviewSubscriptionUpdateRequest), with a test at the HTTP layer (method, path, camelCase body). The existing subscription tests patch the API method itself, so they would not catch a wrong path.refund_reasonneedsPaymentRefundReason(...)with an enum value. It raisedTypeErrorbefore.Summary by CodeRabbit