stripe 16.0.0 → 16.2.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 +761 -109
- 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/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/GiftCards/Cards.js +23 -0
- package/cjs/resources/GiftCards/Transactions.js +33 -0
- package/cjs/resources/Invoices.js +25 -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/Forms.js +20 -0
- package/cjs/resources/Terminal/Readers.js +12 -0
- package/cjs/resources.js +36 -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/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/GiftCards/Cards.js +20 -0
- package/esm/resources/GiftCards/Transactions.js +30 -0
- package/esm/resources/Invoices.js +25 -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/Forms.js +17 -0
- package/esm/resources/Terminal/Readers.js +12 -0
- package/esm/resources.js +22 -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 +110 -0
- package/types/AccountNoticesResource.d.ts +98 -0
- package/types/AccountSessions.d.ts +15 -0
- package/types/AccountSessionsResource.d.ts +205 -0
- package/types/Accounts.d.ts +88 -1
- package/types/AccountsResource.d.ts +204 -0
- package/types/Billing/MetersResource.d.ts +6 -2
- package/types/Capabilities.d.ts +1 -1
- 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 +36 -1
- package/types/Checkout/SessionsResource.d.ts +15 -1
- package/types/ConfirmationTokens.d.ts +83 -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 +72 -0
- package/types/CustomerSessions.d.ts +48 -0
- package/types/CustomerSessionsResource.d.ts +48 -0
- package/types/CustomersResource.d.ts +2 -0
- package/types/Disputes.d.ts +167 -0
- package/types/DisputesResource.d.ts +120 -0
- package/types/EventTypes.d.ts +426 -0
- package/types/Events.d.ts +83 -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/Sessions.d.ts +58 -1
- package/types/FinancialConnections/SessionsResource.d.ts +47 -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 +91 -0
- package/types/Invoices.d.ts +123 -1
- package/types/InvoicesResource.d.ts +6477 -2302
- package/types/Issuing/CardholdersResource.d.ts +2 -1
- package/types/Issuing/Cards.d.ts +34 -0
- package/types/Issuing/CardsResource.d.ts +125 -0
- 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 +1057 -0
- package/types/OrdersResource.d.ts +2711 -0
- package/types/PaymentIntents.d.ts +476 -1
- package/types/PaymentIntentsResource.d.ts +6735 -3354
- package/types/PaymentLinks.d.ts +4 -1
- package/types/PaymentLinksResource.d.ts +8 -2
- 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 +1528 -0
- package/types/QuotePreviewSubscriptionSchedules.d.ts +778 -0
- package/types/Quotes.d.ts +578 -1
- package/types/QuotesResource.d.ts +3174 -265
- package/types/SetupAttempts.d.ts +8 -0
- package/types/SetupIntents.d.ts +117 -1
- package/types/SetupIntentsResource.d.ts +531 -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 +164 -0
- package/types/SubscriptionSchedulesResource.d.ts +1234 -16
- package/types/Subscriptions.d.ts +54 -1
- package/types/SubscriptionsResource.d.ts +369 -2
- package/types/Tax/Forms.d.ts +133 -0
- package/types/Tax/FormsResource.d.ts +90 -0
- package/types/Terminal/Configurations.d.ts +14 -0
- package/types/Terminal/ConfigurationsResource.d.ts +36 -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/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 +50 -0
- package/types/index.d.ts +61 -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.0.
|
|
1
|
+
16.2.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-05-23.preview-v2';
|
package/cjs/multipart.js
CHANGED
|
@@ -45,7 +45,7 @@ const multipartDataGenerator = (method, data, headers) => {
|
|
|
45
45
|
function multipartRequestDataProcessor(method, data, headers, callback) {
|
|
46
46
|
data = data || {};
|
|
47
47
|
if (method !== 'POST') {
|
|
48
|
-
return callback(null, (0, utils_js_1.
|
|
48
|
+
return callback(null, (0, utils_js_1.queryStringifyRequestData)(data));
|
|
49
49
|
}
|
|
50
50
|
this._stripe._platformFunctions
|
|
51
51
|
.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,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,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
|
+
});
|
|
@@ -14,6 +14,14 @@ exports.Invoices = StripeResource_js_1.StripeResource.extend({
|
|
|
14
14
|
methodType: 'list',
|
|
15
15
|
}),
|
|
16
16
|
del: stripeMethod({ method: 'DELETE', fullPath: '/v1/invoices/{invoice}' }),
|
|
17
|
+
addLines: stripeMethod({
|
|
18
|
+
method: 'POST',
|
|
19
|
+
fullPath: '/v1/invoices/{invoice}/add_lines',
|
|
20
|
+
}),
|
|
21
|
+
attachPaymentIntent: stripeMethod({
|
|
22
|
+
method: 'POST',
|
|
23
|
+
fullPath: '/v1/invoices/{invoice}/attach_payment_intent',
|
|
24
|
+
}),
|
|
17
25
|
createPreview: stripeMethod({
|
|
18
26
|
method: 'POST',
|
|
19
27
|
fullPath: '/v1/invoices/create_preview',
|
|
@@ -27,6 +35,11 @@ exports.Invoices = StripeResource_js_1.StripeResource.extend({
|
|
|
27
35
|
fullPath: '/v1/invoices/{invoice}/lines',
|
|
28
36
|
methodType: 'list',
|
|
29
37
|
}),
|
|
38
|
+
listPayments: stripeMethod({
|
|
39
|
+
method: 'GET',
|
|
40
|
+
fullPath: '/v1/invoices/{invoice}/payments',
|
|
41
|
+
methodType: 'list',
|
|
42
|
+
}),
|
|
30
43
|
listUpcomingLines: stripeMethod({
|
|
31
44
|
method: 'GET',
|
|
32
45
|
fullPath: '/v1/invoices/upcoming/lines',
|
|
@@ -37,6 +50,14 @@ exports.Invoices = StripeResource_js_1.StripeResource.extend({
|
|
|
37
50
|
fullPath: '/v1/invoices/{invoice}/mark_uncollectible',
|
|
38
51
|
}),
|
|
39
52
|
pay: stripeMethod({ method: 'POST', fullPath: '/v1/invoices/{invoice}/pay' }),
|
|
53
|
+
removeLines: stripeMethod({
|
|
54
|
+
method: 'POST',
|
|
55
|
+
fullPath: '/v1/invoices/{invoice}/remove_lines',
|
|
56
|
+
}),
|
|
57
|
+
retrievePayment: stripeMethod({
|
|
58
|
+
method: 'GET',
|
|
59
|
+
fullPath: '/v1/invoices/{invoice}/payments/{invoice_payment}',
|
|
60
|
+
}),
|
|
40
61
|
retrieveUpcoming: stripeMethod({
|
|
41
62
|
method: 'GET',
|
|
42
63
|
fullPath: '/v1/invoices/upcoming',
|
|
@@ -50,6 +71,10 @@ exports.Invoices = StripeResource_js_1.StripeResource.extend({
|
|
|
50
71
|
method: 'POST',
|
|
51
72
|
fullPath: '/v1/invoices/{invoice}/send',
|
|
52
73
|
}),
|
|
74
|
+
updateLines: stripeMethod({
|
|
75
|
+
method: 'POST',
|
|
76
|
+
fullPath: '/v1/invoices/{invoice}/update_lines',
|
|
77
|
+
}),
|
|
53
78
|
updateLineItem: stripeMethod({
|
|
54
79
|
method: 'POST',
|
|
55
80
|
fullPath: '/v1/invoices/{invoice}/lines/{line_item_id}',
|
|
@@ -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,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
|
+
});
|
|
@@ -27,6 +27,18 @@ exports.Readers = StripeResource_js_1.StripeResource.extend({
|
|
|
27
27
|
method: 'POST',
|
|
28
28
|
fullPath: '/v1/terminal/readers/{reader}/cancel_action',
|
|
29
29
|
}),
|
|
30
|
+
collectInputs: stripeMethod({
|
|
31
|
+
method: 'POST',
|
|
32
|
+
fullPath: '/v1/terminal/readers/{reader}/collect_inputs',
|
|
33
|
+
}),
|
|
34
|
+
collectPaymentMethod: stripeMethod({
|
|
35
|
+
method: 'POST',
|
|
36
|
+
fullPath: '/v1/terminal/readers/{reader}/collect_payment_method',
|
|
37
|
+
}),
|
|
38
|
+
confirmPaymentIntent: stripeMethod({
|
|
39
|
+
method: 'POST',
|
|
40
|
+
fullPath: '/v1/terminal/readers/{reader}/confirm_payment_intent',
|
|
41
|
+
}),
|
|
30
42
|
processPaymentIntent: stripeMethod({
|
|
31
43
|
method: 'POST',
|
|
32
44
|
fullPath: '/v1/terminal/readers/{reader}/process_payment_intent',
|