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 document_back property to STPVerificationParams #1017

Merged
merged 3 commits into from
Aug 16, 2018
Merged

Add document_back property to STPVerificationParams #1017

merged 3 commits into from
Aug 16, 2018

Conversation

rance-attack
Copy link
Contributor

Summary

Add document_back property

Motivation

Can see this property in go project (https://github.com/stripe/stripe-go/blob/master/account.go#L211)
Hope iOS SDK can also have it

@danj-stripe danj-stripe self-assigned this Aug 16, 2018
This updates the `STPConnectAccountFunctionalTest testTokenCreation_fullySpecified` test
to include the new property.
Copy link
Contributor

@csabol-stripe csabol-stripe left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thanks for the contribution!

@danj-stripe
Copy link
Contributor

@rance-attack Yeah, we appreciate the contribution, and your follow up commit w/documentation that fixed the build!

FYI: we do have additionalAPIParameters on all of the params objects, so you can immediately start using properties (like document_back) that the Stripe API supports but that the SDK doesn't yet have:

/**
You can use this property to add additional fields to an API request that are not explicitly defined by the object's interface. This can be useful when using beta features that haven't been added to the Stripe SDK yet. For example, if the /v1/tokens API began to accept a beta field called "test_field", you might do the following:
STPCardParams *cardParams = [STPCardParams new];
// add card values
cardParams.additionalAPIParameters = @{@"test_field": @"example_value"};
[[STPAPIClient sharedClient] createTokenWithCard:cardParams completion:...];
*/
@property (nonatomic, readwrite, copy) NSDictionary *additionalAPIParameters;

It won't have the type-safety that the property declaration does, so we definitely want to fix the SDK like you've done here, but it would allow you to use the SDK without forking it.

@danj-stripe danj-stripe merged commit 12e349a into stripe:master Aug 16, 2018
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.

4 participants