Skip to content

Commit

Permalink
Add support for AccountParams.Documents
Browse files Browse the repository at this point in the history
  • Loading branch information
richardm-stripe committed Jan 7, 2021
1 parent 78df16d commit 0020ad4
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
31 changes: 31 additions & 0 deletions account.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,36 @@ type AccountDeclineSettingsParams struct {
CVCFailure *bool `form:"cvc_failure"`
}

type AccountDocumentsBankAccountOwnershipVerificationParams struct {
Files []*string `form:"files"`
}
type AccountDocumentsCompanyLicenseParams struct {
Files []*string `form:"files"`
}
type AccountDocumentsCompanyMemorandumOfAssociationParams struct {
Files []*string `form:"files"`
}
type AccountDocumentsCompanyMinisterialDecreeParams struct {
Files []*string `form:"files"`
}
type AccountDocumentsCompanyRegistrationVerificationParams struct {
Files []*string `form:"files"`
}
type AccountDocumentsCompanyTaxIdVerificationParams struct {
Files []*string `form:"files"`
}

// AccountDocumentsParams represent documents that may be submitted to satisfy
// various informational requests.
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"`
ComparyTaxIdVerification *AccountDocumentsCompanyTaxIdVerificationParams `form:"company_tax_id_verification"`
}

// AccountSettingsBrandingParams represent allowed parameters to configure settings specific to the
// account’s branding.
type AccountSettingsBrandingParams struct {
Expand Down Expand Up @@ -408,6 +438,7 @@ type AccountParams struct {
Company *AccountCompanyParams `form:"company"`
Country *string `form:"country"`
DefaultCurrency *string `form:"default_currency"`
Documents *AccountDocumentsParams `form:"documents"`
Email *string `form:"email"`
ExternalAccount *AccountExternalAccountParams `form:"external_account"`
Individual *PersonParams `form:"individual"`
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

0 comments on commit 0020ad4

Please sign in to comment.