-
Notifications
You must be signed in to change notification settings - Fork 997
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
[17.0.0, breaking] Update API version from 2015-10-12 to 2019-05-16 #1254
Merged
+1,532
−1,110
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
942f005
Add `STPSourceRedirectStatusNotRequired` to `STPSourceRedirectStatus`
yuki-stripe f3467e2
Add `STPSourceCard3DSecureStatusRecommended` to `STPSourceCard3DSecur…
yuki-stripe 114e7b1
Remove requires_source, requires_source_action (2019-02-11)
yuki-stripe ec2e919
allowed_source_types -> payment_method_types
yuki-stripe c32af71
Update STPConnectAccountParams - no longer takes STPLegalEntityParams
yuki-stripe 7894dee
Rerun all functional tests with new API version
yuki-stripe 1ce55d3
Update CHANGELOG, MIGRATING
yuki-stripe ddd2830
Add STPConnectAccountCompanyParams
yuki-stripe 61ac2cf
Add STPConnectAccountIndividualParams
yuki-stripe b8503a6
Add STPConnectAccountAddress
yuki-stripe 4d953a6
Fill out STPConnectAccountCompanyParams
yuki-stripe be89d08
Fill out STPConnectAccountIndividualParams
yuki-stripe c497eba
Descriptions
yuki-stripe f9053e9
The rest
yuki-stripe 78307b6
Fill in empty STPConnectAccountAddressTest
yuki-stripe 010e01a
Merge branch 'master' into yuki-update-api-version
yuki-stripe 78d4c9d
Remove extraneous ;
yuki-stripe 89108fc
Merge branch 'master' into yuki-update-api-version
yuki-stripe 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
github "AliSoftware/OHHTTPStubs" "8.0.0" | ||
github "capitalone/SWHttpTrafficRecorder" "1.0.2" | ||
github "erikdoe/ocmock" "v3.4.3" | ||
github "uber/ios-snapshot-test-case" "6.0.3" | ||
github "uber/ios-snapshot-test-case" "6.1.0" |
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
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,69 @@ | ||
// | ||
// STPConnectAccountAddress.h | ||
// Stripe | ||
// | ||
// Created by Yuki Tokuhiro on 8/2/19. | ||
// Copyright © 2019 Stripe, Inc. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
#import "STPFormEncodable.h" | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
/** | ||
An address to use with `STPConnectAccountParams`. | ||
*/ | ||
@interface STPConnectAccountAddress : NSObject <STPFormEncodable> | ||
yuki-stripe marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
/** | ||
City, district, suburb, town, or village. | ||
|
||
For addresses in Japan: City or ward. | ||
*/ | ||
@property (nonatomic, copy, nullable) NSString *city; | ||
|
||
/** | ||
Two-letter country code (ISO 3166-1 alpha-2). | ||
|
||
@see https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 | ||
*/ | ||
@property (nonatomic, copy, nullable) NSString *country; | ||
|
||
/** | ||
Address line 1 (e.g., street, PO Box, or company name). | ||
|
||
For addresses in Japan: Block or building number. | ||
*/ | ||
@property (nonatomic, copy, nullable) NSString *line1; | ||
|
||
/** | ||
Address line 2 (e.g., apartment, suite, unit, or building). | ||
|
||
For addresses in Japan: Building details. | ||
*/ | ||
@property (nonatomic, copy, nullable) NSString *line2; | ||
|
||
/** | ||
ZIP or postal code. | ||
*/ | ||
@property (nonatomic, copy, nullable) NSString *postalCode; | ||
|
||
/** | ||
State, county, province, or region. | ||
|
||
For addresses in Japan: Prefecture. | ||
*/ | ||
@property (nonatomic, copy, nullable) NSString *state; | ||
|
||
/** | ||
Town or cho-me. | ||
|
||
This property only applies to Japanese addresses. | ||
*/ | ||
@property (nonatomic, copy, nullable) NSString *town; | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
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 |
---|---|---|
@@ -0,0 +1,92 @@ | ||
// | ||
// STPConnectAccountCompanyParams.h | ||
// StripeiOS | ||
// | ||
// Created by Yuki Tokuhiro on 8/2/19. | ||
// Copyright © 2019 Stripe, Inc. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
#import "STPConnectAccountAddress.h" | ||
#import "STPFormEncodable.h" | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
/** | ||
Information about the company or business to use with `STPConnectAccountParams`. | ||
|
||
@see https://stripe.com/docs/api/tokens/create_account#create_account_token-account-company | ||
*/ | ||
@interface STPConnectAccountCompanyParams : NSObject <STPFormEncodable> | ||
|
||
/** | ||
The company’s primary address. | ||
*/ | ||
@property (nonatomic, strong) STPConnectAccountAddress *address; | ||
|
||
/** | ||
The Kana variation of the company’s primary address (Japan only). | ||
*/ | ||
@property (nonatomic, nullable) STPConnectAccountAddress *kanaAddress; | ||
|
||
/** | ||
The Kanji variation of the company’s primary address (Japan only). | ||
*/ | ||
@property (nonatomic, nullable) STPConnectAccountAddress *kanjiAddress; | ||
|
||
/** | ||
Whether the company’s directors have been provided. | ||
|
||
Set this Boolean to true after creating all the company’s directors with the Persons API (https://stripe.com/docs/api/persons) for accounts with a relationship.director requirement. | ||
This value is not automatically set to true after creating directors, so it needs to be updated to indicate all directors have been provided. | ||
*/ | ||
@property (nonatomic, nullable) NSNumber *directorsProvided; | ||
|
||
/** | ||
The company’s legal name. | ||
*/ | ||
@property (nonatomic, copy, nullable) NSString *name; | ||
|
||
/** | ||
The Kana variation of the company’s legal name (Japan only). | ||
*/ | ||
@property (nonatomic, copy, nullable) NSString *kanaName; | ||
|
||
/** | ||
The Kanji variation of the company’s legal name (Japan only). | ||
*/ | ||
@property (nonatomic, copy, nullable) NSString *kanjiName; | ||
|
||
/** | ||
Whether the company’s owners have been provided. | ||
|
||
Set this Boolean to true after creating all the company’s owners with the Persons API (https://stripe.com/docs/api/persons) for accounts with a relationship.owner requirement. | ||
*/ | ||
@property (nonatomic, nullable) NSNumber *ownersProvided; | ||
|
||
/** | ||
The company’s phone number (used for verification). | ||
*/ | ||
@property (nonatomic, copy, nullable) NSString *phone; | ||
|
||
/** | ||
The business ID number of the company, as appropriate for the company’s country. | ||
|
||
(Examples are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in the UK.) | ||
*/ | ||
@property (nonatomic, copy, nullable) NSString *taxID; | ||
|
||
/** | ||
The jurisdiction in which the taxID is registered (Germany-based companies only). | ||
*/ | ||
@property (nonatomic, copy, nullable) NSString *taxIDRegistrar; | ||
|
||
/** | ||
The VAT number of the company. | ||
*/ | ||
@property (nonatomic, copy, nullable) NSString *vatID; | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
163 changes: 163 additions & 0 deletions
163
Stripe/PublicHeaders/STPConnectAccountIndividualParams.h
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 |
---|---|---|
@@ -0,0 +1,163 @@ | ||
// | ||
// STPConnectAccountIndividualParams.h | ||
// Stripe | ||
// | ||
// Created by Yuki Tokuhiro on 8/2/19. | ||
// Copyright © 2019 Stripe, Inc. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
#import "STPConnectAccountAddress.h" | ||
#import "STPFormEncodable.h" | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@class STPConnectAccountIndividualVerification, STPConnectAccountVerificationDocument; | ||
|
||
/** | ||
Information about the person represented by the account for use with `STPConnectAccountParams`. | ||
|
||
@see https://stripe.com/docs/api/tokens/create_account#create_account_token-account-individual | ||
*/ | ||
@interface STPConnectAccountIndividualParams : NSObject <STPFormEncodable> | ||
|
||
/** | ||
The individual’s primary address. | ||
*/ | ||
@property (nonatomic, nullable) STPConnectAccountAddress *address; | ||
|
||
/** | ||
The Kana variation of the the individual’s primary address (Japan only). | ||
*/ | ||
@property (nonatomic, nullable) STPConnectAccountAddress *kanaAddress; | ||
|
||
/** | ||
The Kanji variation of the the individual’s primary address (Japan only). | ||
*/ | ||
@property (nonatomic, nullable) STPConnectAccountAddress *kanjiAddress; | ||
|
||
/** | ||
The individual’s date of birth. | ||
|
||
Must include `day`, `month`, and `year`, and only those fields are used. | ||
*/ | ||
@property (nonatomic, copy, nullable) NSDateComponents *dateOfBirth; | ||
|
||
/** | ||
The individual's email address. | ||
*/ | ||
@property (nonatomic, copy, nullable) NSString *email; | ||
|
||
/** | ||
The individual’s first name. | ||
*/ | ||
@property (nonatomic, copy, nullable) NSString *firstName; | ||
|
||
/** | ||
The Kana variation of the the individual’s first name (Japan only). | ||
*/ | ||
@property (nonatomic, copy, nullable) NSString *kanaFirstName; | ||
|
||
/** | ||
The Kanji variation of the individual’s first name (Japan only). | ||
*/ | ||
@property (nonatomic, copy, nullable) NSString *kanjiFirstName; | ||
|
||
/** | ||
The individual’s gender | ||
|
||
International regulations require either “male” or “female”. | ||
*/ | ||
@property (nonatomic, copy, nullable) NSString *gender; | ||
|
||
/** | ||
The government-issued ID number of the individual, as appropriate for the representative’s country. | ||
Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada. | ||
|
||
Instead of the number itself, you can also provide a PII token created with Stripe.js (see https://stripe.com/docs/stripe-js/reference#collecting-pii-data). | ||
*/ | ||
@property (nonatomic, copy, nullable) NSString *idNumber; | ||
|
||
/** | ||
The individual’s last name. | ||
*/ | ||
@property (nonatomic, copy, nullable) NSString *lastName; | ||
|
||
/** | ||
The Kana varation of the individual’s last name (Japan only). | ||
*/ | ||
@property (nonatomic, copy, nullable) NSString *kanaLastName; | ||
|
||
/** | ||
The Kanji varation of the individual’s last name (Japan only). | ||
*/ | ||
@property (nonatomic, copy, nullable) NSString *kanjiLastName; | ||
|
||
/** | ||
The individual’s maiden name. | ||
*/ | ||
@property (nonatomic, copy, nullable) NSString *maidenName; | ||
|
||
/** | ||
Set of key-value pairs that you can attach to an object. | ||
|
||
This can be useful for storing additional information about the object in a structured format. | ||
*/ | ||
@property (nonatomic, copy, nullable) NSDictionary *metadata; | ||
|
||
/** | ||
The individual’s phone number. | ||
*/ | ||
@property (nonatomic, copy, nullable) NSString *phone; | ||
|
||
/** | ||
The last four digits of the individual’s Social Security Number (U.S. only). | ||
*/ | ||
@property (nonatomic, copy, nullable) NSString *ssnLast4; | ||
|
||
/** | ||
The individual’s verification document information. | ||
*/ | ||
@property (nonatomic, strong, nullable) STPConnectAccountIndividualVerification *verification; | ||
|
||
@end | ||
|
||
#pragma mark - | ||
|
||
/** | ||
The individual’s verification document information for use with `STPConnectAccountIndividualParams`. | ||
*/ | ||
@interface STPConnectAccountIndividualVerification: NSObject <STPFormEncodable> | ||
|
||
/** | ||
An identifying document, either a passport or local ID card. | ||
*/ | ||
@property (nonatomic, strong, nullable) STPConnectAccountVerificationDocument *document; | ||
|
||
@end | ||
|
||
#pragma mark - | ||
|
||
/** | ||
An identifying document, either a passport or local ID card for use with `STPConnectAccountIndividualVerification`. | ||
*/ | ||
@interface STPConnectAccountVerificationDocument: NSObject<STPFormEncodable> | ||
|
||
/** | ||
The back of an ID returned by a file upload with a `purpose` value of `identity_document`. | ||
|
||
@see https://stripe.com/docs/api/files/create for file uploads | ||
*/ | ||
@property (nonatomic, copy, nullable) NSString *back; | ||
|
||
/** | ||
The front of an ID returned by a file upload with a `purpose` value of `identity_document`. | ||
|
||
@see https://stripe.com/docs/api/files/create for file uploads | ||
*/ | ||
@property (nonatomic, copy, nullable) NSString *front; | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
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.
I'm kind of inclined not to have another major version bump so soon...Maybe
16.1.0
? This should only be a breaking change for Connect users right? Thoughts @yuki-stripe @davidme-stripeThere 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.
I'm not familiar with how versioning has worked here in the past, but moving from the 2015 API sounds like an appropriate reason to increment the major version number.
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.
Definitely wary of fatiguing our users...there are the (minor) enum changes that Source users should update with, too. Outside of that, it should be unnoticed.
Either way, I'd like to ship this only after some confidence that 16.* won't have more bugfixes.
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.
👍 Let's hold this patch until 16.0.* has settled and then go from there