From f5e4c94e28378f3f701682e202f595792dcc7579 Mon Sep 17 00:00:00 2001 From: Kamil Pajdzik Date: Thu, 15 Sep 2022 10:59:23 -0700 Subject: [PATCH] Codegen for openapi v193 --- OPENAPI_VERSION | 2 +- types/2022-08-01/Charges.d.ts | 9 ++ types/2022-08-01/Checkout/Sessions.d.ts | 26 +++- types/2022-08-01/Customers.d.ts | 1 + types/2022-08-01/Invoices.d.ts | 39 ++++++ types/2022-08-01/Issuing/Disputes.d.ts | 10 ++ types/2022-08-01/PaymentIntents.d.ts | 118 ++++++++++++++++++ types/2022-08-01/PaymentLinks.d.ts | 3 + types/2022-08-01/PaymentMethods.d.ts | 14 +++ types/2022-08-01/SetupIntents.d.ts | 24 ++++ .../2022-08-01/Treasury/CreditReversals.d.ts | 5 + types/2022-08-01/Treasury/DebitReversals.d.ts | 5 + 12 files changed, 254 insertions(+), 2 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 3bdc7ecadb..25f0421fba 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v190 \ No newline at end of file +v193 \ No newline at end of file diff --git a/types/2022-08-01/Charges.d.ts b/types/2022-08-01/Charges.d.ts index 242ecf3052..a46fb2bf59 100644 --- a/types/2022-08-01/Charges.d.ts +++ b/types/2022-08-01/Charges.d.ts @@ -445,6 +445,8 @@ declare module 'stripe' { paynow?: PaymentMethodDetails.Paynow; + pix?: PaymentMethodDetails.Pix; + promptpay?: PaymentMethodDetails.Promptpay; sepa_credit_transfer?: PaymentMethodDetails.SepaCreditTransfer; @@ -1568,6 +1570,13 @@ declare module 'stripe' { reference: string | null; } + interface Pix { + /** + * Unique transaction id generated by BCB + */ + bank_transaction_id?: string | null; + } + interface Promptpay { /** * Bill reference generated by PromptPay diff --git a/types/2022-08-01/Checkout/Sessions.d.ts b/types/2022-08-01/Checkout/Sessions.d.ts index 04b258e607..8ee5689bbd 100644 --- a/types/2022-08-01/Checkout/Sessions.d.ts +++ b/types/2022-08-01/Checkout/Sessions.d.ts @@ -240,6 +240,7 @@ declare module 'stripe' { /** * 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. */ url: string | null; } @@ -511,6 +512,8 @@ declare module 'stripe' { paynow?: PaymentMethodOptions.Paynow; + pix?: PaymentMethodOptions.Pix; + sepa_debit?: PaymentMethodOptions.SepaDebit; sofort?: PaymentMethodOptions.Sofort; @@ -897,6 +900,13 @@ declare module 'stripe' { setup_future_usage?: 'none'; } + interface Pix { + /** + * The number of seconds after which Pix payment will expire. + */ + expires_after_seconds: number | null; + } + interface SepaDebit { /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -1536,7 +1546,8 @@ declare module 'stripe' { /** * A list of the types of payment methods (e.g., `card`) this Checkout Session can accept. * - * Do not include this attribute if you prefer to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + * 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. * * Read more about the supported payment methods and their requirements in our [payment * method details guide](https://stripe.com/docs/payments/checkout/payment-methods). @@ -2124,6 +2135,11 @@ declare module 'stripe' { */ paynow?: PaymentMethodOptions.Paynow; + /** + * contains details about the Pix payment method options. + */ + pix?: PaymentMethodOptions.Pix; + /** * contains details about the Sepa Debit payment method options. */ @@ -2568,6 +2584,13 @@ declare module 'stripe' { tos_shown_and_accepted?: boolean; } + interface Pix { + /** + * The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. + */ + expires_after_seconds?: number; + } + interface SepaDebit { /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -2684,6 +2707,7 @@ declare module 'stripe' { | 'oxxo' | 'p24' | 'paynow' + | 'pix' | 'promptpay' | 'sepa_debit' | 'sofort' diff --git a/types/2022-08-01/Customers.d.ts b/types/2022-08-01/Customers.d.ts index 447832f03e..1e2bb4513a 100644 --- a/types/2022-08-01/Customers.d.ts +++ b/types/2022-08-01/Customers.d.ts @@ -884,6 +884,7 @@ declare module 'stripe' { | 'oxxo' | 'p24' | 'paynow' + | 'pix' | 'promptpay' | 'sepa_debit' | 'sofort' diff --git a/types/2022-08-01/Invoices.d.ts b/types/2022-08-01/Invoices.d.ts index 95796e2d31..a1c41cccdc 100644 --- a/types/2022-08-01/Invoices.d.ts +++ b/types/2022-08-01/Invoices.d.ts @@ -229,6 +229,11 @@ declare module 'stripe' { */ footer: string | null; + /** + * Details of the invoice that was cloned. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details. + */ + from_invoice: Invoice.FromInvoice | null; + /** * The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the invoice has not been finalized yet, this will be null. */ @@ -244,6 +249,11 @@ declare module 'stripe' { */ last_finalization_error: Invoice.LastFinalizationError | null; + /** + * The ID of the most recent non-draft revision of this invoice + */ + latest_revision: string | Stripe.Invoice | null; + /** * The individual line items that make up the invoice. `lines` is sorted as follows: invoice items in reverse chronological order, followed by the subscription, if any. */ @@ -537,6 +547,18 @@ declare module 'stripe' { value: string; } + interface FromInvoice { + /** + * The relation between this invoice and the cloned invoice + */ + action: string; + + /** + * The invoice that was cloned. + */ + invoice: string | Stripe.Invoice; + } + interface LastFinalizationError { /** * For card errors, the ID of the failed charge. @@ -1041,6 +1063,11 @@ declare module 'stripe' { */ footer?: string; + /** + * Revise an existing invoice. The new invoice will be created in `status=draft`. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details. + */ + from_invoice?: InvoiceCreateParams.FromInvoice; + /** * 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`. */ @@ -1118,6 +1145,18 @@ declare module 'stripe' { discount?: string; } + interface FromInvoice { + /** + * The relation between the new invoice and the original invoice. Currently, only 'revision' is permitted + */ + action: 'revision'; + + /** + * The `id` of the invoice that will be cloned. + */ + invoice: string; + } + interface PaymentSettings { /** * ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set. diff --git a/types/2022-08-01/Issuing/Disputes.d.ts b/types/2022-08-01/Issuing/Disputes.d.ts index d1aca952f9..b9c491ef36 100644 --- a/types/2022-08-01/Issuing/Disputes.d.ts +++ b/types/2022-08-01/Issuing/Disputes.d.ts @@ -338,6 +338,11 @@ declare module 'stripe' { } interface DisputeCreateParams { + /** + * The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If not set, defaults to the full transaction amount. + */ + amount?: number; + /** * Evidence provided for the dispute. */ @@ -662,6 +667,11 @@ declare module 'stripe' { } interface DisputeUpdateParams { + /** + * The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + */ + amount?: number; + /** * Evidence provided for the dispute. */ diff --git a/types/2022-08-01/PaymentIntents.d.ts b/types/2022-08-01/PaymentIntents.d.ts index 98b62f594a..c3037fac22 100644 --- a/types/2022-08-01/PaymentIntents.d.ts +++ b/types/2022-08-01/PaymentIntents.d.ts @@ -374,6 +374,8 @@ declare module 'stripe' { paynow_display_qr_code?: NextAction.PaynowDisplayQrCode; + pix_display_qr_code?: NextAction.PixDisplayQrCode; + promptpay_display_qr_code?: NextAction.PromptpayDisplayQrCode; redirect_to_url?: NextAction.RedirectToUrl; @@ -749,6 +751,33 @@ declare module 'stripe' { image_url_svg: string; } + interface PixDisplayQrCode { + /** + * The raw data string used to generate QR code, it should be used together with QR code library. + */ + data?: string; + + /** + * The date (unix timestamp) when the PIX expires. + */ + expires_at?: number; + + /** + * The URL to the hosted pix instructions page, which allows customers to view the pix QR code. + */ + hosted_instructions_url?: string; + + /** + * The image_url_png string used to render png QR code + */ + image_url_png?: string; + + /** + * The image_url_svg string used to render svg QR code + */ + image_url_svg?: string; + } + interface PromptpayDisplayQrCode { /** * The raw data string used to generate QR code, it should be used together with QR code library. @@ -922,6 +951,8 @@ declare module 'stripe' { paynow?: PaymentMethodOptions.Paynow; + pix?: PaymentMethodOptions.Pix; + promptpay?: PaymentMethodOptions.Promptpay; sepa_debit?: PaymentMethodOptions.SepaDebit; @@ -1537,6 +1568,18 @@ declare module 'stripe' { setup_future_usage?: 'none'; } + interface Pix { + /** + * The number of seconds (between 10 and 1209600) after which Pix payment will expire. + */ + expires_after_seconds: number | null; + + /** + * The timestamp at which the Pix expires. + */ + expires_at: number | null; + } + interface Promptpay { /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -2091,6 +2134,11 @@ declare module 'stripe' { */ paynow?: PaymentMethodData.Paynow; + /** + * If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + */ + pix?: PaymentMethodData.Pix; + /** * If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. */ @@ -2388,6 +2436,8 @@ declare module 'stripe' { interface Paynow {} + interface Pix {} + interface Promptpay {} interface RadarOptions { @@ -2437,6 +2487,7 @@ declare module 'stripe' { | 'oxxo' | 'p24' | 'paynow' + | 'pix' | 'promptpay' | 'sepa_debit' | 'sofort' @@ -2604,6 +2655,11 @@ declare module 'stripe' { */ paynow?: Stripe.Emptyable; + /** + * If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options. + */ + pix?: Stripe.Emptyable; + /** * If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options. */ @@ -3346,6 +3402,18 @@ declare module 'stripe' { setup_future_usage?: 'none'; } + interface Pix { + /** + * The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. + */ + expires_after_seconds?: number; + + /** + * The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future. + */ + expires_at?: number; + } + interface Promptpay { /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -3812,6 +3880,11 @@ declare module 'stripe' { */ paynow?: PaymentMethodData.Paynow; + /** + * If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + */ + pix?: PaymentMethodData.Pix; + /** * If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. */ @@ -4109,6 +4182,8 @@ declare module 'stripe' { interface Paynow {} + interface Pix {} + interface Promptpay {} interface RadarOptions { @@ -4158,6 +4233,7 @@ declare module 'stripe' { | 'oxxo' | 'p24' | 'paynow' + | 'pix' | 'promptpay' | 'sepa_debit' | 'sofort' @@ -4325,6 +4401,11 @@ declare module 'stripe' { */ paynow?: Stripe.Emptyable; + /** + * If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options. + */ + pix?: Stripe.Emptyable; + /** * If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options. */ @@ -5067,6 +5148,18 @@ declare module 'stripe' { setup_future_usage?: 'none'; } + interface Pix { + /** + * The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. + */ + expires_after_seconds?: number; + + /** + * The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future. + */ + expires_at?: number; + } + interface Promptpay { /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -5668,6 +5761,11 @@ declare module 'stripe' { */ paynow?: PaymentMethodData.Paynow; + /** + * If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + */ + pix?: PaymentMethodData.Pix; + /** * If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. */ @@ -5965,6 +6063,8 @@ declare module 'stripe' { interface Paynow {} + interface Pix {} + interface Promptpay {} interface RadarOptions { @@ -6014,6 +6114,7 @@ declare module 'stripe' { | 'oxxo' | 'p24' | 'paynow' + | 'pix' | 'promptpay' | 'sepa_debit' | 'sofort' @@ -6181,6 +6282,11 @@ declare module 'stripe' { */ paynow?: Stripe.Emptyable; + /** + * If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options. + */ + pix?: Stripe.Emptyable; + /** * If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options. */ @@ -6923,6 +7029,18 @@ declare module 'stripe' { setup_future_usage?: 'none'; } + interface Pix { + /** + * The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. + */ + expires_after_seconds?: number; + + /** + * The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future. + */ + expires_at?: number; + } + interface Promptpay { /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. diff --git a/types/2022-08-01/PaymentLinks.d.ts b/types/2022-08-01/PaymentLinks.d.ts index 6ec0000a27..433da099d6 100644 --- a/types/2022-08-01/PaymentLinks.d.ts +++ b/types/2022-08-01/PaymentLinks.d.ts @@ -226,6 +226,7 @@ declare module 'stripe' { | 'oxxo' | 'p24' | 'paynow' + | 'pix' | 'promptpay' | 'sepa_debit' | 'sofort' @@ -802,6 +803,7 @@ declare module 'stripe' { | 'oxxo' | 'p24' | 'paynow' + | 'pix' | 'promptpay' | 'sepa_debit' | 'sofort' @@ -1290,6 +1292,7 @@ declare module 'stripe' { | 'oxxo' | 'p24' | 'paynow' + | 'pix' | 'promptpay' | 'sepa_debit' | 'sofort' diff --git a/types/2022-08-01/PaymentMethods.d.ts b/types/2022-08-01/PaymentMethods.d.ts index 3895b1e573..f676037bbb 100644 --- a/types/2022-08-01/PaymentMethods.d.ts +++ b/types/2022-08-01/PaymentMethods.d.ts @@ -90,6 +90,8 @@ declare module 'stripe' { paynow?: PaymentMethod.Paynow; + pix?: PaymentMethod.Pix; + promptpay?: PaymentMethod.Promptpay; /** @@ -622,6 +624,8 @@ declare module 'stripe' { interface Paynow {} + interface Pix {} + interface Promptpay {} interface RadarOptions { @@ -709,6 +713,7 @@ declare module 'stripe' { | 'oxxo' | 'p24' | 'paynow' + | 'pix' | 'promptpay' | 'sepa_debit' | 'sofort' @@ -923,6 +928,11 @@ declare module 'stripe' { */ paynow?: PaymentMethodCreateParams.Paynow; + /** + * If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + */ + pix?: PaymentMethodCreateParams.Pix; + /** * If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. */ @@ -1246,6 +1256,8 @@ declare module 'stripe' { interface Paynow {} + interface Pix {} + interface Promptpay {} interface RadarOptions { @@ -1296,6 +1308,7 @@ declare module 'stripe' { | 'oxxo' | 'p24' | 'paynow' + | 'pix' | 'promptpay' | 'sepa_debit' | 'sofort' @@ -1510,6 +1523,7 @@ declare module 'stripe' { | 'oxxo' | 'p24' | 'paynow' + | 'pix' | 'promptpay' | 'sepa_debit' | 'sofort' diff --git a/types/2022-08-01/SetupIntents.d.ts b/types/2022-08-01/SetupIntents.d.ts index 887717cad5..6f1b9cd4c2 100644 --- a/types/2022-08-01/SetupIntents.d.ts +++ b/types/2022-08-01/SetupIntents.d.ts @@ -847,6 +847,11 @@ declare module 'stripe' { */ paynow?: PaymentMethodData.Paynow; + /** + * If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + */ + pix?: PaymentMethodData.Pix; + /** * If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. */ @@ -1144,6 +1149,8 @@ declare module 'stripe' { interface Paynow {} + interface Pix {} + interface Promptpay {} interface RadarOptions { @@ -1193,6 +1200,7 @@ declare module 'stripe' { | 'oxxo' | 'p24' | 'paynow' + | 'pix' | 'promptpay' | 'sepa_debit' | 'sofort' @@ -1714,6 +1722,11 @@ declare module 'stripe' { */ paynow?: PaymentMethodData.Paynow; + /** + * If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + */ + pix?: PaymentMethodData.Pix; + /** * If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. */ @@ -2011,6 +2024,8 @@ declare module 'stripe' { interface Paynow {} + interface Pix {} + interface Promptpay {} interface RadarOptions { @@ -2060,6 +2075,7 @@ declare module 'stripe' { | 'oxxo' | 'p24' | 'paynow' + | 'pix' | 'promptpay' | 'sepa_debit' | 'sofort' @@ -2663,6 +2679,11 @@ declare module 'stripe' { */ paynow?: PaymentMethodData.Paynow; + /** + * If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + */ + pix?: PaymentMethodData.Pix; + /** * If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. */ @@ -2960,6 +2981,8 @@ declare module 'stripe' { interface Paynow {} + interface Pix {} + interface Promptpay {} interface RadarOptions { @@ -3009,6 +3032,7 @@ declare module 'stripe' { | 'oxxo' | 'p24' | 'paynow' + | 'pix' | 'promptpay' | 'sepa_debit' | 'sofort' diff --git a/types/2022-08-01/Treasury/CreditReversals.d.ts b/types/2022-08-01/Treasury/CreditReversals.d.ts index fe3df812a5..8778464071 100644 --- a/types/2022-08-01/Treasury/CreditReversals.d.ts +++ b/types/2022-08-01/Treasury/CreditReversals.d.ts @@ -22,6 +22,11 @@ declare module 'stripe' { */ amount: number; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number; + /** * 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). */ diff --git a/types/2022-08-01/Treasury/DebitReversals.d.ts b/types/2022-08-01/Treasury/DebitReversals.d.ts index 38e07ccd91..fccd3ca431 100644 --- a/types/2022-08-01/Treasury/DebitReversals.d.ts +++ b/types/2022-08-01/Treasury/DebitReversals.d.ts @@ -22,6 +22,11 @@ declare module 'stripe' { */ amount: number; + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number; + /** * 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). */