From 4a49f8d30ff1bee80bb164bbd9a9c91283f93635 Mon Sep 17 00:00:00 2001 From: Dominic Charley-Roy Date: Tue, 26 Jul 2022 15:46:26 -0400 Subject: [PATCH] Codegen for openapi v173 --- OPENAPI_VERSION | 2 +- types/2020-08-27/Charges.d.ts | 3 +- types/2020-08-27/Checkout/Sessions.d.ts | 135 ++++++++++++++++++++++++ types/2020-08-27/Issuing/Disputes.d.ts | 2 +- types/2020-08-27/Orders.d.ts | 4 + types/2020-08-27/PaymentIntents.d.ts | 6 ++ types/2020-08-27/Products.d.ts | 2 +- types/2020-08-27/SetupAttempts.d.ts | 1 + 8 files changed, 151 insertions(+), 4 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 6fa005db08..426d5c5a1e 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v172 \ No newline at end of file +v173 \ No newline at end of file diff --git a/types/2020-08-27/Charges.d.ts b/types/2020-08-27/Charges.d.ts index e0dae6ed8b..226b2d0006 100644 --- a/types/2020-08-27/Charges.d.ts +++ b/types/2020-08-27/Charges.d.ts @@ -849,6 +849,7 @@ declare module 'stripe' { type Result = | 'attempt_acknowledged' | 'authenticated' + | 'exempted' | 'failed' | 'not_supported' | 'processing_error'; @@ -1461,7 +1462,7 @@ declare module 'stripe' { /** * Preferred language of the Klarna authorization page that the customer is redirected to. - * Can be one of `de-AT`, `en-AT`, `nl-BE`, `fr-BE`, `en-BE`, `de-DE`, `en-DE`, `da-DK`, `en-DK`, `es-ES`, `en-ES`, `fi-FI`, `sv-FI`, `en-FI`, `en-GB`, `en-IE`, `it-IT`, `en-IT`, `nl-NL`, `en-NL`, `nb-NO`, `en-NO`, `sv-SE`, `en-SE`, `en-US`, `es-US`, `fr-FR`, `en-FR`, `en-AU`, or `en-NZ` + * Can be one of `de-AT`, `en-AT`, `nl-BE`, `fr-BE`, `en-BE`, `de-DE`, `en-DE`, `da-DK`, `en-DK`, `es-ES`, `en-ES`, `fi-FI`, `sv-FI`, `en-FI`, `en-GB`, `en-IE`, `it-IT`, `en-IT`, `nl-NL`, `en-NL`, `nb-NO`, `en-NO`, `sv-SE`, `en-SE`, `en-US`, `es-US`, `fr-FR`, `en-FR`, `en-AU`, `en-NZ`, `en-CA`, or `fr-CA` */ preferred_locale: string | null; } diff --git a/types/2020-08-27/Checkout/Sessions.d.ts b/types/2020-08-27/Checkout/Sessions.d.ts index 75267077f0..74386467b1 100644 --- a/types/2020-08-27/Checkout/Sessions.d.ts +++ b/types/2020-08-27/Checkout/Sessions.d.ts @@ -469,6 +469,8 @@ declare module 'stripe' { card?: PaymentMethodOptions.Card; + customer_balance?: PaymentMethodOptions.CustomerBalance; + eps?: PaymentMethodOptions.Eps; fpx?: PaymentMethodOptions.Fpx; @@ -685,6 +687,70 @@ declare module 'stripe' { type SetupFutureUsage = 'none' | 'off_session' | 'on_session'; } + interface CustomerBalance { + bank_transfer?: CustomerBalance.BankTransfer; + + /** + * The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + */ + funding_type: 'bank_transfer' | null; + + /** + * 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). + */ + setup_future_usage?: 'none'; + } + + namespace CustomerBalance { + interface BankTransfer { + eu_bank_transfer?: BankTransfer.EuBankTransfer; + + /** + * List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + * + * Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + */ + requested_address_types?: Array< + BankTransfer.RequestedAddressType + >; + + /** + * The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`. + */ + type: BankTransfer.Type | null; + } + + namespace BankTransfer { + interface EuBankTransfer { + /** + * The desired country code of the bank account information. Permitted values include: `DE`, `ES`, `FR`, `IE`, or `NL`. + */ + country: EuBankTransfer.Country; + } + + namespace EuBankTransfer { + type Country = 'DE' | 'ES' | 'FR' | 'IE' | 'NL'; + } + + type RequestedAddressType = + | 'iban' + | 'sepa' + | 'sort_code' + | 'spei' + | 'zengin'; + + type Type = + | 'eu_bank_transfer' + | 'gb_bank_transfer' + | 'jp_bank_transfer' + | 'mx_bank_transfer'; + } + } + interface Eps { /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -1926,6 +1992,11 @@ declare module 'stripe' { */ card?: PaymentMethodOptions.Card; + /** + * contains details about the Customer Balance payment method options. + */ + customer_balance?: PaymentMethodOptions.CustomerBalance; + /** * contains details about the EPS payment method options. */ @@ -2224,6 +2295,69 @@ declare module 'stripe' { type SetupFutureUsage = 'off_session' | 'on_session'; } + interface CustomerBalance { + /** + * Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + */ + bank_transfer?: CustomerBalance.BankTransfer; + + /** + * The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + */ + funding_type?: 'bank_transfer'; + + /** + * 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). + */ + setup_future_usage?: 'none'; + } + + namespace CustomerBalance { + interface BankTransfer { + eu_bank_transfer?: BankTransfer.EuBankTransfer; + + /** + * List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + * + * Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + */ + requested_address_types?: Array< + BankTransfer.RequestedAddressType + >; + + /** + * The list of bank transfer types that this PaymentIntent is allowed to use for funding. Permitted values include: `us_bank_account`, `eu_bank_account`, `id_bank_account`, `gb_bank_account`, `jp_bank_account`, `mx_bank_account`, `eu_bank_transfer`, `gb_bank_transfer`, `id_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + */ + type: BankTransfer.Type; + } + + namespace BankTransfer { + interface EuBankTransfer { + /** + * The desired country code of the bank account information. Permitted values include: `DE`, `ES`, `FR`, `IE`, or `NL`. + */ + country: string; + } + + type RequestedAddressType = + | 'iban' + | 'sepa' + | 'sort_code' + | 'spei' + | 'zengin'; + + type Type = + | 'eu_bank_transfer' + | 'gb_bank_transfer' + | 'jp_bank_transfer' + | 'mx_bank_transfer'; + } + } + interface Eps { /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -2459,6 +2593,7 @@ declare module 'stripe' { | 'blik' | 'boleto' | 'card' + | 'customer_balance' | 'eps' | 'fpx' | 'giropay' diff --git a/types/2020-08-27/Issuing/Disputes.d.ts b/types/2020-08-27/Issuing/Disputes.d.ts index 342b5f756e..a5ff68650e 100644 --- a/types/2020-08-27/Issuing/Disputes.d.ts +++ b/types/2020-08-27/Issuing/Disputes.d.ts @@ -18,7 +18,7 @@ declare module 'stripe' { object: 'issuing.dispute'; /** - * Disputed amount. Usually the amount of the `transaction`, but can differ (usually because of currency fluctuation). + * Disputed amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Usually the amount of the `transaction`, but can differ (usually because of currency fluctuation). */ amount: number; diff --git a/types/2020-08-27/Orders.d.ts b/types/2020-08-27/Orders.d.ts index c015d6c3ce..7ea8745bc4 100644 --- a/types/2020-08-27/Orders.d.ts +++ b/types/2020-08-27/Orders.d.ts @@ -1589,6 +1589,7 @@ declare module 'stripe' { | 'en-AT' | 'en-AU' | 'en-BE' + | 'en-CA' | 'en-DE' | 'en-DK' | 'en-ES' @@ -1606,6 +1607,7 @@ declare module 'stripe' { | 'es-US' | 'fi-FI' | 'fr-BE' + | 'fr-CA' | 'fr-FR' | 'it-IT' | 'nb-NO' @@ -2754,6 +2756,7 @@ declare module 'stripe' { | 'en-AT' | 'en-AU' | 'en-BE' + | 'en-CA' | 'en-DE' | 'en-DK' | 'en-ES' @@ -2771,6 +2774,7 @@ declare module 'stripe' { | 'es-US' | 'fi-FI' | 'fr-BE' + | 'fr-CA' | 'fr-FR' | 'it-IT' | 'nb-NO' diff --git a/types/2020-08-27/PaymentIntents.d.ts b/types/2020-08-27/PaymentIntents.d.ts index d50988e084..10a23335e0 100644 --- a/types/2020-08-27/PaymentIntents.d.ts +++ b/types/2020-08-27/PaymentIntents.d.ts @@ -3194,6 +3194,7 @@ declare module 'stripe' { | 'en-AT' | 'en-AU' | 'en-BE' + | 'en-CA' | 'en-DE' | 'en-DK' | 'en-ES' @@ -3211,6 +3212,7 @@ declare module 'stripe' { | 'es-US' | 'fi-FI' | 'fr-BE' + | 'fr-CA' | 'fr-FR' | 'it-IT' | 'nb-NO' @@ -4916,6 +4918,7 @@ declare module 'stripe' { | 'en-AT' | 'en-AU' | 'en-BE' + | 'en-CA' | 'en-DE' | 'en-DK' | 'en-ES' @@ -4933,6 +4936,7 @@ declare module 'stripe' { | 'es-US' | 'fi-FI' | 'fr-BE' + | 'fr-CA' | 'fr-FR' | 'it-IT' | 'nb-NO' @@ -6773,6 +6777,7 @@ declare module 'stripe' { | 'en-AT' | 'en-AU' | 'en-BE' + | 'en-CA' | 'en-DE' | 'en-DK' | 'en-ES' @@ -6790,6 +6795,7 @@ declare module 'stripe' { | 'es-US' | 'fi-FI' | 'fr-BE' + | 'fr-CA' | 'fr-FR' | 'it-IT' | 'nb-NO' diff --git a/types/2020-08-27/Products.d.ts b/types/2020-08-27/Products.d.ts index eefbd67b7a..e995965e94 100644 --- a/types/2020-08-27/Products.d.ts +++ b/types/2020-08-27/Products.d.ts @@ -550,7 +550,7 @@ declare module 'stripe' { expand?: Array; /** - * Only return products with the given IDs. + * Only return products with the given IDs. Cannot be used with [starting_after](https://stripe.com/docs/api#list_products-starting_after) or [ending_before](https://stripe.com/docs/api#list_products-ending_before). */ ids?: Array; diff --git a/types/2020-08-27/SetupAttempts.d.ts b/types/2020-08-27/SetupAttempts.d.ts index 44ad86e475..820ea35d8a 100644 --- a/types/2020-08-27/SetupAttempts.d.ts +++ b/types/2020-08-27/SetupAttempts.d.ts @@ -216,6 +216,7 @@ declare module 'stripe' { type Result = | 'attempt_acknowledged' | 'authenticated' + | 'exempted' | 'failed' | 'not_supported' | 'processing_error';