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 support for idempotency key on Stripe token API requests #1775

Merged
merged 1 commit into from
Nov 3, 2019

Conversation

mshafrir-stripe
Copy link
Collaborator

Summary

See Idempotent Requests

Motivation

Fixes #1025

Testing

Wrote integration tests

* @param callback a [ApiResultCallback] to receive the result or error
*/
@UiThread
fun createToken(card: Card, callback: ApiResultCallback<Token>) {
@JvmOverloads
fun createToken(

Choose a reason for hiding this comment

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

Out of curiosity... how does @jvmoverloads work for a function like this, where the 2nd arg is optional -- but the 3rd is not? Does a Java caller always need to specify idempotencyKey since it is positionally before a non optional argument?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@markfi-stripe good question. I verified that it works as intended - idempotencyKey becomes optional.

Screen Shot 2019-11-03 at 6 11 16 PM

@mshafrir-stripe mshafrir-stripe merged commit 2c2fbf7 into master Nov 3, 2019
@mshafrir-stripe mshafrir-stripe deleted the idempotency-key branch November 3, 2019 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing IdempotencyKey, Workaround?
4 participants