From 6172cd283f4f7416b00cefde0d047019f1c38672 Mon Sep 17 00:00:00 2001 From: Remi Jannel Date: Mon, 24 Feb 2020 15:08:21 -0800 Subject: [PATCH] Codegen for openapi fd4c483 --- lib/resources/Checkout/Sessions.js | 2 +- types/2019-12-03/Checkout/Sessions.d.ts | 44 +++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/lib/resources/Checkout/Sessions.js b/lib/resources/Checkout/Sessions.js index 8aa1fb56de..57e601eba9 100644 --- a/lib/resources/Checkout/Sessions.js +++ b/lib/resources/Checkout/Sessions.js @@ -5,5 +5,5 @@ const StripeResource = require('../../StripeResource'); module.exports = StripeResource.extend({ path: 'checkout/sessions', - includeBasic: ['create', 'retrieve'], + includeBasic: ['create', 'list', 'retrieve'], }); diff --git a/types/2019-12-03/Checkout/Sessions.d.ts b/types/2019-12-03/Checkout/Sessions.d.ts index 5f82d2c935..7865f43166 100644 --- a/types/2019-12-03/Checkout/Sessions.d.ts +++ b/types/2019-12-03/Checkout/Sessions.d.ts @@ -341,6 +341,11 @@ declare module 'stripe' { * The quantity of the line item being purchased. */ quantity: number; + + /** + * The tax rates which apply to this line item. This is only allowed in subscription mode. + */ + tax_rates?: Array; } type Locale = @@ -510,6 +515,13 @@ declare module 'stripe' { */ application_fee_percent?: number; + /** + * The tax rates that will apply to any subscription item that does not have + * `tax_rates` set. Invoices created will have their `default_tax_rates` populated + * from the subscription. + */ + default_tax_rates?: Array; + /** * A list of items, each with an attached plan, that the customer is subscribing to. Use this parameter for subscriptions. To create one-time payments, use `line_items`. */ @@ -552,6 +564,12 @@ declare module 'stripe' { * Quantity for this item. */ quantity?: number; + + /** + * The tax rates which apply to this item. When set, the `default_tax_rates` + * on `subscription_data` do not apply to this item. + */ + tax_rates?: Array; } } } @@ -563,6 +581,23 @@ declare module 'stripe' { expand?: Array; } + interface SessionListParams extends PaginationParams { + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + + /** + * Only return the Checkout Session for the PaymentIntent specified. + */ + payment_intent?: string; + + /** + * Only return the Checkout Session for the subscription specified. + */ + subscription?: string; + } + class SessionsResource { /** * Creates a Session object. @@ -584,6 +619,15 @@ declare module 'stripe' { id: string, options?: RequestOptions ): Promise; + + /** + * Returns a list of Checkout Sessions. + */ + list( + params?: SessionListParams, + options?: RequestOptions + ): ApiListPromise; + list(options?: RequestOptions): ApiListPromise; } } }