Skip to content

Commit

Permalink
Merge pull request #1854 from stripe/latest-codegen-beta
Browse files Browse the repository at this point in the history
Update generated code for beta
  • Loading branch information
stripe-openapi[bot] authored May 2, 2024
2 parents d940056 + 5b608a1 commit 20c6e93
Show file tree
Hide file tree
Showing 18 changed files with 365 additions and 21 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@
* Add support for `PaymentMethodSettings` on `AccountSessionComponentsParams`
* Add support for `CancelSubscriptionSchedule` on `QuoteLine` and `QuoteLinesParams`

## 78.4.0 - 2024-04-25
* [#1852](https://github.com/stripe/stripe-go/pull/1852) Update generated code
* Add support for `SetupFutureUsage` on `CheckoutSessionPaymentMethodOptionsAmazonPay`, `CheckoutSessionPaymentMethodOptionsRevolutPay`, `PaymentIntentPaymentMethodOptionsAmazonPay`, and `PaymentIntentPaymentMethodOptionsRevolutPay`
* Change type of `EntitlementsActiveEntitlementFeature` from `string` to `*EntitlementsFeature`
* Remove support for inadvertently released identity verification features `Email` and `Phone` on `IdentityVerificationSessionOptionsParams`
* Add support for new values `amazon_pay` and `revolut_pay` on enums `InvoicePaymentSettingsPaymentMethodTypes` and `SubscriptionPaymentSettingsPaymentMethodTypes`
* Add support for `AmazonPay` and `RevolutPay` on `MandatePaymentMethodDetails` and `SetupAttemptPaymentMethodDetails`
* Add support for `EndingBefore`, `Limit`, and `StartingAfter` on `PaymentMethodConfigurationListParams`
* Add support for `Mobilepay` on `PaymentMethodConfigurationParams` and `PaymentMethodConfiguration`

## 78.4.0-beta.1 - 2024-04-18
* [#1848](https://github.com/stripe/stripe-go/pull/1848) Update generated code for beta
* Add support for `CapitalOverview`, `TaxRegistrations`, and `TaxSettings` on `AccountSessionComponentsParams`
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v992
v1008
10 changes: 10 additions & 0 deletions account.go
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,12 @@ type AccountCapabilitiesPromptPayPaymentsParams struct {
Requested *bool `form:"requested"`
}

// The rechnung_payments capability.
type AccountCapabilitiesRechnungPaymentsParams struct {
// Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
Requested *bool `form:"requested"`
}

// The revolut_pay_payments capability.
type AccountCapabilitiesRevolutPayPaymentsParams struct {
// Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
Expand Down Expand Up @@ -641,6 +647,8 @@ type AccountCapabilitiesParams struct {
PaytoPayments *AccountCapabilitiesPaytoPaymentsParams `form:"payto_payments"`
// The promptpay_payments capability.
PromptPayPayments *AccountCapabilitiesPromptPayPaymentsParams `form:"promptpay_payments"`
// The rechnung_payments capability.
RechnungPayments *AccountCapabilitiesRechnungPaymentsParams `form:"rechnung_payments"`
// The revolut_pay_payments capability.
RevolutPayPayments *AccountCapabilitiesRevolutPayPaymentsParams `form:"revolut_pay_payments"`
// The sepa_debit_payments capability.
Expand Down Expand Up @@ -1228,6 +1236,8 @@ type AccountCapabilities struct {
PaytoPayments AccountCapabilityStatus `json:"payto_payments"`
// The status of the promptpay payments capability of the account, or whether the account can directly process promptpay charges.
PromptPayPayments AccountCapabilityStatus `json:"promptpay_payments"`
// The status of the Rechnung capability of the account, or whether the account can directly process Rechnung payments.
RechnungPayments AccountCapabilityStatus `json:"rechnung_payments"`
// The status of the RevolutPay capability of the account, or whether the account can directly process RevolutPay payments.
RevolutPayPayments AccountCapabilityStatus `json:"revolut_pay_payments"`
// The status of the SEPA Direct Debits payments capability of the account, or whether the account can directly process SEPA Direct Debits charges.
Expand Down
5 changes: 5 additions & 0 deletions charge.go
Original file line number Diff line number Diff line change
Expand Up @@ -1682,6 +1682,8 @@ type ChargePaymentMethodDetailsLink struct {
// You could use this attribute to get a sense of international fees.
Country string `json:"country"`
}

// Internal card details
type ChargePaymentMethodDetailsMobilepayCard struct {
// Brand of the card used in the transaction
Brand string `json:"brand"`
Expand All @@ -1695,6 +1697,7 @@ type ChargePaymentMethodDetailsMobilepayCard struct {
Last4 string `json:"last4"`
}
type ChargePaymentMethodDetailsMobilepay struct {
// Internal card details
Card *ChargePaymentMethodDetailsMobilepayCard `json:"card"`
}
type ChargePaymentMethodDetailsMultibanco struct {
Expand Down Expand Up @@ -1775,6 +1778,7 @@ type ChargePaymentMethodDetailsPromptPay struct {
// Bill reference generated by PromptPay
Reference string `json:"reference"`
}
type ChargePaymentMethodDetailsRechnung struct{}
type ChargePaymentMethodDetailsRevolutPay struct{}
type ChargePaymentMethodDetailsSEPACreditTransfer struct {
// Name of the bank associated with the bank account.
Expand Down Expand Up @@ -1893,6 +1897,7 @@ type ChargePaymentMethodDetails struct {
Payto *ChargePaymentMethodDetailsPayto `json:"payto"`
Pix *ChargePaymentMethodDetailsPix `json:"pix"`
PromptPay *ChargePaymentMethodDetailsPromptPay `json:"promptpay"`
Rechnung *ChargePaymentMethodDetailsRechnung `json:"rechnung"`
RevolutPay *ChargePaymentMethodDetailsRevolutPay `json:"revolut_pay"`
SEPACreditTransfer *ChargePaymentMethodDetailsSEPACreditTransfer `json:"sepa_credit_transfer"`
SEPADebit *ChargePaymentMethodDetailsSEPADebit `json:"sepa_debit"`
Expand Down
33 changes: 33 additions & 0 deletions checkout_session.go
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,18 @@ const (
CheckoutSessionPaymentMethodOptionsMobilepaySetupFutureUsageNone CheckoutSessionPaymentMethodOptionsMobilepaySetupFutureUsage = "none"
)

// Indicates that you intend to make future payments with this PaymentIntent's payment method.
//
// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
//
// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
type CheckoutSessionPaymentMethodOptionsMultibancoSetupFutureUsage string

// List of values that CheckoutSessionPaymentMethodOptionsMultibancoSetupFutureUsage can take
const (
CheckoutSessionPaymentMethodOptionsMultibancoSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsMultibancoSetupFutureUsage = "none"
)

// Indicates that you intend to make future payments with this PaymentIntent's payment method.
//
// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
Expand Down Expand Up @@ -1528,6 +1540,16 @@ type CheckoutSessionPaymentMethodOptionsMobilepayParams struct {
SetupFutureUsage *string `form:"setup_future_usage"`
}

// contains details about the Multibanco payment method options.
type CheckoutSessionPaymentMethodOptionsMultibancoParams struct {
// Indicates that you intend to make future payments with this PaymentIntent's payment method.
//
// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
//
// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
SetupFutureUsage *string `form:"setup_future_usage"`
}

// contains details about the OXXO payment method options.
type CheckoutSessionPaymentMethodOptionsOXXOParams struct {
// The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.
Expand Down Expand Up @@ -1708,6 +1730,8 @@ type CheckoutSessionPaymentMethodOptionsParams struct {
Link *CheckoutSessionPaymentMethodOptionsLinkParams `form:"link"`
// contains details about the Mobilepay payment method options.
Mobilepay *CheckoutSessionPaymentMethodOptionsMobilepayParams `form:"mobilepay"`
// contains details about the Multibanco payment method options.
Multibanco *CheckoutSessionPaymentMethodOptionsMultibancoParams `form:"multibanco"`
// contains details about the OXXO payment method options.
OXXO *CheckoutSessionPaymentMethodOptionsOXXOParams `form:"oxxo"`
// contains details about the P24 payment method options.
Expand Down Expand Up @@ -2569,6 +2593,14 @@ type CheckoutSessionPaymentMethodOptionsMobilepay struct {
// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
SetupFutureUsage CheckoutSessionPaymentMethodOptionsMobilepaySetupFutureUsage `json:"setup_future_usage"`
}
type CheckoutSessionPaymentMethodOptionsMultibanco struct {
// Indicates that you intend to make future payments with this PaymentIntent's payment method.
//
// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
//
// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
SetupFutureUsage CheckoutSessionPaymentMethodOptionsMultibancoSetupFutureUsage `json:"setup_future_usage"`
}
type CheckoutSessionPaymentMethodOptionsOXXO struct {
// The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.
ExpiresAfterDays int64 `json:"expires_after_days"`
Expand Down Expand Up @@ -2691,6 +2723,7 @@ type CheckoutSessionPaymentMethodOptions struct {
Konbini *CheckoutSessionPaymentMethodOptionsKonbini `json:"konbini"`
Link *CheckoutSessionPaymentMethodOptionsLink `json:"link"`
Mobilepay *CheckoutSessionPaymentMethodOptionsMobilepay `json:"mobilepay"`
Multibanco *CheckoutSessionPaymentMethodOptionsMultibanco `json:"multibanco"`
OXXO *CheckoutSessionPaymentMethodOptionsOXXO `json:"oxxo"`
P24 *CheckoutSessionPaymentMethodOptionsP24 `json:"p24"`
PayNow *CheckoutSessionPaymentMethodOptionsPayNow `json:"paynow"`
Expand Down
14 changes: 14 additions & 0 deletions confirmationtoken.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ const (
ConfirmationTokenPaymentMethodPreviewTypePayto ConfirmationTokenPaymentMethodPreviewType = "payto"
ConfirmationTokenPaymentMethodPreviewTypePix ConfirmationTokenPaymentMethodPreviewType = "pix"
ConfirmationTokenPaymentMethodPreviewTypePromptPay ConfirmationTokenPaymentMethodPreviewType = "promptpay"
ConfirmationTokenPaymentMethodPreviewTypeRechnung ConfirmationTokenPaymentMethodPreviewType = "rechnung"
ConfirmationTokenPaymentMethodPreviewTypeRevolutPay ConfirmationTokenPaymentMethodPreviewType = "revolut_pay"
ConfirmationTokenPaymentMethodPreviewTypeSEPADebit ConfirmationTokenPaymentMethodPreviewType = "sepa_debit"
ConfirmationTokenPaymentMethodPreviewTypeSofort ConfirmationTokenPaymentMethodPreviewType = "sofort"
Expand Down Expand Up @@ -627,6 +628,7 @@ type ConfirmationTokenPaymentMethodPreviewLink struct {
// Account owner's email address.
Email string `json:"email"`
// [Deprecated] This is a legacy parameter that no longer has any function.
// Deprecated:
PersistentToken string `json:"persistent_token"`
}
type ConfirmationTokenPaymentMethodPreviewMobilepay struct{}
Expand Down Expand Up @@ -659,6 +661,17 @@ type ConfirmationTokenPaymentMethodPreviewPayto struct {
}
type ConfirmationTokenPaymentMethodPreviewPix struct{}
type ConfirmationTokenPaymentMethodPreviewPromptPay struct{}
type ConfirmationTokenPaymentMethodPreviewRechnungDOB struct {
// The day of birth, between 1 and 31.
Day int64 `json:"day"`
// The month of birth, between 1 and 12.
Month int64 `json:"month"`
// The four-digit year of birth.
Year int64 `json:"year"`
}
type ConfirmationTokenPaymentMethodPreviewRechnung struct {
DOB *ConfirmationTokenPaymentMethodPreviewRechnungDOB `json:"dob"`
}
type ConfirmationTokenPaymentMethodPreviewRevolutPay struct{}

// Information about the object that generated this PaymentMethod.
Expand Down Expand Up @@ -767,6 +780,7 @@ type ConfirmationTokenPaymentMethodPreview struct {
Payto *ConfirmationTokenPaymentMethodPreviewPayto `json:"payto"`
Pix *ConfirmationTokenPaymentMethodPreviewPix `json:"pix"`
PromptPay *ConfirmationTokenPaymentMethodPreviewPromptPay `json:"promptpay"`
Rechnung *ConfirmationTokenPaymentMethodPreviewRechnung `json:"rechnung"`
RevolutPay *ConfirmationTokenPaymentMethodPreviewRevolutPay `json:"revolut_pay"`
SEPADebit *ConfirmationTokenPaymentMethodPreviewSEPADebit `json:"sepa_debit"`
Sofort *ConfirmationTokenPaymentMethodPreviewSofort `json:"sofort"`
Expand Down
24 changes: 12 additions & 12 deletions customersession.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

package stripe

// Controls whether the Payment Element allows the removal of a saved payment method.
// Controls whether the Payment Element displays the option to remove a saved payment method.
type CustomerSessionComponentsPaymentElementFeaturesPaymentMethodRemove string

// List of values that CustomerSessionComponentsPaymentElementFeaturesPaymentMethodRemove can take
Expand All @@ -15,7 +15,7 @@ const (
CustomerSessionComponentsPaymentElementFeaturesPaymentMethodRemoveEnabled CustomerSessionComponentsPaymentElementFeaturesPaymentMethodRemove = "enabled"
)

// Controls whether the Payment Element offers to save a new payment method.
// Controls whether the Payment Element displays a checkbox offering to save a new payment method.
type CustomerSessionComponentsPaymentElementFeaturesPaymentMethodSave string

// List of values that CustomerSessionComponentsPaymentElementFeaturesPaymentMethodSave can take
Expand All @@ -24,7 +24,7 @@ const (
CustomerSessionComponentsPaymentElementFeaturesPaymentMethodSaveEnabled CustomerSessionComponentsPaymentElementFeaturesPaymentMethodSave = "enabled"
)

// Controls whether the Payment Element offers to set a payment method as the default.
// Controls whether the Payment Element displays a checkbox offering to set a saved payment method as the default.
type CustomerSessionComponentsPaymentElementFeaturesPaymentMethodSetAsDefault string

// List of values that CustomerSessionComponentsPaymentElementFeaturesPaymentMethodSetAsDefault can take
Expand All @@ -33,7 +33,7 @@ const (
CustomerSessionComponentsPaymentElementFeaturesPaymentMethodSetAsDefaultEnabled CustomerSessionComponentsPaymentElementFeaturesPaymentMethodSetAsDefault = "enabled"
)

// Controls whether the Payment Element allows the updating of a saved payment method.
// Controls whether the Payment Element displays the option to update a saved payment method.
type CustomerSessionComponentsPaymentElementFeaturesPaymentMethodUpdate string

// List of values that CustomerSessionComponentsPaymentElementFeaturesPaymentMethodUpdate can take
Expand All @@ -50,13 +50,13 @@ type CustomerSessionComponentsBuyButtonParams struct {

// This hash defines whether the payment element supports certain features.
type CustomerSessionComponentsPaymentElementFeaturesParams struct {
// Controls whether the Payment Element allows the removal of a saved payment method.
// Controls whether the Payment Element displays the option to remove a saved payment method.
PaymentMethodRemove *string `form:"payment_method_remove"`
// Controls whether the Payment Element offers to save a new payment method.
// Controls whether the Payment Element displays a checkbox offering to save a new payment method.
PaymentMethodSave *string `form:"payment_method_save"`
// Controls whether the Payment Element offers to set a payment method as the default.
// Controls whether the Payment Element displays a checkbox offering to set a saved payment method as the default.
PaymentMethodSetAsDefault *string `form:"payment_method_set_as_default"`
// Controls whether the Payment Element allows the updating of a saved payment method.
// Controls whether the Payment Element displays the option to update a saved payment method.
PaymentMethodUpdate *string `form:"payment_method_update"`
}

Expand Down Expand Up @@ -108,13 +108,13 @@ type CustomerSessionComponentsBuyButton struct {

// This hash defines whether the payment element supports certain features.
type CustomerSessionComponentsPaymentElementFeatures struct {
// Controls whether the Payment Element allows the removal of a saved payment method.
// Controls whether the Payment Element displays the option to remove a saved payment method.
PaymentMethodRemove CustomerSessionComponentsPaymentElementFeaturesPaymentMethodRemove `json:"payment_method_remove"`
// Controls whether the Payment Element offers to save a new payment method.
// Controls whether the Payment Element displays a checkbox offering to save a new payment method.
PaymentMethodSave CustomerSessionComponentsPaymentElementFeaturesPaymentMethodSave `json:"payment_method_save"`
// Controls whether the Payment Element offers to set a payment method as the default.
// Controls whether the Payment Element displays a checkbox offering to set a saved payment method as the default.
PaymentMethodSetAsDefault CustomerSessionComponentsPaymentElementFeaturesPaymentMethodSetAsDefault `json:"payment_method_set_as_default"`
// Controls whether the Payment Element allows the updating of a saved payment method.
// Controls whether the Payment Element displays the option to update a saved payment method.
PaymentMethodUpdate CustomerSessionComponentsPaymentElementFeaturesPaymentMethodUpdate `json:"payment_method_update"`
}

Expand Down
Loading

0 comments on commit 20c6e93

Please sign in to comment.