Skip to content

Commit

Permalink
Codegen for openapi fd4c483
Browse files Browse the repository at this point in the history
  • Loading branch information
remi-stripe committed Feb 24, 2020
1 parent d0bc3b9 commit 6172cd2
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/resources/Checkout/Sessions.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ const StripeResource = require('../../StripeResource');
module.exports = StripeResource.extend({
path: 'checkout/sessions',

includeBasic: ['create', 'retrieve'],
includeBasic: ['create', 'list', 'retrieve'],
});
44 changes: 44 additions & 0 deletions types/2019-12-03/Checkout/Sessions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string>;
}

type Locale =
Expand Down Expand Up @@ -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<string>;

/**
* 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`.
*/
Expand Down Expand Up @@ -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<string>;
}
}
}
Expand All @@ -563,6 +581,23 @@ declare module 'stripe' {
expand?: Array<string>;
}

interface SessionListParams extends PaginationParams {
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;

/**
* 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.
Expand All @@ -584,6 +619,15 @@ declare module 'stripe' {
id: string,
options?: RequestOptions
): Promise<Stripe.Checkout.Session>;

/**
* Returns a list of Checkout Sessions.
*/
list(
params?: SessionListParams,
options?: RequestOptions
): ApiListPromise<Stripe.Checkout.Session>;
list(options?: RequestOptions): ApiListPromise<Stripe.Checkout.Session>;
}
}
}
Expand Down

0 comments on commit 6172cd2

Please sign in to comment.