Skip to content

Commit

Permalink
Merge pull request #1239 from stripe/richardm-account-document-fields
Browse files Browse the repository at this point in the history
Add support for more verification documents
  • Loading branch information
richardm-stripe authored Jan 11, 2021
2 parents 2260ff8 + f49d043 commit b8f36ca
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ cache:
env:
global:
# If changing this number, please also change it in `testing/testing.go`.
- STRIPE_MOCK_VERSION=0.101.0
- STRIPE_MOCK_VERSION=0.102.0

go:
- "1.10.x"
Expand Down
41 changes: 39 additions & 2 deletions account.go
Original file line number Diff line number Diff line change
Expand Up @@ -333,15 +333,52 @@ type AccountDeclineSettingsParams struct {
CVCFailure *bool `form:"cvc_failure"`
}

// AccountDocumentsBankAccountOwnershipVerificationParams represents the parameters allowed for passing
// bank account ownership verification documents on an account.
// AccountDocumentsBankAccountOwnershipVerificationParams represents the
// parameters allowed for passing bank account ownership verification documents
// on an account.
type AccountDocumentsBankAccountOwnershipVerificationParams struct {
Files []*string `form:"files"`
}

// AccountDocumentsCompanyLicenseParams represents the parameters allowed for
// passing company license verification documents on an account.
type AccountDocumentsCompanyLicenseParams struct {
Files []*string `form:"files"`
}

// AccountDocumentsCompanyMemorandumOfAssociationParams represents the
// parameters allowed for passing company memorandum of association documents
// on an account.
type AccountDocumentsCompanyMemorandumOfAssociationParams struct {
Files []*string `form:"files"`
}

// AccountDocumentsCompanyMinisterialDecreeParams represents the parameters
// allowed for passing company ministerial decree documents on an account.
type AccountDocumentsCompanyMinisterialDecreeParams struct {
Files []*string `form:"files"`
}

// AccountDocumentsCompanyRegistrationVerificationParams represents the
// parameters allowed for passing company registration verification documents.
type AccountDocumentsCompanyRegistrationVerificationParams struct {
Files []*string `form:"files"`
}

// AccountDocumentsCompanyTaxIDVerificationParams represents the parameters
// allowed for passing company tax id verification documents on an account.
type AccountDocumentsCompanyTaxIDVerificationParams struct {
Files []*string `form:"files"`
}

// AccountDocumentsParams represents the parameters allowed for passing additional documents on an account.
type AccountDocumentsParams struct {
BankAccountOwnershipVerification *AccountDocumentsBankAccountOwnershipVerificationParams `form:"bank_account_ownership_verification"`
CompanyLicense *AccountDocumentsCompanyLicenseParams `form:"company_license"`
CompanyMemorandumOfAssocation *AccountDocumentsCompanyMemorandumOfAssociationParams `form:"company_memorandum_of_association"`
CompanyMinisterialDecree *AccountDocumentsCompanyMinisterialDecreeParams `form:"company_ministerial_decree"`
CompanyRegistrationVerification *AccountDocumentsCompanyRegistrationVerificationParams `form:"company_registration_verification"`
CompanyTaxIDVerification *AccountDocumentsCompanyTaxIDVerificationParams `form:"company_tax_id_verification"`
}

// AccountSettingsBrandingParams represent allowed parameters to configure settings specific to the
Expand Down
5 changes: 5 additions & 0 deletions account/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ func TestAccountNew(t *testing.T) {
},
},
},
Documents: &stripe.AccountDocumentsParams{
CompanyLicense: &stripe.AccountDocumentsCompanyLicenseParams{
Files: []*string{stripe.String("file_xyz")},
},
},
Country: stripe.String("CA"),
ExternalAccount: &stripe.AccountExternalAccountParams{
Token: stripe.String("tok_123"),
Expand Down
2 changes: 1 addition & 1 deletion testing/testing.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const (
// added in a more recent version of stripe-mock, we can show people a
// better error message instead of the test suite crashing with a bunch of
// confusing 404 errors or the like.
MockMinimumVersion = "0.101.0"
MockMinimumVersion = "0.102.0"

// TestMerchantID is a token that can be used to represent a merchant ID in
// simple tests.
Expand Down

0 comments on commit b8f36ca

Please sign in to comment.