From 768206df1b9d025853d5e34e6046beb502effdd9 Mon Sep 17 00:00:00 2001 From: David Brownman Date: Fri, 18 Oct 2024 11:41:33 -0700 Subject: [PATCH 1/4] Bump version to 17.2.1 --- CHANGELOG.md | 6 ++++++ VERSION | 2 +- package.json | 2 +- src/stripe.core.ts | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3137c06300..54f2908b74 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,10 @@ # Changelog +## 17.2.1 - 2024-10-18 +* [#2210](https://github.com/stripe/stripe-node/pull/2210) update object tags for meter-related classes + + - fixes a bug where the `object` property of the `MeterEvent`, `MeterEventAdjustment`, and `MeterEventSession` didn't match the server. +* [#2208](https://github.com/stripe/stripe-node/pull/2208) Update signature verification docs link + ## 17.2.0 - 2024-10-09 * [#2201](https://github.com/stripe/stripe-node/pull/2201) Add fetchRelatedObject to V2 Events if needed * `fetchRelatedObject` is added to events retrieved using `stripe.v2.core.events` and can be used to easily fetch the Stripe object related to a retrieved event diff --git a/VERSION b/VERSION index 290a3f36db..7c95a07592 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -17.2.0 +17.2.1 diff --git a/package.json b/package.json index 3757676826..ca02bb0305 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "stripe", - "version": "17.2.0", + "version": "17.2.1", "description": "Stripe API wrapper", "keywords": [ "stripe", diff --git a/src/stripe.core.ts b/src/stripe.core.ts index 03da005082..ca7f9a4e88 100644 --- a/src/stripe.core.ts +++ b/src/stripe.core.ts @@ -59,7 +59,7 @@ export function createStripe( platformFunctions: PlatformFunctions, requestSender: RequestSenderFactory = defaultRequestSenderFactory ): typeof Stripe { - Stripe.PACKAGE_VERSION = '17.2.0'; + Stripe.PACKAGE_VERSION = '17.2.1'; Stripe.USER_AGENT = { bindings_version: Stripe.PACKAGE_VERSION, lang: 'node', From ac7e3e3c1c424403599220f56573fb12cd1b5978 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 23 Oct 2024 23:02:29 +0000 Subject: [PATCH 2/4] Update generated code for v1318 --- OPENAPI_VERSION | 2 +- src/apiVersion.ts | 2 +- types/AccountSessionsResource.d.ts | 16 +- types/AccountsResource.d.ts | 2 +- types/Checkout/Sessions.d.ts | 75 +++++++++ types/Checkout/SessionsResource.d.ts | 80 ++++++++++ types/Disputes.d.ts | 6 +- types/InvoicesResource.d.ts | 10 ++ types/PaymentMethodConfigurations.d.ts | 108 +++++++++++++ .../PaymentMethodConfigurationsResource.d.ts | 150 ++++++++++++++++++ types/Refunds.d.ts | 5 +- types/WebhookEndpointsResource.d.ts | 3 +- 12 files changed, 444 insertions(+), 15 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index d18dc2e69a..579e73fad5 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1317 \ No newline at end of file +v1318 \ No newline at end of file diff --git a/src/apiVersion.ts b/src/apiVersion.ts index c59d0bde0f..3ca0bbd17f 100644 --- a/src/apiVersion.ts +++ b/src/apiVersion.ts @@ -1,3 +1,3 @@ // File generated from our OpenAPI spec -export const ApiVersion = '2024-09-30.acacia'; +export const ApiVersion = '2024-10-28.acacia'; diff --git a/types/AccountSessionsResource.d.ts b/types/AccountSessionsResource.d.ts index cf94a9f4da..8b1ef1c55d 100644 --- a/types/AccountSessionsResource.d.ts +++ b/types/AccountSessionsResource.d.ts @@ -121,6 +121,9 @@ declare module 'stripe' { */ payouts_list?: Components.PayoutsList; + /** + * Configuration for the recipients component. + */ recipients?: Components.Recipients; /** @@ -361,6 +364,9 @@ declare module 'stripe' { */ enabled: boolean; + /** + * The list of features enabled in the embedded component. + */ features?: FinancialAccount.Features; } @@ -640,14 +646,16 @@ declare module 'stripe' { */ enabled: boolean; - /** - * The list of features enabled in the embedded component. - */ features?: Recipients.Features; } namespace Recipients { - interface Features {} + interface Features { + /** + * Whether to allow sending money. + */ + send_money?: boolean; + } } interface ReportingChart { diff --git a/types/AccountsResource.d.ts b/types/AccountsResource.d.ts index 9394a0a55f..90a10b6b77 100644 --- a/types/AccountsResource.d.ts +++ b/types/AccountsResource.d.ts @@ -4838,7 +4838,7 @@ declare module 'stripe' { ): Promise>; /** - * Creates a single-use login link for a connected account to access the Express Dashboard. + * Creates a login link for a connected account to access the Express Dashboard. * * You can only create login links for accounts that use the [Express Dashboard](https://stripe.com/connect/express-dashboard) and are connected to your platform. */ diff --git a/types/Checkout/Sessions.d.ts b/types/Checkout/Sessions.d.ts index 8dab25c1ab..4a0685e238 100644 --- a/types/Checkout/Sessions.d.ts +++ b/types/Checkout/Sessions.d.ts @@ -1097,20 +1097,28 @@ declare module 'stripe' { ideal?: PaymentMethodOptions.Ideal; + kakao_pay?: PaymentMethodOptions.KakaoPay; + klarna?: PaymentMethodOptions.Klarna; konbini?: PaymentMethodOptions.Konbini; + kr_card?: PaymentMethodOptions.KrCard; + link?: PaymentMethodOptions.Link; mobilepay?: PaymentMethodOptions.Mobilepay; multibanco?: PaymentMethodOptions.Multibanco; + naver_pay?: PaymentMethodOptions.NaverPay; + oxxo?: PaymentMethodOptions.Oxxo; p24?: PaymentMethodOptions.P24; + payco?: PaymentMethodOptions.Payco; + paynow?: PaymentMethodOptions.Paynow; paypal?: PaymentMethodOptions.Paypal; @@ -1121,6 +1129,8 @@ declare module 'stripe' { revolut_pay?: PaymentMethodOptions.RevolutPay; + samsung_pay?: PaymentMethodOptions.SamsungPay; + sepa_debit?: PaymentMethodOptions.SepaDebit; sofort?: PaymentMethodOptions.Sofort; @@ -1510,6 +1520,28 @@ declare module 'stripe' { setup_future_usage?: 'none'; } + interface KakaoPay { + /** + * Controls when the funds will be captured from the customer's account. + */ + capture_method?: 'manual'; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). + */ + setup_future_usage?: KakaoPay.SetupFutureUsage; + } + + namespace KakaoPay { + type SetupFutureUsage = 'none' | 'off_session'; + } + interface Klarna { /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -1545,6 +1577,28 @@ declare module 'stripe' { setup_future_usage?: 'none'; } + interface KrCard { + /** + * Controls when the funds will be captured from the customer's account. + */ + capture_method?: 'manual'; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). + */ + setup_future_usage?: KrCard.SetupFutureUsage; + } + + namespace KrCard { + type SetupFutureUsage = 'none' | 'off_session'; + } + interface Link { /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -1588,6 +1642,13 @@ declare module 'stripe' { setup_future_usage?: 'none'; } + interface NaverPay { + /** + * Controls when the funds will be captured from the customer's account. + */ + capture_method?: 'manual'; + } + interface Oxxo { /** * The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. @@ -1619,6 +1680,13 @@ declare module 'stripe' { setup_future_usage?: 'none'; } + interface Payco { + /** + * Controls when the funds will be captured from the customer's account. + */ + capture_method?: 'manual'; + } + interface Paynow { /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -1776,6 +1844,13 @@ declare module 'stripe' { type SetupFutureUsage = 'none' | 'off_session'; } + interface SamsungPay { + /** + * Controls when the funds will be captured from the customer's account. + */ + capture_method?: 'manual'; + } + interface SepaDebit { /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. diff --git a/types/Checkout/SessionsResource.d.ts b/types/Checkout/SessionsResource.d.ts index 464e64fd46..f4a8820f6d 100644 --- a/types/Checkout/SessionsResource.d.ts +++ b/types/Checkout/SessionsResource.d.ts @@ -1075,6 +1075,11 @@ declare module 'stripe' { */ ideal?: PaymentMethodOptions.Ideal; + /** + * contains details about the Kakao Pay payment method options. + */ + kakao_pay?: PaymentMethodOptions.KakaoPay; + /** * contains details about the Klarna payment method options. */ @@ -1085,6 +1090,11 @@ declare module 'stripe' { */ konbini?: PaymentMethodOptions.Konbini; + /** + * contains details about the Korean card payment method options. + */ + kr_card?: PaymentMethodOptions.KrCard; + /** * contains details about the Link payment method options. */ @@ -1100,6 +1110,11 @@ declare module 'stripe' { */ multibanco?: PaymentMethodOptions.Multibanco; + /** + * contains details about the Kakao Pay payment method options. + */ + naver_pay?: PaymentMethodOptions.NaverPay; + /** * contains details about the OXXO payment method options. */ @@ -1110,6 +1125,11 @@ declare module 'stripe' { */ p24?: PaymentMethodOptions.P24; + /** + * contains details about the PAYCO payment method options. + */ + payco?: PaymentMethodOptions.Payco; + /** * contains details about the PayNow payment method options. */ @@ -1135,6 +1155,11 @@ declare module 'stripe' { */ revolut_pay?: PaymentMethodOptions.RevolutPay; + /** + * contains details about the Samsung Pay payment method options. + */ + samsung_pay?: PaymentMethodOptions.SamsungPay; + /** * contains details about the Sepa Debit payment method options. */ @@ -1556,6 +1581,23 @@ declare module 'stripe' { setup_future_usage?: 'none'; } + interface KakaoPay { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). + */ + setup_future_usage?: KakaoPay.SetupFutureUsage; + } + + namespace KakaoPay { + type SetupFutureUsage = 'none' | 'off_session'; + } + interface Klarna { /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -1587,6 +1629,23 @@ declare module 'stripe' { setup_future_usage?: 'none'; } + interface KrCard { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). + */ + setup_future_usage?: KrCard.SetupFutureUsage; + } + + namespace KrCard { + type SetupFutureUsage = 'none' | 'off_session'; + } + interface Link { /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -1630,6 +1689,23 @@ declare module 'stripe' { setup_future_usage?: 'none'; } + interface NaverPay { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + * + * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + * + * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). + */ + setup_future_usage?: NaverPay.SetupFutureUsage; + } + + namespace NaverPay { + type SetupFutureUsage = 'none' | 'off_session'; + } + interface Oxxo { /** * The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. @@ -1666,6 +1742,8 @@ declare module 'stripe' { tos_shown_and_accepted?: boolean; } + interface Payco {} + interface Paynow { /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -1861,6 +1939,8 @@ declare module 'stripe' { type SetupFutureUsage = 'none' | 'off_session'; } + interface SamsungPay {} + interface SepaDebit { /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. diff --git a/types/Disputes.d.ts b/types/Disputes.d.ts index 0ebc980f89..c4c76ede2b 100644 --- a/types/Disputes.d.ts +++ b/types/Disputes.d.ts @@ -48,7 +48,7 @@ declare module 'stripe' { /** * List of eligibility types that are included in `enhanced_evidence`. */ - enhanced_eligibility_types?: Array<'visa_compelling_evidence_3'>; + enhanced_eligibility_types: Array<'visa_compelling_evidence_3'>; evidence: Dispute.Evidence; @@ -159,7 +159,7 @@ declare module 'stripe' { */ duplicate_charge_id: string | null; - enhanced_evidence?: Evidence.EnhancedEvidence; + enhanced_evidence: Evidence.EnhancedEvidence; /** * A description of the product or service that was sold. @@ -350,7 +350,7 @@ declare module 'stripe' { */ due_by: number | null; - enhanced_eligibility?: EvidenceDetails.EnhancedEligibility; + enhanced_eligibility: EvidenceDetails.EnhancedEligibility; /** * Whether evidence has been staged for this dispute. diff --git a/types/InvoicesResource.d.ts b/types/InvoicesResource.d.ts index f414856f47..cb1b54cbb2 100644 --- a/types/InvoicesResource.d.ts +++ b/types/InvoicesResource.d.ts @@ -28,6 +28,11 @@ declare module 'stripe' { */ automatic_tax?: InvoiceCreateParams.AutomaticTax; + /** + * The time when this invoice should be scheduled to finalize. The invoice will be finalized at this time if it is still in draft state. + */ + automatically_finalizes_at?: number; + /** * Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. Defaults to `charge_automatically`. */ @@ -869,6 +874,11 @@ declare module 'stripe' { */ automatic_tax?: InvoiceUpdateParams.AutomaticTax; + /** + * The time when this invoice should be scheduled to finalize. The invoice will be finalized at this time if it is still in draft state. To turn off automatic finalization, set `auto_advance` to false. + */ + automatically_finalizes_at?: number; + /** * Either `charge_automatically` or `send_invoice`. This field can be updated only on `draft` invoices. */ diff --git a/types/PaymentMethodConfigurations.d.ts b/types/PaymentMethodConfigurations.d.ts index 9e7be4f1f4..8609282c85 100644 --- a/types/PaymentMethodConfigurations.d.ts +++ b/types/PaymentMethodConfigurations.d.ts @@ -79,6 +79,8 @@ declare module 'stripe' { google_pay?: PaymentMethodConfiguration.GooglePay; + gopay?: PaymentMethodConfiguration.Gopay; + grabpay?: PaymentMethodConfiguration.Grabpay; id_bank_transfer?: PaymentMethodConfiguration.IdBankTransfer; @@ -129,10 +131,14 @@ declare module 'stripe' { promptpay?: PaymentMethodConfiguration.Promptpay; + qris?: PaymentMethodConfiguration.Qris; + revolut_pay?: PaymentMethodConfiguration.RevolutPay; sepa_debit?: PaymentMethodConfiguration.SepaDebit; + shopeepay?: PaymentMethodConfiguration.Shopeepay; + sofort?: PaymentMethodConfiguration.Sofort; swish?: PaymentMethodConfiguration.Swish; @@ -827,6 +833,40 @@ declare module 'stripe' { } } + interface Gopay { + /** + * Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + */ + available: boolean; + + display_preference: Gopay.DisplayPreference; + } + + namespace Gopay { + interface DisplayPreference { + /** + * For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + */ + overridable: boolean | null; + + /** + * The account's display preference. + */ + preference: DisplayPreference.Preference; + + /** + * The effective display preference value. + */ + value: DisplayPreference.Value; + } + + namespace DisplayPreference { + type Preference = 'none' | 'off' | 'on'; + + type Value = 'off' | 'on'; + } + } + interface Grabpay { /** * Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. @@ -1337,6 +1377,40 @@ declare module 'stripe' { } } + interface Qris { + /** + * Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + */ + available: boolean; + + display_preference: Qris.DisplayPreference; + } + + namespace Qris { + interface DisplayPreference { + /** + * For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + */ + overridable: boolean | null; + + /** + * The account's display preference. + */ + preference: DisplayPreference.Preference; + + /** + * The effective display preference value. + */ + value: DisplayPreference.Value; + } + + namespace DisplayPreference { + type Preference = 'none' | 'off' | 'on'; + + type Value = 'off' | 'on'; + } + } + interface RevolutPay { /** * Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. @@ -1405,6 +1479,40 @@ declare module 'stripe' { } } + interface Shopeepay { + /** + * Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + */ + available: boolean; + + display_preference: Shopeepay.DisplayPreference; + } + + namespace Shopeepay { + interface DisplayPreference { + /** + * For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + */ + overridable: boolean | null; + + /** + * The account's display preference. + */ + preference: DisplayPreference.Preference; + + /** + * The effective display preference value. + */ + value: DisplayPreference.Value; + } + + namespace DisplayPreference { + type Preference = 'none' | 'off' | 'on'; + + type Value = 'off' | 'on'; + } + } + interface Sofort { /** * Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. diff --git a/types/PaymentMethodConfigurationsResource.d.ts b/types/PaymentMethodConfigurationsResource.d.ts index 8f8314ddd2..cc91bcdc2b 100644 --- a/types/PaymentMethodConfigurationsResource.d.ts +++ b/types/PaymentMethodConfigurationsResource.d.ts @@ -113,6 +113,11 @@ declare module 'stripe' { */ google_pay?: PaymentMethodConfigurationCreateParams.GooglePay; + /** + * GoPay is a [single use](https://stripe.com/docs/payments/payment-methods#usage) digital wallet payment method popular in Indonesia. When paying with GoPay, customers authenticate and approve payments using the Gojek app. Desktop checkout is performed by scanning a QR code. When checking out on mobile, customers are redirected to the Gojek app to confirm payment. + */ + gopay?: PaymentMethodConfigurationCreateParams.Gopay; + /** * GrabPay is a payment method developed by [Grab](https://www.grab.com/sg/consumer/finance/pay/). GrabPay is a digital wallet - customers maintain a balance in their wallets that they pay out with. Check this [page](https://stripe.com/docs/payments/grabpay) for more details. */ @@ -198,6 +203,11 @@ declare module 'stripe' { */ promptpay?: PaymentMethodConfigurationCreateParams.Promptpay; + /** + * QRIS is a [real-time](https://docs.stripe.com/payments/real-time) payment method popular in Indonesia. When paying with QRIS, customers authenticate and approve payments by scanning a QR code in their preferred digital wallet app. + */ + qris?: PaymentMethodConfigurationCreateParams.Qris; + /** * Revolut Pay, developed by Revolut, a global finance app, is a digital wallet payment method. Revolut Pay uses the customer's stored balance or cards to fund the payment, and offers the option for non-Revolut customers to save their details after their first purchase. */ @@ -208,6 +218,11 @@ declare module 'stripe' { */ sepa_debit?: PaymentMethodConfigurationCreateParams.SepaDebit; + /** + * ShopeePay is a [single use](https://stripe.com/docs/payments/payment-methods#usage) digital wallet payment method popular in Indonesia. When paying with GoPay, customers authenticate and approve payments using the Shopee app. Desktop checkout is performed by scanning a QR code. When checking out on mobile, customers are redirected to the Shopee app to confirm payment. + */ + shopeepay?: PaymentMethodConfigurationCreateParams.Shopeepay; + /** * Stripe users in Europe and the United States can use the [Payment Intents API](https://stripe.com/docs/payments/payment-intents)—a single integration path for creating payments using any supported method—to accept [Sofort](https://www.sofort.com/) payments from customers. Check this [page](https://stripe.com/docs/payments/sofort) for more details. */ @@ -660,6 +675,26 @@ declare module 'stripe' { } } + interface Gopay { + /** + * Whether or not the payment method should be displayed. + */ + display_preference?: Gopay.DisplayPreference; + } + + namespace Gopay { + interface DisplayPreference { + /** + * The account's preference for whether or not to display this payment method. + */ + preference?: DisplayPreference.Preference; + } + + namespace DisplayPreference { + type Preference = 'none' | 'off' | 'on'; + } + } + interface Grabpay { /** * Whether or not the payment method should be displayed. @@ -960,6 +995,26 @@ declare module 'stripe' { } } + interface Qris { + /** + * Whether or not the payment method should be displayed. + */ + display_preference?: Qris.DisplayPreference; + } + + namespace Qris { + interface DisplayPreference { + /** + * The account's preference for whether or not to display this payment method. + */ + preference?: DisplayPreference.Preference; + } + + namespace DisplayPreference { + type Preference = 'none' | 'off' | 'on'; + } + } + interface RevolutPay { /** * Whether or not the payment method should be displayed. @@ -1000,6 +1055,26 @@ declare module 'stripe' { } } + interface Shopeepay { + /** + * Whether or not the payment method should be displayed. + */ + display_preference?: Shopeepay.DisplayPreference; + } + + namespace Shopeepay { + interface DisplayPreference { + /** + * The account's preference for whether or not to display this payment method. + */ + preference?: DisplayPreference.Preference; + } + + namespace DisplayPreference { + type Preference = 'none' | 'off' | 'on'; + } + } + interface Sofort { /** * Whether or not the payment method should be displayed. @@ -1244,6 +1319,11 @@ declare module 'stripe' { */ google_pay?: PaymentMethodConfigurationUpdateParams.GooglePay; + /** + * GoPay is a [single use](https://stripe.com/docs/payments/payment-methods#usage) digital wallet payment method popular in Indonesia. When paying with GoPay, customers authenticate and approve payments using the Gojek app. Desktop checkout is performed by scanning a QR code. When checking out on mobile, customers are redirected to the Gojek app to confirm payment. + */ + gopay?: PaymentMethodConfigurationUpdateParams.Gopay; + /** * GrabPay is a payment method developed by [Grab](https://www.grab.com/sg/consumer/finance/pay/). GrabPay is a digital wallet - customers maintain a balance in their wallets that they pay out with. Check this [page](https://stripe.com/docs/payments/grabpay) for more details. */ @@ -1324,6 +1404,11 @@ declare module 'stripe' { */ promptpay?: PaymentMethodConfigurationUpdateParams.Promptpay; + /** + * QRIS is a [real-time](https://docs.stripe.com/payments/real-time) payment method popular in Indonesia. When paying with QRIS, customers authenticate and approve payments by scanning a QR code in their preferred digital wallet app. + */ + qris?: PaymentMethodConfigurationUpdateParams.Qris; + /** * Revolut Pay, developed by Revolut, a global finance app, is a digital wallet payment method. Revolut Pay uses the customer's stored balance or cards to fund the payment, and offers the option for non-Revolut customers to save their details after their first purchase. */ @@ -1334,6 +1419,11 @@ declare module 'stripe' { */ sepa_debit?: PaymentMethodConfigurationUpdateParams.SepaDebit; + /** + * ShopeePay is a [single use](https://stripe.com/docs/payments/payment-methods#usage) digital wallet payment method popular in Indonesia. When paying with GoPay, customers authenticate and approve payments using the Shopee app. Desktop checkout is performed by scanning a QR code. When checking out on mobile, customers are redirected to the Shopee app to confirm payment. + */ + shopeepay?: PaymentMethodConfigurationUpdateParams.Shopeepay; + /** * Stripe users in Europe and the United States can use the [Payment Intents API](https://stripe.com/docs/payments/payment-intents)—a single integration path for creating payments using any supported method—to accept [Sofort](https://www.sofort.com/) payments from customers. Check this [page](https://stripe.com/docs/payments/sofort) for more details. */ @@ -1786,6 +1876,26 @@ declare module 'stripe' { } } + interface Gopay { + /** + * Whether or not the payment method should be displayed. + */ + display_preference?: Gopay.DisplayPreference; + } + + namespace Gopay { + interface DisplayPreference { + /** + * The account's preference for whether or not to display this payment method. + */ + preference?: DisplayPreference.Preference; + } + + namespace DisplayPreference { + type Preference = 'none' | 'off' | 'on'; + } + } + interface Grabpay { /** * Whether or not the payment method should be displayed. @@ -2086,6 +2196,26 @@ declare module 'stripe' { } } + interface Qris { + /** + * Whether or not the payment method should be displayed. + */ + display_preference?: Qris.DisplayPreference; + } + + namespace Qris { + interface DisplayPreference { + /** + * The account's preference for whether or not to display this payment method. + */ + preference?: DisplayPreference.Preference; + } + + namespace DisplayPreference { + type Preference = 'none' | 'off' | 'on'; + } + } + interface RevolutPay { /** * Whether or not the payment method should be displayed. @@ -2126,6 +2256,26 @@ declare module 'stripe' { } } + interface Shopeepay { + /** + * Whether or not the payment method should be displayed. + */ + display_preference?: Shopeepay.DisplayPreference; + } + + namespace Shopeepay { + interface DisplayPreference { + /** + * The account's preference for whether or not to display this payment method. + */ + preference?: DisplayPreference.Preference; + } + + namespace DisplayPreference { + type Preference = 'none' | 'off' | 'on'; + } + } + interface Sofort { /** * Whether or not the payment method should be displayed. diff --git a/types/Refunds.d.ts b/types/Refunds.d.ts index 8550dc60e7..10b19b9a4b 100644 --- a/types/Refunds.d.ts +++ b/types/Refunds.d.ts @@ -388,10 +388,7 @@ declare module 'stripe' { } interface NextAction { - /** - * Contains the refund details. - */ - display_details: NextAction.DisplayDetails | null; + display_details?: NextAction.DisplayDetails; /** * Type of the next action to perform. diff --git a/types/WebhookEndpointsResource.d.ts b/types/WebhookEndpointsResource.d.ts index 1d15d01cc4..ceda0aeffa 100644 --- a/types/WebhookEndpointsResource.d.ts +++ b/types/WebhookEndpointsResource.d.ts @@ -143,7 +143,8 @@ declare module 'stripe' { | '2023-10-16' | '2024-04-10' | '2024-06-20' - | '2024-09-30.acacia'; + | '2024-09-30.acacia' + | '2024-10-28.acacia'; type EnabledEvent = | '*' From cf9db284ccb7df7284e6bc7831a4977e87b017c1 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 23 Oct 2024 23:17:37 +0000 Subject: [PATCH 3/4] Update generated code for v1318 --- src/resources/V2/Core.ts | 2 + src/resources/V2/Core/EventDestinations.ts | 39 +++ types/V2/Core/EventDestinationsResource.d.ts | 281 +++++++++++++++++++ types/V2/Core/EventsResource.d.ts | 2 +- types/V2/CoreResource.d.ts | 1 + types/V2/EventDestinations.d.ts | 164 +++++++++++ types/index.d.ts | 2 + 7 files changed, 490 insertions(+), 1 deletion(-) create mode 100644 src/resources/V2/Core/EventDestinations.ts create mode 100644 types/V2/Core/EventDestinationsResource.d.ts create mode 100644 types/V2/EventDestinations.d.ts diff --git a/src/resources/V2/Core.ts b/src/resources/V2/Core.ts index 4f13f0cc90..10210e8ed1 100644 --- a/src/resources/V2/Core.ts +++ b/src/resources/V2/Core.ts @@ -1,10 +1,12 @@ // File generated from our OpenAPI spec import {StripeResource} from '../../StripeResource.js'; +import {EventDestinations} from './Core/EventDestinations.js'; import {Events} from './Core/Events.js'; export const Core = StripeResource.extend({ constructor: function(...args: any) { StripeResource.apply(this, args); + this.eventDestinations = new EventDestinations(...args); this.events = new Events(...args); }, }); diff --git a/src/resources/V2/Core/EventDestinations.ts b/src/resources/V2/Core/EventDestinations.ts new file mode 100644 index 0000000000..b857691e05 --- /dev/null +++ b/src/resources/V2/Core/EventDestinations.ts @@ -0,0 +1,39 @@ +// File generated from our OpenAPI spec + +import {StripeResource} from '../../../StripeResource.js'; +const stripeMethod = StripeResource.method; +export const EventDestinations = StripeResource.extend({ + create: stripeMethod({ + method: 'POST', + fullPath: '/v2/core/event_destinations', + }), + retrieve: stripeMethod({ + method: 'GET', + fullPath: '/v2/core/event_destinations/{id}', + }), + update: stripeMethod({ + method: 'POST', + fullPath: '/v2/core/event_destinations/{id}', + }), + list: stripeMethod({ + method: 'GET', + fullPath: '/v2/core/event_destinations', + methodType: 'list', + }), + del: stripeMethod({ + method: 'DELETE', + fullPath: '/v2/core/event_destinations/{id}', + }), + disable: stripeMethod({ + method: 'POST', + fullPath: '/v2/core/event_destinations/{id}/disable', + }), + enable: stripeMethod({ + method: 'POST', + fullPath: '/v2/core/event_destinations/{id}/enable', + }), + ping: stripeMethod({ + method: 'POST', + fullPath: '/v2/core/event_destinations/{id}/ping', + }), +}); diff --git a/types/V2/Core/EventDestinationsResource.d.ts b/types/V2/Core/EventDestinationsResource.d.ts new file mode 100644 index 0000000000..f6c2fe9b7b --- /dev/null +++ b/types/V2/Core/EventDestinationsResource.d.ts @@ -0,0 +1,281 @@ +// File generated from our OpenAPI spec + +declare module 'stripe' { + namespace Stripe { + namespace V2 { + namespace Core { + interface EventDestinationCreateParams { + /** + * The list of events to enable for this endpoint. + */ + enabled_events: Array; + + /** + * Payload type of events being subscribed to. + */ + event_payload: EventDestinationCreateParams.EventPayload; + + /** + * Event destination name. + */ + name: string; + + /** + * Event destination type. + */ + type: EventDestinationCreateParams.Type; + + /** + * Amazon EventBridge configuration. + */ + amazon_eventbridge?: EventDestinationCreateParams.AmazonEventbridge; + + /** + * An optional description of what the event destination is used for. + */ + description?: string; + + /** + * Where events should be routed from. + */ + events_from?: Array; + + /** + * Additional fields to include in the response. + */ + include?: Array; + + /** + * Metadata. + */ + metadata?: Stripe.MetadataParam; + + /** + * If using the snapshot event payload, the API version events are rendered as. + */ + snapshot_api_version?: string; + + /** + * Webhook endpoint configuration. + */ + webhook_endpoint?: EventDestinationCreateParams.WebhookEndpoint; + } + + namespace EventDestinationCreateParams { + interface AmazonEventbridge { + /** + * The AWS account ID. + */ + aws_account_id: string; + + /** + * The region of the AWS event source. + */ + aws_region: string; + } + + type EventPayload = 'snapshot' | 'thin'; + + type EventsFrom = 'other_accounts' | 'self'; + + type Include = + | 'webhook_endpoint.signing_secret' + | 'webhook_endpoint.url'; + + type Type = 'amazon_eventbridge' | 'webhook_endpoint'; + + interface WebhookEndpoint { + /** + * The URL of the webhook endpoint. + */ + url: string; + } + } + } + + namespace Core { + interface EventDestinationRetrieveParams { + /** + * Additional fields to include in the response. + */ + include?: Array<'webhook_endpoint.url'>; + } + } + + namespace Core { + interface EventDestinationUpdateParams { + /** + * An optional description of what the event destination is used for. + */ + description?: string; + + /** + * The list of events to enable for this endpoint. + */ + enabled_events?: Array; + + /** + * Additional fields to include in the response. Currently supports `webhook_endpoint.url`. + */ + include?: Array<'webhook_endpoint.url'>; + + /** + * Metadata. + */ + metadata?: Stripe.MetadataParam; + + /** + * Event destination name. + */ + name?: string; + + /** + * Webhook endpoint configuration. + */ + webhook_endpoint?: EventDestinationUpdateParams.WebhookEndpoint; + } + + namespace EventDestinationUpdateParams { + interface WebhookEndpoint { + /** + * The URL of the webhook endpoint. + */ + url: string; + } + } + } + + namespace Core { + interface EventDestinationListParams { + /** + * Additional fields to include in the response. Currently supports `webhook_endpoint.url`. + */ + include?: Array<'webhook_endpoint.url'>; + + /** + * The page size. + */ + limit?: number; + + /** + * The requested page. + */ + page?: string; + } + } + + namespace Core { + interface EventDestinationDeleteParams {} + } + + namespace Core { + interface EventDestinationDisableParams {} + } + + namespace Core { + interface EventDestinationEnableParams {} + } + + namespace Core { + interface EventDestinationPingParams {} + } + + namespace Core { + class EventDestinationsResource { + /** + * Create a new event destination. + */ + create( + params: EventDestinationCreateParams, + options?: RequestOptions + ): Promise>; + + /** + * Retrieves the details of an event destination. + */ + retrieve( + id: string, + params?: EventDestinationRetrieveParams, + options?: RequestOptions + ): Promise>; + retrieve( + id: string, + options?: RequestOptions + ): Promise>; + + /** + * Update the details of an event destination. + */ + update( + id: string, + params?: EventDestinationUpdateParams, + options?: RequestOptions + ): Promise>; + + /** + * Lists all event destinations. + */ + list( + params?: EventDestinationListParams, + options?: RequestOptions + ): ApiListPromise; + list( + options?: RequestOptions + ): ApiListPromise; + + /** + * Delete an event destination. + */ + del( + id: string, + params?: EventDestinationDeleteParams, + options?: RequestOptions + ): Promise>; + del( + id: string, + options?: RequestOptions + ): Promise>; + + /** + * Disable an event destination. + */ + disable( + id: string, + params?: EventDestinationDisableParams, + options?: RequestOptions + ): Promise>; + disable( + id: string, + options?: RequestOptions + ): Promise>; + + /** + * Enable an event destination. + */ + enable( + id: string, + params?: EventDestinationEnableParams, + options?: RequestOptions + ): Promise>; + enable( + id: string, + options?: RequestOptions + ): Promise>; + + /** + * Send a `ping` event to an event destination. + */ + ping( + id: string, + params?: EventDestinationPingParams, + options?: RequestOptions + ): Promise>; + ping( + id: string, + options?: RequestOptions + ): Promise>; + } + } + } + } +} diff --git a/types/V2/Core/EventsResource.d.ts b/types/V2/Core/EventsResource.d.ts index 21a09fa644..bb3489e290 100644 --- a/types/V2/Core/EventsResource.d.ts +++ b/types/V2/Core/EventsResource.d.ts @@ -22,7 +22,7 @@ declare module 'stripe' { limit?: number; /** - * The requested page number. + * The requested page. */ page?: string; } diff --git a/types/V2/CoreResource.d.ts b/types/V2/CoreResource.d.ts index f65f8a4b98..f9e54d2ffc 100644 --- a/types/V2/CoreResource.d.ts +++ b/types/V2/CoreResource.d.ts @@ -4,6 +4,7 @@ declare module 'stripe' { namespace Stripe { namespace V2 { class CoreResource { + eventDestinations: Stripe.V2.Core.EventDestinationsResource; events: Stripe.V2.Core.EventsResource; } } diff --git a/types/V2/EventDestinations.d.ts b/types/V2/EventDestinations.d.ts new file mode 100644 index 0000000000..5eb69f715d --- /dev/null +++ b/types/V2/EventDestinations.d.ts @@ -0,0 +1,164 @@ +// File generated from our OpenAPI spec + +declare module 'stripe' { + namespace Stripe { + namespace V2 { + /** + * The EventDestination object. + */ + interface EventDestination { + /** + * Unique identifier for the object. + */ + id: string; + + /** + * String representing the object's type. Objects of the same type share the same value of the object field. + */ + object: 'v2.core.event_destination'; + + /** + * Amazon EventBridge configuration. + */ + amazon_eventbridge: EventDestination.AmazonEventbridge | null; + + /** + * Time at which the object was created. + */ + created: string; + + /** + * An optional description of what the event destination is used for. + */ + description: string; + + /** + * The list of events to enable for this endpoint. + */ + enabled_events: Array; + + /** + * Payload type of events being subscribed to. + */ + event_payload: EventDestination.EventPayload; + + /** + * Where events should be routed from. + */ + events_from: Array | null; + + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ + livemode: boolean; + + /** + * Metadata. + */ + metadata: Stripe.Metadata | null; + + /** + * Event destination name. + */ + name: string; + + /** + * If using the snapshot event payload, the API version events are rendered as. + */ + snapshot_api_version: string | null; + + /** + * Status. It can be set to either enabled or disabled. + */ + status: EventDestination.Status; + + /** + * Additional information about event destination status. + */ + status_details: EventDestination.StatusDetails | null; + + /** + * Event destination type. + */ + type: EventDestination.Type; + + /** + * Time at which the object was last updated. + */ + updated: string; + + /** + * Webhook endpoint configuration. + */ + webhook_endpoint: EventDestination.WebhookEndpoint | null; + } + + namespace EventDestination { + interface AmazonEventbridge { + /** + * The AWS account ID. + */ + aws_account_id: string; + + /** + * The ARN of the AWS event source. + */ + aws_event_source_arn: string; + + /** + * The state of the AWS event source. + */ + aws_event_source_status: AmazonEventbridge.AwsEventSourceStatus; + } + + namespace AmazonEventbridge { + type AwsEventSourceStatus = + | 'active' + | 'deleted' + | 'pending' + | 'unknown'; + } + + type EventPayload = 'snapshot' | 'thin'; + + type EventsFrom = 'other_accounts' | 'self'; + + type Status = 'disabled' | 'enabled'; + + interface StatusDetails { + /** + * Details about why the event destination has been disabled. + */ + disabled: StatusDetails.Disabled | null; + } + + namespace StatusDetails { + interface Disabled { + /** + * Reason event destination has been disabled. + */ + reason: Disabled.Reason; + } + + namespace Disabled { + type Reason = 'no_aws_event_source_exists' | 'user'; + } + } + + type Type = 'amazon_eventbridge' | 'webhook_endpoint'; + + interface WebhookEndpoint { + /** + * The signing secret of the webhook endpoint, only includable on creation. + */ + signing_secret: string | null; + + /** + * The URL of the webhook endpoint, includable. + */ + url: string | null; + } + } + } + } +} diff --git a/types/index.d.ts b/types/index.d.ts index 895ad1a5b2..103d9c84cf 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -148,6 +148,7 @@ /// /// /// +/// /// /// /// @@ -316,6 +317,7 @@ /// /// /// +/// /// /// // Imports: The end of the section generated from our OpenAPI spec From a4504ee802ae85de9a74e90c5ac8a9dd2d5b0701 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 24 Oct 2024 16:11:01 +0000 Subject: [PATCH 4/4] Update generated code for v1319 --- OPENAPI_VERSION | 2 +- types/Invoices.d.ts | 1 - types/PaymentIntents.d.ts | 1 - types/QuotePreviewInvoices.d.ts | 1 - types/SetupAttempts.d.ts | 1 - types/SetupIntents.d.ts | 1 - 6 files changed, 1 insertion(+), 6 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 579e73fad5..c626f7dd81 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1318 \ No newline at end of file +v1319 \ No newline at end of file diff --git a/types/Invoices.d.ts b/types/Invoices.d.ts index b7da68dcd2..bf7b0ef41f 100644 --- a/types/Invoices.d.ts +++ b/types/Invoices.d.ts @@ -994,7 +994,6 @@ declare module 'stripe' { | 'payment_method_unexpected_state' | 'payment_method_unsupported_type' | 'payout_reconciliation_not_ready' - | 'payout_statement_descriptor_profanity' | 'payouts_limit_exceeded' | 'payouts_not_allowed' | 'platform_account_required' diff --git a/types/PaymentIntents.d.ts b/types/PaymentIntents.d.ts index ec2e928426..f8b39d32c5 100644 --- a/types/PaymentIntents.d.ts +++ b/types/PaymentIntents.d.ts @@ -537,7 +537,6 @@ declare module 'stripe' { | 'payment_method_unexpected_state' | 'payment_method_unsupported_type' | 'payout_reconciliation_not_ready' - | 'payout_statement_descriptor_profanity' | 'payouts_limit_exceeded' | 'payouts_not_allowed' | 'platform_account_required' diff --git a/types/QuotePreviewInvoices.d.ts b/types/QuotePreviewInvoices.d.ts index aa3264c47f..99f5cb232d 100644 --- a/types/QuotePreviewInvoices.d.ts +++ b/types/QuotePreviewInvoices.d.ts @@ -968,7 +968,6 @@ declare module 'stripe' { | 'payment_method_unexpected_state' | 'payment_method_unsupported_type' | 'payout_reconciliation_not_ready' - | 'payout_statement_descriptor_profanity' | 'payouts_limit_exceeded' | 'payouts_not_allowed' | 'platform_account_required' diff --git a/types/SetupAttempts.d.ts b/types/SetupAttempts.d.ts index 9224f23eb6..0ff2e9aa87 100644 --- a/types/SetupAttempts.d.ts +++ b/types/SetupAttempts.d.ts @@ -793,7 +793,6 @@ declare module 'stripe' { | 'payment_method_unexpected_state' | 'payment_method_unsupported_type' | 'payout_reconciliation_not_ready' - | 'payout_statement_descriptor_profanity' | 'payouts_limit_exceeded' | 'payouts_not_allowed' | 'platform_account_required' diff --git a/types/SetupIntents.d.ts b/types/SetupIntents.d.ts index 8f2540cf01..d7758694e6 100644 --- a/types/SetupIntents.d.ts +++ b/types/SetupIntents.d.ts @@ -418,7 +418,6 @@ declare module 'stripe' { | 'payment_method_unexpected_state' | 'payment_method_unsupported_type' | 'payout_reconciliation_not_ready' - | 'payout_statement_descriptor_profanity' | 'payouts_limit_exceeded' | 'payouts_not_allowed' | 'platform_account_required'