Skip to content

Commit

Permalink
Merge pull request #909 from stripe/remi-fix-pmo
Browse files Browse the repository at this point in the history
Fix typo in property name for PaymentMethodOptions
  • Loading branch information
remi-stripe authored Jul 29, 2019
2 parents 2419d12 + 3268628 commit 1a1de60
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 22 deletions.
26 changes: 16 additions & 10 deletions paymentintent.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,16 +112,19 @@ type PaymentIntentConfirmParams struct {
Params `form:"*"`
// This parameter expects a boolean but used to take an enum so we're adding support for both
// until the next major version (TODO).
OffSession interface{} `form:"off_session"`
PaymentMethod *string `form:"payment_method"`
OffSession interface{} `form:"off_session"`
PaymentMethod *string `form:"payment_method"`
PaymentMethodOptions *PaymentIntentPaymentMethodOptionsParams `form:"payment_method_options"`
PaymentMethodTypes []*string `form:"payment_method_types"`
ReceiptEmail *string `form:"receipt_email"`
ReturnURL *string `form:"return_url"`
SavePaymentMethod *bool `form:"save_payment_method"`
SetupFutureUsage *string `form:"setup_future_usage"`
Shipping *ShippingDetailsParams `form:"shipping"`
Source *string `form:"source"`

// TODO: remove the following parameter in the next major version
PayentMethodOptions *PaymentIntentPaymentMethodOptionsParams `form:"payment_method_options"`
PaymentMethodTypes []*string `form:"payment_method_types"`
ReceiptEmail *string `form:"receipt_email"`
ReturnURL *string `form:"return_url"`
SavePaymentMethod *bool `form:"save_payment_method"`
SetupFutureUsage *string `form:"setup_future_usage"`
Shipping *ShippingDetailsParams `form:"shipping"`
Source *string `form:"source"`
}

// PaymentIntentPaymentMethodOptionsCardParams represents the card-specific options applied to a
Expand Down Expand Up @@ -155,7 +158,7 @@ type PaymentIntentParams struct {
Description *string `form:"description"`
OnBehalfOf *string `form:"on_behalf_of"`
PaymentMethod *string `form:"payment_method"`
PayentMethodOptions *PaymentIntentPaymentMethodOptionsParams `form:"payment_method_options"`
PaymentMethodOptions *PaymentIntentPaymentMethodOptionsParams `form:"payment_method_options"`
PaymentMethodTypes []*string `form:"payment_method_types"`
ReceiptEmail *string `form:"receipt_email"`
ReturnURL *string `form:"return_url"`
Expand All @@ -170,6 +173,9 @@ type PaymentIntentParams struct {
// This parameter only works if you confirm on creation. It also expects a boolean but used to
// take an enum so we're adding support for both until the next major version (TODO).
OffSession interface{} `form:"off_session"`

// TODO: remove the following parameter in the next major version
PayentMethodOptions *PaymentIntentPaymentMethodOptionsParams `form:"payment_method_options"`
}

// PaymentIntentListParams is the set of parameters that can be used when listing payment intents.
Expand Down
30 changes: 18 additions & 12 deletions setupintent.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,13 @@ type SetupIntentCancelParams struct {

// SetupIntentConfirmParams is the set of parameters that can be used when confirming a setup intent.
type SetupIntentConfirmParams struct {
Params `form:"*"`
PaymentMethod *string `form:"payment_method"`
Params `form:"*"`
PaymentMethod *string `form:"payment_method"`
PaymentMethodOptions *SetupIntentPaymentMethodOptionsParams `form:"payment_method_options"`
ReturnURL *string `form:"return_url"`

// TODO: remove the following parameter in the next major version
PayentMethodOptions *SetupIntentPaymentMethodOptionsParams `form:"payment_method_options"`
ReturnURL *string `form:"return_url"`
}

// SetupIntentPaymentMethodOptionsCardParams represents the card-specific options applied to a
Expand All @@ -86,16 +89,19 @@ type SetupIntentPaymentMethodOptionsParams struct {

// SetupIntentParams is the set of parameters that can be used when handling a setup intent.
type SetupIntentParams struct {
Params `form:"*"`
Confirm *bool `form:"confirm"`
Customer *string `form:"customer"`
Description *string `form:"description"`
OnBehalfOf *string `form:"on_behalf_of"`
PaymentMethod *string `form:"payment_method"`
Params `form:"*"`
Confirm *bool `form:"confirm"`
Customer *string `form:"customer"`
Description *string `form:"description"`
OnBehalfOf *string `form:"on_behalf_of"`
PaymentMethod *string `form:"payment_method"`
PaymentMethodOptions *SetupIntentPaymentMethodOptionsParams `form:"payment_method_options"`
PaymentMethodTypes []*string `form:"payment_method_types"`
ReturnURL *string `form:"return_url"`
Usage *string `form:"usage"`

// TODO: remove the following parameter in the next major version
PayentMethodOptions *SetupIntentPaymentMethodOptionsParams `form:"payment_method_options"`
PaymentMethodTypes []*string `form:"payment_method_types"`
ReturnURL *string `form:"return_url"`
Usage *string `form:"usage"`
}

// SetupIntentListParams is the set of parameters that can be used when listing setup intents.
Expand Down

0 comments on commit 1a1de60

Please sign in to comment.