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

Sync default payment method to the backend #10172

Merged
merged 5 commits into from
Feb 18, 2025
Merged

Conversation

amk-stripe
Copy link
Collaborator

Summary

Sync default payment method to the backend

Motivation

https://jira.corp.stripe.com/browse/MOBILESDK-2688

Testing

  • Added tests
  • Modified tests
  • Manually verified

Copy link
Contributor

github-actions bot commented Feb 14, 2025

Diffuse output:

OLD: paymentsheet-example-release-master.apk (signature: V1, V2)
NEW: paymentsheet-example-release-pr.apk (signature: V1, V2)

          │           compressed           │         uncompressed         
          ├───────────┬───────────┬────────┼──────────┬──────────┬────────
 APK      │ old       │ new       │ diff   │ old      │ new      │ diff   
──────────┼───────────┼───────────┼────────┼──────────┼──────────┼────────
      dex │     4 MiB │     4 MiB │ +828 B │  8.8 MiB │  8.8 MiB │ +2 KiB 
     arsc │   2.4 MiB │   2.4 MiB │    0 B │  2.4 MiB │  2.4 MiB │    0 B 
 manifest │   5.1 KiB │   5.1 KiB │    0 B │ 25.7 KiB │ 25.7 KiB │    0 B 
      res │ 910.9 KiB │ 910.9 KiB │    0 B │  1.4 MiB │  1.4 MiB │    0 B 
   native │   2.6 MiB │   2.6 MiB │    0 B │    6 MiB │    6 MiB │    0 B 
    asset │   1.6 MiB │   1.6 MiB │   -6 B │  1.6 MiB │  1.6 MiB │   -6 B 
    other │   1.4 MiB │   1.4 MiB │  +10 B │  1.6 MiB │  1.6 MiB │    0 B 
──────────┼───────────┼───────────┼────────┼──────────┼──────────┼────────
    total │  12.8 MiB │  12.8 MiB │ +832 B │ 21.8 MiB │ 21.8 MiB │ +2 KiB 

 DEX     │ old   │ new   │ diff            
─────────┼───────┼───────┼─────────────────
   files │     1 │     1 │   0             
 strings │ 41276 │ 41282 │  +6 (+7 -1)     
   types │ 14294 │ 14298 │  +4 (+4 -0)     
 classes │ 11945 │ 11949 │  +4 (+4 -0)     
 methods │ 60621 │ 60633 │ +12 (+224 -212) 
  fields │ 40894 │ 40909 │ +15 (+199 -184) 

 ARSC    │ old  │ new  │ diff 
─────────┼──────┼──────┼──────
 configs │  243 │  243 │  0   
 entries │ 6250 │ 6250 │  0
APK
    compressed     │    uncompressed    │                                           
──────────┬────────┼───────────┬────────┤                                           
 size     │ diff   │ size      │ diff   │ path                                      
──────────┼────────┼───────────┼────────┼───────────────────────────────────────────
    4 MiB │ +828 B │   8.8 MiB │ +2 KiB │ ∆ classes.dex                             
 50.4 KiB │   +9 B │ 118.9 KiB │    0 B │ ∆ META-INF/MANIFEST.MF                    
  7.8 KiB │   -7 B │   7.6 KiB │   -7 B │ ∆ assets/dexopt/baseline.prof             
 53.7 KiB │   +3 B │   119 KiB │    0 B │ ∆ META-INF/CERT.SF                        
    271 B │   -1 B │     120 B │    0 B │ ∆ META-INF/version-control-info.textproto 
  1,012 B │   +1 B │     880 B │   +1 B │ ∆ assets/dexopt/baseline.profm            
  1.2 KiB │   -1 B │   1.2 KiB │    0 B │ ∆ META-INF/CERT.RSA                       
──────────┼────────┼───────────┼────────┼───────────────────────────────────────────
  4.1 MiB │ +832 B │     9 MiB │ +2 KiB │ (total)
DEX
STRINGS:

   old   │ new   │ diff       
  ───────┼───────┼────────────
   41276 │ 41282 │ +6 (+7 -1) 
  
  + /set_default_payment_method
  + LU6/W;
  + Lf8/r;
  + Lp5/O;
  + Lp5/P;
  + elements/customers/
  + ~~R8{"backend":"dex","compilation-mode":"release","has-checksums":false,"min-api":21,"pg-map-id":"08c7c65","r8-mode":"full","version":"8.7.14"}
  
  - ~~R8{"backend":"dex","compilation-mode":"release","has-checksums":false,"min-api":21,"pg-map-id":"439c851","r8-mode":"full","version":"8.7.14"}
  

TYPES:

   old   │ new   │ diff       
  ───────┼───────┼────────────
   14294 │ 14298 │ +4 (+4 -0) 
  
  + LU6/W;
  + Lf8/r;
  + Lp5/O;
  + Lp5/P;
  

METHODS:

   old   │ new   │ diff            
  ───────┼───────┼─────────────────
   60621 │ 60633 │ +12 (+224 -212) 
  
  + A5.n <init>(W, j, c, h, h, h)
  + A5.n <init>(W, h, h, j, h, h)
  + C.E0 D() → V
  + I4.M <init>(Application, h, V, boolean, i)
  + S9.s <init>(V)
  + U6.A <init>(V, c)
  + U6.B <init>(V, c)
  + U6.C <init>(V, c)
  + U6.D <init>(V, c)
  + U6.E <init>(V, c)
  + U6.F <init>(V, c)
  + U6.G <init>(V, c)
  + U6.H <init>(V, c)
  + U6.I <init>(V, c)
  + U6.J <init>(V, c)
  + U6.K <init>(V, c)
  + U6.L <init>(V, c)
  + U6.M <init>(V, c)
  + U6.N <init>(V, c)
  + U6.O <init>(V, c)
  + U6.P <init>(V, c)
  + U6.Q <init>(V, c)
  + U6.S <init>(V, c)
  + U6.T <init>(V, c)
  + U6.U <init>(V, c)
  + U6.U o(Object) → Object
  + U6.V <clinit>()
  + U6.V <init>(Context, a, d, i, Set, p, b, int)
  + U6.V <init>(Context, a, i, Set, b, p, d)
  + U6.V A(String, k, c) → Object
  + U6.V B(l, c, c) → Object
  + U6.V C(Map, S1, H2) → Map
  + U6.V D(o, k, c) → Object
  + U6.V E(String, k, c) → Object
  + U6.V F(String, k, c) → Object
  + U6.V G(k, Map, c) → Object
  + U6.V H(k, String, Set, c) → Object
  + U6.V I(z0, k, c) → Object
  + U6.V J(z0, k, c) → Object
  + U6.V K(String, k, List, c) → Object
  + U6.V L(String, k, List, c) → Object
  + U6.V M(String, k, List, c) → Object
  + U6.V N(k, String, String, c) → Object
  + U6.V O(String, String, Map, k, c) → Object
  + U6.V P(M2, k, c) → Object
  + U6.V Q(String, C, k, c) → Object
  + U6.V R(String, e2, k, c) → Object
  + U6.V a(String, String, String, k, List, c) → Object
  + U6.V b(String, String, String, k, List, c) → Object
  + U6.V c(String, Set, String, k, c) → Object
  + U6.V d(Set) → String
  + U6.V e(k, String, String, c) → Object
  + U6.V f(k, String, String, c) → Object
  + U6.V g(String, k, c) → Object
  + U6.V h(o, k, List, c) → Object
  + U6.V i(o, k, List, c) → Object
  + U6.V j(p, k, List, c) → Object
  + U6.V k(String, List) → LinkedHashMap
  + U6.V l(T, k, c) → Object
  + U6.V m(String, W, k, c) → Object
  + U6.V n(S1, k, c) → Object
  + U6.V o(String, W, k, c) → Object
  + U6.V p(k, String, String, c) → Object
  + U6.V q(k, String, Set, c) → Object
  + U6.V r(String, Set, String, k, c) → Object
  + U6.V s(l, b, c, c) → Object
  + U6.V t(PaymentAnalyticsEvent)
  + U6.V u()
  + U6.V v(a, k, c) → Object
  + U6.V w(Object) → String
  + U6.V x(L0, Set, k, c) → Object
  + U6.V y(W)
  + U6.V z(k, String, Set, c) → Object
  + U6.W <init>(h, h, h, h, h, h, h, int)
  + U6.W get() → Object
  + U6.d <init>(V, Set, int)
  + U6.e <init>(V, int)
  + U6.f <init>(V, d)
  + U6.j <init>(V, c)
  + U6.k <init>(V, c)
  + U6.l <init>(V, c)
  + U6.m <init>(V, c)
  + U6.n <init>(V, c)
  + U6.o <init>(V, c)
  + U6.p <init>(V, c)
  + U6.q <init>(V, c)
  + U6.r <init>(V, c)
  + U6.s <init>(V, c)
  + U6.t <init>(V, c)
  + U6.u <init>(V, c)
  + U6.v <init>(V, c)
  + U6.w <init>(V, c)
  + U6.x <init>(V, c)
  + U6.y <init>(V, c)
  + U6.z <init>(V, c)
  + c7.j <init>(V, f, boolean, a, a)
  + com.stripe.android.link.WebLinkActivityContract <init>(V, f)
  + f8.a <init>(k, c)
  + f8.b <init>(k, c)
  + f8.c <init>(k, c)
  + f8.d <init>(D1, k, l, ArrayList, d)
  + f8.e <init>(k, c)
  + f8.f <init>(k, l, v1, d)
  + f8.g <init>(List, k, l, boolean, d)
  + f8.h <init>(k, c)
  + f8.i <init>(k, c)
  + f8.j <init>(k, c)
  + f8.j o(Object) → Object
  + f8.k <init>(V, a, d, f, i, Set)
  + f8.k a(l, String, c) → Object
  + f8.k b(l, String, boolean, c) → Object
  + f8.k c(k, l, String, c) → Object
  + f8.k d(l, List, boolean, c) → Object
  + f8.k e(l, c) → Object
  + f8.k f(l, String, c) → Object
  + f8.k g(l, String, e2, c) → Object
  + f8.l <init>(String, String, String)
  + f8.l equals(Object) → boolean
  + f8.l hashCode() → int
  + f8.l toString() → String
  + f8.m <init>(String, Throwable)
  + f8.n <init>(List)
  + f8.n getMessage() → String
  +
...✂

@amk-stripe amk-stripe force-pushed the set-default-via-backend branch from e56c280 to 0c72ca7 Compare February 14, 2025 18:14
@amk-stripe amk-stripe marked this pull request as ready for review February 14, 2025 20:02
@amk-stripe amk-stripe requested review from a team as code owners February 14, 2025 20:02
samer-stripe
samer-stripe previously approved these changes Feb 18, 2025
"https://api.stripe.com/v1/elements/customers/$customerId/set_default_payment_method"
)
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a unit test for the parameters as well? The parameters tests are found found below the URL tests.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes! Just added a couple

samer-stripe
samer-stripe previously approved these changes Feb 18, 2025
@amk-stripe amk-stripe merged commit bd3790c into master Feb 18, 2025
16 checks passed
@amk-stripe amk-stripe deleted the set-default-via-backend branch February 18, 2025 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants