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

Introduce suspend fun for Stripe Android SDK - part1 #3557

Merged
merged 7 commits into from
Apr 6, 2021
Merged

Conversation

ccen-stripe
Copy link
Collaborator

@ccen-stripe ccen-stripe commented Apr 3, 2021

Summary

Introduce suspend fun for all existing Stripe APIs.

Note: the doc linked to in this PR is internal only

In general, all of these APIs follow the following rule

  • Either returns a non-null object or throws an exception.

There are roughly 3 types of APIs changed, the first two are directly mapped from their synchronous counterparts, for the 'get' APIs, need to expose some functions from PaymentController, will make the change in a separate PR

Will add these to the example app in a follow up PR.

Motivation

For details, please refer to this doc

Fixes #2642

Testing

  • Added tests
  • Modified tests
  • Manually verified

@ccen-stripe ccen-stripe changed the title Introduce suspend fun for Stripe Android SDK Introduce suspend fun for Stripe Android SDK Apr 3, 2021
stripe/src/main/java/com/stripe/android/StripeKtx.kt Outdated Show resolved Hide resolved
stripe/src/test/java/com/stripe/android/StripeKtxTest.kt Outdated Show resolved Hide resolved
stripe/src/test/java/com/stripe/android/StripeKtxTest.kt Outdated Show resolved Hide resolved
stripe/src/test/java/com/stripe/android/StripeKtxTest.kt Outdated Show resolved Hide resolved
stripe/src/test/java/com/stripe/android/StripeKtxTest.kt Outdated Show resolved Hide resolved
stripe/src/test/java/com/stripe/android/StripeKtxTest.kt Outdated Show resolved Hide resolved
stripe/src/test/java/com/stripe/android/StripeKtxTest.kt Outdated Show resolved Hide resolved
stripe/src/test/java/com/stripe/android/StripeKtxTest.kt Outdated Show resolved Hide resolved
stripe/src/test/java/com/stripe/android/StripeKtxTest.kt Outdated Show resolved Hide resolved
@ccen-stripe ccen-stripe merged commit e1ed6a5 into master Apr 6, 2021
@ccen-stripe ccen-stripe deleted the suspend branch April 6, 2021 01:23
mshafrir-stripe added a commit that referenced this pull request Apr 6, 2021
Suspend methods were added in #3557
@ccen-stripe ccen-stripe changed the title Introduce suspend fun for Stripe Android SDK Introduce suspend fun for Stripe Android SDK - part1 Apr 6, 2021
@ccen-stripe ccen-stripe mentioned this pull request Apr 15, 2021
3 tasks
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.

Support for suspended function
3 participants