Skip to content

Commit

Permalink
Merge pull request #1810 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 8, 2024
2 parents 5983b9c + e9f5a0a commit 76879e7
Show file tree
Hide file tree
Showing 9 changed files with 65 additions and 10 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@
* Add support for `AccountTaxIDs` on `InvoiceCreatePreviewScheduleDetailsPhasesInvoiceSettingsParams`, `InvoiceUpcomingLinesScheduleDetailsPhasesInvoiceSettingsParams`, and `InvoiceUpcomingScheduleDetailsPhasesInvoiceSettingsParams`
* Add support for `Feature` on `ProductFeaturesParams` and `ProductFeatures`

## 76.15.0 - 2024-02-01
Release specs are identical.
* [#1805](https://github.com/stripe/stripe-go/pull/1805) Update generated code
* Add support for Swish payment method throughout the API.
* Add support for `Relationship` on `AccountIndividualParams` and `TokenAccountIndividualParams`
* Add support for `Invoices` on `AccountSettingsParams` and `AccountSettings`
* Add support for `AccountTaxIDs` on `SubscriptionInvoiceSettingsParams`, `SubscriptionScheduleDefaultSettingsInvoiceSettingsParams`, `SubscriptionScheduleDefaultSettingsInvoiceSettings`, `SubscriptionSchedulePhasesInvoiceSettingsParams`, and `SubscriptionSchedulePhasesInvoiceSettings`
* Add support for `JurisdictionLevel` on `TaxRate`

## 76.15.0-beta.1 - 2024-01-25
* [#1802](https://github.com/stripe/stripe-go/pull/1802) Update generated code for beta
* Add support for `CreatePreview` method on resource `Invoice`
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v808
v814
2 changes: 1 addition & 1 deletion charge.go
Original file line number Diff line number Diff line change
Expand Up @@ -1676,7 +1676,7 @@ type ChargePaymentMethodDetailsOXXO struct {
Number string `json:"number"`
}
type ChargePaymentMethodDetailsP24 struct {
// The customer's bank. Can be one of `ing`, `citi_handlowy`, `tmobile_usbugi_bankowe`, `plus_bank`, `etransfer_pocztowy24`, `banki_spbdzielcze`, `bank_nowy_bfg_sa`, `getin_bank`, `blik`, `noble_pay`, `ideabank`, `envelobank`, `santander_przelew24`, `nest_przelew`, `mbank_mtransfer`, `inteligo`, `pbac_z_ipko`, `bnp_paribas`, `credit_agricole`, `toyota_bank`, `bank_pekao_sa`, `volkswagen_bank`, `bank_millennium`, `alior_bank`, or `boz`.
// The customer's bank. Can be one of `ing`, `citi_handlowy`, `tmobile_usbugi_bankowe`, `plus_bank`, `etransfer_pocztowy24`, `banki_spbdzielcze`, `bank_nowy_bfg_sa`, `getin_bank`, `velobank`, `blik`, `noble_pay`, `ideabank`, `envelobank`, `santander_przelew24`, `nest_przelew`, `mbank_mtransfer`, `inteligo`, `pbac_z_ipko`, `bnp_paribas`, `credit_agricole`, `toyota_bank`, `bank_pekao_sa`, `volkswagen_bank`, `bank_millennium`, `alior_bank`, or `boz`.
Bank string `json:"bank"`
// Unique reference for this Przelewy24 payment.
Reference string `json:"reference"`
Expand Down
2 changes: 1 addition & 1 deletion client/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ type API struct {
TaxCodes *taxcode.Client
// TaxForms is the client used to invoke /tax/forms APIs.
TaxForms *taxform.Client
// TaxIDs is the client used to invoke /tax_ids APIs.
// TaxIDs is the client used to invoke /customers/{customer}/tax_ids APIs.
TaxIDs *taxid.Client
// TaxRates is the client used to invoke /tax_rates APIs.
TaxRates *taxrate.Client
Expand Down
17 changes: 16 additions & 1 deletion confirmationtoken.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ const (
ConfirmationTokenPaymentMethodPreviewP24BankSantanderPrzelew24 ConfirmationTokenPaymentMethodPreviewP24Bank = "santander_przelew24"
ConfirmationTokenPaymentMethodPreviewP24BankTmobileUsbugiBankowe ConfirmationTokenPaymentMethodPreviewP24Bank = "tmobile_usbugi_bankowe"
ConfirmationTokenPaymentMethodPreviewP24BankToyotaBank ConfirmationTokenPaymentMethodPreviewP24Bank = "toyota_bank"
ConfirmationTokenPaymentMethodPreviewP24BankVelobank ConfirmationTokenPaymentMethodPreviewP24Bank = "velobank"
ConfirmationTokenPaymentMethodPreviewP24BankVolkswagenBank ConfirmationTokenPaymentMethodPreviewP24Bank = "volkswagen_bank"
)

Expand Down Expand Up @@ -341,6 +342,18 @@ type ConfirmationTokenMandateData struct {
// This hash contains details about the customer acceptance of the Mandate.
CustomerAcceptance *ConfirmationTokenMandateDataCustomerAcceptance `json:"customer_acceptance"`
}

// This hash contains the card payment method options.
type ConfirmationTokenPaymentMethodOptionsCard struct {
// The `cvc_update` Token collected from the Payment Element.
CVCToken string `json:"cvc_token"`
}

// Payment-method-specific configuration for this ConfirmationToken.
type ConfirmationTokenPaymentMethodOptions struct {
// This hash contains the card payment method options.
Card *ConfirmationTokenPaymentMethodOptionsCard `json:"card"`
}
type ConfirmationTokenPaymentMethodPreviewACSSDebit struct {
// Name of the bank associated with the bank account.
BankName string `json:"bank_name"`
Expand Down Expand Up @@ -403,7 +416,7 @@ type ConfirmationTokenPaymentMethodPreviewCardChecks struct {
type ConfirmationTokenPaymentMethodPreviewCardNetworks struct {
// All available networks for the card.
Available []string `json:"available"`
// The preferred network for the card. Can be `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if requested network is not valid for the card.
// 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"`
}

Expand Down Expand Up @@ -774,6 +787,8 @@ type ConfirmationToken struct {
PaymentIntent string `json:"payment_intent"`
// ID of an existing PaymentMethod.
PaymentMethod *PaymentMethod `json:"payment_method"`
// Payment-method-specific configuration for this ConfirmationToken.
PaymentMethodOptions *ConfirmationTokenPaymentMethodOptions `json:"payment_method_options"`
// Payment details collected by the Payment Element, used to create a PaymentMethod when a PaymentIntent or SetupIntent is confirmed with this ConfirmationToken.
PaymentMethodPreview *ConfirmationTokenPaymentMethodPreview `json:"payment_method_preview"`
// Return URL used to confirm the Intent.
Expand Down
2 changes: 1 addition & 1 deletion identity_verificationreport.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ type IdentityVerificationReportIDNumber struct {
Error *IdentityVerificationReportIDNumberError `json:"error"`
// First name.
FirstName string `json:"first_name"`
// ID number.
// ID number. When `id_number_type` is `us_ssn`, only the last 4 digits are present.
IDNumber string `json:"id_number"`
// Type of ID number.
IDNumberType IdentityVerificationReportIDNumberIDNumberType `json:"id_number_type"`
Expand Down
33 changes: 32 additions & 1 deletion paymentintent.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,18 @@ const (
PaymentIntentPaymentMethodOptionsBancontactSetupFutureUsageOffSession PaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage = "off_session"
)

// 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 PaymentIntentPaymentMethodOptionsBLIKSetupFutureUsage string

// List of values that PaymentIntentPaymentMethodOptionsBLIKSetupFutureUsage can take
const (
PaymentIntentPaymentMethodOptionsBLIKSetupFutureUsageNone PaymentIntentPaymentMethodOptionsBLIKSetupFutureUsage = "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 @@ -1554,6 +1566,14 @@ type PaymentIntentPaymentMethodOptionsBancontactParams struct {
type PaymentIntentPaymentMethodOptionsBLIKParams struct {
// The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation.
Code *string `form:"code"`
// 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).
//
// If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
SetupFutureUsage *string `form:"setup_future_usage"`
}

// If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options.
Expand Down Expand Up @@ -1710,6 +1730,8 @@ type PaymentIntentPaymentMethodOptionsCardParams struct {
RequestOvercapture *string `form:"request_overcapture"`
// We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
RequestThreeDSecure *string `form:"request_three_d_secure"`
// When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter).
RequireCVCRecollection *bool `form:"require_cvc_recollection"`
// 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 @@ -3787,7 +3809,14 @@ type PaymentIntentPaymentMethodOptionsBancontact 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 PaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage `json:"setup_future_usage"`
}
type PaymentIntentPaymentMethodOptionsBLIK struct{}
type PaymentIntentPaymentMethodOptionsBLIK 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 PaymentIntentPaymentMethodOptionsBLIKSetupFutureUsage `json:"setup_future_usage"`
}
type PaymentIntentPaymentMethodOptionsBoleto struct {
// The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time.
ExpiresAfterDays int64 `json:"expires_after_days"`
Expand Down Expand Up @@ -3869,6 +3898,8 @@ type PaymentIntentPaymentMethodOptionsCard struct {
RequestOvercapture PaymentIntentPaymentMethodOptionsCardRequestOvercapture `json:"request_overcapture"`
// We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
RequestThreeDSecure PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure `json:"request_three_d_secure"`
// When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter).
RequireCVCRecollection bool `json:"require_cvc_recollection"`
// 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
4 changes: 2 additions & 2 deletions paymentmethod.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const (
PaymentMethodCardNetworksAvailableUnknown PaymentMethodCardNetworksAvailable = "unknown"
)

// The preferred network for the card. Can be `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if requested network is not valid for the card.
// 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.
type PaymentMethodCardNetworksPreferred string

// List of values that PaymentMethodCardNetworksPreferred can take
Expand Down Expand Up @@ -653,7 +653,7 @@ type PaymentMethodCardChecks struct {
type PaymentMethodCardNetworks struct {
// All available networks for the card.
Available []PaymentMethodCardNetworksAvailable `json:"available"`
// The preferred network for the card. Can be `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if requested network is not valid for the card.
// 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 PaymentMethodCardNetworksPreferred `json:"preferred"`
}

Expand Down
4 changes: 2 additions & 2 deletions taxid/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//
//

// Package taxid provides the /tax_ids APIs
// Package taxid provides the /customers/{customer}/tax_ids APIs
package taxid

import (
Expand All @@ -15,7 +15,7 @@ import (
"github.com/stripe/stripe-go/v76/form"
)

// Client is used to invoke /tax_ids APIs.
// Client is used to invoke /customers/{customer}/tax_ids APIs.
type Client struct {
B stripe.Backend
Key string
Expand Down

0 comments on commit 76879e7

Please sign in to comment.