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
|
@@ -15,6 +15,14 @@ export const Invoices = StripeResource.extend({
|
|
|
15
15
|
method: 'POST',
|
|
16
16
|
fullPath: '/v1/invoices/{invoice}/add_lines',
|
|
17
17
|
}),
|
|
18
|
+
attachPayment: stripeMethod({
|
|
19
|
+
method: 'POST',
|
|
20
|
+
fullPath: '/v1/invoices/{invoice}/attach_payment',
|
|
21
|
+
}),
|
|
22
|
+
attachPaymentIntent: stripeMethod({
|
|
23
|
+
method: 'POST',
|
|
24
|
+
fullPath: '/v1/invoices/{invoice}/attach_payment_intent',
|
|
25
|
+
}),
|
|
18
26
|
createPreview: stripeMethod({
|
|
19
27
|
method: 'POST',
|
|
20
28
|
fullPath: '/v1/invoices/create_preview',
|
|
@@ -28,6 +36,11 @@ export const Invoices = StripeResource.extend({
|
|
|
28
36
|
fullPath: '/v1/invoices/{invoice}/lines',
|
|
29
37
|
methodType: 'list',
|
|
30
38
|
}),
|
|
39
|
+
listPayments: stripeMethod({
|
|
40
|
+
method: 'GET',
|
|
41
|
+
fullPath: '/v1/invoices/{invoice}/payments',
|
|
42
|
+
methodType: 'list',
|
|
43
|
+
}),
|
|
31
44
|
listUpcomingLines: stripeMethod({
|
|
32
45
|
method: 'GET',
|
|
33
46
|
fullPath: '/v1/invoices/upcoming/lines',
|
|
@@ -42,6 +55,10 @@ export const Invoices = StripeResource.extend({
|
|
|
42
55
|
method: 'POST',
|
|
43
56
|
fullPath: '/v1/invoices/{invoice}/remove_lines',
|
|
44
57
|
}),
|
|
58
|
+
retrievePayment: stripeMethod({
|
|
59
|
+
method: 'GET',
|
|
60
|
+
fullPath: '/v1/invoices/{invoice}/payments/{invoice_payment}',
|
|
61
|
+
}),
|
|
45
62
|
retrieveUpcoming: stripeMethod({
|
|
46
63
|
method: 'GET',
|
|
47
64
|
fullPath: '/v1/invoices/upcoming',
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec
|
|
2
|
+
import { StripeResource } from '../../StripeResource.js';
|
|
3
|
+
const stripeMethod = StripeResource.method;
|
|
4
|
+
export const CreditUnderwritingRecords = StripeResource.extend({
|
|
5
|
+
retrieve: stripeMethod({
|
|
6
|
+
method: 'GET',
|
|
7
|
+
fullPath: '/v1/issuing/credit_underwriting_records/{credit_underwriting_record}',
|
|
8
|
+
}),
|
|
9
|
+
list: stripeMethod({
|
|
10
|
+
method: 'GET',
|
|
11
|
+
fullPath: '/v1/issuing/credit_underwriting_records',
|
|
12
|
+
methodType: 'list',
|
|
13
|
+
}),
|
|
14
|
+
correct: stripeMethod({
|
|
15
|
+
method: 'POST',
|
|
16
|
+
fullPath: '/v1/issuing/credit_underwriting_records/{credit_underwriting_record}/correct',
|
|
17
|
+
}),
|
|
18
|
+
createFromApplication: stripeMethod({
|
|
19
|
+
method: 'POST',
|
|
20
|
+
fullPath: '/v1/issuing/credit_underwriting_records/create_from_application',
|
|
21
|
+
}),
|
|
22
|
+
createFromProactiveReview: stripeMethod({
|
|
23
|
+
method: 'POST',
|
|
24
|
+
fullPath: '/v1/issuing/credit_underwriting_records/create_from_proactive_review',
|
|
25
|
+
}),
|
|
26
|
+
reportDecision: stripeMethod({
|
|
27
|
+
method: 'POST',
|
|
28
|
+
fullPath: '/v1/issuing/credit_underwriting_records/{credit_underwriting_record}/report_decision',
|
|
29
|
+
}),
|
|
30
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec
|
|
2
|
+
import { StripeResource } from '../StripeResource.js';
|
|
3
|
+
const stripeMethod = StripeResource.method;
|
|
4
|
+
export const Margins = StripeResource.extend({
|
|
5
|
+
create: stripeMethod({ method: 'POST', fullPath: '/v1/billing/margins' }),
|
|
6
|
+
retrieve: stripeMethod({
|
|
7
|
+
method: 'GET',
|
|
8
|
+
fullPath: '/v1/billing/margins/{margin}',
|
|
9
|
+
}),
|
|
10
|
+
update: stripeMethod({
|
|
11
|
+
method: 'POST',
|
|
12
|
+
fullPath: '/v1/billing/margins/{margin}',
|
|
13
|
+
}),
|
|
14
|
+
list: stripeMethod({
|
|
15
|
+
method: 'GET',
|
|
16
|
+
fullPath: '/v1/billing/margins',
|
|
17
|
+
methodType: 'list',
|
|
18
|
+
}),
|
|
19
|
+
});
|
package/esm/resources/OAuth.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
import { StripeResource } from '../StripeResource.js';
|
|
3
|
-
import {
|
|
3
|
+
import { queryStringifyRequestData } from '../utils.js';
|
|
4
4
|
const stripeMethod = StripeResource.method;
|
|
5
5
|
const oAuthHost = 'connect.stripe.com';
|
|
6
6
|
export const OAuth = StripeResource.extend({
|
|
@@ -22,7 +22,7 @@ export const OAuth = StripeResource.extend({
|
|
|
22
22
|
if (!params.scope) {
|
|
23
23
|
params.scope = 'read_write';
|
|
24
24
|
}
|
|
25
|
-
return `https://${oAuthHost}/${path}?${
|
|
25
|
+
return `https://${oAuthHost}/${path}?${queryStringifyRequestData(params)}`;
|
|
26
26
|
},
|
|
27
27
|
token: stripeMethod({
|
|
28
28
|
method: 'POST',
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec
|
|
2
|
+
import { StripeResource } from '../StripeResource.js';
|
|
3
|
+
const stripeMethod = StripeResource.method;
|
|
4
|
+
export const Orders = StripeResource.extend({
|
|
5
|
+
create: stripeMethod({ method: 'POST', fullPath: '/v1/orders' }),
|
|
6
|
+
retrieve: stripeMethod({ method: 'GET', fullPath: '/v1/orders/{id}' }),
|
|
7
|
+
update: stripeMethod({ method: 'POST', fullPath: '/v1/orders/{id}' }),
|
|
8
|
+
list: stripeMethod({
|
|
9
|
+
method: 'GET',
|
|
10
|
+
fullPath: '/v1/orders',
|
|
11
|
+
methodType: 'list',
|
|
12
|
+
}),
|
|
13
|
+
cancel: stripeMethod({ method: 'POST', fullPath: '/v1/orders/{id}/cancel' }),
|
|
14
|
+
listLineItems: stripeMethod({
|
|
15
|
+
method: 'GET',
|
|
16
|
+
fullPath: '/v1/orders/{id}/line_items',
|
|
17
|
+
methodType: 'list',
|
|
18
|
+
}),
|
|
19
|
+
reopen: stripeMethod({ method: 'POST', fullPath: '/v1/orders/{id}/reopen' }),
|
|
20
|
+
submit: stripeMethod({ method: 'POST', fullPath: '/v1/orders/{id}/submit' }),
|
|
21
|
+
});
|
|
@@ -32,6 +32,10 @@ export const PaymentIntents = StripeResource.extend({
|
|
|
32
32
|
method: 'POST',
|
|
33
33
|
fullPath: '/v1/payment_intents/{intent}/confirm',
|
|
34
34
|
}),
|
|
35
|
+
decrementAuthorization: stripeMethod({
|
|
36
|
+
method: 'POST',
|
|
37
|
+
fullPath: '/v1/payment_intents/{intent}/decrement_authorization',
|
|
38
|
+
}),
|
|
35
39
|
incrementAuthorization: stripeMethod({
|
|
36
40
|
method: 'POST',
|
|
37
41
|
fullPath: '/v1/payment_intents/{intent}/increment_authorization',
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec
|
|
2
|
+
import { StripeResource } from '../StripeResource.js';
|
|
3
|
+
const stripeMethod = StripeResource.method;
|
|
4
|
+
export const QuotePhases = StripeResource.extend({
|
|
5
|
+
retrieve: stripeMethod({
|
|
6
|
+
method: 'GET',
|
|
7
|
+
fullPath: '/v1/quote_phases/{quote_phase}',
|
|
8
|
+
}),
|
|
9
|
+
list: stripeMethod({
|
|
10
|
+
method: 'GET',
|
|
11
|
+
fullPath: '/v1/quote_phases',
|
|
12
|
+
methodType: 'list',
|
|
13
|
+
}),
|
|
14
|
+
listLineItems: stripeMethod({
|
|
15
|
+
method: 'GET',
|
|
16
|
+
fullPath: '/v1/quote_phases/{quote_phase}/line_items',
|
|
17
|
+
methodType: 'list',
|
|
18
|
+
}),
|
|
19
|
+
});
|
package/esm/resources/Quotes.js
CHANGED
|
@@ -16,6 +16,11 @@ export const Quotes = StripeResource.extend({
|
|
|
16
16
|
method: 'POST',
|
|
17
17
|
fullPath: '/v1/quotes/{quote}/finalize',
|
|
18
18
|
}),
|
|
19
|
+
listPreviewInvoiceLines: stripeMethod({
|
|
20
|
+
method: 'GET',
|
|
21
|
+
fullPath: '/v1/quotes/{quote}/preview_invoices/{preview_invoice}/lines',
|
|
22
|
+
methodType: 'list',
|
|
23
|
+
}),
|
|
19
24
|
listComputedUpfrontLineItems: stripeMethod({
|
|
20
25
|
method: 'GET',
|
|
21
26
|
fullPath: '/v1/quotes/{quote}/computed_upfront_line_items',
|
|
@@ -26,10 +31,37 @@ export const Quotes = StripeResource.extend({
|
|
|
26
31
|
fullPath: '/v1/quotes/{quote}/line_items',
|
|
27
32
|
methodType: 'list',
|
|
28
33
|
}),
|
|
34
|
+
listLines: stripeMethod({
|
|
35
|
+
method: 'GET',
|
|
36
|
+
fullPath: '/v1/quotes/{quote}/lines',
|
|
37
|
+
methodType: 'list',
|
|
38
|
+
}),
|
|
39
|
+
listPreviewInvoices: stripeMethod({
|
|
40
|
+
method: 'GET',
|
|
41
|
+
fullPath: '/v1/quotes/{quote}/preview_invoices',
|
|
42
|
+
methodType: 'list',
|
|
43
|
+
}),
|
|
44
|
+
listPreviewSubscriptionSchedules: stripeMethod({
|
|
45
|
+
method: 'GET',
|
|
46
|
+
fullPath: '/v1/quotes/{quote}/preview_subscription_schedules',
|
|
47
|
+
methodType: 'list',
|
|
48
|
+
}),
|
|
49
|
+
markDraft: stripeMethod({
|
|
50
|
+
method: 'POST',
|
|
51
|
+
fullPath: '/v1/quotes/{quote}/mark_draft',
|
|
52
|
+
}),
|
|
53
|
+
markStale: stripeMethod({
|
|
54
|
+
method: 'POST',
|
|
55
|
+
fullPath: '/v1/quotes/{quote}/mark_stale',
|
|
56
|
+
}),
|
|
29
57
|
pdf: stripeMethod({
|
|
30
58
|
method: 'GET',
|
|
31
59
|
fullPath: '/v1/quotes/{quote}/pdf',
|
|
32
60
|
host: 'files.stripe.com',
|
|
33
61
|
streaming: true,
|
|
34
62
|
}),
|
|
63
|
+
reestimate: stripeMethod({
|
|
64
|
+
method: 'POST',
|
|
65
|
+
fullPath: '/v1/quotes/{quote}/reestimate',
|
|
66
|
+
}),
|
|
35
67
|
});
|
|
@@ -19,6 +19,10 @@ export const SubscriptionSchedules = StripeResource.extend({
|
|
|
19
19
|
fullPath: '/v1/subscription_schedules',
|
|
20
20
|
methodType: 'list',
|
|
21
21
|
}),
|
|
22
|
+
amend: stripeMethod({
|
|
23
|
+
method: 'POST',
|
|
24
|
+
fullPath: '/v1/subscription_schedules/{schedule}/amend',
|
|
25
|
+
}),
|
|
22
26
|
cancel: stripeMethod({
|
|
23
27
|
method: 'POST',
|
|
24
28
|
fullPath: '/v1/subscription_schedules/{schedule}/cancel',
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec
|
|
2
|
+
import { StripeResource } from '../../StripeResource.js';
|
|
3
|
+
const stripeMethod = StripeResource.method;
|
|
4
|
+
export const Associations = StripeResource.extend({
|
|
5
|
+
find: stripeMethod({ method: 'GET', fullPath: '/v1/tax/associations/find' }),
|
|
6
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec
|
|
2
|
+
import { StripeResource } from '../../StripeResource.js';
|
|
3
|
+
const stripeMethod = StripeResource.method;
|
|
4
|
+
export const Forms = StripeResource.extend({
|
|
5
|
+
retrieve: stripeMethod({ method: 'GET', fullPath: '/v1/tax/forms/{id}' }),
|
|
6
|
+
list: stripeMethod({
|
|
7
|
+
method: 'GET',
|
|
8
|
+
fullPath: '/v1/tax/forms',
|
|
9
|
+
methodType: 'list',
|
|
10
|
+
}),
|
|
11
|
+
pdf: stripeMethod({
|
|
12
|
+
method: 'GET',
|
|
13
|
+
fullPath: '/v1/tax/forms/{id}/pdf',
|
|
14
|
+
host: 'files.stripe.com',
|
|
15
|
+
streaming: true,
|
|
16
|
+
}),
|
|
17
|
+
});
|
|
@@ -24,6 +24,18 @@ export const Readers = StripeResource.extend({
|
|
|
24
24
|
method: 'POST',
|
|
25
25
|
fullPath: '/v1/terminal/readers/{reader}/cancel_action',
|
|
26
26
|
}),
|
|
27
|
+
collectInputs: stripeMethod({
|
|
28
|
+
method: 'POST',
|
|
29
|
+
fullPath: '/v1/terminal/readers/{reader}/collect_inputs',
|
|
30
|
+
}),
|
|
31
|
+
collectPaymentMethod: stripeMethod({
|
|
32
|
+
method: 'POST',
|
|
33
|
+
fullPath: '/v1/terminal/readers/{reader}/collect_payment_method',
|
|
34
|
+
}),
|
|
35
|
+
confirmPaymentIntent: stripeMethod({
|
|
36
|
+
method: 'POST',
|
|
37
|
+
fullPath: '/v1/terminal/readers/{reader}/confirm_payment_intent',
|
|
38
|
+
}),
|
|
27
39
|
processPaymentIntent: stripeMethod({
|
|
28
40
|
method: 'POST',
|
|
29
41
|
fullPath: '/v1/terminal/readers/{reader}/process_payment_intent',
|
package/esm/resources.js
CHANGED
|
@@ -2,25 +2,34 @@
|
|
|
2
2
|
import { resourceNamespace } from './ResourceNamespace.js';
|
|
3
3
|
import { Accounts as FinancialConnectionsAccounts } from './resources/FinancialConnections/Accounts.js';
|
|
4
4
|
import { ActiveEntitlements as EntitlementsActiveEntitlements } from './resources/Entitlements/ActiveEntitlements.js';
|
|
5
|
+
import { Alerts as BillingAlerts } from './resources/Billing/Alerts.js';
|
|
6
|
+
import { Associations as TaxAssociations } from './resources/Tax/Associations.js';
|
|
5
7
|
import { Authorizations as TestHelpersIssuingAuthorizations } from './resources/TestHelpers/Issuing/Authorizations.js';
|
|
6
8
|
import { Authorizations as IssuingAuthorizations } from './resources/Issuing/Authorizations.js';
|
|
7
9
|
import { Calculations as TaxCalculations } from './resources/Tax/Calculations.js';
|
|
8
10
|
import { Cardholders as IssuingCardholders } from './resources/Issuing/Cardholders.js';
|
|
9
11
|
import { Cards as TestHelpersIssuingCards } from './resources/TestHelpers/Issuing/Cards.js';
|
|
12
|
+
import { Cards as GiftCardsCards } from './resources/GiftCards/Cards.js';
|
|
10
13
|
import { Cards as IssuingCards } from './resources/Issuing/Cards.js';
|
|
11
14
|
import { Configurations as BillingPortalConfigurations } from './resources/BillingPortal/Configurations.js';
|
|
12
15
|
import { Configurations as TerminalConfigurations } from './resources/Terminal/Configurations.js';
|
|
13
16
|
import { ConfirmationTokens as TestHelpersConfirmationTokens } from './resources/TestHelpers/ConfirmationTokens.js';
|
|
14
17
|
import { ConnectionTokens as TerminalConnectionTokens } from './resources/Terminal/ConnectionTokens.js';
|
|
15
18
|
import { CreditReversals as TreasuryCreditReversals } from './resources/Treasury/CreditReversals.js';
|
|
19
|
+
import { CreditUnderwritingRecords as IssuingCreditUnderwritingRecords } from './resources/Issuing/CreditUnderwritingRecords.js';
|
|
16
20
|
import { Customers as TestHelpersCustomers } from './resources/TestHelpers/Customers.js';
|
|
17
21
|
import { DebitReversals as TreasuryDebitReversals } from './resources/Treasury/DebitReversals.js';
|
|
18
22
|
import { Disputes as IssuingDisputes } from './resources/Issuing/Disputes.js';
|
|
19
23
|
import { EarlyFraudWarnings as RadarEarlyFraudWarnings } from './resources/Radar/EarlyFraudWarnings.js';
|
|
20
24
|
import { Features as EntitlementsFeatures } from './resources/Entitlements/Features.js';
|
|
21
25
|
import { FinancialAccounts as TreasuryFinancialAccounts } from './resources/Treasury/FinancialAccounts.js';
|
|
26
|
+
import { FinancingOffers as CapitalFinancingOffers } from './resources/Capital/FinancingOffers.js';
|
|
27
|
+
import { FinancingSummary as CapitalFinancingSummary } from './resources/Capital/FinancingSummary.js';
|
|
28
|
+
import { FinancingTransactions as CapitalFinancingTransactions } from './resources/Capital/FinancingTransactions.js';
|
|
29
|
+
import { Forms as TaxForms } from './resources/Tax/Forms.js';
|
|
22
30
|
import { InboundTransfers as TestHelpersTreasuryInboundTransfers } from './resources/TestHelpers/Treasury/InboundTransfers.js';
|
|
23
31
|
import { InboundTransfers as TreasuryInboundTransfers } from './resources/Treasury/InboundTransfers.js';
|
|
32
|
+
import { Institutions as FinancialConnectionsInstitutions } from './resources/FinancialConnections/Institutions.js';
|
|
24
33
|
import { Locations as TerminalLocations } from './resources/Terminal/Locations.js';
|
|
25
34
|
import { MeterEventAdjustments as BillingMeterEventAdjustments } from './resources/Billing/MeterEventAdjustments.js';
|
|
26
35
|
import { MeterEvents as BillingMeterEvents } from './resources/Billing/MeterEvents.js';
|
|
@@ -57,6 +66,7 @@ import { Tokens as IssuingTokens } from './resources/Issuing/Tokens.js';
|
|
|
57
66
|
import { TransactionEntries as TreasuryTransactionEntries } from './resources/Treasury/TransactionEntries.js';
|
|
58
67
|
import { Transactions as TestHelpersIssuingTransactions } from './resources/TestHelpers/Issuing/Transactions.js';
|
|
59
68
|
import { Transactions as FinancialConnectionsTransactions } from './resources/FinancialConnections/Transactions.js';
|
|
69
|
+
import { Transactions as GiftCardsTransactions } from './resources/GiftCards/Transactions.js';
|
|
60
70
|
import { Transactions as IssuingTransactions } from './resources/Issuing/Transactions.js';
|
|
61
71
|
import { Transactions as TaxTransactions } from './resources/Tax/Transactions.js';
|
|
62
72
|
import { Transactions as TreasuryTransactions } from './resources/Treasury/Transactions.js';
|
|
@@ -66,6 +76,7 @@ import { VerificationReports as IdentityVerificationReports } from './resources/
|
|
|
66
76
|
import { VerificationSessions as IdentityVerificationSessions } from './resources/Identity/VerificationSessions.js';
|
|
67
77
|
export { Accounts as Account } from './resources/Accounts.js';
|
|
68
78
|
export { AccountLinks } from './resources/AccountLinks.js';
|
|
79
|
+
export { AccountNotices } from './resources/AccountNotices.js';
|
|
69
80
|
export { AccountSessions } from './resources/AccountSessions.js';
|
|
70
81
|
export { Accounts } from './resources/Accounts.js';
|
|
71
82
|
export { ApplePayDomains } from './resources/ApplePayDomains.js';
|
|
@@ -88,7 +99,9 @@ export { Files } from './resources/Files.js';
|
|
|
88
99
|
export { InvoiceItems } from './resources/InvoiceItems.js';
|
|
89
100
|
export { Invoices } from './resources/Invoices.js';
|
|
90
101
|
export { Mandates } from './resources/Mandates.js';
|
|
102
|
+
export { Margins } from './resources/Margins.js';
|
|
91
103
|
export { OAuth } from './resources/OAuth.js';
|
|
104
|
+
export { Orders } from './resources/Orders.js';
|
|
92
105
|
export { PaymentIntents } from './resources/PaymentIntents.js';
|
|
93
106
|
export { PaymentLinks } from './resources/PaymentLinks.js';
|
|
94
107
|
export { PaymentMethodConfigurations } from './resources/PaymentMethodConfigurations.js';
|
|
@@ -99,6 +112,7 @@ export { Plans } from './resources/Plans.js';
|
|
|
99
112
|
export { Prices } from './resources/Prices.js';
|
|
100
113
|
export { Products } from './resources/Products.js';
|
|
101
114
|
export { PromotionCodes } from './resources/PromotionCodes.js';
|
|
115
|
+
export { QuotePhases } from './resources/QuotePhases.js';
|
|
102
116
|
export { Quotes } from './resources/Quotes.js';
|
|
103
117
|
export { Refunds } from './resources/Refunds.js';
|
|
104
118
|
export { Reviews } from './resources/Reviews.js';
|
|
@@ -118,6 +132,7 @@ export { Transfers } from './resources/Transfers.js';
|
|
|
118
132
|
export { WebhookEndpoints } from './resources/WebhookEndpoints.js';
|
|
119
133
|
export const Apps = resourceNamespace('apps', { Secrets: AppsSecrets });
|
|
120
134
|
export const Billing = resourceNamespace('billing', {
|
|
135
|
+
Alerts: BillingAlerts,
|
|
121
136
|
MeterEventAdjustments: BillingMeterEventAdjustments,
|
|
122
137
|
MeterEvents: BillingMeterEvents,
|
|
123
138
|
Meters: BillingMeters,
|
|
@@ -126,6 +141,11 @@ export const BillingPortal = resourceNamespace('billingPortal', {
|
|
|
126
141
|
Configurations: BillingPortalConfigurations,
|
|
127
142
|
Sessions: BillingPortalSessions,
|
|
128
143
|
});
|
|
144
|
+
export const Capital = resourceNamespace('capital', {
|
|
145
|
+
FinancingOffers: CapitalFinancingOffers,
|
|
146
|
+
FinancingSummary: CapitalFinancingSummary,
|
|
147
|
+
FinancingTransactions: CapitalFinancingTransactions,
|
|
148
|
+
});
|
|
129
149
|
export const Checkout = resourceNamespace('checkout', {
|
|
130
150
|
Sessions: CheckoutSessions,
|
|
131
151
|
});
|
|
@@ -140,12 +160,17 @@ export const Entitlements = resourceNamespace('entitlements', {
|
|
|
140
160
|
});
|
|
141
161
|
export const FinancialConnections = resourceNamespace('financialConnections', {
|
|
142
162
|
Accounts: FinancialConnectionsAccounts,
|
|
163
|
+
Institutions: FinancialConnectionsInstitutions,
|
|
143
164
|
Sessions: FinancialConnectionsSessions,
|
|
144
165
|
Transactions: FinancialConnectionsTransactions,
|
|
145
166
|
});
|
|
146
167
|
export const Forwarding = resourceNamespace('forwarding', {
|
|
147
168
|
Requests: ForwardingRequests,
|
|
148
169
|
});
|
|
170
|
+
export const GiftCards = resourceNamespace('giftCards', {
|
|
171
|
+
Cards: GiftCardsCards,
|
|
172
|
+
Transactions: GiftCardsTransactions,
|
|
173
|
+
});
|
|
149
174
|
export const Identity = resourceNamespace('identity', {
|
|
150
175
|
VerificationReports: IdentityVerificationReports,
|
|
151
176
|
VerificationSessions: IdentityVerificationSessions,
|
|
@@ -154,6 +179,7 @@ export const Issuing = resourceNamespace('issuing', {
|
|
|
154
179
|
Authorizations: IssuingAuthorizations,
|
|
155
180
|
Cardholders: IssuingCardholders,
|
|
156
181
|
Cards: IssuingCards,
|
|
182
|
+
CreditUnderwritingRecords: IssuingCreditUnderwritingRecords,
|
|
157
183
|
Disputes: IssuingDisputes,
|
|
158
184
|
PersonalizationDesigns: IssuingPersonalizationDesigns,
|
|
159
185
|
PhysicalBundles: IssuingPhysicalBundles,
|
|
@@ -173,7 +199,9 @@ export const Sigma = resourceNamespace('sigma', {
|
|
|
173
199
|
ScheduledQueryRuns: SigmaScheduledQueryRuns,
|
|
174
200
|
});
|
|
175
201
|
export const Tax = resourceNamespace('tax', {
|
|
202
|
+
Associations: TaxAssociations,
|
|
176
203
|
Calculations: TaxCalculations,
|
|
204
|
+
Forms: TaxForms,
|
|
177
205
|
Registrations: TaxRegistrations,
|
|
178
206
|
Settings: TaxSettings,
|
|
179
207
|
Transactions: TaxTransactions,
|
package/esm/stripe.core.js
CHANGED
|
@@ -2,7 +2,7 @@ import * as _Error from './Error.js';
|
|
|
2
2
|
import { RequestSender } from './RequestSender.js';
|
|
3
3
|
import { StripeResource } from './StripeResource.js';
|
|
4
4
|
import { createWebhooks } from './Webhooks.js';
|
|
5
|
-
import
|
|
5
|
+
import { ApiVersion } from './apiVersion.js';
|
|
6
6
|
import { CryptoProvider } from './crypto/CryptoProvider.js';
|
|
7
7
|
import { HttpClient, HttpClientResponse } from './net/HttpClient.js';
|
|
8
8
|
import * as resources from './resources.js';
|
|
@@ -10,7 +10,7 @@ import { determineProcessUserAgentProperties, pascalToCamelCase, validateInteger
|
|
|
10
10
|
const DEFAULT_HOST = 'api.stripe.com';
|
|
11
11
|
const DEFAULT_PORT = '443';
|
|
12
12
|
const DEFAULT_BASE_PATH = '/v1/';
|
|
13
|
-
const DEFAULT_API_VERSION =
|
|
13
|
+
const DEFAULT_API_VERSION = ApiVersion;
|
|
14
14
|
const DEFAULT_TIMEOUT = 80000;
|
|
15
15
|
const MAX_NETWORK_RETRY_DELAY_SEC = 2;
|
|
16
16
|
const INITIAL_NETWORK_RETRY_DELAY_SEC = 0.5;
|
|
@@ -31,7 +31,7 @@ const ALLOWED_CONFIG_PROPERTIES = [
|
|
|
31
31
|
];
|
|
32
32
|
const defaultRequestSenderFactory = (stripe) => new RequestSender(stripe, StripeResource.MAX_BUFFERED_REQUEST_METRICS);
|
|
33
33
|
export function createStripe(platformFunctions, requestSender = defaultRequestSenderFactory) {
|
|
34
|
-
Stripe.PACKAGE_VERSION = '16.
|
|
34
|
+
Stripe.PACKAGE_VERSION = '16.7.0-beta.1';
|
|
35
35
|
Stripe.USER_AGENT = Object.assign({ bindings_version: Stripe.PACKAGE_VERSION, lang: 'node', publisher: 'stripe', uname: null, typescript: false }, determineProcessUserAgentProperties());
|
|
36
36
|
Stripe.StripeResource = StripeResource;
|
|
37
37
|
Stripe.resources = resources;
|
|
@@ -147,6 +147,9 @@ export function createStripe(platformFunctions, requestSender = defaultRequestSe
|
|
|
147
147
|
_enableTelemetry: null,
|
|
148
148
|
_requestSender: null,
|
|
149
149
|
_platformFunctions: null,
|
|
150
|
+
rawRequest(method, path, params, options) {
|
|
151
|
+
return this._requestSender._rawRequest(method, path, params, options);
|
|
152
|
+
},
|
|
150
153
|
/**
|
|
151
154
|
* @private
|
|
152
155
|
*/
|
package/esm/utils.js
CHANGED
|
@@ -7,6 +7,8 @@ const OPTIONS_KEYS = [
|
|
|
7
7
|
'maxNetworkRetries',
|
|
8
8
|
'timeout',
|
|
9
9
|
'host',
|
|
10
|
+
'apiMode',
|
|
11
|
+
'additionalHeaders',
|
|
10
12
|
];
|
|
11
13
|
export function isOptionsHash(o) {
|
|
12
14
|
return (o &&
|
|
@@ -17,7 +19,7 @@ export function isOptionsHash(o) {
|
|
|
17
19
|
* Stringifies an Object, accommodating nested objects
|
|
18
20
|
* (forming the conventional key 'parent[child]=value')
|
|
19
21
|
*/
|
|
20
|
-
export function
|
|
22
|
+
export function queryStringifyRequestData(data) {
|
|
21
23
|
return (qs
|
|
22
24
|
.stringify(data, {
|
|
23
25
|
serializeDate: (d) => Math.floor(d.getTime() / 1000).toString(),
|
|
@@ -124,6 +126,15 @@ export function getOptionsFromArgs(args) {
|
|
|
124
126
|
if (params.host) {
|
|
125
127
|
opts.host = params.host;
|
|
126
128
|
}
|
|
129
|
+
if (params.apiMode) {
|
|
130
|
+
if (params.apiMode !== 'standard' && params.apiMode !== 'preview') {
|
|
131
|
+
throw new Error(`Invalid apiMode: ${params.apiMode}. Must be one of 'standard' or 'preview'`);
|
|
132
|
+
}
|
|
133
|
+
opts.apiMode = params.apiMode;
|
|
134
|
+
}
|
|
135
|
+
if (params.additionalHeaders) {
|
|
136
|
+
opts.headers = params.additionalHeaders;
|
|
137
|
+
}
|
|
127
138
|
}
|
|
128
139
|
}
|
|
129
140
|
return opts;
|
|
@@ -285,3 +296,18 @@ export function concat(arrays) {
|
|
|
285
296
|
});
|
|
286
297
|
return merged;
|
|
287
298
|
}
|
|
299
|
+
/**
|
|
300
|
+
* Replaces Date objects with Unix timestamps
|
|
301
|
+
*/
|
|
302
|
+
function dateTimeReplacer(key, value) {
|
|
303
|
+
if (this[key] instanceof Date) {
|
|
304
|
+
return Math.floor(this[key].getTime() / 1000).toString();
|
|
305
|
+
}
|
|
306
|
+
return value;
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* JSON stringifies an Object, replacing Date objects with Unix timestamps
|
|
310
|
+
*/
|
|
311
|
+
export function jsonStringifyRequestData(data) {
|
|
312
|
+
return JSON.stringify(data, dateTimeReplacer);
|
|
313
|
+
}
|
package/package.json
CHANGED
|
@@ -60,7 +60,11 @@ declare module 'stripe' {
|
|
|
60
60
|
type FutureRequirements = 'include' | 'omit';
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
type Type =
|
|
63
|
+
type Type =
|
|
64
|
+
| 'account_onboarding'
|
|
65
|
+
| 'account_update'
|
|
66
|
+
| 'capital_financing_offer'
|
|
67
|
+
| 'capital_financing_reporting';
|
|
64
68
|
}
|
|
65
69
|
|
|
66
70
|
class AccountLinksResource {
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec
|
|
2
|
+
|
|
3
|
+
declare module 'stripe' {
|
|
4
|
+
namespace Stripe {
|
|
5
|
+
/**
|
|
6
|
+
* A notice to a Connected account. Notice can be sent by Stripe on your behalf or you can opt to send the notices yourself.
|
|
7
|
+
*
|
|
8
|
+
* See the [guide to send notices](https://stripe.com/docs/issuing/compliance-us/issuing-regulated-customer-notices) to your connected accounts.
|
|
9
|
+
*/
|
|
10
|
+
interface AccountNotice {
|
|
11
|
+
/**
|
|
12
|
+
* Unique identifier for the object.
|
|
13
|
+
*/
|
|
14
|
+
id: string;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* String representing the object's type. Objects of the same type share the same value.
|
|
18
|
+
*/
|
|
19
|
+
object: 'account_notice';
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Time at which the object was created. Measured in seconds since the Unix epoch.
|
|
23
|
+
*/
|
|
24
|
+
created: number;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* When present, the deadline for sending the notice to meet the relevant regulations.
|
|
28
|
+
*/
|
|
29
|
+
deadline: number | null;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Information about the email when sent.
|
|
33
|
+
*/
|
|
34
|
+
email: AccountNotice.Email | null;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Information about objects related to the notice.
|
|
38
|
+
*/
|
|
39
|
+
linked_objects: AccountNotice.LinkedObjects | null;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
|
43
|
+
*/
|
|
44
|
+
livemode: boolean;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
|
48
|
+
*/
|
|
49
|
+
metadata: Stripe.Metadata | null;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Reason the notice is being sent. The reason determines what copy the notice must contain. See the [regulated customer notices](https://stripe.com/docs/issuing/compliance-us/issuing-regulated-customer-notices) guide. All reasons might not apply to your integration, and Stripe might add new reasons in the future, so we recommend an internal warning when you receive an unknown reason.
|
|
53
|
+
*/
|
|
54
|
+
reason: AccountNotice.Reason;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Date when the notice was sent. When absent, you must send the notice, update the content of the email and date when it was sent.
|
|
58
|
+
*/
|
|
59
|
+
sent_at: number | null;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
namespace AccountNotice {
|
|
63
|
+
interface Email {
|
|
64
|
+
/**
|
|
65
|
+
* Content of the email in plain text. The copy must match exactly the language that Stripe Compliance has approved for use.
|
|
66
|
+
*/
|
|
67
|
+
plain_text: string;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Email address of the recipient.
|
|
71
|
+
*/
|
|
72
|
+
recipient: string;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Subject of the email.
|
|
76
|
+
*/
|
|
77
|
+
subject: string;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
interface LinkedObjects {
|
|
81
|
+
/**
|
|
82
|
+
* Associated [Capability](https://stripe.com/docs/api/capabilities)
|
|
83
|
+
*/
|
|
84
|
+
capability: string | null;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Associated [Credit Underwriting Record](https://stripe.com/docs/api/issuing/credit_underwriting_record)
|
|
88
|
+
*/
|
|
89
|
+
issuing_credit_underwriting_record?: string | null;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Associated [Issuing Dispute](https://stripe.com/docs/api/issuing/disputes)
|
|
93
|
+
*/
|
|
94
|
+
issuing_dispute: string | null;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
type Reason =
|
|
98
|
+
| 'issuing.account_closed_for_inactivity'
|
|
99
|
+
| 'issuing.account_closed_for_not_providing_business_model_clarification'
|
|
100
|
+
| 'issuing.account_closed_for_not_providing_url_clarification'
|
|
101
|
+
| 'issuing.account_closed_for_not_providing_use_case_clarification'
|
|
102
|
+
| 'issuing.account_closed_for_terms_of_service_violation'
|
|
103
|
+
| 'issuing.application_rejected_for_failure_to_verify'
|
|
104
|
+
| 'issuing.credit_application_rejected'
|
|
105
|
+
| 'issuing.credit_increase_application_rejected'
|
|
106
|
+
| 'issuing.credit_limit_decreased'
|
|
107
|
+
| 'issuing.credit_line_closed'
|
|
108
|
+
| 'issuing.dispute_lost'
|
|
109
|
+
| 'issuing.dispute_submitted'
|
|
110
|
+
| 'issuing.dispute_won';
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|