From b4566c0a7422109dd02499d46d68d929fab9d075 Mon Sep 17 00:00:00 2001 From: Yejia Chen Date: Fri, 11 Feb 2022 12:29:33 -0500 Subject: [PATCH] Codegen for openapi a285624 --- lib/resources/PaymentIntents.js | 5 +++++ lib/resources/SetupIntents.js | 5 +++++ types/2020-08-27/Invoices.d.ts | 3 +++ types/2020-08-27/PaymentIntents.d.ts | 25 +++++++++++++++++++++++++ types/2020-08-27/SetupIntents.d.ts | 25 +++++++++++++++++++++++++ types/2020-08-27/SubscriptionItems.d.ts | 4 ++-- types/2020-08-27/Subscriptions.d.ts | 3 +++ types/2020-08-27/Terminal/Readers.d.ts | 18 +++++++++++++++--- 8 files changed, 83 insertions(+), 5 deletions(-) diff --git a/lib/resources/PaymentIntents.js b/lib/resources/PaymentIntents.js index 42f6cddba2..af61bab8c0 100644 --- a/lib/resources/PaymentIntents.js +++ b/lib/resources/PaymentIntents.js @@ -43,4 +43,9 @@ module.exports = StripeResource.extend({ method: 'POST', path: '/{intent}/confirm', }), + + verifyMicrodeposits: stripeMethod({ + method: 'POST', + path: '/{intent}/verify_microdeposits', + }), }); diff --git a/lib/resources/SetupIntents.js b/lib/resources/SetupIntents.js index 0f5ed8ecab..7aea8dcf75 100644 --- a/lib/resources/SetupIntents.js +++ b/lib/resources/SetupIntents.js @@ -38,4 +38,9 @@ module.exports = StripeResource.extend({ method: 'POST', path: '/{intent}/confirm', }), + + verifyMicrodeposits: stripeMethod({ + method: 'POST', + path: '/{intent}/verify_microdeposits', + }), }); diff --git a/types/2020-08-27/Invoices.d.ts b/types/2020-08-27/Invoices.d.ts index e5a0aee14a..d076fb073d 100644 --- a/types/2020-08-27/Invoices.d.ts +++ b/types/2020-08-27/Invoices.d.ts @@ -664,6 +664,7 @@ declare module 'stripe' { | 'card' | 'fpx' | 'giropay' + | 'grabpay' | 'ideal' | 'sepa_credit_transfer' | 'sepa_debit' @@ -1029,6 +1030,7 @@ declare module 'stripe' { | 'card' | 'fpx' | 'giropay' + | 'grabpay' | 'ideal' | 'sepa_credit_transfer' | 'sepa_debit' @@ -1286,6 +1288,7 @@ declare module 'stripe' { | 'card' | 'fpx' | 'giropay' + | 'grabpay' | 'ideal' | 'sepa_credit_transfer' | 'sepa_debit' diff --git a/types/2020-08-27/PaymentIntents.d.ts b/types/2020-08-27/PaymentIntents.d.ts index c7385a749e..978e19d1d5 100644 --- a/types/2020-08-27/PaymentIntents.d.ts +++ b/types/2020-08-27/PaymentIntents.d.ts @@ -4005,6 +4005,18 @@ declare module 'stripe' { } } + interface PaymentIntentVerifyMicrodepositsParams { + /** + * Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. + */ + amounts?: Array; + + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + } + class PaymentIntentsResource { /** * Creates a PaymentIntent object. @@ -4132,6 +4144,19 @@ declare module 'stripe' { id: string, options?: RequestOptions ): Promise>; + + /** + * Verifies microdeposits on a PaymentIntent object. + */ + verifyMicrodeposits( + id: string, + params?: PaymentIntentVerifyMicrodepositsParams, + options?: RequestOptions + ): Promise>; + verifyMicrodeposits( + id: string, + options?: RequestOptions + ): Promise>; } } } diff --git a/types/2020-08-27/SetupIntents.d.ts b/types/2020-08-27/SetupIntents.d.ts index 264c1e3abf..78dc6b196f 100644 --- a/types/2020-08-27/SetupIntents.d.ts +++ b/types/2020-08-27/SetupIntents.d.ts @@ -1032,6 +1032,18 @@ declare module 'stripe' { } } + interface SetupIntentVerifyMicrodepositsParams { + /** + * Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. + */ + amounts?: Array; + + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + } + class SetupIntentsResource { /** * Creates a SetupIntent object. @@ -1121,6 +1133,19 @@ declare module 'stripe' { id: string, options?: RequestOptions ): Promise>; + + /** + * Verifies microdeposits on a SetupIntent object. + */ + verifyMicrodeposits( + id: string, + params?: SetupIntentVerifyMicrodepositsParams, + options?: RequestOptions + ): Promise>; + verifyMicrodeposits( + id: string, + options?: RequestOptions + ): Promise>; } } } diff --git a/types/2020-08-27/SubscriptionItems.d.ts b/types/2020-08-27/SubscriptionItems.d.ts index 202ccbd3dd..1ec83b1fc1 100644 --- a/types/2020-08-27/SubscriptionItems.d.ts +++ b/types/2020-08-27/SubscriptionItems.d.ts @@ -41,7 +41,7 @@ declare module 'stripe' { * * For example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year. * - * Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) and more about [products and prices](https://stripe.com/docs/billing/prices-guide). + * Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) and more about [products and prices](https://stripe.com/docs/products-prices/overview). */ plan: Stripe.Plan; @@ -51,7 +51,7 @@ declare module 'stripe' { * * For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once. * - * Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), [create an invoice](https://stripe.com/docs/billing/invoices/create), and more about [products and prices](https://stripe.com/docs/billing/prices-guide). + * Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), [create an invoice](https://stripe.com/docs/billing/invoices/create), and more about [products and prices](https://stripe.com/docs/products-prices/overview). */ price: Stripe.Price; diff --git a/types/2020-08-27/Subscriptions.d.ts b/types/2020-08-27/Subscriptions.d.ts index 169c81a0c3..9cd5b9a075 100644 --- a/types/2020-08-27/Subscriptions.d.ts +++ b/types/2020-08-27/Subscriptions.d.ts @@ -342,6 +342,7 @@ declare module 'stripe' { | 'card' | 'fpx' | 'giropay' + | 'grabpay' | 'ideal' | 'sepa_credit_transfer' | 'sepa_debit' @@ -869,6 +870,7 @@ declare module 'stripe' { | 'card' | 'fpx' | 'giropay' + | 'grabpay' | 'ideal' | 'sepa_credit_transfer' | 'sepa_debit' @@ -1401,6 +1403,7 @@ declare module 'stripe' { | 'card' | 'fpx' | 'giropay' + | 'grabpay' | 'ideal' | 'sepa_credit_transfer' | 'sepa_debit' diff --git a/types/2020-08-27/Terminal/Readers.d.ts b/types/2020-08-27/Terminal/Readers.d.ts index 3d9fbde9a8..291631031a 100644 --- a/types/2020-08-27/Terminal/Readers.d.ts +++ b/types/2020-08-27/Terminal/Readers.d.ts @@ -192,11 +192,19 @@ declare module 'stripe' { id: string, params?: ReaderRetrieveParams, options?: RequestOptions - ): Promise>; + ): Promise< + Stripe.Response< + Stripe.Terminal.Reader | Stripe.Terminal.DeletedReader + > + >; retrieve( id: string, options?: RequestOptions - ): Promise>; + ): Promise< + Stripe.Response< + Stripe.Terminal.Reader | Stripe.Terminal.DeletedReader + > + >; /** * Updates a Reader object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. @@ -205,7 +213,11 @@ declare module 'stripe' { id: string, params?: ReaderUpdateParams, options?: RequestOptions - ): Promise>; + ): Promise< + Stripe.Response< + Stripe.Terminal.Reader | Stripe.Terminal.DeletedReader + > + >; /** * Returns a list of Reader objects.