From ea2a42fe4e6ed3ae1de4c5a2158cb097e1a29172 Mon Sep 17 00:00:00 2001 From: Pavel Krymets Date: Wed, 21 Sep 2022 14:43:41 -0700 Subject: [PATCH] Codegen for openapi v195 --- OPENAPI_VERSION | 2 +- types/2022-08-01/Checkout/Sessions.d.ts | 51 ++++++++----------- .../FinancialConnections/Accounts.d.ts | 2 +- types/2022-08-01/PaymentLinks.d.ts | 15 ++++++ types/2022-08-01/SubscriptionSchedules.d.ts | 2 +- 5 files changed, 40 insertions(+), 32 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 25f0421fba..176e17cefa 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v193 \ No newline at end of file +v195 \ No newline at end of file diff --git a/types/2022-08-01/Checkout/Sessions.d.ts b/types/2022-08-01/Checkout/Sessions.d.ts index 8ee5689bbd..52436937c5 100644 --- a/types/2022-08-01/Checkout/Sessions.d.ts +++ b/types/2022-08-01/Checkout/Sessions.d.ts @@ -303,6 +303,11 @@ declare module 'stripe' { * from the merchant about this Checkout Session. */ promotions: Consent.Promotions | null; + + /** + * If `accepted`, the customer in this Checkout Session has agreed to the merchant's terms of service. + */ + terms_of_service: 'accepted' | null; } namespace Consent { @@ -316,10 +321,17 @@ declare module 'stripe' { * from the merchant depending on the customer's locale. Only available to US merchants. */ promotions: ConsentCollection.Promotions | null; + + /** + * If set to `required`, it requires customers to accept the terms of service before being able to pay. + */ + terms_of_service: ConsentCollection.TermsOfService | null; } namespace ConsentCollection { type Promotions = 'auto' | 'none'; + + type TermsOfService = 'none' | 'required'; } type CustomerCreation = 'always' | 'if_required'; @@ -1645,10 +1657,18 @@ declare module 'stripe' { * from the merchant depending on the customer's locale. Only available to US merchants. */ promotions?: ConsentCollection.Promotions; + + /** + * If set to `required`, it requires customers to check a terms of service checkbox before being able to pay. + * There must be a valid terms of service URL set in your [Dashboard settings](https://dashboard.stripe.com/settings/public). + */ + terms_of_service?: ConsentCollection.TermsOfService; } namespace ConsentCollection { type Promotions = 'auto' | 'none'; + + type TermsOfService = 'none' | 'required'; } type CustomerCreation = 'always' | 'if_required'; @@ -2352,37 +2372,10 @@ declare module 'stripe' { namespace Card { interface Installments { /** - * Setting to true enables installments for this PaymentIntent. - * This will cause the response to contain a list of available installment plans. - * Setting to false will prevent any selected plan from applying to a charge. + * Setting to true enables installments for this Checkout Session. + * Setting to false will prevent any installment plan from applying to a payment. */ enabled?: boolean; - - /** - * The selected installment plan to use for this payment attempt. - * This parameter can only be provided during confirmation. - */ - plan?: Stripe.Emptyable; - } - - namespace Installments { - interface Plan { - /** - * For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. - */ - count: number; - - /** - * For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. - * One of `month`. - */ - interval: 'month'; - - /** - * Type of installment plan, one of `fixed_count`. - */ - type: 'fixed_count'; - } } type SetupFutureUsage = 'off_session' | 'on_session'; diff --git a/types/2022-08-01/FinancialConnections/Accounts.d.ts b/types/2022-08-01/FinancialConnections/Accounts.d.ts index 969cd922f2..a23b32f151 100644 --- a/types/2022-08-01/FinancialConnections/Accounts.d.ts +++ b/types/2022-08-01/FinancialConnections/Accounts.d.ts @@ -299,7 +299,7 @@ declare module 'stripe' { interface AccountRefreshParams { /** - * The list of account features that you would like to refresh. Either: `balance` or `ownership`. + * The list of account features that you would like to refresh. */ features: Array; diff --git a/types/2022-08-01/PaymentLinks.d.ts b/types/2022-08-01/PaymentLinks.d.ts index 433da099d6..b3fa8238e6 100644 --- a/types/2022-08-01/PaymentLinks.d.ts +++ b/types/2022-08-01/PaymentLinks.d.ts @@ -178,10 +178,17 @@ declare module 'stripe' { * If set to `auto`, enables the collection of customer consent for promotional communications. */ promotions: ConsentCollection.Promotions | null; + + /** + * 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. + */ + terms_of_service: ConsentCollection.TermsOfService | null; } namespace ConsentCollection { type Promotions = 'auto' | 'none'; + + type TermsOfService = 'none' | 'required'; } type CustomerCreation = 'always' | 'if_required'; @@ -709,10 +716,18 @@ declare module 'stripe' { * from the merchant depending on the customer's locale. Only available to US merchants. */ promotions?: ConsentCollection.Promotions; + + /** + * If set to `required`, it requires customers to check a terms of service checkbox before being able to pay. + * There must be a valid terms of service URL set in your [Dashboard settings](https://dashboard.stripe.com/settings/public). + */ + terms_of_service?: ConsentCollection.TermsOfService; } namespace ConsentCollection { type Promotions = 'auto' | 'none'; + + type TermsOfService = 'none' | 'required'; } type CustomerCreation = 'always' | 'if_required'; diff --git a/types/2022-08-01/SubscriptionSchedules.d.ts b/types/2022-08-01/SubscriptionSchedules.d.ts index 26e9607973..b1e0652e6d 100644 --- a/types/2022-08-01/SubscriptionSchedules.d.ts +++ b/types/2022-08-01/SubscriptionSchedules.d.ts @@ -239,7 +239,7 @@ declare module 'stripe' { /** * 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; + currency: string; /** * ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.