Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Updates #1280

Merged
merged 3 commits into from
May 6, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"`
Alipay *PaymentIntentPaymentMethodOptionsAlipayParams `form:"alipay"`
AfterpayClearpay *PaymentIntentPaymentMethodOptionsAfterpayClearpayParams `form:"afterpay_clearpay"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be before Alipay in alphabetical order

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch

richardm-stripe marked this conversation as resolved.
Show resolved Hide resolved
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