Skip to content

Commit

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

* Update generated code for v709

* Update generated code for v709

* Update generated code for v710

* Update generated code for v711

* Update generated code for v712

* Update generated code for v714

* Update generated code for v714

* Update generated code for v715

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Co-authored-by: Richard Marmorstein <[email protected]>
  • Loading branch information
stripe-openapi[bot] and richardm-stripe authored Dec 14, 2023
1 parent 0250098 commit 5f27342
Show file tree
Hide file tree
Showing 9 changed files with 268 additions and 172 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v704
v715
5 changes: 1 addition & 4 deletions accountsession.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,12 @@ type AccountSessionComponentsPaymentsParams struct {
// The list of features enabled in the embedded component.
Features *AccountSessionComponentsPaymentsFeaturesParams `form:"features"`
}

// The list of features enabled in the embedded component.
type AccountSessionComponentsPayoutsFeaturesParams struct{}

// Configuration for the payouts embedded component.
type AccountSessionComponentsPayoutsParams struct {
// Whether the embedded component is enabled.
Enabled *bool `form:"enabled"`
// The list of features enabled in the embedded component.
Enabled *bool `form:"enabled"`
Features *AccountSessionComponentsPayoutsFeaturesParams `form:"features"`
}

Expand Down
46 changes: 46 additions & 0 deletions checkout_session.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,17 @@ const (
CheckoutSessionConsentTermsOfServiceAccepted CheckoutSessionConsentTermsOfService = "accepted"
)

// Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's defaults will be used.
//
// When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI.
type CheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition string

// List of values that CheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition can take
const (
CheckoutSessionConsentCollectionPaymentMethodReuseAgreementPositionAuto CheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition = "auto"
CheckoutSessionConsentCollectionPaymentMethodReuseAgreementPositionHidden CheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition = "hidden"
)

// If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout
// Session will determine whether to display an option to opt into promotional communication
// from the merchant depending on the customer's locale. Only available to US merchants.
Expand Down Expand Up @@ -785,8 +796,17 @@ type CheckoutSessionAutomaticTaxParams struct {
Enabled *bool `form:"enabled"`
}

// Determines the display of payment method reuse agreement text in the UI. If set to `hidden`, it will hide legal text related to the reuse of a payment method.
type CheckoutSessionConsentCollectionPaymentMethodReuseAgreementParams struct {
// Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's
// defaults will be used. When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI.
Position *string `form:"position"`
}

// Configure fields for the Checkout Session to gather active consent from customers.
type CheckoutSessionConsentCollectionParams struct {
// Determines the display of payment method reuse agreement text in the UI. If set to `hidden`, it will hide legal text related to the reuse of a payment method.
PaymentMethodReuseAgreement *CheckoutSessionConsentCollectionPaymentMethodReuseAgreementParams `form:"payment_method_reuse_agreement"`
// If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout
// Session will determine whether to display an option to opt into promotional communication
// from the merchant depending on the customer's locale. Only available to US merchants.
Expand Down Expand Up @@ -852,6 +872,12 @@ type CheckoutSessionCustomFieldParams struct {
Type *string `form:"type"`
}

// Custom text that should be displayed after the payment confirmation button.
type CheckoutSessionCustomTextAfterSubmitParams struct {
// Text may be up to 1200 characters in length.
Message *string `form:"message"`
}

// Custom text that should be displayed alongside shipping address collection.
type CheckoutSessionCustomTextShippingAddressParams struct {
// Text may be up to 1200 characters in length.
Expand All @@ -872,6 +898,8 @@ type CheckoutSessionCustomTextTermsOfServiceAcceptanceParams struct {

// Display additional text for your customers using custom text.
type CheckoutSessionCustomTextParams struct {
// Custom text that should be displayed after the payment confirmation button.
AfterSubmit *CheckoutSessionCustomTextAfterSubmitParams `form:"after_submit"`
// Custom text that should be displayed alongside shipping address collection.
ShippingAddress *CheckoutSessionCustomTextShippingAddressParams `form:"shipping_address"`
// Custom text that should be displayed alongside the payment confirmation button.
Expand Down Expand Up @@ -1931,8 +1959,18 @@ type CheckoutSessionConsent struct {
TermsOfService CheckoutSessionConsentTermsOfService `json:"terms_of_service"`
}

// If set to `hidden`, it will hide legal text related to the reuse of a payment method.
type CheckoutSessionConsentCollectionPaymentMethodReuseAgreement struct {
// Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's defaults will be used.
//
// When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI.
Position CheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition `json:"position"`
}

// When set, provides configuration for the Checkout Session to gather active consent from customers.
type CheckoutSessionConsentCollection struct {
// If set to `hidden`, it will hide legal text related to the reuse of a payment method.
PaymentMethodReuseAgreement *CheckoutSessionConsentCollectionPaymentMethodReuseAgreement `json:"payment_method_reuse_agreement"`
// If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout
// Session will determine whether to display an option to opt into promotional communication
// from the merchant depending on the customer's locale. Only available to US merchants.
Expand Down Expand Up @@ -2003,6 +2041,12 @@ type CheckoutSessionCustomField struct {
Type CheckoutSessionCustomFieldType `json:"type"`
}

// Custom text that should be displayed after the payment confirmation button.
type CheckoutSessionCustomTextAfterSubmit struct {
// Text may be up to 1200 characters in length.
Message string `json:"message"`
}

// Custom text that should be displayed alongside shipping address collection.
type CheckoutSessionCustomTextShippingAddress struct {
// Text may be up to 1200 characters in length.
Expand All @@ -2021,6 +2065,8 @@ type CheckoutSessionCustomTextTermsOfServiceAcceptance struct {
Message string `json:"message"`
}
type CheckoutSessionCustomText struct {
// Custom text that should be displayed after the payment confirmation button.
AfterSubmit *CheckoutSessionCustomTextAfterSubmit `json:"after_submit"`
// Custom text that should be displayed alongside shipping address collection.
ShippingAddress *CheckoutSessionCustomTextShippingAddress `json:"shipping_address"`
// Custom text that should be displayed alongside the payment confirmation button.
Expand Down
8 changes: 4 additions & 4 deletions invoice.go
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ type InvoiceUpcomingParams struct {
SubscriptionBillingCycleAnchor *int64 `form:"subscription_billing_cycle_anchor"`
SubscriptionBillingCycleAnchorNow *bool `form:"-"` // See custom AppendTo
SubscriptionBillingCycleAnchorUnchanged *bool `form:"-"` // See custom AppendTo
// Timestamp indicating when the subscription should be scheduled to cancel. Will prorate if within the current period and prorations have been enabled using `proration_behavior`.
// A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.
SubscriptionCancelAt *int64 `form:"subscription_cancel_at"`
// Boolean indicating whether this subscription should cancel at the end of the current period.
SubscriptionCancelAtPeriodEnd *bool `form:"subscription_cancel_at_period_end"`
Expand All @@ -387,7 +387,7 @@ type InvoiceUpcomingParams struct {
SubscriptionProrationDate *int64 `form:"subscription_proration_date"`
// For paused subscriptions, setting `subscription_resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed.
SubscriptionResumeAt *string `form:"subscription_resume_at"`
// Date a subscription is intended to start (can be future or past)
// Date a subscription is intended to start (can be future or past).
SubscriptionStartDate *int64 `form:"subscription_start_date"`
// If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_items` or `subscription` is required.
SubscriptionTrialEnd *int64 `form:"subscription_trial_end"`
Expand Down Expand Up @@ -985,7 +985,7 @@ type InvoiceUpcomingLinesParams struct {
SubscriptionBillingCycleAnchor *int64 `form:"subscription_billing_cycle_anchor"`
SubscriptionBillingCycleAnchorNow *bool `form:"-"` // See custom AppendTo
SubscriptionBillingCycleAnchorUnchanged *bool `form:"-"` // See custom AppendTo
// Timestamp indicating when the subscription should be scheduled to cancel. Will prorate if within the current period and prorations have been enabled using `proration_behavior`.
// A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.
SubscriptionCancelAt *int64 `form:"subscription_cancel_at"`
// Boolean indicating whether this subscription should cancel at the end of the current period.
SubscriptionCancelAtPeriodEnd *bool `form:"subscription_cancel_at_period_end"`
Expand All @@ -1001,7 +1001,7 @@ type InvoiceUpcomingLinesParams struct {
SubscriptionProrationDate *int64 `form:"subscription_proration_date"`
// For paused subscriptions, setting `subscription_resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed.
SubscriptionResumeAt *string `form:"subscription_resume_at"`
// Date a subscription is intended to start (can be future or past)
// Date a subscription is intended to start (can be future or past).
SubscriptionStartDate *int64 `form:"subscription_start_date"`
// If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_items` or `subscription` is required.
SubscriptionTrialEnd *int64 `form:"subscription_trial_end"`
Expand Down
7 changes: 5 additions & 2 deletions paymentintent.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ const (
PaymentIntentCaptureMethodManual PaymentIntentCaptureMethod = "manual"
)

// Describes whether we can confirm this PaymentIntent automatically, or if it requires customer action to confirm the payment.
type PaymentIntentConfirmationMethod string

// List of values that PaymentIntentConfirmationMethod can take
Expand Down Expand Up @@ -1805,7 +1806,8 @@ type PaymentIntentParams struct {
// The client secret of the PaymentIntent. We require it if you use a publishable key to retrieve the source.
ClientSecret *string `form:"client_secret"`
// Set to `true` to attempt to [confirm this PaymentIntent](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent immediately. This parameter defaults to `false`. When creating and confirming a PaymentIntent at the same time, you can also provide the parameters available in the [Confirm API](https://stripe.com/docs/api/payment_intents/confirm).
Confirm *bool `form:"confirm"`
Confirm *bool `form:"confirm"`
// Describes whether we can confirm this PaymentIntent automatically, or if it requires customer action to confirm the payment.
ConfirmationMethod *string `form:"confirmation_method"`
// 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).
Currency *string `form:"currency"`
Expand Down Expand Up @@ -2987,7 +2989,8 @@ type PaymentIntent struct {
// The client secret can be used to complete a payment from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.
//
// Refer to our docs to [accept a payment](https://stripe.com/docs/payments/accept-a-payment?ui=elements) and learn about how `client_secret` should be handled.
ClientSecret string `json:"client_secret"`
ClientSecret string `json:"client_secret"`
// Describes whether we can confirm this PaymentIntent automatically, or if it requires customer action to confirm the payment.
ConfirmationMethod PaymentIntentConfirmationMethod `json:"confirmation_method"`
// Time at which the object was created. Measured in seconds since the Unix epoch.
Created int64 `json:"created"`
Expand Down
46 changes: 46 additions & 0 deletions paymentlink.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,17 @@ const (
PaymentLinkBillingAddressCollectionRequired PaymentLinkBillingAddressCollection = "required"
)

// Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's defaults will be used.
//
// When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI.
type PaymentLinkConsentCollectionPaymentMethodReuseAgreementPosition string

// List of values that PaymentLinkConsentCollectionPaymentMethodReuseAgreementPosition can take
const (
PaymentLinkConsentCollectionPaymentMethodReuseAgreementPositionAuto PaymentLinkConsentCollectionPaymentMethodReuseAgreementPosition = "auto"
PaymentLinkConsentCollectionPaymentMethodReuseAgreementPositionHidden PaymentLinkConsentCollectionPaymentMethodReuseAgreementPosition = "hidden"
)

// If set to `auto`, enables the collection of customer consent for promotional communications.
type PaymentLinkConsentCollectionPromotions string

Expand Down Expand Up @@ -197,8 +208,17 @@ type PaymentLinkAutomaticTaxParams struct {
Enabled *bool `form:"enabled"`
}

// Determines the display of payment method reuse agreement text in the UI. If set to `hidden`, it will hide legal text related to the reuse of a payment method.
type PaymentLinkConsentCollectionPaymentMethodReuseAgreementParams struct {
// Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's
// defaults will be used. When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI.
Position *string `form:"position"`
}

// Configure fields to gather active consent from customers.
type PaymentLinkConsentCollectionParams struct {
// Determines the display of payment method reuse agreement text in the UI. If set to `hidden`, it will hide legal text related to the reuse of a payment method.
PaymentMethodReuseAgreement *PaymentLinkConsentCollectionPaymentMethodReuseAgreementParams `form:"payment_method_reuse_agreement"`
// If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout
// Session will determine whether to display an option to opt into promotional communication
// from the merchant depending on the customer's locale. Only available to US merchants.
Expand Down Expand Up @@ -264,6 +284,12 @@ type PaymentLinkCustomFieldParams struct {
Type *string `form:"type"`
}

// Custom text that should be displayed after the payment confirmation button.
type PaymentLinkCustomTextAfterSubmitParams struct {
// Text may be up to 1200 characters in length.
Message *string `form:"message"`
}

// Custom text that should be displayed alongside shipping address collection.
type PaymentLinkCustomTextShippingAddressParams struct {
// Text may be up to 1200 characters in length.
Expand All @@ -284,6 +310,8 @@ type PaymentLinkCustomTextTermsOfServiceAcceptanceParams struct {

// Display additional text for your customers using custom text.
type PaymentLinkCustomTextParams struct {
// Custom text that should be displayed after the payment confirmation button.
AfterSubmit *PaymentLinkCustomTextAfterSubmitParams `form:"after_submit"`
// Custom text that should be displayed alongside shipping address collection.
ShippingAddress *PaymentLinkCustomTextShippingAddressParams `form:"shipping_address"`
// Custom text that should be displayed alongside the payment confirmation button.
Expand Down Expand Up @@ -596,8 +624,18 @@ type PaymentLinkAutomaticTax struct {
Enabled bool `json:"enabled"`
}

// Settings related to the payment method reuse text shown in the Checkout UI.
type PaymentLinkConsentCollectionPaymentMethodReuseAgreement struct {
// Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's defaults will be used.
//
// When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI.
Position PaymentLinkConsentCollectionPaymentMethodReuseAgreementPosition `json:"position"`
}

// When set, provides configuration to gather active consent from customers.
type PaymentLinkConsentCollection struct {
// Settings related to the payment method reuse text shown in the Checkout UI.
PaymentMethodReuseAgreement *PaymentLinkConsentCollectionPaymentMethodReuseAgreement `json:"payment_method_reuse_agreement"`
// If set to `auto`, enables the collection of customer consent for promotional communications.
Promotions PaymentLinkConsentCollectionPromotions `json:"promotions"`
// If set to `required`, it requires cutomers to accept the terms of service before being able to pay. If set to `none`, customers won't be shown a checkbox to accept the terms of service.
Expand Down Expand Up @@ -648,6 +686,12 @@ type PaymentLinkCustomField struct {
Type PaymentLinkCustomFieldType `json:"type"`
}

// Custom text that should be displayed after the payment confirmation button.
type PaymentLinkCustomTextAfterSubmit struct {
// Text may be up to 1200 characters in length.
Message string `json:"message"`
}

// Custom text that should be displayed alongside shipping address collection.
type PaymentLinkCustomTextShippingAddress struct {
// Text may be up to 1200 characters in length.
Expand All @@ -666,6 +710,8 @@ type PaymentLinkCustomTextTermsOfServiceAcceptance struct {
Message string `json:"message"`
}
type PaymentLinkCustomText struct {
// Custom text that should be displayed after the payment confirmation button.
AfterSubmit *PaymentLinkCustomTextAfterSubmit `json:"after_submit"`
// Custom text that should be displayed alongside shipping address collection.
ShippingAddress *PaymentLinkCustomTextShippingAddress `json:"shipping_address"`
// Custom text that should be displayed alongside the payment confirmation button.
Expand Down
Loading

0 comments on commit 5f27342

Please sign in to comment.