-
Notifications
You must be signed in to change notification settings - Fork 658
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
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -401,13 +401,15 @@ class Stripe internal constructor( | |
* @param clientSecret the client_secret with which to retrieve the [PaymentIntent] | ||
* @param stripeAccountId Optional, the Connect account to associate with this request. | ||
* By default, will use the Connect account that was used to instantiate the `Stripe` object, if specified. | ||
* @param expand Optional, a list of keys to expand on the returned `PaymentIntent` object. | ||
* @param callback a [ApiResultCallback] to receive the result or error | ||
*/ | ||
@UiThread | ||
@JvmOverloads | ||
fun retrievePaymentIntent( | ||
clientSecret: String, | ||
stripeAccountId: String? = this.stripeAccountId, | ||
expand: List<String> = emptyList(), | ||
callback: ApiResultCallback<PaymentIntent> | ||
) { | ||
executeAsync(callback) { | ||
|
@@ -416,7 +418,8 @@ class Stripe internal constructor( | |
ApiRequest.Options( | ||
apiKey = publishableKey, | ||
stripeAccount = stripeAccountId | ||
) | ||
), | ||
expand, | ||
) | ||
} | ||
} | ||
|
@@ -431,6 +434,7 @@ class Stripe internal constructor( | |
* @param clientSecret the client_secret with which to retrieve the [PaymentIntent] | ||
* @param stripeAccountId Optional, the Connect account to associate with this request. | ||
* By default, will use the Connect account that was used to instantiate the `Stripe` object, if specified. | ||
* @param expand Optional, a list of keys to expand on the returned `PaymentIntent` object. | ||
* @return a [PaymentIntent] or `null` if a problem occurred | ||
*/ | ||
@Throws( | ||
|
@@ -443,15 +447,17 @@ class Stripe internal constructor( | |
@JvmOverloads | ||
fun retrievePaymentIntentSynchronous( | ||
clientSecret: String, | ||
stripeAccountId: String? = this.stripeAccountId | ||
stripeAccountId: String? = this.stripeAccountId, | ||
expand: List<String> = emptyList(), | ||
): PaymentIntent? { | ||
return runBlocking { | ||
stripeRepository.retrievePaymentIntent( | ||
PaymentIntent.ClientSecret(clientSecret).value, | ||
ApiRequest.Options( | ||
apiKey = publishableKey, | ||
stripeAccount = stripeAccountId | ||
) | ||
), | ||
expand, | ||
) | ||
} | ||
} | ||
|
@@ -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 | ||
* @param stripeAccountId Optional, the Connect account to associate with this request. | ||
* By default, will use the Connect account that was used to instantiate the `Stripe` object, if specified. | ||
*/ | ||
|
@@ -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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was also missing before. |
||
* @param stripeAccountId Optional, the Connect account to associate with this request. | ||
* By default, will use the Connect account that was used to instantiate the `Stripe` object, if specified. | ||
*/ | ||
|
@@ -683,6 +691,7 @@ class Stripe internal constructor( | |
* @param clientSecret the client_secret with which to retrieve the [SetupIntent] | ||
* @param stripeAccountId Optional, the Connect account to associate with this request. | ||
* By default, will use the Connect account that was used to instantiate the `Stripe` object, if specified. | ||
* @param expand Optional, a list of keys to expand on the returned `SetupIntent` object. | ||
* @param callback a [ApiResultCallback] to receive the result or error | ||
*/ | ||
@Throws( | ||
|
@@ -696,6 +705,7 @@ class Stripe internal constructor( | |
fun retrieveSetupIntent( | ||
clientSecret: String, | ||
stripeAccountId: String? = this.stripeAccountId, | ||
expand: List<String> = emptyList(), | ||
callback: ApiResultCallback<SetupIntent> | ||
) { | ||
executeAsync(callback) { | ||
|
@@ -704,7 +714,8 @@ class Stripe internal constructor( | |
ApiRequest.Options( | ||
apiKey = publishableKey, | ||
stripeAccount = stripeAccountId | ||
) | ||
), | ||
expand, | ||
) | ||
} | ||
} | ||
|
@@ -719,6 +730,7 @@ class Stripe internal constructor( | |
* @param clientSecret client_secret of the [SetupIntent] to retrieve | ||
* @param stripeAccountId Optional, the Connect account to associate with this request. | ||
* By default, will use the Connect account that was used to instantiate the `Stripe` object, if specified. | ||
* @param expand Optional, a list of keys to expand on the returned `SetupIntent` object. | ||
* @return a [SetupIntent] or `null` if a problem occurred | ||
*/ | ||
@Throws( | ||
|
@@ -731,15 +743,17 @@ class Stripe internal constructor( | |
@JvmOverloads | ||
fun retrieveSetupIntentSynchronous( | ||
clientSecret: String, | ||
stripeAccountId: String? = this.stripeAccountId | ||
stripeAccountId: String? = this.stripeAccountId, | ||
expand: List<String> = emptyList(), | ||
): SetupIntent? { | ||
return runBlocking { | ||
stripeRepository.retrieveSetupIntent( | ||
SetupIntent.ClientSecret(clientSecret).value, | ||
ApiRequest.Options( | ||
apiKey = publishableKey, | ||
stripeAccount = stripeAccountId | ||
) | ||
), | ||
expand, | ||
) | ||
} | ||
} | ||
|
This file contains 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
Oops, something went wrong.
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.
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.
This was missing before.