-
Notifications
You must be signed in to change notification settings - Fork 32
feat: Fallback to Customer Address if default payment method address doesn't exist #3878
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
Conversation
… address doesnt exist
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3878 +/- ##
=======================================
Coverage 98.72% 98.72%
=======================================
Files 827 827
Lines 15029 15029
Branches 4304 4305 +1
=======================================
Hits 14838 14838
Misses 184 184
Partials 7 7
Continue to review full report in Codecov by Sentry.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. @@ Coverage Diff @@
## main #3878 +/- ##
=======================================
Coverage 98.72% 98.72%
=======================================
Files 827 827
Lines 15029 15029
Branches 4296 4305 +9
=======================================
Hits 14838 14838
Misses 184 184
Partials 7 7
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
Codecov ReportAll modified and coverable lines are covered by tests ✅ ✅ All tests successful. No failed tests found. @@ Coverage Diff @@
## main #3878 +/- ##
=======================================
Coverage 98.72% 98.72%
=======================================
Files 827 827
Lines 15029 15029
Branches 4304 4305 +1
=======================================
Hits 14838 14838
Misses 184 184
Partials 7 7
Continue to review full report in Codecov by Sentry.
|
Bundle ReportChanges will increase total bundle size by 256 bytes (0.0%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: gazebo-staging-systemAssets Changed:
Files in
Files in
view changes for bundle: gazebo-staging-esmAssets Changed:
Files in
Files in
|
Bundle ReportChanges will increase total bundle size by 256 bytes (0.0%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: gazebo-production-systemAssets Changed:
Files in
Files in
view changes for bundle: gazebo-production-esmAssets Changed:
Files in
Files in
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. @@ Coverage Diff @@
## main #3878 +/- ##
=======================================
Coverage 98.72% 98.72%
=======================================
Files 827 827
Lines 15029 15029
Branches 4296 4305 +9
=======================================
Hits 14838 14838
Misses 184 184
Partials 7 7
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
✅ Sentry found no issues in your recent changes ✅ |
✅ Deploy preview for gazebo ready!Previews expire after 1 month automatically.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice thanks for doing this. Looks like we're good to get the dependent version of api deployed in all environments (incl dec) before / with this gazebo PR so good to go there
@@ -102,7 +104,7 @@ export const SubscriptionDetailSchema = z | |||
expires: z.number().nullable(), | |||
}) | |||
.nullish(), | |||
email: z.string(), | |||
name: z.string().nullable(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is name nullish
? I feel like I've seen it undefined in the past
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It actually should have always been undefined in the past because it was never on the StripeSerializer to begin with, but based off the stripe docs, they call it nullable: https://docs.stripe.com/api/customers/object
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah got it, cool. As long as all our code in-between continues to treat it as null
should be good to go. Worst case if we see it error can make adjustments as it comes up haha
Description
This PR adds a fallback mechanism to the address component to use the "customer address" if that exists instead. This is actually what stripe / we do under the hood anyway, we just want to make it clear to the customer as well.
FYI If the customer changes their billing address using this form, both their customer address AND the default payment method address are set.
Relates to codecov/umbrella#189
Screenshot of new params coming in and successful account-details zod parsing
Link to Sample Entry
Legal Boilerplate
Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. In 2022 this entity acquired Codecov and as result Sentry is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.