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 expand argument to various methods on Stripe #5938

Merged
merged 5 commits into from
Dec 12, 2022

Conversation

tillh-stripe
Copy link
Collaborator

@tillh-stripe tillh-stripe commented Dec 9, 2022

Summary

This pull request adds an expand argument to various methods on Stripe, defaulting to an empty list.

Motivation

RUN_MOBILESDK-1115

Testing

  • Added tests
  • Modified tests
  • Manually verified

Screenshots

Before After
before screenshot after screenshot
N/A

Changelog

[ADDED] [CHANGED] Methods on Stripe for retrieving and confirming intents now accept an optional expand argument to expand fields in the response.

@tillh-stripe tillh-stripe force-pushed the tillh/stripe-expand-argument branch from 277eb0b to 349ff87 Compare December 9, 2022 19:40
CHANGELOG.md Outdated Show resolved Hide resolved
@@ -517,6 +523,7 @@ class Stripe internal constructor(
* | Custom return_url | WebView | WebView | WebView |
*
* @param activity the `Activity` that is launching the payment authentication flow
* @param confirmSetupIntentParams a set of params with which to confirm the Setup Intent
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This was missing before.

@@ -558,6 +565,7 @@ class Stripe internal constructor(
* | Custom return_url | WebView | WebView | WebView |
*
* @param fragment the `Fragment` that is launching the payment authentication flow
* @param confirmSetupIntentParams a set of params with which to confirm the Setup Intent
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This was also missing before.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 9, 2022

Diffuse output:

OLD: paymentsheet-example-release-master.apk (signature: none)
NEW: paymentsheet-example-release-pr.apk (signature: none)

          │           compressed           │           uncompressed           
          ├──────────┬──────────┬──────────┼───────────┬───────────┬──────────
 APK      │ old      │ new      │ diff     │ old       │ new       │ diff     
──────────┼──────────┼──────────┼──────────┼───────────┼───────────┼──────────
      dex │  5.7 MiB │  5.7 MiB │   +438 B │  14.9 MiB │  14.9 MiB │   +1 KiB 
     arsc │    2 MiB │    2 MiB │      0 B │     2 MiB │     2 MiB │      0 B 
 manifest │  4.4 KiB │  4.4 KiB │      0 B │  20.8 KiB │  20.8 KiB │      0 B 
      res │  1.1 MiB │  1.1 MiB │      0 B │   1.8 MiB │   1.8 MiB │      0 B 
   native │  2.6 MiB │  2.6 MiB │      0 B │     6 MiB │     6 MiB │      0 B 
    asset │    3 MiB │    3 MiB │ +1.5 KiB │     3 MiB │     3 MiB │ +1.5 KiB 
    other │ 82.9 KiB │ 82.9 KiB │      0 B │ 158.3 KiB │ 158.3 KiB │      0 B 
──────────┼──────────┼──────────┼──────────┼───────────┼───────────┼──────────
    total │ 14.4 MiB │ 14.4 MiB │ +1.9 KiB │  27.9 MiB │  27.9 MiB │ +2.5 KiB 

         │          raw           │             unique             
         ├────────┬────────┬──────┼────────┬────────┬──────────────
 DEX     │ old    │ new    │ diff │ old    │ new    │ diff         
─────────┼────────┼────────┼──────┼────────┼────────┼──────────────
   files │      2 │      2 │    0 │        │        │              
 strings │  91366 │  91367 │   +1 │  76580 │  76581 │ +1 (+1 -0)   
   types │  24250 │  24250 │    0 │  21877 │  21877 │  0 (+0 -0)   
 classes │  19740 │  19740 │    0 │  19740 │  19740 │  0 (+0 -0)   
 methods │ 104015 │ 104020 │   +5 │  99677 │  99681 │ +4 (+18 -14) 
  fields │ 104185 │ 104189 │   +4 │ 102843 │ 102847 │ +4 (+4 -0)   

 ARSC    │ old  │ new  │ diff 
─────────┼──────┼──────┼──────
 configs │  334 │  334 │  0   
 entries │ 6421 │ 6421 │  0
APK
     compressed     │    uncompressed    │                                
─────────┬──────────┼─────────┬──────────┤                                
 size    │ diff     │ size    │ diff     │ path                           
─────────┼──────────┼─────────┼──────────┼────────────────────────────────
 8.3 KiB │ +1.5 KiB │ 8.2 KiB │ +1.5 KiB │ ∆ assets/dexopt/baseline.prof  
 3.5 MiB │   +438 B │   9 MiB │   +1 KiB │ ∆ classes.dex                  
   805 B │     +4 B │   673 B │     +4 B │ ∆ assets/dexopt/baseline.profm 
─────────┼──────────┼─────────┼──────────┼────────────────────────────────
 3.6 MiB │ +1.9 KiB │   9 MiB │ +2.5 KiB │ (total)
DEX
STRINGS:

   old   │ new   │ diff       
  ───────┼───────┼────────────
   76580 │ 76581 │ +1 (+1 -0) 
  + _expand
  

METHODS:

   old   │ new   │ diff         
  ───────┼───────┼──────────────
   99677 │ 99681 │ +4 (+18 -14) 
  + com.stripe.android.Stripe_retrievePaymentIntent_1 <init>(Stripe, String, String, List, d)
  + com.stripe.android.Stripe_retrievePaymentIntentSynchronous_1 <init>(Stripe, String, String, List, d)
  + com.stripe.android.Stripe_retrieveSetupIntent_1 <init>(Stripe, String, String, List, d)
  + com.stripe.android.Stripe_retrieveSetupIntentSynchronous_1 <init>(Stripe, String, String, List, d)
  + com.stripe.android.Stripe retrievePaymentIntent(String, String, List, ApiResultCallback)
  + com.stripe.android.Stripe retrievePaymentIntent_default(Stripe, String, String, List, ApiResultCallback, int, Object)
  + com.stripe.android.Stripe retrievePaymentIntentSynchronous(String, String, List) → PaymentIntent
  + com.stripe.android.Stripe retrievePaymentIntentSynchronous_default(Stripe, String, String, List, int, Object) → PaymentIntent
  + com.stripe.android.Stripe retrieveSetupIntent(String, String, List, ApiResultCallback)
  + com.stripe.android.Stripe retrieveSetupIntent_default(Stripe, String, String, List, ApiResultCallback, int, Object)
  + com.stripe.android.Stripe retrieveSetupIntentSynchronous(String, String, List) → SetupIntent
  + com.stripe.android.Stripe retrieveSetupIntentSynchronous_default(Stripe, String, String, List, int, Object) → SetupIntent
  + com.stripe.android.StripeKtxKt confirmSetupIntent(Stripe, ConfirmSetupIntentParams, String, List, d) → Object
  + com.stripe.android.StripeKtxKt confirmSetupIntent_default(Stripe, ConfirmSetupIntentParams, String, List, d, int, Object) → Object
  + com.stripe.android.StripeKtxKt retrievePaymentIntent(Stripe, String, String, List, d) → Object
  + com.stripe.android.StripeKtxKt retrievePaymentIntent_default(Stripe, String, String, List, d, int, Object) → Object
  + com.stripe.android.StripeKtxKt retrieveSetupIntent(Stripe, String, String, List, d) → Object
  + com.stripe.android.StripeKtxKt retrieveSetupIntent_default(Stripe, String, String, List, d, int, Object) → Object
  
  - com.stripe.android.Stripe_retrievePaymentIntent_1 <init>(Stripe, String, String, d)
  - com.stripe.android.Stripe_retrievePaymentIntentSynchronous_1 <init>(Stripe, String, String, d)
  - com.stripe.android.Stripe_retrieveSetupIntent_1 <init>(Stripe, String, String, d)
  - com.stripe.android.Stripe_retrieveSetupIntentSynchronous_1 <init>(Stripe, String, String, d)
  - com.stripe.android.Stripe retrievePaymentIntent_default(Stripe, String, String, ApiResultCallback, int, Object)
  - com.stripe.android.Stripe retrievePaymentIntentSynchronous_default(Stripe, String, String, int, Object) → PaymentIntent
  - com.stripe.android.Stripe retrieveSetupIntent_default(Stripe, String, String, ApiResultCallback, int, Object)
  - com.stripe.android.Stripe retrieveSetupIntentSynchronous_default(Stripe, String, String, int, Object) → SetupIntent
  - com.stripe.android.StripeKtxKt confirmSetupIntent(Stripe, ConfirmSetupIntentParams, String, d) → Object
  - com.stripe.android.StripeKtxKt confirmSetupIntent_default(Stripe, ConfirmSetupIntentParams, String, d, int, Object) → Object
  - com.stripe.android.StripeKtxKt retrievePaymentIntent(Stripe, String, String, d) → Object
  - com.stripe.android.StripeKtxKt retrievePaymentIntent_default(Stripe, String, String, d, int, Object) → Object
  - com.stripe.android.StripeKtxKt retrieveSetupIntent(Stripe, String, String, d) → Object
  - com.stripe.android.StripeKtxKt retrieveSetupIntent_default(Stripe, String, String, d, int, Object) → Object
  

FIELDS:

   old    │ new    │ diff       
  ────────┼────────┼────────────
   102843 │ 102847 │ +4 (+4 -0) 
  + com.stripe.android.Stripe_retrievePaymentIntent_1 _expand: List
  + com.stripe.android.Stripe_retrievePaymentIntentSynchronous_1 _expand: List
  + com.stripe.android.Stripe_retrieveSetupIntent_1 _expand: List
  + com.stripe.android.Stripe_retrieveSetupIntentSynchronous_1 _expand: List

Copy link
Collaborator

@jaynewstrom-stripe jaynewstrom-stripe left a comment

Choose a reason for hiding this comment

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

LGTM, would be nice to add a test if possible.

jameswoo-stripe
jameswoo-stripe previously approved these changes Dec 9, 2022
@tillh-stripe tillh-stripe merged commit b416061 into master Dec 12, 2022
@tillh-stripe tillh-stripe deleted the tillh/stripe-expand-argument branch December 12, 2022 15:24
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.

3 participants