Skip to content

Commit

Permalink
Merge pull request #1813 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 Feb 16, 2024
2 parents a9d259e + f1cf19c commit f0e2282
Show file tree
Hide file tree
Showing 22 changed files with 529 additions and 45 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
# Changelog

## 76.17.0 - 2024-02-15
* [#1812](https://github.com/stripe/stripe-go/pull/1812) Update generated code
* Add support for `Networks` on `Card`, `PaymentMethodCardParams`, and `TokenCardParams`
* Add support for new value `no_voec` on enums `CheckoutSessionCustomerDetailsTaxIdsType`, `InvoiceCustomerTaxIdsType`, `TaxCalculationCustomerDetailsTaxIdsType`, `TaxIdType`, and `TaxTransactionCustomerDetailsTaxIdsType`
* Add support for new value `financial_connections.account.refreshed_ownership` on enum `EventType`
* Add support for `DisplayBrand` on `PaymentMethodCard`

## 76.17.0-beta.1 - 2024-02-08
* [#1810](https://github.com/stripe/stripe-go/pull/1810) Update generated code for beta
* Add support for `PaymentMethodOptions` on `ConfirmationToken`
* Add support for new value `velobank` on enum `ConfirmationTokenPaymentMethodPreviewP24Bank`

## 76.16.0 - 2024-02-08
* [#1811](https://github.com/stripe/stripe-go/pull/1811) Update generated code
* Add support for new value `velobank` on enums `ChargePaymentMethodDetailsP24Bank` and `PaymentMethodP24Bank`
* Add support for `SetupFutureUsage` on `PaymentIntentConfirmPaymentMethodOptionsBlikParams`, `PaymentIntentPaymentMethodOptionsBlikParams`, and `PaymentIntentPaymentMethodOptionsBlik`
* Add support for `RequireCVCRecollection` on `PaymentIntentConfirmPaymentMethodOptionsCardParams`, `PaymentIntentPaymentMethodOptionsCardParams`, and `PaymentIntentPaymentMethodOptionsCard`

## 76.16.0-beta.1 - 2024-02-01
* [#1806](https://github.com/stripe/stripe-go/pull/1806) Update generated code for beta
* Add support for new resources `Entitlements.Event` and `Entitlements.Feature`
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v814
v831
20 changes: 20 additions & 0 deletions account.go
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,12 @@ type AccountCapabilitiesPaypalPaymentsParams struct {
Requested *bool `form:"requested"`
}

// The payto_payments capability.
type AccountCapabilitiesPaytoPaymentsParams 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 promptpay_payments capability.
type AccountCapabilitiesPromptPayPaymentsParams 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 @@ -480,6 +486,12 @@ type AccountCapabilitiesTreasuryParams struct {
Requested *bool `form:"requested"`
}

// The twint_payments capability.
type AccountCapabilitiesTWINTPaymentsParams 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 us_bank_account_ach_payments capability.
type AccountCapabilitiesUSBankAccountACHPaymentsParams 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 @@ -550,6 +562,8 @@ type AccountCapabilitiesParams struct {
PayNowPayments *AccountCapabilitiesPayNowPaymentsParams `form:"paynow_payments"`
// The paypal_payments capability.
PaypalPayments *AccountCapabilitiesPaypalPaymentsParams `form:"paypal_payments"`
// The payto_payments capability.
PaytoPayments *AccountCapabilitiesPaytoPaymentsParams `form:"payto_payments"`
// The promptpay_payments capability.
PromptPayPayments *AccountCapabilitiesPromptPayPaymentsParams `form:"promptpay_payments"`
// The revolut_pay_payments capability.
Expand All @@ -568,6 +582,8 @@ type AccountCapabilitiesParams struct {
Transfers *AccountCapabilitiesTransfersParams `form:"transfers"`
// The treasury capability.
Treasury *AccountCapabilitiesTreasuryParams `form:"treasury"`
// The twint_payments capability.
TWINTPayments *AccountCapabilitiesTWINTPaymentsParams `form:"twint_payments"`
// The us_bank_account_ach_payments capability.
USBankAccountACHPayments *AccountCapabilitiesUSBankAccountACHPaymentsParams `form:"us_bank_account_ach_payments"`
// The zip_payments capability.
Expand Down Expand Up @@ -1079,6 +1095,8 @@ type AccountCapabilities struct {
PayNowPayments AccountCapabilityStatus `json:"paynow_payments"`
// The status of the PayPal payments capability of the account, or whether the account can directly process PayPal charges.
PaypalPayments AccountCapabilityStatus `json:"paypal_payments"`
// The status of the PayTo capability of the account, or whether the account can directly process PayTo charges.
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 RevolutPay capability of the account, or whether the account can directly process RevolutPay payments.
Expand All @@ -1097,6 +1115,8 @@ type AccountCapabilities struct {
Transfers AccountCapabilityStatus `json:"transfers"`
// The status of the banking capability, or whether the account can have bank accounts.
Treasury AccountCapabilityStatus `json:"treasury"`
// The status of the Twint capability of the account, or whether the account can directly process Twint charges.
TWINTPayments AccountCapabilityStatus `json:"twint_payments"`
// The status of the US bank account ACH payments capability of the account, or whether the account can directly process US bank account charges.
USBankAccountACHPayments AccountCapabilityStatus `json:"us_bank_account_ach_payments"`
// The status of the Zip capability of the account, or whether the account can directly process Zip charges.
Expand Down
8 changes: 7 additions & 1 deletion card.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,11 @@ func (p *CardListParams) AppendTo(body *form.Values, keyParts []string) {
}
}

type CardNetworks struct {
// The preferred network for co-branded cards. Can be `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if requested network is not valid for the card.
Preferred string `json:"preferred"`
}

// You can store multiple cards on a customer in order to charge the customer
// later. You can also store multiple debit cards on a recipient in order to
// transfer to those cards later.
Expand Down Expand Up @@ -359,7 +364,8 @@ type Card struct {
// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
Metadata map[string]string `json:"metadata"`
// Cardholder name.
Name string `json:"name"`
Name string `json:"name"`
Networks *CardNetworks `json:"networks"`
// String representing the object's type. Objects of the same type share the same value.
Object string `json:"object"`
// For external accounts that are cards, possible values are `new` and `errored`. If a payout fails, the status is set to `errored` and [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) are stopped until account details are updated.
Expand Down
29 changes: 28 additions & 1 deletion charge.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,15 @@ const (
ChargePaymentMethodDetailsCardChecksCVCCheckUnchecked ChargePaymentMethodDetailsCardChecksCVCCheck = "unchecked"
)

// Indicates whether or not the decremental authorization feature is supported.
type ChargePaymentMethodDetailsCardDecrementalAuthorizationStatus string

// List of values that ChargePaymentMethodDetailsCardDecrementalAuthorizationStatus can take
const (
ChargePaymentMethodDetailsCardDecrementalAuthorizationStatusAvailable ChargePaymentMethodDetailsCardDecrementalAuthorizationStatus = "available"
ChargePaymentMethodDetailsCardDecrementalAuthorizationStatusUnavailable ChargePaymentMethodDetailsCardDecrementalAuthorizationStatus = "unavailable"
)

// Indicates whether or not the capture window is extended beyond the standard authorization.
type ChargePaymentMethodDetailsCardExtendedAuthorizationStatus string

Expand Down Expand Up @@ -1301,6 +1310,10 @@ type ChargePaymentMethodDetailsCardChecks struct {
// If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
CVCCheck ChargePaymentMethodDetailsCardChecksCVCCheck `json:"cvc_check"`
}
type ChargePaymentMethodDetailsCardDecrementalAuthorization struct {
// Indicates whether or not the decremental authorization feature is supported.
Status ChargePaymentMethodDetailsCardDecrementalAuthorizationStatus `json:"status"`
}
type ChargePaymentMethodDetailsCardExtendedAuthorization struct {
// Indicates whether or not the capture window is extended beyond the standard authorization.
Status ChargePaymentMethodDetailsCardExtendedAuthorizationStatus `json:"status"`
Expand Down Expand Up @@ -1408,7 +1421,8 @@ type ChargePaymentMethodDetailsCard struct {
// Check results by Card networks on Card address and CVC at time of payment.
Checks *ChargePaymentMethodDetailsCardChecks `json:"checks"`
// Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
Country string `json:"country"`
Country string `json:"country"`
DecrementalAuthorization *ChargePaymentMethodDetailsCardDecrementalAuthorization `json:"decremental_authorization"`
// Two-digit number representing the card's expiration month.
ExpMonth int64 `json:"exp_month"`
// Four-digit number representing the card's expiration year.
Expand Down Expand Up @@ -1725,6 +1739,16 @@ type ChargePaymentMethodDetailsPaypal struct {
// (if supported) at the time of authorization or settlement. They cannot be set or mutated.
VerifiedName string `json:"verified_name"`
}
type ChargePaymentMethodDetailsPayto struct {
// Bank-State-Branch number of the bank account.
BSBNumber string `json:"bsb_number"`
// Last four digits of the bank account number.
Last4 string `json:"last4"`
// ID of the mandate used to make this payment.
Mandate string `json:"mandate"`
// The PayID alias for the bank account.
PayID string `json:"pay_id"`
}
type ChargePaymentMethodDetailsPix struct {
// Unique transaction id generated by BCB
BankTransactionID string `json:"bank_transaction_id"`
Expand Down Expand Up @@ -1787,6 +1811,7 @@ type ChargePaymentMethodDetailsSwish struct {
// The last four digits of the Swish account phone number
VerifiedPhoneLast4 string `json:"verified_phone_last4"`
}
type ChargePaymentMethodDetailsTWINT struct{}
type ChargePaymentMethodDetailsUSBankAccount struct {
// Account holder type: individual or company.
AccountHolderType ChargePaymentMethodDetailsUSBankAccountAccountHolderType `json:"account_holder_type"`
Expand Down Expand Up @@ -1841,6 +1866,7 @@ type ChargePaymentMethodDetails struct {
P24 *ChargePaymentMethodDetailsP24 `json:"p24"`
PayNow *ChargePaymentMethodDetailsPayNow `json:"paynow"`
Paypal *ChargePaymentMethodDetailsPaypal `json:"paypal"`
Payto *ChargePaymentMethodDetailsPayto `json:"payto"`
Pix *ChargePaymentMethodDetailsPix `json:"pix"`
PromptPay *ChargePaymentMethodDetailsPromptPay `json:"promptpay"`
RevolutPay *ChargePaymentMethodDetailsRevolutPay `json:"revolut_pay"`
Expand All @@ -1849,6 +1875,7 @@ type ChargePaymentMethodDetails struct {
Sofort *ChargePaymentMethodDetailsSofort `json:"sofort"`
StripeAccount *ChargePaymentMethodDetailsStripeAccount `json:"stripe_account"`
Swish *ChargePaymentMethodDetailsSwish `json:"swish"`
TWINT *ChargePaymentMethodDetailsTWINT `json:"twint"`
// The type of transaction-specific details of the payment method used in the payment, one of `ach_credit_transfer`, `ach_debit`, `acss_debit`, `alipay`, `au_becs_debit`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `klarna`, `multibanco`, `p24`, `sepa_debit`, `sofort`, `stripe_account`, or `wechat`.
// An additional hash is included on `payment_method_details` with a name matching this value.
// It contains information specific to the payment method.
Expand Down
5 changes: 3 additions & 2 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`, `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`, 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`, `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`, or `unknown`
type CheckoutSessionCustomerDetailsTaxIDType string

// List of values that CheckoutSessionCustomerDetailsTaxIDType can take
Expand Down Expand Up @@ -170,6 +170,7 @@ const (
CheckoutSessionCustomerDetailsTaxIDTypeMYITN CheckoutSessionCustomerDetailsTaxIDType = "my_itn"
CheckoutSessionCustomerDetailsTaxIDTypeMYSST CheckoutSessionCustomerDetailsTaxIDType = "my_sst"
CheckoutSessionCustomerDetailsTaxIDTypeNOVAT CheckoutSessionCustomerDetailsTaxIDType = "no_vat"
CheckoutSessionCustomerDetailsTaxIDTypeNOVOEC CheckoutSessionCustomerDetailsTaxIDType = "no_voec"
CheckoutSessionCustomerDetailsTaxIDTypeNZGST CheckoutSessionCustomerDetailsTaxIDType = "nz_gst"
CheckoutSessionCustomerDetailsTaxIDTypePERUC CheckoutSessionCustomerDetailsTaxIDType = "pe_ruc"
CheckoutSessionCustomerDetailsTaxIDTypePHTIN CheckoutSessionCustomerDetailsTaxIDType = "ph_tin"
Expand Down Expand Up @@ -2163,7 +2164,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`, `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`, 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`, `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`, or `unknown`
Type CheckoutSessionCustomerDetailsTaxIDType `json:"type"`
// The value of the tax ID.
Value string `json:"value"`
Expand Down
Loading

0 comments on commit f0e2282

Please sign in to comment.