[PM-36225] Upgrade Stripe SDK to 51.1.0#7643
Draft
sbrown-livefront wants to merge 12 commits into
Draft
Conversation
…h Source.Coupon path
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #7643 +/- ##
==========================================
+ Coverage 59.84% 59.85% +0.01%
==========================================
Files 2121 2121
Lines 93460 93502 +42
Branches 8291 8294 +3
==========================================
+ Hits 55932 55967 +35
- Misses 35547 35549 +2
- Partials 1981 1986 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
This file contains hidden or 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
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.



🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-36225
📔 Objective
Introduces updates across the billing codebase to support Stripe's new discount object structure and to explicitly set the billing mode to "classic" for all relevant Stripe API calls. The changes ensure compatibility with Stripe's evolving API and prevent potential issues with discount handling and subscription creation. The most important changes are grouped below:
Stripe Discount Object Updates:
discount.Source.Couponinstead of the deprecateddiscount.Coupon, aligning with Stripe's new discount object structure. This affects discount application, validation, and coupon ID/percent retrieval across services, extensions, and tests.Explicit Billing Mode Configuration:
BillingModeproperty withType = StripeConstants.BillingMode.Classicto all Stripe subscription, invoice, and session creation options to ensure the correct billing mode is used and to prepare for future Stripe API requirements.Constants and Supporting Types:
StripeConstants.BillingModewithClassicandFlexibleoptions for consistent usage throughout the codebase.Stripe Object Null Property Settings
Updated
Expandparameters and coupon lookups to use the new discount structure in queries and commands.Notes:
Paths Tested
📸 Screenshots