Skip to content

Commit

Permalink
Merge pull request #622 from stripe/remi-fix-decline-charge-on
Browse files Browse the repository at this point in the history
Fix decline_charge_on on the Account ressource
  • Loading branch information
brandur-stripe authored Jul 6, 2018
2 parents 87f27e6 + 06a147c commit 00a7b3c
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 31 deletions.
52 changes: 26 additions & 26 deletions account.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ type AccountParams struct {
BusinessPrimaryColor *string `form:"business_primary_color"`
BusinessURL *string `form:"business_url"`
Country *string `form:"country"`
DeclineChargeOn *AccountDeclineSettingsParams `form:"decline_charge_on"`
DebitNegativeBalances *bool `form:"debit_negative_balances"`
DefaultCurrency *string `form:"default_currency"`
Email *string `form:"email"`
Expand All @@ -123,32 +124,31 @@ type LegalEntityParams struct {
// owners.
AdditionalOwnersEmpty bool `form:"additional_owners,empty"`

Address *AccountAddressParams `form:"address"`
AddressKana *AccountAddressParams `form:"address_kana"`
AddressKanji *AccountAddressParams `form:"address_kanji"`
BusinessName *string `form:"business_name"`
BusinessNameKana *string `form:"business_name_kana"`
BusinessNameKanji *string `form:"business_name_kanji"`
BusinessTaxID *string `form:"business_tax_id"`
BusinessVATID *string `form:"business_vat_id"`
DeclineChargeOn *AccountDeclineSettingsParams `form:"decline_charge_on"`
DOB *DOBParams `form:"dob"`
FirstName *string `form:"first_name"`
FirstNameKana *string `form:"first_name_kana"`
FirstNameKanji *string `form:"first_name_kanji"`
Gender *string `form:"gender"`
LastName *string `form:"last_name"`
LastNameKana *string `form:"last_name_kana"`
LastNameKanji *string `form:"last_name_kanji"`
MaidenName *string `form:"maiden_name"`
PersonalAddress *AccountAddressParams `form:"personal_address"`
PersonalAddressKana *AccountAddressParams `form:"personal_address_kana"`
PersonalAddressKanji *AccountAddressParams `form:"personal_address_kanji"`
PersonalIDNumber *string `form:"personal_id_number"`
PhoneNumber *string `form:"phone_number"`
SSNLast4 *string `form:"ssn_last_4"`
Type *string `form:"type"`
Verification *IdentityVerificationParams `form:"verification"`
Address *AccountAddressParams `form:"address"`
AddressKana *AccountAddressParams `form:"address_kana"`
AddressKanji *AccountAddressParams `form:"address_kanji"`
BusinessName *string `form:"business_name"`
BusinessNameKana *string `form:"business_name_kana"`
BusinessNameKanji *string `form:"business_name_kanji"`
BusinessTaxID *string `form:"business_tax_id"`
BusinessVATID *string `form:"business_vat_id"`
DOB *DOBParams `form:"dob"`
FirstName *string `form:"first_name"`
FirstNameKana *string `form:"first_name_kana"`
FirstNameKanji *string `form:"first_name_kanji"`
Gender *string `form:"gender"`
LastName *string `form:"last_name"`
LastNameKana *string `form:"last_name_kana"`
LastNameKanji *string `form:"last_name_kanji"`
MaidenName *string `form:"maiden_name"`
PersonalAddress *AccountAddressParams `form:"personal_address"`
PersonalAddressKana *AccountAddressParams `form:"personal_address_kana"`
PersonalAddressKanji *AccountAddressParams `form:"personal_address_kanji"`
PersonalIDNumber *string `form:"personal_id_number"`
PhoneNumber *string `form:"phone_number"`
SSNLast4 *string `form:"ssn_last_4"`
Type *string `form:"type"`
Verification *IdentityVerificationParams `form:"verification"`
}

// AccountAddressParams represents an address during account creation/updates.
Expand Down
14 changes: 9 additions & 5 deletions account/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,15 @@ func TestAccountList(t *testing.T) {

func TestAccountNew(t *testing.T) {
account, err := New(&stripe.AccountParams{
Type: stripe.String(string(stripe.AccountTypeCustom)),
Country: stripe.String("CA"),
BusinessURL: stripe.String("www.stripe.com"),
BusinessName: stripe.String("Stripe"),
BusinessPrimaryColor: stripe.String("#ffffff"),
Type: stripe.String(string(stripe.AccountTypeCustom)),
Country: stripe.String("CA"),
BusinessURL: stripe.String("www.stripe.com"),
BusinessName: stripe.String("Stripe"),
BusinessPrimaryColor: stripe.String("#ffffff"),
DeclineChargeOn: &stripe.AccountDeclineSettingsParams{
AVSFailure: stripe.Bool(true),
CVCFailure: stripe.Bool(true),
},
DebitNegativeBalances: stripe.Bool(true),
SupportEmail: stripe.String("[email protected]"),
SupportURL: stripe.String("www.stripe.com"),
Expand Down

0 comments on commit 00a7b3c

Please sign in to comment.