Skip to content

Commit

Permalink
Update generated code (#1762)
Browse files Browse the repository at this point in the history
* Update generated code for v646

* Update generated code for v648

* Update generated code for v649

* Update generated code for v650

* Update generated code for v654

* Update generated code for v655

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
  • Loading branch information
stripe-openapi[bot] authored Nov 9, 2023
1 parent 8699de6 commit 53ae974
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 7 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v645
v655
2 changes: 1 addition & 1 deletion charge.go
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,7 @@ type ChargePaymentMethodDetailsSEPADebit struct {
Fingerprint string `json:"fingerprint"`
// Last four characters of the IBAN.
Last4 string `json:"last4"`
// ID of the mandate used to make this payment.
// Find the ID of the mandate used for this payment under the [payment_method_details.sepa_debit.mandate](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-sepa_debit-mandate) property on the Charge. Use this mandate ID to [retrieve the Mandate](https://stripe.com/docs/api/mandates/retrieve).
Mandate string `json:"mandate"`
}
type ChargePaymentMethodDetailsSofort struct {
Expand Down
11 changes: 6 additions & 5 deletions checkout_session.go
Original file line number Diff line number Diff line change
Expand Up @@ -1711,7 +1711,7 @@ type CheckoutSessionParams struct {
ClientReferenceID *string `form:"client_reference_id"`
// Configure fields for the Checkout Session to gather active consent from customers.
ConsentCollection *CheckoutSessionConsentCollectionParams `form:"consent_collection"`
// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). Required in `setup` mode when `payment_method_types` is not set.
Currency *string `form:"currency"`
// ID of an existing Customer, if one exists. In `payment` mode, the customer's most recently saved card
// payment method will be used to prefill the email, name, card details, and billing address
Expand Down Expand Up @@ -1782,8 +1782,8 @@ type CheckoutSessionParams struct {
PaymentMethodOptions *CheckoutSessionPaymentMethodOptionsParams `form:"payment_method_options"`
// A list of the types of payment methods (e.g., `card`) this Checkout Session can accept.
//
// In `payment` and `subscription` mode, you can omit this attribute to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).
// It is required in `setup` mode.
// You can omit this attribute to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).
// See [Dynamic Payment Methods](https://stripe.com/docs/payments/payment-methods/integration-options#using-dynamic-payment-methods) for more details.
//
// Read more about the supported payment methods and their requirements in our [payment
// method details guide](https://stripe.com/docs/payments/checkout/payment-methods).
Expand Down Expand Up @@ -1818,8 +1818,9 @@ type CheckoutSessionParams struct {
SubscriptionData *CheckoutSessionSubscriptionDataParams `form:"subscription_data"`
// The URL to which Stripe should send customers when payment or setup
// is complete.
// If you'd like to use information from the successful Checkout Session on your page,
// read the guide on [customizing your success page](https://stripe.com/docs/payments/checkout/custom-success-page).
// This parameter is not allowed if ui_mode is `embedded`. If you'd like to use
// information from the successful Checkout Session on your page, read the
// guide on [customizing your success page](https://stripe.com/docs/payments/checkout/custom-success-page).
SuccessURL *string `form:"success_url"`
// Controls tax ID collection settings for the session.
TaxIDCollection *CheckoutSessionTaxIDCollectionParams `form:"tax_id_collection"`
Expand Down
1 change: 1 addition & 0 deletions error.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ const (
ErrorCodeTaxesCalculationFailed ErrorCode = "taxes_calculation_failed"
ErrorCodeTerminalLocationCountryUnsupported ErrorCode = "terminal_location_country_unsupported"
ErrorCodeTerminalReaderBusy ErrorCode = "terminal_reader_busy"
ErrorCodeTerminalReaderHardwareFault ErrorCode = "terminal_reader_hardware_fault"
ErrorCodeTerminalReaderOffline ErrorCode = "terminal_reader_offline"
ErrorCodeTerminalReaderTimeout ErrorCode = "terminal_reader_timeout"
ErrorCodeTestmodeChargesOnly ErrorCode = "testmode_charges_only"
Expand Down
13 changes: 13 additions & 0 deletions quote.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,10 +242,21 @@ type QuoteSubscriptionDataParams struct {
// When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted.
EffectiveDate *int64 `form:"effective_date"`
EffectiveDateCurrentPeriodEnd *bool `form:"-"` // See custom AppendTo
// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
Metadata map[string]string `form:"metadata"`
// Integer representing the number of trial period days before the customer is charged for the first time.
TrialPeriodDays *int64 `form:"trial_period_days"`
}

// AddMetadata adds a new key-value pair to the Metadata.
func (p *QuoteSubscriptionDataParams) AddMetadata(key string, value string) {
if p.Metadata == nil {
p.Metadata = make(map[string]string)
}

p.Metadata[key] = value
}

// AppendTo implements custom encoding logic for QuoteSubscriptionDataParams.
func (p *QuoteSubscriptionDataParams) AppendTo(body *form.Values, keyParts []string) {
if BoolValue(p.EffectiveDateCurrentPeriodEnd) {
Expand Down Expand Up @@ -505,6 +516,8 @@ type QuoteSubscriptionData struct {
Description string `json:"description"`
// When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. This date is ignored if it is in the past when the quote is accepted. Measured in seconds since the Unix epoch.
EffectiveDate int64 `json:"effective_date"`
// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
Metadata map[string]string `json:"metadata"`
// Integer representing the number of trial period days before the customer is charged for the first time.
TrialPeriodDays int64 `json:"trial_period_days"`
}
Expand Down

0 comments on commit 53ae974

Please sign in to comment.