Skip to content

Commit

Permalink
API Updates (#1280)
Browse files Browse the repository at this point in the history
  • Loading branch information
richardm-stripe authored May 6, 2021
1 parent 970456b commit 888b638
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 13 deletions.
4 changes: 3 additions & 1 deletion charge.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,9 @@ type ChargePaymentMethodDetailsAcssDebit struct {
}

// ChargePaymentMethodDetailsAfterpayClearpay represents details about the AfterpayClearpay PaymentMethod.
type ChargePaymentMethodDetailsAfterpayClearpay struct{}
type ChargePaymentMethodDetailsAfterpayClearpay struct {
Reference string `json:"reference"`
}

// ChargePaymentMethodDetailsAlipay represents details about the Alipay PaymentMethod.
type ChargePaymentMethodDetailsAlipay struct {
Expand Down
38 changes: 26 additions & 12 deletions paymentintent.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,12 @@ type PaymentIntentPaymentMethodOptionsACSSDebitParams struct {
VerificationMethod *string `form:"verification_method"`
}

// PaymentIntentPaymentMethodOptionsAfterpayClearpayParams represents the AfterpayClearpay-specific options
// applied to a PaymentIntent.
type PaymentIntentPaymentMethodOptionsAfterpayClearpayParams struct {
Reference *string `form:"reference"`
}

// PaymentIntentPaymentMethodOptionsAlipayParams represents the Alipay-specific options
// applied to a PaymentIntent.
type PaymentIntentPaymentMethodOptionsAlipayParams struct {
Expand Down Expand Up @@ -280,12 +286,13 @@ type PaymentIntentPaymentMethodOptionsSofortParams struct {
// PaymentIntentPaymentMethodOptionsParams represents the type-specific payment method options
// applied to a PaymentIntent.
type PaymentIntentPaymentMethodOptionsParams struct {
ACSSDebit *PaymentIntentPaymentMethodOptionsACSSDebitParams `form:"acss_debit"`
Alipay *PaymentIntentPaymentMethodOptionsAlipayParams `form:"alipay"`
Bancontact *PaymentIntentPaymentMethodOptionsBancontactParams `form:"bancontact"`
Card *PaymentIntentPaymentMethodOptionsCardParams `form:"card"`
OXXO *PaymentIntentPaymentMethodOptionsOXXOParams `form:"oxxo"`
Sofort *PaymentIntentPaymentMethodOptionsSofortParams `form:"sofort"`
ACSSDebit *PaymentIntentPaymentMethodOptionsACSSDebitParams `form:"acss_debit"`
AfterpayClearpay *PaymentIntentPaymentMethodOptionsAfterpayClearpayParams `form:"afterpay_clearpay"`
Alipay *PaymentIntentPaymentMethodOptionsAlipayParams `form:"alipay"`
Bancontact *PaymentIntentPaymentMethodOptionsBancontactParams `form:"bancontact"`
Card *PaymentIntentPaymentMethodOptionsCardParams `form:"card"`
OXXO *PaymentIntentPaymentMethodOptionsOXXOParams `form:"oxxo"`
Sofort *PaymentIntentPaymentMethodOptionsSofortParams `form:"sofort"`
}

// PaymentIntentTransferDataParams is the set of parameters allowed for the transfer hash.
Expand Down Expand Up @@ -412,6 +419,12 @@ type PaymentIntentPaymentMethodOptionsACSSDebit struct {
VerificationMethod PaymentIntentPaymentMethodOptionsACSSDebitVerificationMethod `json:"verification_method"`
}

// PaymentIntentPaymentMethodOptionsAfterpayClearpay describes the AfterpayClearpay-specific options associated
// with that payment intent.
type PaymentIntentPaymentMethodOptionsAfterpayClearpay struct {
Reference string `json:"reference"`
}

// PaymentIntentPaymentMethodOptionsAlipay is the set of Alipay-specific options associated
// with that payment intent.
type PaymentIntentPaymentMethodOptionsAlipay struct {
Expand Down Expand Up @@ -446,12 +459,13 @@ type PaymentIntentPaymentMethodOptionsSofort struct {
// PaymentIntentPaymentMethodOptions is the set of payment method-specific options associated with
// that payment intent.
type PaymentIntentPaymentMethodOptions struct {
ACSSDebit *PaymentIntentPaymentMethodOptionsACSSDebit `json:"acss_debit"`
Alipay *PaymentIntentPaymentMethodOptionsAlipay `json:"alipay"`
Bancontact *PaymentIntentPaymentMethodOptionsBancontact `json:"bancontact"`
Card *PaymentIntentPaymentMethodOptionsCard `json:"card"`
OXXO *PaymentIntentPaymentMethodOptionsOXXO `json:"oxxo"`
Sofort *PaymentIntentPaymentMethodOptionsSofort `json:"sofort"`
ACSSDebit *PaymentIntentPaymentMethodOptionsACSSDebit `json:"acss_debit"`
AfterpayClearpay *PaymentIntentPaymentMethodOptionsAfterpayClearpay `json:"afterpay_clearpay"`
Alipay *PaymentIntentPaymentMethodOptionsAlipay `json:"alipay"`
Bancontact *PaymentIntentPaymentMethodOptionsBancontact `json:"bancontact"`
Card *PaymentIntentPaymentMethodOptionsCard `json:"card"`
OXXO *PaymentIntentPaymentMethodOptionsOXXO `json:"oxxo"`
Sofort *PaymentIntentPaymentMethodOptionsSofort `json:"sofort"`
}

// PaymentIntentTransferData represents the information for the transfer associated with a payment intent.
Expand Down

0 comments on commit 888b638

Please sign in to comment.