-
Notifications
You must be signed in to change notification settings - Fork 659
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
Conversation
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
ccen-stripe
requested review from
mshafrir-stripe,
michelleb-stripe,
brnunes-stripe,
ebarrenechea-stripe and
mlapadula-stripe
April 3, 2021 07:06
ccen-stripe
changed the title
Introduce suspend fun for Stripe Android SDK
Introduce Apr 3, 2021
suspend fun
for Stripe Android SDK
mshafrir-stripe
requested changes
Apr 5, 2021
mshafrir-stripe
requested changes
Apr 5, 2021
mshafrir-stripe
requested changes
Apr 5, 2021
mshafrir-stripe
requested changes
Apr 5, 2021
mshafrir-stripe
requested changes
Apr 5, 2021
mshafrir-stripe
requested changes
Apr 5, 2021
mshafrir-stripe
approved these changes
Apr 6, 2021
mshafrir-stripe
added a commit
that referenced
this pull request
Apr 6, 2021
Suspend methods were added in #3557
3 tasks
ccen-stripe
changed the title
Introduce
Introduce Apr 6, 2021
suspend fun
for Stripe Android SDKsuspend fun
for Stripe Android SDK - part1
3 tasks
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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
non-null
object or throws an exception.null
(E.g When aJsonParser
fails to find a supported type), in this case the API consumes thenull
object and throws aInvalidRequestException
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 fromPaymentController
, will make the change in a separate PRGET
andPOST
GET
andPOST
Intent
on activity result, changes not included in this PR, see changes in part2 Introducesuspend fun
for Stripe Android SDK - part2 #3568Will add these to the example app in a follow up PR.
Motivation
For details, please refer to this doc
Fixes #2642
Testing