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 8dad463 commit 05239ad
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 2 deletions.
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"`
ComparyTaxIdVerification *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

0 comments on commit 05239ad

Please sign in to comment.