Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update generated code #1818

Merged
merged 7 commits into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v840
v855
4 changes: 2 additions & 2 deletions bankaccount.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ const (

// For bank accounts, possible values are `new`, `validated`, `verified`, `verification_failed`, or `errored`. A bank account that hasn't had any activity or validation performed is `new`. If Stripe can determine that the bank account exists, its status will be `validated`. Note that there often isn't enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be `verified`. If the verification failed for any reason, such as microdeposit failure, the status will be `verification_failed`. If a payout sent to this bank account fails, we'll set the status to `errored` and will not continue to send [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) until the bank details are updated.
//
// For external accounts, possible values are `new`, `errored` and `verification_failed`. If a payouts fails, the status is set to `errored` and scheduled payouts are stopped until account details are updated. In India, if we can't [verify the owner of the bank account](https://support.stripe.com/questions/bank-account-ownership-verification), we'll set the status to `verification_failed`. Other validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply.
// For external accounts, possible values are `new`, `errored` and `verification_failed`. If a payout fails, the status is set to `errored` and scheduled payouts are stopped until account details are updated. In the US and India, if we can't [verify the owner of the bank account](https://support.stripe.com/questions/bank-account-ownership-verification), we'll set the status to `verification_failed`. Other validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply.
type BankAccountStatus string

// List of values that BankAccountStatus can take
Expand Down Expand Up @@ -484,7 +484,7 @@ type BankAccount struct {
RoutingNumber string `json:"routing_number"`
// For bank accounts, possible values are `new`, `validated`, `verified`, `verification_failed`, or `errored`. A bank account that hasn't had any activity or validation performed is `new`. If Stripe can determine that the bank account exists, its status will be `validated`. Note that there often isn't enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be `verified`. If the verification failed for any reason, such as microdeposit failure, the status will be `verification_failed`. If a payout sent to this bank account fails, we'll set the status to `errored` and will not continue to send [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) until the bank details are updated.
//
// For external accounts, possible values are `new`, `errored` and `verification_failed`. If a payouts fails, the status is set to `errored` and scheduled payouts are stopped until account details are updated. In India, if we can't [verify the owner of the bank account](https://support.stripe.com/questions/bank-account-ownership-verification), we'll set the status to `verification_failed`. Other validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply.
// For external accounts, possible values are `new`, `errored` and `verification_failed`. If a payout fails, the status is set to `errored` and scheduled payouts are stopped until account details are updated. In the US and India, if we can't [verify the owner of the bank account](https://support.stripe.com/questions/bank-account-ownership-verification), we'll set the status to `verification_failed`. Other validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply.
Status BankAccountStatus `json:"status"`
}

Expand Down
28 changes: 14 additions & 14 deletions checkout_session.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const (
CheckoutSessionAutomaticTaxStatusRequiresLocationInputs CheckoutSessionAutomaticTaxStatus = "requires_location_inputs"
)

// Describes whether Checkout should collect the customer's billing address.
// Describes whether Checkout should collect the customer's billing address. Defaults to `auto`.
type CheckoutSessionBillingAddressCollection string

// List of values that CheckoutSessionBillingAddressCollection can take
Expand Down Expand Up @@ -214,7 +214,7 @@ const (
CheckoutSessionModeSubscription CheckoutSessionMode = "subscription"
)

// Configure whether a Checkout Session should collect a payment method.
// Configure whether a Checkout Session should collect a payment method. Defaults to `always`.
type CheckoutSessionPaymentMethodCollection string

// List of values that CheckoutSessionPaymentMethodCollection can take
Expand Down Expand Up @@ -673,7 +673,7 @@ const (
CheckoutSessionPaymentStatusUnpaid CheckoutSessionPaymentStatus = "unpaid"
)

// Applies to Checkout Sessions with `ui_mode: embedded`. By default, Stripe will always redirect to your return_url after a successful confirmation. If you set `redirect_on_completion: 'if_required'`, then we will only redirect if your user chooses a redirect-based payment method.
// This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-redirect-behavior) of embedded sessions. Defaults to `always`.
type CheckoutSessionRedirectOnCompletion string

// List of values that CheckoutSessionRedirectOnCompletion can take
Expand Down Expand Up @@ -750,7 +750,7 @@ const (
CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonZeroRated CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "zero_rated"
)

// The UI mode of the Session. Can be `hosted` (default) or `embedded`.
// The UI mode of the Session. Defaults to `hosted`.
type CheckoutSessionUIMode string

// List of values that CheckoutSessionUIMode can take
Expand Down Expand Up @@ -1819,7 +1819,7 @@ type CheckoutSessionParams struct {
AllowPromotionCodes *bool `form:"allow_promotion_codes"`
// Settings for automatic tax lookup for this session and resulting payments, invoices, and subscriptions.
AutomaticTax *CheckoutSessionAutomaticTaxParams `form:"automatic_tax"`
// Specify whether Checkout should collect the customer's billing address.
// Specify whether Checkout should collect the customer's billing address. Defaults to `auto`.
BillingAddressCollection *string `form:"billing_address_collection"`
// If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website.
CancelURL *string `form:"cancel_url"`
Expand Down Expand Up @@ -1890,7 +1890,7 @@ type CheckoutSessionParams struct {
// Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.
// This may occur if the Checkout Session includes a free trial or a discount.
//
// Can only be set in `subscription` mode.
// Can only be set in `subscription` mode. Defaults to `always`.
//
// If you'd like information on how to collect a payment method outside of Checkout, read the guide on configuring [subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials).
PaymentMethodCollection *string `form:"payment_method_collection"`
Expand All @@ -1915,7 +1915,7 @@ type CheckoutSessionParams struct {
// We recommend that you review your privacy policy and check with your legal contacts
// before using this feature. Learn more about [collecting phone numbers with Checkout](https://stripe.com/docs/payments/checkout/phone-numbers).
PhoneNumberCollection *CheckoutSessionPhoneNumberCollectionParams `form:"phone_number_collection"`
// This parameter applies to `ui_mode: embedded`. By default, Stripe will always redirect to your return_url after a successful confirmation. If you set `redirect_on_completion: 'if_required'`, then we will only redirect if your user chooses a redirect-based payment method.
// This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-redirect-behavior) of embedded sessions. Defaults to `always`.
RedirectOnCompletion *string `form:"redirect_on_completion"`
// The URL to redirect your customer back to after they authenticate or cancel their payment on the
// payment method's app or site. This parameter is required if ui_mode is `embedded`
Expand All @@ -1941,7 +1941,7 @@ type CheckoutSessionParams struct {
SuccessURL *string `form:"success_url"`
// Controls tax ID collection settings for the session.
TaxIDCollection *CheckoutSessionTaxIDCollectionParams `form:"tax_id_collection"`
// `ui_mode` can be `hosted` or `embedded`. The default is `hosted`.
// The UI mode of the Session. Defaults to `hosted`.
UIMode *string `form:"ui_mode"`
}

Expand Down Expand Up @@ -2155,7 +2155,7 @@ type CheckoutSessionCustomerDetailsTaxID struct {
Value string `json:"value"`
}

// The customer details including the customer's tax exempt status and the customer's tax IDs. Only the customer's email is present on Sessions in `setup` mode.
// The customer details including the customer's tax exempt status and the customer's tax IDs. Customer's address details are not present on Sessions in `setup` mode.
type CheckoutSessionCustomerDetails struct {
// The customer's address after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022.
Address *Address `json:"address"`
Expand Down Expand Up @@ -2657,7 +2657,7 @@ type CheckoutSession struct {
// Total of all items after discounts and taxes are applied.
AmountTotal int64 `json:"amount_total"`
AutomaticTax *CheckoutSessionAutomaticTax `json:"automatic_tax"`
// Describes whether Checkout should collect the customer's billing address.
// Describes whether Checkout should collect the customer's billing address. Defaults to `auto`.
BillingAddressCollection CheckoutSessionBillingAddressCollection `json:"billing_address_collection"`
// If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website.
CancelURL string `json:"cancel_url"`
Expand Down Expand Up @@ -2685,7 +2685,7 @@ type CheckoutSession struct {
Customer *Customer `json:"customer"`
// Configure whether a Checkout Session creates a Customer when the Checkout Session completes.
CustomerCreation CheckoutSessionCustomerCreation `json:"customer_creation"`
// The customer details including the customer's tax exempt status and the customer's tax IDs. Only the customer's email is present on Sessions in `setup` mode.
// The customer details including the customer's tax exempt status and the customer's tax IDs. Customer's address details are not present on Sessions in `setup` mode.
CustomerDetails *CheckoutSessionCustomerDetails `json:"customer_details"`
// If provided, this value will be used when the Customer object is created.
// If not provided, customers will be asked to enter their email address.
Expand Down Expand Up @@ -2720,7 +2720,7 @@ type CheckoutSession struct {
PaymentIntent *PaymentIntent `json:"payment_intent"`
// The ID of the Payment Link that created this Session.
PaymentLink *PaymentLink `json:"payment_link"`
// Configure whether a Checkout Session should collect a payment method.
// Configure whether a Checkout Session should collect a payment method. Defaults to `always`.
PaymentMethodCollection CheckoutSessionPaymentMethodCollection `json:"payment_method_collection"`
// Information about the payment method configuration used for this Checkout session if using dynamic payment methods.
PaymentMethodConfigurationDetails *CheckoutSessionPaymentMethodConfigurationDetails `json:"payment_method_configuration_details"`
Expand All @@ -2735,7 +2735,7 @@ type CheckoutSession struct {
PhoneNumberCollection *CheckoutSessionPhoneNumberCollection `json:"phone_number_collection"`
// The ID of the original expired Checkout Session that triggered the recovery flow.
RecoveredFrom string `json:"recovered_from"`
// Applies to Checkout Sessions with `ui_mode: embedded`. By default, Stripe will always redirect to your return_url after a successful confirmation. If you set `redirect_on_completion: 'if_required'`, then we will only redirect if your user chooses a redirect-based payment method.
// This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-redirect-behavior) of embedded sessions. Defaults to `always`.
RedirectOnCompletion CheckoutSessionRedirectOnCompletion `json:"redirect_on_completion"`
// Applies to Checkout Sessions with `ui_mode: embedded`. The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site.
ReturnURL string `json:"return_url"`
Expand Down Expand Up @@ -2763,7 +2763,7 @@ type CheckoutSession struct {
TaxIDCollection *CheckoutSessionTaxIDCollection `json:"tax_id_collection"`
// Tax and discount details for the computed total amount.
TotalDetails *CheckoutSessionTotalDetails `json:"total_details"`
// The UI mode of the Session. Can be `hosted` (default) or `embedded`.
// The UI mode of the Session. Defaults to `hosted`.
UIMode CheckoutSessionUIMode `json:"ui_mode"`
// The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you're using [Custom Domains](https://stripe.com/docs/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it'll use `checkout.stripe.com.`
// This value is only present when the session is active.
Expand Down
2 changes: 2 additions & 0 deletions invoice.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,8 @@ type InvoiceParams struct {
Issuer *InvoiceIssuerParams `form:"issuer"`
// 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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
Metadata map[string]string `form:"metadata"`
// Set the number for this invoice. If no number is present then a number will be assigned automatically when the invoice is finalized. In many markets, regulations require invoices to be unique, sequential and / or gapless. You are responsible for ensuring this is true across all your different invoicing systems in the event that you edit the invoice number using our API. If you use only Stripe for your invoices and do not change invoice numbers, Stripe handles this aspect of compliance for you automatically.
Number *string `form:"number"`
// The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details.
OnBehalfOf *string `form:"on_behalf_of"`
// Configuration settings for the PaymentIntent that is generated when the invoice is finalized.
Expand Down
12 changes: 6 additions & 6 deletions paymentlink.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const (
PaymentLinkAutomaticTaxLiabilityTypeSelf PaymentLinkAutomaticTaxLiabilityType = "self"
)

// Configuration for collecting the customer's billing address.
// Configuration for collecting the customer's billing address. Defaults to `auto`.
type PaymentLinkBillingAddressCollection string

// List of values that PaymentLinkBillingAddressCollection can take
Expand Down Expand Up @@ -119,7 +119,7 @@ const (
PaymentLinkPaymentIntentDataSetupFutureUsageOnSession PaymentLinkPaymentIntentDataSetupFutureUsage = "on_session"
)

// Configuration for collecting a payment method during checkout.
// Configuration for collecting a payment method during checkout. Defaults to `always`.
type PaymentLinkPaymentMethodCollection string

// List of values that PaymentLinkPaymentMethodCollection can take
Expand Down Expand Up @@ -588,7 +588,7 @@ type PaymentLinkParams struct {
ApplicationFeePercent *float64 `form:"application_fee_percent"`
// Configuration for automatic tax collection.
AutomaticTax *PaymentLinkAutomaticTaxParams `form:"automatic_tax"`
// Configuration for collecting the customer's billing address.
// Configuration for collecting the customer's billing address. Defaults to `auto`.
BillingAddressCollection *string `form:"billing_address_collection"`
// Configure fields to gather active consent from customers.
ConsentCollection *PaymentLinkConsentCollectionParams `form:"consent_collection"`
Expand Down Expand Up @@ -616,7 +616,7 @@ type PaymentLinkParams struct {
PaymentIntentData *PaymentLinkPaymentIntentDataParams `form:"payment_intent_data"`
// Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount.
//
// Can only be set in `subscription` mode.
// Can only be set in `subscription` mode. Defaults to `always`.
//
// If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials).
PaymentMethodCollection *string `form:"payment_method_collection"`
Expand Down Expand Up @@ -954,7 +954,7 @@ type PaymentLink struct {
// This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account.
ApplicationFeePercent float64 `json:"application_fee_percent"`
AutomaticTax *PaymentLinkAutomaticTax `json:"automatic_tax"`
// Configuration for collecting the customer's billing address.
// Configuration for collecting the customer's billing address. Defaults to `auto`.
BillingAddressCollection PaymentLinkBillingAddressCollection `json:"billing_address_collection"`
// When set, provides configuration to gather active consent from customers.
ConsentCollection *PaymentLinkConsentCollection `json:"consent_collection"`
Expand Down Expand Up @@ -983,7 +983,7 @@ type PaymentLink struct {
OnBehalfOf *Account `json:"on_behalf_of"`
// Indicates the parameters to be passed to PaymentIntent creation during checkout.
PaymentIntentData *PaymentLinkPaymentIntentData `json:"payment_intent_data"`
// Configuration for collecting a payment method during checkout.
// Configuration for collecting a payment method during checkout. Defaults to `always`.
PaymentMethodCollection PaymentLinkPaymentMethodCollection `json:"payment_method_collection"`
// The list of payment method types that customers can use. When `null`, Stripe will dynamically show relevant payment methods you've enabled in your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).
PaymentMethodTypes []PaymentLinkPaymentMethodType `json:"payment_method_types"`
Expand Down
Loading
Loading