Feat: Add Organization Subscription-Preview Endpoint - #8245
Feat: Add Organization Subscription-Preview Endpoint#8245sbrown-livefront wants to merge 24 commits into
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #8245 +/- ##
==========================================
+ Coverage 63.64% 63.66% +0.02%
==========================================
Files 2430 2433 +3
Lines 104962 105067 +105
Branches 9506 9517 +11
==========================================
+ Hits 66798 66896 +98
- Misses 35868 35872 +4
- Partials 2296 2299 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
a72b6a3 to
72c51a8
Compare
ad72c4f to
6f86df0
Compare
🤖 Bitwarden Claude Code ReviewOverall Assessment: APPROVE Reviewed the new Code Review DetailsNo new findings. |
72c51a8 to
2bcc3d0
Compare
2bcc3d0 to
01a50dd
Compare
dd2eb84 to
400d063
Compare
BTreston
left a comment
There was a problem hiding this comment.
Approved for AC changes
01a50dd to
e58bcfd
Compare
…ionEndpointsHandler
df4eccc to
63e3371
Compare
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
amorask-bitwarden
left a comment
There was a problem hiding this comment.
Looks great, nice work.
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-39927
📔 Objective
First endpoint on the new
Bit.Subscriptions.Organizationfeature library and first consumer of the shared, Stripe-invoice-preview–driven cart summary. Sources the organization's upcoming-renewal cart totals from an actual Stripe invoice preview instead of reconstructing them from local subscription state.Adds:
GetSubscriptionPreviewQuery(Bit.Invoicing) — shared,ISubscriber-generic query ported fromGetBitwardenSubscriptionQuery. Resolves tier/cadence (collapsingTeamsStarter → Teams), previews viacreate_preview(subscription=id), falls back to the subscription overload when there's no upcoming invoice, and maps subscription status →SubscriptionPreviewenvelope (suspension/grace-period/cancel). Registered inAddInvoicing(). The Organization path is fully wired here; the User/Premium path is stubbed for Task 8.GET /organizations/{organizationId:guid}/billing/subscription/preview— new route on the org subscription group, gated behindPM36631_PreviewDrivenCart.AuthorizeAttribute<OrganizationBillingRequirement>using theIOrganizationRequirementframework (Owner or confirmed provider-user-for-org; excludes Admin/Custom). Lives entirely in theOrganizationAuthorizationlibrary — no dependency on theApiproject.