Skip to content
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

Add detachPaymentMethodAndDuplicates extension function. #8467

Merged
merged 2 commits into from
May 15, 2024

Conversation

samer-stripe
Copy link
Collaborator

Summary

Add detachPaymentMethodAndDuplicates extension function.

Motivation

Helps ensure when using CustomerSession, any Stripe payment methods that are effectively duplicates are removed from the Stripe API since CustomerSession dedupes these payment methods. I chose to build it out this way to ensure we know exactly what payment methods were successfully removed and see if we need to swap in a duplicate payment method that failed to detach in place of the originally selected payment method we wanted to remove which was removed successfully.

In the future, this will be replaced by a detach endpoint that we can reference.

Testing

  • Added tests
  • Modified tests
  • Manually verified

@samer-stripe samer-stripe requested review from a team as code owners May 15, 2024 16:52
@samer-stripe samer-stripe requested review from ccen-stripe, jaynewstrom-stripe and amk-stripe and removed request for ccen-stripe May 15, 2024 16:52
Copy link
Contributor

github-actions bot commented May 15, 2024

Diffuse output:

OLD: identity-example-release-base.apk (signature: V1, V2)
NEW: identity-example-release-pr.apk (signature: V1, V2)

          │          compressed          │         uncompressed         
          ├───────────┬───────────┬──────┼───────────┬───────────┬──────
 APK      │ old       │ new       │ diff │ old       │ new       │ diff 
──────────┼───────────┼───────────┼──────┼───────────┼───────────┼──────
      dex │     2 MiB │     2 MiB │  0 B │   4.3 MiB │   4.3 MiB │  0 B 
     arsc │     1 MiB │     1 MiB │  0 B │     1 MiB │     1 MiB │  0 B 
 manifest │   2.3 KiB │   2.3 KiB │  0 B │   8.1 KiB │   8.1 KiB │  0 B 
      res │ 301.5 KiB │ 301.5 KiB │  0 B │   455 KiB │   455 KiB │  0 B 
   native │   7.3 MiB │   7.3 MiB │  0 B │  18.4 MiB │  18.4 MiB │  0 B 
    asset │   1.5 MiB │   1.5 MiB │  0 B │   1.5 MiB │   1.5 MiB │  0 B 
    other │    87 KiB │    87 KiB │ +5 B │ 161.5 KiB │ 161.5 KiB │  0 B 
──────────┼───────────┼───────────┼──────┼───────────┼───────────┼──────
    total │  12.2 MiB │  12.2 MiB │ +5 B │  25.8 MiB │  25.8 MiB │  0 B 

 DEX     │ old   │ new   │ diff      
─────────┼───────┼───────┼───────────
   files │     1 │     1 │ 0         
 strings │ 21686 │ 21686 │ 0 (+0 -0) 
   types │  6869 │  6869 │ 0 (+0 -0) 
 classes │  5634 │  5634 │ 0 (+0 -0) 
 methods │ 31447 │ 31447 │ 0 (+0 -0) 
  fields │ 18315 │ 18315 │ 0 (+0 -0) 

 ARSC    │ old  │ new  │ diff 
─────────┼──────┼──────┼──────
 configs │  164 │  164 │  0   
 entries │ 3404 │ 3404 │  0
APK
   compressed    │  uncompressed   │                        
──────────┬──────┼──────────┬──────┤                        
 size     │ diff │ size     │ diff │ path                   
──────────┼──────┼──────────┼──────┼────────────────────────
 25.9 KiB │ +3 B │ 63.9 KiB │  0 B │ ∆ META-INF/MANIFEST.MF 
  1.2 KiB │ +2 B │  1.2 KiB │  0 B │ ∆ META-INF/CERT.RSA    
──────────┼──────┼──────────┼──────┼────────────────────────
   27 KiB │ +5 B │ 65.1 KiB │  0 B │ (total)

@samer-stripe samer-stripe force-pushed the samer/add-remove-duplicates-extension-function branch from c9d63f3 to a1a48c2 Compare May 15, 2024 20:23
@samer-stripe samer-stripe merged commit 6d5c460 into master May 15, 2024
12 checks passed
@samer-stripe samer-stripe deleted the samer/add-remove-duplicates-extension-function branch May 15, 2024 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants