stripe 16.6.0 → 16.7.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +787 -116
- package/README.md +33 -0
- package/VERSION +1 -1
- package/cjs/RequestSender.js +66 -5
- package/cjs/StripeResource.js +1 -1
- package/cjs/apiVersion.js +2 -1
- package/cjs/multipart.js +1 -1
- package/cjs/resources/AccountNotices.js +21 -0
- package/cjs/resources/Billing/Alerts.js +27 -0
- package/cjs/resources/Capital/FinancingOffers.js +21 -0
- package/cjs/resources/Capital/FinancingSummary.js +12 -0
- package/cjs/resources/Capital/FinancingTransactions.js +17 -0
- package/cjs/resources/FinancialConnections/Accounts.js +5 -0
- package/cjs/resources/FinancialConnections/Institutions.js +17 -0
- package/cjs/resources/GiftCards/Cards.js +23 -0
- package/cjs/resources/GiftCards/Transactions.js +33 -0
- package/cjs/resources/Invoices.js +17 -0
- package/cjs/resources/Issuing/CreditUnderwritingRecords.js +33 -0
- package/cjs/resources/Margins.js +22 -0
- package/cjs/resources/OAuth.js +1 -1
- package/cjs/resources/Orders.js +24 -0
- package/cjs/resources/PaymentIntents.js +4 -0
- package/cjs/resources/QuotePhases.js +22 -0
- package/cjs/resources/Quotes.js +32 -0
- package/cjs/resources/SubscriptionSchedules.js +4 -0
- package/cjs/resources/Tax/Associations.js +9 -0
- package/cjs/resources/Tax/Forms.js +20 -0
- package/cjs/resources/Terminal/Readers.js +12 -0
- package/cjs/resources.js +42 -10
- package/cjs/stripe.core.js +6 -3
- package/cjs/utils.js +30 -3
- package/esm/RequestSender.js +67 -6
- package/esm/StripeResource.js +2 -2
- package/esm/apiVersion.js +1 -0
- package/esm/multipart.js +2 -2
- package/esm/resources/AccountNotices.js +18 -0
- package/esm/resources/Billing/Alerts.js +24 -0
- package/esm/resources/Capital/FinancingOffers.js +18 -0
- package/esm/resources/Capital/FinancingSummary.js +9 -0
- package/esm/resources/Capital/FinancingTransactions.js +14 -0
- package/esm/resources/FinancialConnections/Accounts.js +5 -0
- package/esm/resources/FinancialConnections/Institutions.js +14 -0
- package/esm/resources/GiftCards/Cards.js +20 -0
- package/esm/resources/GiftCards/Transactions.js +30 -0
- package/esm/resources/Invoices.js +17 -0
- package/esm/resources/Issuing/CreditUnderwritingRecords.js +30 -0
- package/esm/resources/Margins.js +19 -0
- package/esm/resources/OAuth.js +2 -2
- package/esm/resources/Orders.js +21 -0
- package/esm/resources/PaymentIntents.js +4 -0
- package/esm/resources/QuotePhases.js +19 -0
- package/esm/resources/Quotes.js +32 -0
- package/esm/resources/SubscriptionSchedules.js +4 -0
- package/esm/resources/Tax/Associations.js +6 -0
- package/esm/resources/Tax/Forms.js +17 -0
- package/esm/resources/Terminal/Readers.js +12 -0
- package/esm/resources.js +28 -0
- package/esm/stripe.core.js +6 -3
- package/esm/utils.js +27 -1
- package/package.json +1 -1
- package/types/AccountLinksResource.d.ts +5 -1
- package/types/AccountNotices.d.ts +113 -0
- package/types/AccountNoticesResource.d.ts +98 -0
- package/types/AccountSessions.d.ts +15 -0
- package/types/AccountSessionsResource.d.ts +215 -0
- package/types/Accounts.d.ts +106 -1
- package/types/AccountsResource.d.ts +246 -0
- package/types/Billing/AlertsResource.d.ts +176 -0
- package/types/Capital/FinancingOffers.d.ts +188 -0
- package/types/Capital/FinancingOffersResource.d.ts +97 -0
- package/types/Capital/FinancingSummary.d.ts +106 -0
- package/types/Capital/FinancingSummaryResource.d.ts +27 -0
- package/types/Capital/FinancingTransactions.d.ts +135 -0
- package/types/Capital/FinancingTransactionsResource.d.ts +68 -0
- package/types/Charges.d.ts +67 -0
- package/types/ChargesResource.d.ts +1294 -0
- package/types/Checkout/Sessions.d.ts +28 -1
- package/types/Checkout/SessionsResource.d.ts +15 -1
- package/types/ConfirmationTokens.d.ts +62 -0
- package/types/Coupons.d.ts +1 -1
- package/types/CouponsResource.d.ts +1 -1
- package/types/CreditNotes.d.ts +21 -0
- package/types/CreditNotesResource.d.ts +51 -0
- package/types/CustomersResource.d.ts +2 -0
- package/types/Disputes.d.ts +158 -0
- package/types/DisputesResource.d.ts +120 -0
- package/types/EventTypes.d.ts +460 -0
- package/types/Events.d.ts +85 -0
- package/types/FinancialConnections/AccountInferredBalances.d.ts +38 -0
- package/types/FinancialConnections/Accounts.d.ts +29 -1
- package/types/FinancialConnections/AccountsResource.d.ts +35 -3
- package/types/FinancialConnections/Institutions.d.ts +93 -0
- package/types/FinancialConnections/InstitutionsResource.d.ts +47 -0
- package/types/FinancialConnections/Sessions.d.ts +49 -1
- package/types/FinancialConnections/SessionsResource.d.ts +38 -1
- package/types/GiftCards/Cards.d.ts +118 -0
- package/types/GiftCards/CardsResource.d.ts +159 -0
- package/types/GiftCards/Transactions.d.ts +129 -0
- package/types/GiftCards/TransactionsResource.d.ts +201 -0
- package/types/InvoiceItems.d.ts +5 -0
- package/types/InvoiceItemsResource.d.ts +98 -0
- package/types/InvoiceLineItems.d.ts +22 -0
- package/types/InvoicePayments.d.ts +138 -0
- package/types/Invoices.d.ts +116 -1
- package/types/InvoicesResource.d.ts +5455 -1797
- package/types/Issuing/CardholdersResource.d.ts +2 -1
- package/types/Issuing/CreditUnderwritingRecords.d.ts +446 -0
- package/types/Issuing/CreditUnderwritingRecordsResource.d.ts +1017 -0
- package/types/LineItems.d.ts +7 -0
- package/types/Mandates.d.ts +77 -0
- package/types/Margins.d.ts +56 -0
- package/types/MarginsResource.d.ts +114 -0
- package/types/Orders.d.ts +1083 -0
- package/types/OrdersResource.d.ts +2763 -0
- package/types/PaymentIntents.d.ts +492 -1
- package/types/PaymentIntentsResource.d.ts +6992 -3461
- package/types/PaymentMethodConfigurations.d.ts +36 -0
- package/types/PaymentMethodConfigurationsResource.d.ts +50 -0
- package/types/PaymentMethods.d.ts +62 -0
- package/types/PaymentMethodsResource.d.ts +110 -0
- package/types/Prices.d.ts +22 -0
- package/types/PricesResource.d.ts +22 -0
- package/types/Products.d.ts +39 -0
- package/types/ProductsResource.d.ts +36 -0
- package/types/QuoteLines.d.ts +634 -0
- package/types/QuotePhases.d.ts +198 -0
- package/types/QuotePhasesResource.d.ts +67 -0
- package/types/QuotePreviewInvoices.d.ts +1529 -0
- package/types/QuotePreviewSubscriptionSchedules.d.ts +814 -0
- package/types/Quotes.d.ts +596 -1
- package/types/QuotesResource.d.ts +3174 -265
- package/types/SetupAttempts.d.ts +9 -0
- package/types/SetupIntents.d.ts +110 -1
- package/types/SetupIntentsResource.d.ts +498 -3
- package/types/Sources.d.ts +23 -0
- package/types/SubscriptionItems.d.ts +21 -0
- package/types/SubscriptionItemsResource.d.ts +109 -0
- package/types/SubscriptionSchedules.d.ts +200 -0
- package/types/SubscriptionSchedulesResource.d.ts +1234 -16
- package/types/Subscriptions.d.ts +82 -1
- package/types/SubscriptionsResource.d.ts +347 -2
- package/types/Tax/Associations.d.ts +126 -0
- package/types/Tax/AssociationsResource.d.ts +29 -0
- package/types/Tax/Forms.d.ts +133 -0
- package/types/Tax/FormsResource.d.ts +90 -0
- package/types/Terminal/Readers.d.ts +278 -0
- package/types/Terminal/ReadersResource.d.ts +208 -0
- package/types/TestHelpers/ConfirmationTokensResource.d.ts +55 -0
- package/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +26 -0
- package/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +26 -0
- package/types/Treasury/FinancialAccounts.d.ts +5 -0
- package/types/Treasury/FinancialAccountsResource.d.ts +10 -0
- package/types/Treasury/OutboundTransfers.d.ts +26 -0
- package/types/Treasury/OutboundTransfersResource.d.ts +26 -0
- package/types/Treasury/ReceivedCredits.d.ts +26 -0
- package/types/Treasury/ReceivedDebits.d.ts +31 -0
- package/types/WebhookEndpointsResource.d.ts +54 -0
- package/types/index.d.ts +69 -0
- package/types/lib.d.ts +12 -0
package/README.md
CHANGED
|
@@ -517,6 +517,39 @@ const stripe = new Stripe('sk_test_...', {
|
|
|
517
517
|
});
|
|
518
518
|
```
|
|
519
519
|
|
|
520
|
+
### Custom requests
|
|
521
|
+
|
|
522
|
+
If you would like to send a request to an undocumented API (for example you are in a private beta), or if you prefer to bypass the method definitions in the library and specify your request details directly, you can use the `rawRequest` method on the Stripe object.
|
|
523
|
+
|
|
524
|
+
```javascript
|
|
525
|
+
const stripe = require('stripe')('sk_test_...');
|
|
526
|
+
|
|
527
|
+
stripe.rawRequest(
|
|
528
|
+
'POST',
|
|
529
|
+
'/v1/beta_endpoint',
|
|
530
|
+
{ param: 123 },
|
|
531
|
+
{ apiVersion: '2022-11-15; feature_beta=v3' }
|
|
532
|
+
)
|
|
533
|
+
.then((response) => /* handle response */ )
|
|
534
|
+
.catch((error) => console.error(error));
|
|
535
|
+
```
|
|
536
|
+
|
|
537
|
+
Or using ES modules and `async`/`await`:
|
|
538
|
+
|
|
539
|
+
```javascript
|
|
540
|
+
import Stripe from 'stripe';
|
|
541
|
+
const stripe = new Stripe('sk_test_...');
|
|
542
|
+
|
|
543
|
+
const response = await stripe.rawRequest(
|
|
544
|
+
'POST',
|
|
545
|
+
'/v1/beta_endpoint',
|
|
546
|
+
{ param: 123 },
|
|
547
|
+
{ apiVersion: '2022-11-15; feature_beta=v3' }
|
|
548
|
+
);
|
|
549
|
+
|
|
550
|
+
// handle response
|
|
551
|
+
```
|
|
552
|
+
|
|
520
553
|
## Support
|
|
521
554
|
|
|
522
555
|
New features and bug fixes are released on the latest major version of the `stripe` package. If you are on an older major version, we recommend that you upgrade to the latest in order to use the new features and bug fixes including those for security vulnerabilities. Older major versions of the package will continue to be available for use, but will not be receiving any updates.
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
16.
|
|
1
|
+
16.7.0-beta.1
|
package/cjs/RequestSender.js
CHANGED
|
@@ -4,6 +4,7 @@ exports.RequestSender = void 0;
|
|
|
4
4
|
const Error_js_1 = require("./Error.js");
|
|
5
5
|
const utils_js_1 = require("./utils.js");
|
|
6
6
|
const HttpClient_js_1 = require("./net/HttpClient.js");
|
|
7
|
+
const apiVersion_js_1 = require("./apiVersion.js");
|
|
7
8
|
const MAX_RETRY_AFTER_WAIT = 60;
|
|
8
9
|
class RequestSender {
|
|
9
10
|
constructor(stripe, maxBufferedRequestMetric) {
|
|
@@ -201,12 +202,12 @@ class RequestSender {
|
|
|
201
202
|
}
|
|
202
203
|
return null;
|
|
203
204
|
}
|
|
204
|
-
_makeHeaders(auth, contentLength, apiVersion, clientUserAgent, method, userSuppliedHeaders, userSuppliedSettings) {
|
|
205
|
+
_makeHeaders(auth, contentType, contentLength, apiVersion, clientUserAgent, method, userSuppliedHeaders, userSuppliedSettings) {
|
|
205
206
|
const defaultHeaders = {
|
|
206
207
|
// Use specified auth token or use default from this stripe instance:
|
|
207
208
|
Authorization: auth ? `Bearer ${auth}` : this._stripe.getApiField('auth'),
|
|
208
209
|
Accept: 'application/json',
|
|
209
|
-
'Content-Type':
|
|
210
|
+
'Content-Type': contentType,
|
|
210
211
|
'User-Agent': this._getUserAgentString(),
|
|
211
212
|
'X-Stripe-Client-User-Agent': clientUserAgent,
|
|
212
213
|
'X-Stripe-Client-Telemetry': this._getTelemetryHeader(),
|
|
@@ -274,6 +275,54 @@ class RequestSender {
|
|
|
274
275
|
}
|
|
275
276
|
}
|
|
276
277
|
}
|
|
278
|
+
_rawRequest(method, path, params, options) {
|
|
279
|
+
const requestPromise = new Promise((resolve, reject) => {
|
|
280
|
+
let opts;
|
|
281
|
+
try {
|
|
282
|
+
const requestMethod = method.toUpperCase();
|
|
283
|
+
if (requestMethod !== 'POST' &&
|
|
284
|
+
params &&
|
|
285
|
+
Object.keys(params).length !== 0) {
|
|
286
|
+
throw new Error('rawRequest only supports params on POST requests. Please pass null and add your parameters to path.');
|
|
287
|
+
}
|
|
288
|
+
const args = [].slice.call([params, options]);
|
|
289
|
+
// Pull request data and options (headers, auth) from args.
|
|
290
|
+
const dataFromArgs = (0, utils_js_1.getDataFromArgs)(args);
|
|
291
|
+
const data = Object.assign({}, dataFromArgs);
|
|
292
|
+
const calculatedOptions = (0, utils_js_1.getOptionsFromArgs)(args);
|
|
293
|
+
const apiMode = calculatedOptions.apiMode || 'standard';
|
|
294
|
+
const headers = calculatedOptions.headers;
|
|
295
|
+
opts = {
|
|
296
|
+
requestMethod,
|
|
297
|
+
requestPath: path,
|
|
298
|
+
bodyData: data,
|
|
299
|
+
queryData: {},
|
|
300
|
+
auth: calculatedOptions.auth,
|
|
301
|
+
headers,
|
|
302
|
+
host: null,
|
|
303
|
+
streaming: false,
|
|
304
|
+
settings: {},
|
|
305
|
+
apiMode: apiMode,
|
|
306
|
+
usage: ['raw_request'],
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
catch (err) {
|
|
310
|
+
reject(err);
|
|
311
|
+
return;
|
|
312
|
+
}
|
|
313
|
+
function requestCallback(err, response) {
|
|
314
|
+
if (err) {
|
|
315
|
+
reject(err);
|
|
316
|
+
}
|
|
317
|
+
else {
|
|
318
|
+
resolve(response);
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
const { headers, settings } = opts;
|
|
322
|
+
this._request(opts.requestMethod, opts.host, path, opts.bodyData, opts.auth, { headers, settings, streaming: opts.streaming, apiMode: opts.apiMode }, opts.usage, requestCallback);
|
|
323
|
+
});
|
|
324
|
+
return requestPromise;
|
|
325
|
+
}
|
|
277
326
|
_request(method, host, path, data, auth, options = {}, usage = [], callback, requestDataProcessor = null) {
|
|
278
327
|
let requestData;
|
|
279
328
|
const retryRequest = (requestFn, apiVersion, headers, requestRetries, retryAfter) => {
|
|
@@ -338,10 +387,15 @@ class RequestSender {
|
|
|
338
387
|
return callback(error);
|
|
339
388
|
}
|
|
340
389
|
requestData = data;
|
|
390
|
+
let contentType = 'application/x-www-form-urlencoded';
|
|
391
|
+
let apiVersion = this._stripe.getApiField('version');
|
|
392
|
+
if (options.apiMode === 'preview') {
|
|
393
|
+
contentType = 'application/json';
|
|
394
|
+
apiVersion = apiVersion_js_1.PreviewVersion;
|
|
395
|
+
}
|
|
341
396
|
this._stripe.getClientUserAgent((clientUserAgent) => {
|
|
342
397
|
var _a, _b;
|
|
343
|
-
const
|
|
344
|
-
const headers = this._makeHeaders(auth, requestData.length, apiVersion, clientUserAgent, method, (_a = options.headers) !== null && _a !== void 0 ? _a : null, (_b = options.settings) !== null && _b !== void 0 ? _b : {});
|
|
398
|
+
const headers = this._makeHeaders(auth, contentType, requestData.length, apiVersion, clientUserAgent, method, (_a = options.headers) !== null && _a !== void 0 ? _a : null, (_b = options.settings) !== null && _b !== void 0 ? _b : {});
|
|
345
399
|
makeRequest(apiVersion, headers, 0);
|
|
346
400
|
});
|
|
347
401
|
};
|
|
@@ -349,7 +403,14 @@ class RequestSender {
|
|
|
349
403
|
requestDataProcessor(method, data, options.headers, prepareAndMakeRequest);
|
|
350
404
|
}
|
|
351
405
|
else {
|
|
352
|
-
|
|
406
|
+
let stringifiedData;
|
|
407
|
+
if (options.apiMode === 'preview') {
|
|
408
|
+
stringifiedData = data ? (0, utils_js_1.jsonStringifyRequestData)(data) : '';
|
|
409
|
+
}
|
|
410
|
+
else {
|
|
411
|
+
stringifiedData = (0, utils_js_1.queryStringifyRequestData)(data || {});
|
|
412
|
+
}
|
|
413
|
+
prepareAndMakeRequest(null, stringifiedData);
|
|
353
414
|
}
|
|
354
415
|
}
|
|
355
416
|
}
|
package/cjs/StripeResource.js
CHANGED
|
@@ -162,7 +162,7 @@ StripeResource.prototype = {
|
|
|
162
162
|
const path = [
|
|
163
163
|
opts.requestPath,
|
|
164
164
|
emptyQuery ? '' : '?',
|
|
165
|
-
(0, utils_js_1.
|
|
165
|
+
(0, utils_js_1.queryStringifyRequestData)(opts.queryData),
|
|
166
166
|
].join('');
|
|
167
167
|
const { headers, settings } = opts;
|
|
168
168
|
this._stripe._requestSender._request(opts.requestMethod, opts.host, path, opts.bodyData, opts.auth, { headers, settings, streaming: opts.streaming }, opts.usage, requestCallback, (_a = this.requestDataProcessor) === null || _a === void 0 ? void 0 : _a.bind(this));
|
package/cjs/apiVersion.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// File generated from our OpenAPI spec
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.ApiVersion = void 0;
|
|
4
|
+
exports.PreviewVersion = exports.ApiVersion = void 0;
|
|
5
5
|
exports.ApiVersion = '2024-06-20';
|
|
6
|
+
exports.PreviewVersion = '2024-07-16.preview-v2';
|
package/cjs/multipart.js
CHANGED
|
@@ -48,7 +48,7 @@ const multipartDataGenerator = (method, data, headers) => {
|
|
|
48
48
|
function multipartRequestDataProcessor(method, data, headers, callback) {
|
|
49
49
|
data = data || {};
|
|
50
50
|
if (method !== 'POST') {
|
|
51
|
-
return callback(null, (0, utils_js_1.
|
|
51
|
+
return callback(null, (0, utils_js_1.queryStringifyRequestData)(data));
|
|
52
52
|
}
|
|
53
53
|
this._stripe._platformFunctions
|
|
54
54
|
.tryBufferData(data)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.AccountNotices = void 0;
|
|
5
|
+
const StripeResource_js_1 = require("../StripeResource.js");
|
|
6
|
+
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
|
7
|
+
exports.AccountNotices = StripeResource_js_1.StripeResource.extend({
|
|
8
|
+
retrieve: stripeMethod({
|
|
9
|
+
method: 'GET',
|
|
10
|
+
fullPath: '/v1/account_notices/{account_notice}',
|
|
11
|
+
}),
|
|
12
|
+
update: stripeMethod({
|
|
13
|
+
method: 'POST',
|
|
14
|
+
fullPath: '/v1/account_notices/{account_notice}',
|
|
15
|
+
}),
|
|
16
|
+
list: stripeMethod({
|
|
17
|
+
method: 'GET',
|
|
18
|
+
fullPath: '/v1/account_notices',
|
|
19
|
+
methodType: 'list',
|
|
20
|
+
}),
|
|
21
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Alerts = void 0;
|
|
5
|
+
const StripeResource_js_1 = require("../../StripeResource.js");
|
|
6
|
+
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
|
7
|
+
exports.Alerts = StripeResource_js_1.StripeResource.extend({
|
|
8
|
+
create: stripeMethod({ method: 'POST', fullPath: '/v1/billing/alerts' }),
|
|
9
|
+
retrieve: stripeMethod({ method: 'GET', fullPath: '/v1/billing/alerts/{id}' }),
|
|
10
|
+
list: stripeMethod({
|
|
11
|
+
method: 'GET',
|
|
12
|
+
fullPath: '/v1/billing/alerts',
|
|
13
|
+
methodType: 'list',
|
|
14
|
+
}),
|
|
15
|
+
activate: stripeMethod({
|
|
16
|
+
method: 'POST',
|
|
17
|
+
fullPath: '/v1/billing/alerts/{id}/activate',
|
|
18
|
+
}),
|
|
19
|
+
archive: stripeMethod({
|
|
20
|
+
method: 'POST',
|
|
21
|
+
fullPath: '/v1/billing/alerts/{id}/archive',
|
|
22
|
+
}),
|
|
23
|
+
deactivate: stripeMethod({
|
|
24
|
+
method: 'POST',
|
|
25
|
+
fullPath: '/v1/billing/alerts/{id}/deactivate',
|
|
26
|
+
}),
|
|
27
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.FinancingOffers = void 0;
|
|
5
|
+
const StripeResource_js_1 = require("../../StripeResource.js");
|
|
6
|
+
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
|
7
|
+
exports.FinancingOffers = StripeResource_js_1.StripeResource.extend({
|
|
8
|
+
retrieve: stripeMethod({
|
|
9
|
+
method: 'GET',
|
|
10
|
+
fullPath: '/v1/capital/financing_offers/{financing_offer}',
|
|
11
|
+
}),
|
|
12
|
+
list: stripeMethod({
|
|
13
|
+
method: 'GET',
|
|
14
|
+
fullPath: '/v1/capital/financing_offers',
|
|
15
|
+
methodType: 'list',
|
|
16
|
+
}),
|
|
17
|
+
markDelivered: stripeMethod({
|
|
18
|
+
method: 'POST',
|
|
19
|
+
fullPath: '/v1/capital/financing_offers/{financing_offer}/mark_delivered',
|
|
20
|
+
}),
|
|
21
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.FinancingSummary = void 0;
|
|
5
|
+
const StripeResource_js_1 = require("../../StripeResource.js");
|
|
6
|
+
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
|
7
|
+
exports.FinancingSummary = StripeResource_js_1.StripeResource.extend({
|
|
8
|
+
retrieve: stripeMethod({
|
|
9
|
+
method: 'GET',
|
|
10
|
+
fullPath: '/v1/capital/financing_summary',
|
|
11
|
+
}),
|
|
12
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.FinancingTransactions = void 0;
|
|
5
|
+
const StripeResource_js_1 = require("../../StripeResource.js");
|
|
6
|
+
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
|
7
|
+
exports.FinancingTransactions = StripeResource_js_1.StripeResource.extend({
|
|
8
|
+
retrieve: stripeMethod({
|
|
9
|
+
method: 'GET',
|
|
10
|
+
fullPath: '/v1/capital/financing_transactions/{financing_transaction}',
|
|
11
|
+
}),
|
|
12
|
+
list: stripeMethod({
|
|
13
|
+
method: 'GET',
|
|
14
|
+
fullPath: '/v1/capital/financing_transactions',
|
|
15
|
+
methodType: 'list',
|
|
16
|
+
}),
|
|
17
|
+
});
|
|
@@ -18,6 +18,11 @@ exports.Accounts = StripeResource_js_1.StripeResource.extend({
|
|
|
18
18
|
method: 'POST',
|
|
19
19
|
fullPath: '/v1/financial_connections/accounts/{account}/disconnect',
|
|
20
20
|
}),
|
|
21
|
+
listInferredBalances: stripeMethod({
|
|
22
|
+
method: 'GET',
|
|
23
|
+
fullPath: '/v1/financial_connections/accounts/{account}/inferred_balances',
|
|
24
|
+
methodType: 'list',
|
|
25
|
+
}),
|
|
21
26
|
listOwners: stripeMethod({
|
|
22
27
|
method: 'GET',
|
|
23
28
|
fullPath: '/v1/financial_connections/accounts/{account}/owners',
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Institutions = void 0;
|
|
5
|
+
const StripeResource_js_1 = require("../../StripeResource.js");
|
|
6
|
+
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
|
7
|
+
exports.Institutions = StripeResource_js_1.StripeResource.extend({
|
|
8
|
+
retrieve: stripeMethod({
|
|
9
|
+
method: 'GET',
|
|
10
|
+
fullPath: '/v1/financial_connections/institutions/{institution}',
|
|
11
|
+
}),
|
|
12
|
+
list: stripeMethod({
|
|
13
|
+
method: 'GET',
|
|
14
|
+
fullPath: '/v1/financial_connections/institutions',
|
|
15
|
+
methodType: 'list',
|
|
16
|
+
}),
|
|
17
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Cards = void 0;
|
|
5
|
+
const StripeResource_js_1 = require("../../StripeResource.js");
|
|
6
|
+
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
|
7
|
+
exports.Cards = StripeResource_js_1.StripeResource.extend({
|
|
8
|
+
create: stripeMethod({ method: 'POST', fullPath: '/v1/gift_cards/cards' }),
|
|
9
|
+
retrieve: stripeMethod({
|
|
10
|
+
method: 'GET',
|
|
11
|
+
fullPath: '/v1/gift_cards/cards/{id}',
|
|
12
|
+
}),
|
|
13
|
+
update: stripeMethod({ method: 'POST', fullPath: '/v1/gift_cards/cards/{id}' }),
|
|
14
|
+
list: stripeMethod({
|
|
15
|
+
method: 'GET',
|
|
16
|
+
fullPath: '/v1/gift_cards/cards',
|
|
17
|
+
methodType: 'list',
|
|
18
|
+
}),
|
|
19
|
+
validate: stripeMethod({
|
|
20
|
+
method: 'POST',
|
|
21
|
+
fullPath: '/v1/gift_cards/cards/validate',
|
|
22
|
+
}),
|
|
23
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Transactions = void 0;
|
|
5
|
+
const StripeResource_js_1 = require("../../StripeResource.js");
|
|
6
|
+
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
|
7
|
+
exports.Transactions = StripeResource_js_1.StripeResource.extend({
|
|
8
|
+
create: stripeMethod({
|
|
9
|
+
method: 'POST',
|
|
10
|
+
fullPath: '/v1/gift_cards/transactions',
|
|
11
|
+
}),
|
|
12
|
+
retrieve: stripeMethod({
|
|
13
|
+
method: 'GET',
|
|
14
|
+
fullPath: '/v1/gift_cards/transactions/{id}',
|
|
15
|
+
}),
|
|
16
|
+
update: stripeMethod({
|
|
17
|
+
method: 'POST',
|
|
18
|
+
fullPath: '/v1/gift_cards/transactions/{id}',
|
|
19
|
+
}),
|
|
20
|
+
list: stripeMethod({
|
|
21
|
+
method: 'GET',
|
|
22
|
+
fullPath: '/v1/gift_cards/transactions',
|
|
23
|
+
methodType: 'list',
|
|
24
|
+
}),
|
|
25
|
+
cancel: stripeMethod({
|
|
26
|
+
method: 'POST',
|
|
27
|
+
fullPath: '/v1/gift_cards/transactions/{id}/cancel',
|
|
28
|
+
}),
|
|
29
|
+
confirm: stripeMethod({
|
|
30
|
+
method: 'POST',
|
|
31
|
+
fullPath: '/v1/gift_cards/transactions/{id}/confirm',
|
|
32
|
+
}),
|
|
33
|
+
});
|
|
@@ -18,6 +18,14 @@ exports.Invoices = StripeResource_js_1.StripeResource.extend({
|
|
|
18
18
|
method: 'POST',
|
|
19
19
|
fullPath: '/v1/invoices/{invoice}/add_lines',
|
|
20
20
|
}),
|
|
21
|
+
attachPayment: stripeMethod({
|
|
22
|
+
method: 'POST',
|
|
23
|
+
fullPath: '/v1/invoices/{invoice}/attach_payment',
|
|
24
|
+
}),
|
|
25
|
+
attachPaymentIntent: stripeMethod({
|
|
26
|
+
method: 'POST',
|
|
27
|
+
fullPath: '/v1/invoices/{invoice}/attach_payment_intent',
|
|
28
|
+
}),
|
|
21
29
|
createPreview: stripeMethod({
|
|
22
30
|
method: 'POST',
|
|
23
31
|
fullPath: '/v1/invoices/create_preview',
|
|
@@ -31,6 +39,11 @@ exports.Invoices = StripeResource_js_1.StripeResource.extend({
|
|
|
31
39
|
fullPath: '/v1/invoices/{invoice}/lines',
|
|
32
40
|
methodType: 'list',
|
|
33
41
|
}),
|
|
42
|
+
listPayments: stripeMethod({
|
|
43
|
+
method: 'GET',
|
|
44
|
+
fullPath: '/v1/invoices/{invoice}/payments',
|
|
45
|
+
methodType: 'list',
|
|
46
|
+
}),
|
|
34
47
|
listUpcomingLines: stripeMethod({
|
|
35
48
|
method: 'GET',
|
|
36
49
|
fullPath: '/v1/invoices/upcoming/lines',
|
|
@@ -45,6 +58,10 @@ exports.Invoices = StripeResource_js_1.StripeResource.extend({
|
|
|
45
58
|
method: 'POST',
|
|
46
59
|
fullPath: '/v1/invoices/{invoice}/remove_lines',
|
|
47
60
|
}),
|
|
61
|
+
retrievePayment: stripeMethod({
|
|
62
|
+
method: 'GET',
|
|
63
|
+
fullPath: '/v1/invoices/{invoice}/payments/{invoice_payment}',
|
|
64
|
+
}),
|
|
48
65
|
retrieveUpcoming: stripeMethod({
|
|
49
66
|
method: 'GET',
|
|
50
67
|
fullPath: '/v1/invoices/upcoming',
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.CreditUnderwritingRecords = void 0;
|
|
5
|
+
const StripeResource_js_1 = require("../../StripeResource.js");
|
|
6
|
+
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
|
7
|
+
exports.CreditUnderwritingRecords = StripeResource_js_1.StripeResource.extend({
|
|
8
|
+
retrieve: stripeMethod({
|
|
9
|
+
method: 'GET',
|
|
10
|
+
fullPath: '/v1/issuing/credit_underwriting_records/{credit_underwriting_record}',
|
|
11
|
+
}),
|
|
12
|
+
list: stripeMethod({
|
|
13
|
+
method: 'GET',
|
|
14
|
+
fullPath: '/v1/issuing/credit_underwriting_records',
|
|
15
|
+
methodType: 'list',
|
|
16
|
+
}),
|
|
17
|
+
correct: stripeMethod({
|
|
18
|
+
method: 'POST',
|
|
19
|
+
fullPath: '/v1/issuing/credit_underwriting_records/{credit_underwriting_record}/correct',
|
|
20
|
+
}),
|
|
21
|
+
createFromApplication: stripeMethod({
|
|
22
|
+
method: 'POST',
|
|
23
|
+
fullPath: '/v1/issuing/credit_underwriting_records/create_from_application',
|
|
24
|
+
}),
|
|
25
|
+
createFromProactiveReview: stripeMethod({
|
|
26
|
+
method: 'POST',
|
|
27
|
+
fullPath: '/v1/issuing/credit_underwriting_records/create_from_proactive_review',
|
|
28
|
+
}),
|
|
29
|
+
reportDecision: stripeMethod({
|
|
30
|
+
method: 'POST',
|
|
31
|
+
fullPath: '/v1/issuing/credit_underwriting_records/{credit_underwriting_record}/report_decision',
|
|
32
|
+
}),
|
|
33
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Margins = void 0;
|
|
5
|
+
const StripeResource_js_1 = require("../StripeResource.js");
|
|
6
|
+
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
|
7
|
+
exports.Margins = StripeResource_js_1.StripeResource.extend({
|
|
8
|
+
create: stripeMethod({ method: 'POST', fullPath: '/v1/billing/margins' }),
|
|
9
|
+
retrieve: stripeMethod({
|
|
10
|
+
method: 'GET',
|
|
11
|
+
fullPath: '/v1/billing/margins/{margin}',
|
|
12
|
+
}),
|
|
13
|
+
update: stripeMethod({
|
|
14
|
+
method: 'POST',
|
|
15
|
+
fullPath: '/v1/billing/margins/{margin}',
|
|
16
|
+
}),
|
|
17
|
+
list: stripeMethod({
|
|
18
|
+
method: 'GET',
|
|
19
|
+
fullPath: '/v1/billing/margins',
|
|
20
|
+
methodType: 'list',
|
|
21
|
+
}),
|
|
22
|
+
});
|
package/cjs/resources/OAuth.js
CHANGED
|
@@ -24,7 +24,7 @@ exports.OAuth = StripeResource_js_1.StripeResource.extend({
|
|
|
24
24
|
if (!params.scope) {
|
|
25
25
|
params.scope = 'read_write';
|
|
26
26
|
}
|
|
27
|
-
return `https://${oAuthHost}/${path}?${(0, utils_js_1.
|
|
27
|
+
return `https://${oAuthHost}/${path}?${(0, utils_js_1.queryStringifyRequestData)(params)}`;
|
|
28
28
|
},
|
|
29
29
|
token: stripeMethod({
|
|
30
30
|
method: 'POST',
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Orders = void 0;
|
|
5
|
+
const StripeResource_js_1 = require("../StripeResource.js");
|
|
6
|
+
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
|
7
|
+
exports.Orders = StripeResource_js_1.StripeResource.extend({
|
|
8
|
+
create: stripeMethod({ method: 'POST', fullPath: '/v1/orders' }),
|
|
9
|
+
retrieve: stripeMethod({ method: 'GET', fullPath: '/v1/orders/{id}' }),
|
|
10
|
+
update: stripeMethod({ method: 'POST', fullPath: '/v1/orders/{id}' }),
|
|
11
|
+
list: stripeMethod({
|
|
12
|
+
method: 'GET',
|
|
13
|
+
fullPath: '/v1/orders',
|
|
14
|
+
methodType: 'list',
|
|
15
|
+
}),
|
|
16
|
+
cancel: stripeMethod({ method: 'POST', fullPath: '/v1/orders/{id}/cancel' }),
|
|
17
|
+
listLineItems: stripeMethod({
|
|
18
|
+
method: 'GET',
|
|
19
|
+
fullPath: '/v1/orders/{id}/line_items',
|
|
20
|
+
methodType: 'list',
|
|
21
|
+
}),
|
|
22
|
+
reopen: stripeMethod({ method: 'POST', fullPath: '/v1/orders/{id}/reopen' }),
|
|
23
|
+
submit: stripeMethod({ method: 'POST', fullPath: '/v1/orders/{id}/submit' }),
|
|
24
|
+
});
|
|
@@ -35,6 +35,10 @@ exports.PaymentIntents = StripeResource_js_1.StripeResource.extend({
|
|
|
35
35
|
method: 'POST',
|
|
36
36
|
fullPath: '/v1/payment_intents/{intent}/confirm',
|
|
37
37
|
}),
|
|
38
|
+
decrementAuthorization: stripeMethod({
|
|
39
|
+
method: 'POST',
|
|
40
|
+
fullPath: '/v1/payment_intents/{intent}/decrement_authorization',
|
|
41
|
+
}),
|
|
38
42
|
incrementAuthorization: stripeMethod({
|
|
39
43
|
method: 'POST',
|
|
40
44
|
fullPath: '/v1/payment_intents/{intent}/increment_authorization',
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.QuotePhases = void 0;
|
|
5
|
+
const StripeResource_js_1 = require("../StripeResource.js");
|
|
6
|
+
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
|
7
|
+
exports.QuotePhases = StripeResource_js_1.StripeResource.extend({
|
|
8
|
+
retrieve: stripeMethod({
|
|
9
|
+
method: 'GET',
|
|
10
|
+
fullPath: '/v1/quote_phases/{quote_phase}',
|
|
11
|
+
}),
|
|
12
|
+
list: stripeMethod({
|
|
13
|
+
method: 'GET',
|
|
14
|
+
fullPath: '/v1/quote_phases',
|
|
15
|
+
methodType: 'list',
|
|
16
|
+
}),
|
|
17
|
+
listLineItems: stripeMethod({
|
|
18
|
+
method: 'GET',
|
|
19
|
+
fullPath: '/v1/quote_phases/{quote_phase}/line_items',
|
|
20
|
+
methodType: 'list',
|
|
21
|
+
}),
|
|
22
|
+
});
|
package/cjs/resources/Quotes.js
CHANGED
|
@@ -19,6 +19,11 @@ exports.Quotes = StripeResource_js_1.StripeResource.extend({
|
|
|
19
19
|
method: 'POST',
|
|
20
20
|
fullPath: '/v1/quotes/{quote}/finalize',
|
|
21
21
|
}),
|
|
22
|
+
listPreviewInvoiceLines: stripeMethod({
|
|
23
|
+
method: 'GET',
|
|
24
|
+
fullPath: '/v1/quotes/{quote}/preview_invoices/{preview_invoice}/lines',
|
|
25
|
+
methodType: 'list',
|
|
26
|
+
}),
|
|
22
27
|
listComputedUpfrontLineItems: stripeMethod({
|
|
23
28
|
method: 'GET',
|
|
24
29
|
fullPath: '/v1/quotes/{quote}/computed_upfront_line_items',
|
|
@@ -29,10 +34,37 @@ exports.Quotes = StripeResource_js_1.StripeResource.extend({
|
|
|
29
34
|
fullPath: '/v1/quotes/{quote}/line_items',
|
|
30
35
|
methodType: 'list',
|
|
31
36
|
}),
|
|
37
|
+
listLines: stripeMethod({
|
|
38
|
+
method: 'GET',
|
|
39
|
+
fullPath: '/v1/quotes/{quote}/lines',
|
|
40
|
+
methodType: 'list',
|
|
41
|
+
}),
|
|
42
|
+
listPreviewInvoices: stripeMethod({
|
|
43
|
+
method: 'GET',
|
|
44
|
+
fullPath: '/v1/quotes/{quote}/preview_invoices',
|
|
45
|
+
methodType: 'list',
|
|
46
|
+
}),
|
|
47
|
+
listPreviewSubscriptionSchedules: stripeMethod({
|
|
48
|
+
method: 'GET',
|
|
49
|
+
fullPath: '/v1/quotes/{quote}/preview_subscription_schedules',
|
|
50
|
+
methodType: 'list',
|
|
51
|
+
}),
|
|
52
|
+
markDraft: stripeMethod({
|
|
53
|
+
method: 'POST',
|
|
54
|
+
fullPath: '/v1/quotes/{quote}/mark_draft',
|
|
55
|
+
}),
|
|
56
|
+
markStale: stripeMethod({
|
|
57
|
+
method: 'POST',
|
|
58
|
+
fullPath: '/v1/quotes/{quote}/mark_stale',
|
|
59
|
+
}),
|
|
32
60
|
pdf: stripeMethod({
|
|
33
61
|
method: 'GET',
|
|
34
62
|
fullPath: '/v1/quotes/{quote}/pdf',
|
|
35
63
|
host: 'files.stripe.com',
|
|
36
64
|
streaming: true,
|
|
37
65
|
}),
|
|
66
|
+
reestimate: stripeMethod({
|
|
67
|
+
method: 'POST',
|
|
68
|
+
fullPath: '/v1/quotes/{quote}/reestimate',
|
|
69
|
+
}),
|
|
38
70
|
});
|
|
@@ -22,6 +22,10 @@ exports.SubscriptionSchedules = StripeResource_js_1.StripeResource.extend({
|
|
|
22
22
|
fullPath: '/v1/subscription_schedules',
|
|
23
23
|
methodType: 'list',
|
|
24
24
|
}),
|
|
25
|
+
amend: stripeMethod({
|
|
26
|
+
method: 'POST',
|
|
27
|
+
fullPath: '/v1/subscription_schedules/{schedule}/amend',
|
|
28
|
+
}),
|
|
25
29
|
cancel: stripeMethod({
|
|
26
30
|
method: 'POST',
|
|
27
31
|
fullPath: '/v1/subscription_schedules/{schedule}/cancel',
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Associations = void 0;
|
|
5
|
+
const StripeResource_js_1 = require("../../StripeResource.js");
|
|
6
|
+
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
|
7
|
+
exports.Associations = StripeResource_js_1.StripeResource.extend({
|
|
8
|
+
find: stripeMethod({ method: 'GET', fullPath: '/v1/tax/associations/find' }),
|
|
9
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Forms = void 0;
|
|
5
|
+
const StripeResource_js_1 = require("../../StripeResource.js");
|
|
6
|
+
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
|
7
|
+
exports.Forms = StripeResource_js_1.StripeResource.extend({
|
|
8
|
+
retrieve: stripeMethod({ method: 'GET', fullPath: '/v1/tax/forms/{id}' }),
|
|
9
|
+
list: stripeMethod({
|
|
10
|
+
method: 'GET',
|
|
11
|
+
fullPath: '/v1/tax/forms',
|
|
12
|
+
methodType: 'list',
|
|
13
|
+
}),
|
|
14
|
+
pdf: stripeMethod({
|
|
15
|
+
method: 'GET',
|
|
16
|
+
fullPath: '/v1/tax/forms/{id}/pdf',
|
|
17
|
+
host: 'files.stripe.com',
|
|
18
|
+
streaming: true,
|
|
19
|
+
}),
|
|
20
|
+
});
|