Initial project import
This commit is contained in:
5016
node_modules/stripe/esm/resources/Checkout/Sessions.d.ts
generated
vendored
Normal file
5016
node_modules/stripe/esm/resources/Checkout/Sessions.d.ts
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
569
node_modules/stripe/esm/resources/Checkout/Sessions.js
generated
vendored
Normal file
569
node_modules/stripe/esm/resources/Checkout/Sessions.js
generated
vendored
Normal file
@@ -0,0 +1,569 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../../StripeResource.js';
|
||||
export class SessionResource extends StripeResource {
|
||||
/**
|
||||
* Returns a list of Checkout Sessions.
|
||||
*/
|
||||
list(params, options) {
|
||||
return this._makeRequest('GET', '/v1/checkout/sessions', params, options, {
|
||||
methodType: 'list',
|
||||
responseSchema: {
|
||||
kind: 'object',
|
||||
fields: {
|
||||
data: {
|
||||
kind: 'array',
|
||||
element: {
|
||||
kind: 'object',
|
||||
fields: {
|
||||
currency_conversion: {
|
||||
kind: 'nullable',
|
||||
inner: {
|
||||
kind: 'object',
|
||||
fields: { fx_rate: { kind: 'decimal_string' } },
|
||||
},
|
||||
},
|
||||
line_items: {
|
||||
kind: 'object',
|
||||
fields: {
|
||||
data: {
|
||||
kind: 'array',
|
||||
element: {
|
||||
kind: 'object',
|
||||
fields: {
|
||||
price: {
|
||||
kind: 'nullable',
|
||||
inner: {
|
||||
kind: 'object',
|
||||
fields: {
|
||||
currency_options: {
|
||||
kind: 'array',
|
||||
element: {
|
||||
kind: 'object',
|
||||
fields: {
|
||||
tiers: {
|
||||
kind: 'array',
|
||||
element: {
|
||||
kind: 'object',
|
||||
fields: {
|
||||
flat_amount_decimal: {
|
||||
kind: 'nullable',
|
||||
inner: { kind: 'decimal_string' },
|
||||
},
|
||||
unit_amount_decimal: {
|
||||
kind: 'nullable',
|
||||
inner: { kind: 'decimal_string' },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
unit_amount_decimal: {
|
||||
kind: 'nullable',
|
||||
inner: { kind: 'decimal_string' },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
tiers: {
|
||||
kind: 'array',
|
||||
element: {
|
||||
kind: 'object',
|
||||
fields: {
|
||||
flat_amount_decimal: {
|
||||
kind: 'nullable',
|
||||
inner: { kind: 'decimal_string' },
|
||||
},
|
||||
unit_amount_decimal: {
|
||||
kind: 'nullable',
|
||||
inner: { kind: 'decimal_string' },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
unit_amount_decimal: {
|
||||
kind: 'nullable',
|
||||
inner: { kind: 'decimal_string' },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Creates a Checkout Session object.
|
||||
*/
|
||||
create(params, options) {
|
||||
return this._makeRequest('POST', '/v1/checkout/sessions', params, options, {
|
||||
requestSchema: {
|
||||
kind: 'object',
|
||||
fields: {
|
||||
line_items: {
|
||||
kind: 'array',
|
||||
element: {
|
||||
kind: 'object',
|
||||
fields: {
|
||||
price_data: {
|
||||
kind: 'object',
|
||||
fields: { unit_amount_decimal: { kind: 'decimal_string' } },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
responseSchema: {
|
||||
kind: 'object',
|
||||
fields: {
|
||||
currency_conversion: {
|
||||
kind: 'nullable',
|
||||
inner: {
|
||||
kind: 'object',
|
||||
fields: { fx_rate: { kind: 'decimal_string' } },
|
||||
},
|
||||
},
|
||||
line_items: {
|
||||
kind: 'object',
|
||||
fields: {
|
||||
data: {
|
||||
kind: 'array',
|
||||
element: {
|
||||
kind: 'object',
|
||||
fields: {
|
||||
price: {
|
||||
kind: 'nullable',
|
||||
inner: {
|
||||
kind: 'object',
|
||||
fields: {
|
||||
currency_options: {
|
||||
kind: 'array',
|
||||
element: {
|
||||
kind: 'object',
|
||||
fields: {
|
||||
tiers: {
|
||||
kind: 'array',
|
||||
element: {
|
||||
kind: 'object',
|
||||
fields: {
|
||||
flat_amount_decimal: {
|
||||
kind: 'nullable',
|
||||
inner: { kind: 'decimal_string' },
|
||||
},
|
||||
unit_amount_decimal: {
|
||||
kind: 'nullable',
|
||||
inner: { kind: 'decimal_string' },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
unit_amount_decimal: {
|
||||
kind: 'nullable',
|
||||
inner: { kind: 'decimal_string' },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
tiers: {
|
||||
kind: 'array',
|
||||
element: {
|
||||
kind: 'object',
|
||||
fields: {
|
||||
flat_amount_decimal: {
|
||||
kind: 'nullable',
|
||||
inner: { kind: 'decimal_string' },
|
||||
},
|
||||
unit_amount_decimal: {
|
||||
kind: 'nullable',
|
||||
inner: { kind: 'decimal_string' },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
unit_amount_decimal: {
|
||||
kind: 'nullable',
|
||||
inner: { kind: 'decimal_string' },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Retrieves a Checkout Session object.
|
||||
*/
|
||||
retrieve(id, params, options) {
|
||||
return this._makeRequest('GET', `/v1/checkout/sessions/${encodeURIComponent(id)}`, params, options, {
|
||||
responseSchema: {
|
||||
kind: 'object',
|
||||
fields: {
|
||||
currency_conversion: {
|
||||
kind: 'nullable',
|
||||
inner: {
|
||||
kind: 'object',
|
||||
fields: { fx_rate: { kind: 'decimal_string' } },
|
||||
},
|
||||
},
|
||||
line_items: {
|
||||
kind: 'object',
|
||||
fields: {
|
||||
data: {
|
||||
kind: 'array',
|
||||
element: {
|
||||
kind: 'object',
|
||||
fields: {
|
||||
price: {
|
||||
kind: 'nullable',
|
||||
inner: {
|
||||
kind: 'object',
|
||||
fields: {
|
||||
currency_options: {
|
||||
kind: 'array',
|
||||
element: {
|
||||
kind: 'object',
|
||||
fields: {
|
||||
tiers: {
|
||||
kind: 'array',
|
||||
element: {
|
||||
kind: 'object',
|
||||
fields: {
|
||||
flat_amount_decimal: {
|
||||
kind: 'nullable',
|
||||
inner: { kind: 'decimal_string' },
|
||||
},
|
||||
unit_amount_decimal: {
|
||||
kind: 'nullable',
|
||||
inner: { kind: 'decimal_string' },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
unit_amount_decimal: {
|
||||
kind: 'nullable',
|
||||
inner: { kind: 'decimal_string' },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
tiers: {
|
||||
kind: 'array',
|
||||
element: {
|
||||
kind: 'object',
|
||||
fields: {
|
||||
flat_amount_decimal: {
|
||||
kind: 'nullable',
|
||||
inner: { kind: 'decimal_string' },
|
||||
},
|
||||
unit_amount_decimal: {
|
||||
kind: 'nullable',
|
||||
inner: { kind: 'decimal_string' },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
unit_amount_decimal: {
|
||||
kind: 'nullable',
|
||||
inner: { kind: 'decimal_string' },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Updates a Checkout Session object.
|
||||
*
|
||||
* Related guide: [Dynamically update a Checkout Session](https://docs.stripe.com/payments/advanced/dynamic-updates)
|
||||
*/
|
||||
update(id, params, options) {
|
||||
return this._makeRequest('POST', `/v1/checkout/sessions/${encodeURIComponent(id)}`, params, options, {
|
||||
requestSchema: {
|
||||
kind: 'object',
|
||||
fields: {
|
||||
line_items: {
|
||||
kind: 'array',
|
||||
element: {
|
||||
kind: 'object',
|
||||
fields: {
|
||||
price_data: {
|
||||
kind: 'object',
|
||||
fields: { unit_amount_decimal: { kind: 'decimal_string' } },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
responseSchema: {
|
||||
kind: 'object',
|
||||
fields: {
|
||||
currency_conversion: {
|
||||
kind: 'nullable',
|
||||
inner: {
|
||||
kind: 'object',
|
||||
fields: { fx_rate: { kind: 'decimal_string' } },
|
||||
},
|
||||
},
|
||||
line_items: {
|
||||
kind: 'object',
|
||||
fields: {
|
||||
data: {
|
||||
kind: 'array',
|
||||
element: {
|
||||
kind: 'object',
|
||||
fields: {
|
||||
price: {
|
||||
kind: 'nullable',
|
||||
inner: {
|
||||
kind: 'object',
|
||||
fields: {
|
||||
currency_options: {
|
||||
kind: 'array',
|
||||
element: {
|
||||
kind: 'object',
|
||||
fields: {
|
||||
tiers: {
|
||||
kind: 'array',
|
||||
element: {
|
||||
kind: 'object',
|
||||
fields: {
|
||||
flat_amount_decimal: {
|
||||
kind: 'nullable',
|
||||
inner: { kind: 'decimal_string' },
|
||||
},
|
||||
unit_amount_decimal: {
|
||||
kind: 'nullable',
|
||||
inner: { kind: 'decimal_string' },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
unit_amount_decimal: {
|
||||
kind: 'nullable',
|
||||
inner: { kind: 'decimal_string' },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
tiers: {
|
||||
kind: 'array',
|
||||
element: {
|
||||
kind: 'object',
|
||||
fields: {
|
||||
flat_amount_decimal: {
|
||||
kind: 'nullable',
|
||||
inner: { kind: 'decimal_string' },
|
||||
},
|
||||
unit_amount_decimal: {
|
||||
kind: 'nullable',
|
||||
inner: { kind: 'decimal_string' },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
unit_amount_decimal: {
|
||||
kind: 'nullable',
|
||||
inner: { kind: 'decimal_string' },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* A Checkout Session can be expired when it is in one of these statuses: open
|
||||
*
|
||||
* After it expires, a customer can't complete a Checkout Session and customers loading the Checkout Session see a message saying the Checkout Session is expired.
|
||||
*/
|
||||
expire(id, params, options) {
|
||||
return this._makeRequest('POST', `/v1/checkout/sessions/${encodeURIComponent(id)}/expire`, params, options, {
|
||||
responseSchema: {
|
||||
kind: 'object',
|
||||
fields: {
|
||||
currency_conversion: {
|
||||
kind: 'nullable',
|
||||
inner: {
|
||||
kind: 'object',
|
||||
fields: { fx_rate: { kind: 'decimal_string' } },
|
||||
},
|
||||
},
|
||||
line_items: {
|
||||
kind: 'object',
|
||||
fields: {
|
||||
data: {
|
||||
kind: 'array',
|
||||
element: {
|
||||
kind: 'object',
|
||||
fields: {
|
||||
price: {
|
||||
kind: 'nullable',
|
||||
inner: {
|
||||
kind: 'object',
|
||||
fields: {
|
||||
currency_options: {
|
||||
kind: 'array',
|
||||
element: {
|
||||
kind: 'object',
|
||||
fields: {
|
||||
tiers: {
|
||||
kind: 'array',
|
||||
element: {
|
||||
kind: 'object',
|
||||
fields: {
|
||||
flat_amount_decimal: {
|
||||
kind: 'nullable',
|
||||
inner: { kind: 'decimal_string' },
|
||||
},
|
||||
unit_amount_decimal: {
|
||||
kind: 'nullable',
|
||||
inner: { kind: 'decimal_string' },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
unit_amount_decimal: {
|
||||
kind: 'nullable',
|
||||
inner: { kind: 'decimal_string' },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
tiers: {
|
||||
kind: 'array',
|
||||
element: {
|
||||
kind: 'object',
|
||||
fields: {
|
||||
flat_amount_decimal: {
|
||||
kind: 'nullable',
|
||||
inner: { kind: 'decimal_string' },
|
||||
},
|
||||
unit_amount_decimal: {
|
||||
kind: 'nullable',
|
||||
inner: { kind: 'decimal_string' },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
unit_amount_decimal: {
|
||||
kind: 'nullable',
|
||||
inner: { kind: 'decimal_string' },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* When retrieving a Checkout Session, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
|
||||
*/
|
||||
listLineItems(id, params, options) {
|
||||
return this._makeRequest('GET', `/v1/checkout/sessions/${encodeURIComponent(id)}/line_items`, params, options, {
|
||||
methodType: 'list',
|
||||
responseSchema: {
|
||||
kind: 'object',
|
||||
fields: {
|
||||
data: {
|
||||
kind: 'array',
|
||||
element: {
|
||||
kind: 'object',
|
||||
fields: {
|
||||
price: {
|
||||
kind: 'nullable',
|
||||
inner: {
|
||||
kind: 'object',
|
||||
fields: {
|
||||
currency_options: {
|
||||
kind: 'array',
|
||||
element: {
|
||||
kind: 'object',
|
||||
fields: {
|
||||
tiers: {
|
||||
kind: 'array',
|
||||
element: {
|
||||
kind: 'object',
|
||||
fields: {
|
||||
flat_amount_decimal: {
|
||||
kind: 'nullable',
|
||||
inner: { kind: 'decimal_string' },
|
||||
},
|
||||
unit_amount_decimal: {
|
||||
kind: 'nullable',
|
||||
inner: { kind: 'decimal_string' },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
unit_amount_decimal: {
|
||||
kind: 'nullable',
|
||||
inner: { kind: 'decimal_string' },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
tiers: {
|
||||
kind: 'array',
|
||||
element: {
|
||||
kind: 'object',
|
||||
fields: {
|
||||
flat_amount_decimal: {
|
||||
kind: 'nullable',
|
||||
inner: { kind: 'decimal_string' },
|
||||
},
|
||||
unit_amount_decimal: {
|
||||
kind: 'nullable',
|
||||
inner: { kind: 'decimal_string' },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
unit_amount_decimal: {
|
||||
kind: 'nullable',
|
||||
inner: { kind: 'decimal_string' },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=Sessions.js.map
|
||||
1
node_modules/stripe/esm/resources/Checkout/Sessions.js.map
generated
vendored
Normal file
1
node_modules/stripe/esm/resources/Checkout/Sessions.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
17
node_modules/stripe/esm/resources/Checkout/index.d.ts
generated
vendored
Normal file
17
node_modules/stripe/esm/resources/Checkout/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
import { Stripe } from '../../stripe.core.js';
|
||||
import { Checkout as CheckoutNamespace0, Session, SessionResource } from './Sessions.js';
|
||||
export { Session } from './Sessions.js';
|
||||
export declare class Checkout {
|
||||
private readonly stripe;
|
||||
sessions: SessionResource;
|
||||
constructor(stripe: Stripe);
|
||||
}
|
||||
export declare namespace Checkout {
|
||||
export import SessionListParams = CheckoutNamespace0.SessionListParams;
|
||||
export import SessionCreateParams = CheckoutNamespace0.SessionCreateParams;
|
||||
export import SessionRetrieveParams = CheckoutNamespace0.SessionRetrieveParams;
|
||||
export import SessionUpdateParams = CheckoutNamespace0.SessionUpdateParams;
|
||||
export import SessionExpireParams = CheckoutNamespace0.SessionExpireParams;
|
||||
export import SessionListLineItemsParams = CheckoutNamespace0.SessionListLineItemsParams;
|
||||
export { Session };
|
||||
}
|
||||
9
node_modules/stripe/esm/resources/Checkout/index.js
generated
vendored
Normal file
9
node_modules/stripe/esm/resources/Checkout/index.js
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { SessionResource, } from './Sessions.js';
|
||||
export class Checkout {
|
||||
constructor(stripe) {
|
||||
this.stripe = stripe;
|
||||
this.sessions = new SessionResource(stripe);
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
node_modules/stripe/esm/resources/Checkout/index.js.map
generated
vendored
Normal file
1
node_modules/stripe/esm/resources/Checkout/index.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/Checkout/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AAGvC,OAAO,EAGL,eAAe,GAChB,MAAM,eAAe,CAAC;AAIvB,MAAM,OAAO,QAAQ;IAGnB,YAA6B,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;QACzC,IAAI,CAAC,QAAQ,GAAG,IAAI,eAAe,CAAC,MAAM,CAAC,CAAC;IAC9C,CAAC;CACF"}
|
||||
Reference in New Issue
Block a user