Skip to content

Commit

Permalink
Merge pull request #1907 from stripe/latest-codegen-beta
Browse files Browse the repository at this point in the history
Update generated code for beta
  • Loading branch information
xavdid-stripe authored Aug 22, 2024
2 parents 8534b26 + a254997 commit 8037f3d
Show file tree
Hide file tree
Showing 28 changed files with 186 additions and 170 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@
* ⚠️ Remove support for `RiskCorrelationID` on `PaymentIntentConfirmPaymentMethodOptionsRechnungParams`, `PaymentIntentPaymentMethodOptionsRechnungParams`, and `PaymentIntentPaymentMethodOptionsRechnung`
* Add support for new value `payto` on enum `PaymentLinkPaymentMethodTypes`

## 79.8.0 - 2024-08-15
* [#1904](https://github.com/stripe/stripe-go/pull/1904) Update generated code
* Add support for `AuthorizationCode` on `ChargePaymentMethodDetailsCard`
* Add support for `Wallet` on `ChargePaymentMethodDetailsCardPresent`, `ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresent`, `ConfirmationTokenPaymentMethodPreviewCardPresent`, `PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresent`, and `PaymentMethodCardPresent`
* Add support for `MandateOptions` on `PaymentIntentConfirmPaymentMethodOptionsBacsDebitParams`, `PaymentIntentPaymentMethodOptionsBacsDebitParams`, and `PaymentIntentPaymentMethodOptionsBacsDebit`
* Add support for `BACSDebit` on `SetupIntentConfirmPaymentMethodOptionsParams`, `SetupIntentPaymentMethodOptionsParams`, and `SetupIntentPaymentMethodOptions`
* Add support for `Chips` on `TreasuryOutboundPaymentTrackingDetailsUsDomesticWireParams`, `TreasuryOutboundPaymentTrackingDetailsUsDomesticWire`, `TreasuryOutboundTransferTrackingDetailsUsDomesticWireParams`, and `TreasuryOutboundTransferTrackingDetailsUsDomesticWire`
* [#1903](https://github.com/stripe/stripe-go/pull/1903) Use pinned version of staticcheck

## 79.7.0 - 2024-08-08
* [#1899](https://github.com/stripe/stripe-go/pull/1899) Update generated code
* Add support for `Activate`, `Archive`, `Deactivate`, `Get`, `List`, and `New` methods on resource `Billing.Alert`
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1201
v1214
10 changes: 10 additions & 0 deletions account.go
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,12 @@ type AccountCapabilitiesLinkPaymentsParams struct {
Requested *bool `form:"requested"`
}

// The mb_way_payments capability.
type AccountCapabilitiesMbWayPaymentsParams 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 mobilepay_payments capability.
type AccountCapabilitiesMobilepayPaymentsParams 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 @@ -673,6 +679,8 @@ type AccountCapabilitiesParams struct {
LegacyPayments *AccountCapabilitiesLegacyPaymentsParams `form:"legacy_payments"`
// The link_payments capability.
LinkPayments *AccountCapabilitiesLinkPaymentsParams `form:"link_payments"`
// The mb_way_payments capability.
MbWayPayments *AccountCapabilitiesMbWayPaymentsParams `form:"mb_way_payments"`
// The mobilepay_payments capability.
MobilepayPayments *AccountCapabilitiesMobilepayPaymentsParams `form:"mobilepay_payments"`
// The multibanco_payments capability.
Expand Down Expand Up @@ -1284,6 +1292,8 @@ type AccountCapabilities struct {
LegacyPayments AccountCapabilityStatus `json:"legacy_payments"`
// The status of the link_payments capability of the account, or whether the account can directly process Link charges.
LinkPayments AccountCapabilityStatus `json:"link_payments"`
// The status of the MB WAY payments capability of the account, or whether the account can directly process MB WAY charges.
MbWayPayments AccountCapabilityStatus `json:"mb_way_payments"`
// The status of the MobilePay capability of the account, or whether the account can directly process MobilePay charges.
MobilepayPayments AccountCapabilityStatus `json:"mobilepay_payments"`
// The status of the Multibanco payments capability of the account, or whether the account can directly process Multibanco charges.
Expand Down
2 changes: 1 addition & 1 deletion api_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ package stripe

const (
apiVersion string = "2024-06-20"
previewVersion string = "2024-07-16.preview-v2"
previewVersion string = "2024-08-21.preview-v2"
)
14 changes: 11 additions & 3 deletions charge.go
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,9 @@ type ChargeParams struct {
// Shipping information for the charge. Helps prevent fraud on charges for physical goods.
Shipping *ShippingDetailsParams `form:"shipping"`
Source *PaymentSourceSourceParams `form:"*"` // PaymentSourceSourceParams has custom encoding so brought to top level with "*"
// For a non-card charge, text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors). This value overrides the account's default statement descriptor. For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix.
// For a non-card charge, text that appears on the customer's statement as the statement descriptor. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors).
//
// For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix.
StatementDescriptor *string `form:"statement_descriptor"`
// Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor.
StatementDescriptorSuffix *string `form:"statement_descriptor_suffix"`
Expand Down Expand Up @@ -1128,7 +1130,9 @@ type ChargeCaptureParams struct {
PaymentDetails *ChargeCapturePaymentDetailsParams `form:"payment_details"`
// The email address to send this charge's receipt to. This will override the previously-specified email address for this charge, if one was set. Receipts will not be sent in test mode.
ReceiptEmail *string `form:"receipt_email"`
// For a non-card charge, text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors). This value overrides the account's default statement descriptor. For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix.
// For a non-card charge, text that appears on the customer's statement as the statement descriptor. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors).
//
// For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix.
StatementDescriptor *string `form:"statement_descriptor"`
// Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor.
StatementDescriptorSuffix *string `form:"statement_descriptor_suffix"`
Expand Down Expand Up @@ -1724,6 +1728,7 @@ type ChargePaymentMethodDetailsLink struct {
// You could use this attribute to get a sense of international fees.
Country string `json:"country"`
}
type ChargePaymentMethodDetailsMbWay struct{}

// Internal card details
type ChargePaymentMethodDetailsMobilepayCard struct {
Expand Down Expand Up @@ -1930,6 +1935,7 @@ type ChargePaymentMethodDetails struct {
Klarna *ChargePaymentMethodDetailsKlarna `json:"klarna"`
Konbini *ChargePaymentMethodDetailsKonbini `json:"konbini"`
Link *ChargePaymentMethodDetailsLink `json:"link"`
MbWay *ChargePaymentMethodDetailsMbWay `json:"mb_way"`
Mobilepay *ChargePaymentMethodDetailsMobilepay `json:"mobilepay"`
Multibanco *ChargePaymentMethodDetailsMultibanco `json:"multibanco"`
OXXO *ChargePaymentMethodDetailsOXXO `json:"oxxo"`
Expand Down Expand Up @@ -2059,7 +2065,9 @@ type Charge struct {
Source *PaymentSource `json:"source"`
// The transfer ID which created this charge. Only present if the charge came from another Stripe account. [See the Connect documentation](https://docs.stripe.com/connect/destination-charges) for details.
SourceTransfer *Transfer `json:"source_transfer"`
// For a non-card charge, text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors). This value overrides the account's default statement descriptor. For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix.
// For a non-card charge, text that appears on the customer's statement as the statement descriptor. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors).
//
// For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix.
StatementDescriptor string `json:"statement_descriptor"`
// Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor.
StatementDescriptorSuffix string `json:"statement_descriptor_suffix"`
Expand Down
11 changes: 7 additions & 4 deletions checkout_session.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ const (
CheckoutSessionCustomerDetailsTaxExemptReverse CheckoutSessionCustomerDetailsTaxExempt = "reverse"
)

// The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, or `unknown`
// The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, or `unknown`
type CheckoutSessionCustomerDetailsTaxIDType string

// List of values that CheckoutSessionCustomerDetailsTaxIDType can take
Expand Down Expand Up @@ -157,6 +157,7 @@ const (
CheckoutSessionCustomerDetailsTaxIDTypeGBVAT CheckoutSessionCustomerDetailsTaxIDType = "gb_vat"
CheckoutSessionCustomerDetailsTaxIDTypeGEVAT CheckoutSessionCustomerDetailsTaxIDType = "ge_vat"
CheckoutSessionCustomerDetailsTaxIDTypeHKBR CheckoutSessionCustomerDetailsTaxIDType = "hk_br"
CheckoutSessionCustomerDetailsTaxIDTypeHROib CheckoutSessionCustomerDetailsTaxIDType = "hr_oib"
CheckoutSessionCustomerDetailsTaxIDTypeHUTIN CheckoutSessionCustomerDetailsTaxIDType = "hu_tin"
CheckoutSessionCustomerDetailsTaxIDTypeIDNPWP CheckoutSessionCustomerDetailsTaxIDType = "id_npwp"
CheckoutSessionCustomerDetailsTaxIDTypeILVAT CheckoutSessionCustomerDetailsTaxIDType = "il_vat"
Expand Down Expand Up @@ -1395,9 +1396,11 @@ type CheckoutSessionPaymentIntentDataParams struct {
SetupFutureUsage *string `form:"setup_future_usage"`
// Shipping information for this payment.
Shipping *ShippingDetailsParams `form:"shipping"`
// Text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors) for a non-card charge. This value overrides the account's default statement descriptor. Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead.
// Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors).
//
// Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead.
StatementDescriptor *string `form:"statement_descriptor"`
// Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement.
// Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement.
StatementDescriptorSuffix *string `form:"statement_descriptor_suffix"`
// The parameters used to automatically create a Transfer when the payment succeeds.
// For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
Expand Down Expand Up @@ -2603,7 +2606,7 @@ type CheckoutSessionCustomText struct {

// The customer's tax IDs after a completed Checkout Session.
type CheckoutSessionCustomerDetailsTaxID struct {
// The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, or `unknown`
// The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, or `unknown`
Type CheckoutSessionCustomerDetailsTaxIDType `json:"type"`
// The value of the tax ID.
Value string `json:"value"`
Expand Down
3 changes: 3 additions & 0 deletions confirmationtoken.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ const (
ConfirmationTokenPaymentMethodPreviewTypeKlarna ConfirmationTokenPaymentMethodPreviewType = "klarna"
ConfirmationTokenPaymentMethodPreviewTypeKonbini ConfirmationTokenPaymentMethodPreviewType = "konbini"
ConfirmationTokenPaymentMethodPreviewTypeLink ConfirmationTokenPaymentMethodPreviewType = "link"
ConfirmationTokenPaymentMethodPreviewTypeMbWay ConfirmationTokenPaymentMethodPreviewType = "mb_way"
ConfirmationTokenPaymentMethodPreviewTypeMobilepay ConfirmationTokenPaymentMethodPreviewType = "mobilepay"
ConfirmationTokenPaymentMethodPreviewTypeMultibanco ConfirmationTokenPaymentMethodPreviewType = "multibanco"
ConfirmationTokenPaymentMethodPreviewTypeOXXO ConfirmationTokenPaymentMethodPreviewType = "oxxo"
Expand Down Expand Up @@ -827,6 +828,7 @@ type ConfirmationTokenPaymentMethodPreviewLink struct {
// Deprecated:
PersistentToken string `json:"persistent_token"`
}
type ConfirmationTokenPaymentMethodPreviewMbWay struct{}
type ConfirmationTokenPaymentMethodPreviewMobilepay struct{}
type ConfirmationTokenPaymentMethodPreviewMultibanco struct{}
type ConfirmationTokenPaymentMethodPreviewOXXO struct{}
Expand Down Expand Up @@ -971,6 +973,7 @@ type ConfirmationTokenPaymentMethodPreview struct {
Klarna *ConfirmationTokenPaymentMethodPreviewKlarna `json:"klarna"`
Konbini *ConfirmationTokenPaymentMethodPreviewKonbini `json:"konbini"`
Link *ConfirmationTokenPaymentMethodPreviewLink `json:"link"`
MbWay *ConfirmationTokenPaymentMethodPreviewMbWay `json:"mb_way"`
Mobilepay *ConfirmationTokenPaymentMethodPreviewMobilepay `json:"mobilepay"`
Multibanco *ConfirmationTokenPaymentMethodPreviewMultibanco `json:"multibanco"`
OXXO *ConfirmationTokenPaymentMethodPreviewOXXO `json:"oxxo"`
Expand Down
Loading

0 comments on commit 8037f3d

Please sign in to comment.