stripe 11.15.0 → 11.16.0
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 +20 -9
- package/VERSION +1 -1
- package/cjs/ResourceNamespace.js +1 -1
- package/cjs/resources/Tax/Calculations.js +17 -0
- package/cjs/resources/Tax/Transactions.js +29 -0
- package/cjs/resources.js +9 -3
- package/cjs/stripe.core.js +1 -1
- package/esm/net/FetchHttpClient.js +1 -1
- package/esm/net/NodeHttpClient.js +1 -1
- package/esm/resources/Tax/Calculations.js +14 -0
- package/esm/resources/Tax/Transactions.js +26 -0
- package/esm/resources.js +6 -0
- package/esm/stripe.core.js +1 -1
- package/package.json +6 -1
- package/types/Checkout/Sessions.d.ts +27 -0
- package/types/Checkout/SessionsResource.d.ts +1 -0
- package/types/Disputes.d.ts +1 -1
- package/types/PaymentLinks.d.ts +1 -0
- package/types/PaymentLinksResource.d.ts +2 -0
- package/types/SetupIntents.d.ts +12 -0
- package/types/SetupIntentsResource.d.ts +12 -0
- package/types/Tax/CalculationLineItems.d.ts +178 -0
- package/types/Tax/Calculations.d.ts +273 -0
- package/types/Tax/CalculationsResource.d.ts +273 -0
- package/types/Tax/TransactionLineItems.d.ts +85 -0
- package/types/Tax/Transactions.d.ts +225 -0
- package/types/Tax/TransactionsResource.d.ts +202 -0
- package/types/index.d.ts +10 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,16 +1,27 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 11.16.0 - 2023-03-23
|
|
4
|
+
* [#1730](https://github.com/stripe/stripe-node/pull/1730) Update generated code
|
|
5
|
+
* Add support for new resources `Tax.CalculationLineItem`, `Tax.Calculation`, `Tax.TransactionLineItem`, and `Tax.Transaction`
|
|
6
|
+
* Add support for `create` and `list_line_items` methods on resource `Calculation`
|
|
7
|
+
* Add support for `create_from_calculation`, `create_reversal`, `create`, `list_line_items`, and `retrieve` methods on resource `Transaction`
|
|
8
|
+
* Add support for new value `link` on enum `CheckoutSessionCreateParams.payment_method_types[]`
|
|
9
|
+
* Add support for `currency_conversion` on `Checkout.Session`
|
|
10
|
+
* Add support for new value `link` on enums `PaymentLink.payment_method_types[]`, `PaymentLinkCreateParams.payment_method_types[]`, and `PaymentLinkUpdateParams.payment_method_types[]`
|
|
11
|
+
* Add support for `automatic_payment_methods` on `SetupIntentCreateParams` and `SetupIntent`
|
|
12
|
+
* [#1726](https://github.com/stripe/stripe-node/pull/1726) Add Deno entry point
|
|
13
|
+
|
|
3
14
|
## 11.15.0 - 2023-03-16
|
|
4
15
|
* [#1714](https://github.com/stripe/stripe-node/pull/1714) API Updates
|
|
5
|
-
* Add support for `cashapp_payments` on `Account.capabilities`, `AccountCreateParams.capabilities`, and `AccountUpdateParams.capabilities`
|
|
6
|
-
* Add support for new value `cashapp` as a new `type` throughout the API.
|
|
7
|
-
* Add support for `future_requirements` and `requirements` on `BankAccount`
|
|
8
|
-
* Add support for `country` on `Charge.payment_method_details.link`
|
|
9
|
-
* Add support for new value `automatic_async` on enums `CheckoutSessionCreateParams.payment_intent_data.capture_method`, `PaymentIntent.capture_method`, `PaymentIntentConfirmParams.capture_method`, `PaymentIntentCreateParams.capture_method`, `PaymentIntentUpdateParams.capture_method`, `PaymentLink.payment_intent_data.capture_method`, and `PaymentLinkCreateParams.payment_intent_data.capture_method`
|
|
10
|
-
|
|
11
|
-
* Add support for `preferred_locale` on `PaymentIntent.payment_method_options.affirm`,
|
|
12
|
-
* Add support for `cashapp_handle_redirect_or_display_qr_code` on `PaymentIntent.next_action` and `SetupIntent.next_action`
|
|
13
|
-
* Add support for new value `payout.reconciliation_completed` on enums `WebhookEndpointCreateParams.enabled_events[]` and `WebhookEndpointUpdateParams.enabled_events[]`
|
|
16
|
+
* Add support for `cashapp_payments` on `Account.capabilities`, `AccountCreateParams.capabilities`, and `AccountUpdateParams.capabilities`
|
|
17
|
+
* Add support for new value `cashapp` as a new `type` throughout the API.
|
|
18
|
+
* Add support for `future_requirements` and `requirements` on `BankAccount`
|
|
19
|
+
* Add support for `country` on `Charge.payment_method_details.link`
|
|
20
|
+
* Add support for new value `automatic_async` on enums `CheckoutSessionCreateParams.payment_intent_data.capture_method`, `PaymentIntent.capture_method`, `PaymentIntentConfirmParams.capture_method`, `PaymentIntentCreateParams.capture_method`, `PaymentIntentUpdateParams.capture_method`, `PaymentLink.payment_intent_data.capture_method`, and `PaymentLinkCreateParams.payment_intent_data.capture_method`
|
|
21
|
+
|
|
22
|
+
* Add support for `preferred_locale` on `PaymentIntent.payment_method_options.affirm`,
|
|
23
|
+
* Add support for `cashapp_handle_redirect_or_display_qr_code` on `PaymentIntent.next_action` and `SetupIntent.next_action`
|
|
24
|
+
* Add support for new value `payout.reconciliation_completed` on enums `WebhookEndpointCreateParams.enabled_events[]` and `WebhookEndpointUpdateParams.enabled_events[]`
|
|
14
25
|
* [#1709](https://github.com/stripe/stripe-node/pull/1709) Add ES module package entry point
|
|
15
26
|
* Add support for ES modules by defining a separate ESM entry point. This updates stripe-node to be a [dual CommonJS / ES module package](https://nodejs.org/api/packages.html#dual-commonjses-module-packages).
|
|
16
27
|
* [#1704](https://github.com/stripe/stripe-node/pull/1704) Configure 2 TypeScript compile targets for ESM and CJS
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
11.
|
|
1
|
+
11.16.0
|
package/cjs/ResourceNamespace.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
// ResourceNamespace allows you to create nested resources, i.e. `stripe.issuing.cards`.
|
|
2
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
4
|
exports.resourceNamespace = void 0;
|
|
4
|
-
// ResourceNamespace allows you to create nested resources, i.e. `stripe.issuing.cards`.
|
|
5
5
|
// It also works recursively, so you could do i.e. `stripe.billing.invoicing.pay`.
|
|
6
6
|
function ResourceNamespace(stripe, resources) {
|
|
7
7
|
for (const name in resources) {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Calculations = void 0;
|
|
5
|
+
const StripeResource_js_1 = require("../../StripeResource.js");
|
|
6
|
+
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
|
7
|
+
exports.Calculations = StripeResource_js_1.StripeResource.extend({
|
|
8
|
+
create: stripeMethod({
|
|
9
|
+
method: 'POST',
|
|
10
|
+
fullPath: '/v1/tax/calculations',
|
|
11
|
+
}),
|
|
12
|
+
listLineItems: stripeMethod({
|
|
13
|
+
method: 'GET',
|
|
14
|
+
fullPath: '/v1/tax/calculations/{calculation}/line_items',
|
|
15
|
+
methodType: 'list',
|
|
16
|
+
}),
|
|
17
|
+
});
|
|
@@ -0,0 +1,29 @@
|
|
|
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/tax/transactions',
|
|
11
|
+
}),
|
|
12
|
+
retrieve: stripeMethod({
|
|
13
|
+
method: 'GET',
|
|
14
|
+
fullPath: '/v1/tax/transactions/{transaction}',
|
|
15
|
+
}),
|
|
16
|
+
createFromCalculation: stripeMethod({
|
|
17
|
+
method: 'POST',
|
|
18
|
+
fullPath: '/v1/tax/transactions/create_from_calculation',
|
|
19
|
+
}),
|
|
20
|
+
createReversal: stripeMethod({
|
|
21
|
+
method: 'POST',
|
|
22
|
+
fullPath: '/v1/tax/transactions/create_reversal',
|
|
23
|
+
}),
|
|
24
|
+
listLineItems: stripeMethod({
|
|
25
|
+
method: 'GET',
|
|
26
|
+
fullPath: '/v1/tax/transactions/{transaction}/line_items',
|
|
27
|
+
methodType: 'list',
|
|
28
|
+
}),
|
|
29
|
+
});
|
package/cjs/resources.js
CHANGED
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
// File generated from our OpenAPI spec
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.FinancialConnections = exports.Checkout = exports.BillingPortal = exports.Apps = exports.WebhookEndpoints = exports.Transfers = exports.Topups = exports.Tokens = exports.TaxRates = exports.TaxCodes = exports.SubscriptionSchedules = exports.SubscriptionItems = exports.Subscriptions = exports.Sources = exports.ShippingRates = exports.SetupIntents = exports.SetupAttempts = exports.Reviews = exports.Refunds = exports.Quotes = exports.PromotionCodes = exports.Products = exports.Prices = exports.Plans = exports.Payouts = exports.PaymentMethods = exports.PaymentLinks = exports.PaymentIntents = exports.Mandates = exports.InvoiceItems = exports.Invoices = exports.FileLinks = exports.Files = exports.ExchangeRates = exports.Events = exports.EphemeralKeys = exports.Disputes = exports.Customers = exports.CreditNotes = exports.Coupons = exports.CountrySpecs = exports.Charges = exports.BalanceTransactions = exports.Balance = exports.ApplicationFees = exports.ApplePayDomains = exports.AccountLinks = exports.Accounts = exports.OAuth = exports.Account = void 0;
|
|
5
|
-
exports.Treasury = exports.TestHelpers = exports.Terminal = exports.Sigma = exports.Reporting = exports.Radar = exports.Issuing = exports.Identity = void 0;
|
|
5
|
+
exports.Treasury = exports.TestHelpers = exports.Terminal = exports.Tax = exports.Sigma = exports.Reporting = exports.Radar = exports.Issuing = exports.Identity = void 0;
|
|
6
6
|
const ResourceNamespace_js_1 = require("./ResourceNamespace.js");
|
|
7
7
|
const Accounts_js_1 = require("./resources/FinancialConnections/Accounts.js");
|
|
8
8
|
const Authorizations_js_1 = require("./resources/Issuing/Authorizations.js");
|
|
9
|
+
const Calculations_js_1 = require("./resources/Tax/Calculations.js");
|
|
9
10
|
const Cardholders_js_1 = require("./resources/Issuing/Cardholders.js");
|
|
10
11
|
const Cards_js_1 = require("./resources/TestHelpers/Issuing/Cards.js");
|
|
11
12
|
const Cards_js_2 = require("./resources/Issuing/Cards.js");
|
|
@@ -42,7 +43,8 @@ const Sessions_js_3 = require("./resources/FinancialConnections/Sessions.js");
|
|
|
42
43
|
const TestClocks_js_1 = require("./resources/TestHelpers/TestClocks.js");
|
|
43
44
|
const TransactionEntries_js_1 = require("./resources/Treasury/TransactionEntries.js");
|
|
44
45
|
const Transactions_js_1 = require("./resources/Issuing/Transactions.js");
|
|
45
|
-
const Transactions_js_2 = require("./resources/
|
|
46
|
+
const Transactions_js_2 = require("./resources/Tax/Transactions.js");
|
|
47
|
+
const Transactions_js_3 = require("./resources/Treasury/Transactions.js");
|
|
46
48
|
const ValueListItems_js_1 = require("./resources/Radar/ValueListItems.js");
|
|
47
49
|
const ValueLists_js_1 = require("./resources/Radar/ValueLists.js");
|
|
48
50
|
const VerificationReports_js_1 = require("./resources/Identity/VerificationReports.js");
|
|
@@ -174,6 +176,10 @@ exports.Reporting = (0, ResourceNamespace_js_1.resourceNamespace)('reporting', {
|
|
|
174
176
|
exports.Sigma = (0, ResourceNamespace_js_1.resourceNamespace)('sigma', {
|
|
175
177
|
ScheduledQueryRuns: ScheduledQueryRuns_js_1.ScheduledQueryRuns,
|
|
176
178
|
});
|
|
179
|
+
exports.Tax = (0, ResourceNamespace_js_1.resourceNamespace)('tax', {
|
|
180
|
+
Calculations: Calculations_js_1.Calculations,
|
|
181
|
+
Transactions: Transactions_js_2.Transactions,
|
|
182
|
+
});
|
|
177
183
|
exports.Terminal = (0, ResourceNamespace_js_1.resourceNamespace)('terminal', {
|
|
178
184
|
Configurations: Configurations_js_2.Configurations,
|
|
179
185
|
ConnectionTokens: ConnectionTokens_js_1.ConnectionTokens,
|
|
@@ -206,5 +212,5 @@ exports.Treasury = (0, ResourceNamespace_js_1.resourceNamespace)('treasury', {
|
|
|
206
212
|
ReceivedCredits: ReceivedCredits_js_2.ReceivedCredits,
|
|
207
213
|
ReceivedDebits: ReceivedDebits_js_2.ReceivedDebits,
|
|
208
214
|
TransactionEntries: TransactionEntries_js_1.TransactionEntries,
|
|
209
|
-
Transactions:
|
|
215
|
+
Transactions: Transactions_js_3.Transactions,
|
|
210
216
|
});
|
package/cjs/stripe.core.js
CHANGED
|
@@ -33,7 +33,7 @@ const ALLOWED_CONFIG_PROPERTIES = [
|
|
|
33
33
|
];
|
|
34
34
|
const defaultRequestSenderFactory = (stripe) => new RequestSender_js_1.RequestSender(stripe, StripeResource_js_1.StripeResource.MAX_BUFFERED_REQUEST_METRICS);
|
|
35
35
|
function createStripe(platformFunctions, requestSender = defaultRequestSenderFactory) {
|
|
36
|
-
Stripe.PACKAGE_VERSION = '11.
|
|
36
|
+
Stripe.PACKAGE_VERSION = '11.16.0';
|
|
37
37
|
Stripe.USER_AGENT = Object.assign({ bindings_version: Stripe.PACKAGE_VERSION, lang: 'node', publisher: 'stripe', uname: null, typescript: false }, (0, utils_js_1.determineProcessUserAgentProperties)());
|
|
38
38
|
Stripe.StripeResource = StripeResource_js_1.StripeResource;
|
|
39
39
|
Stripe.resources = resources;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as http from 'http';
|
|
2
2
|
import * as https from 'https';
|
|
3
|
-
import { HttpClient, HttpClientResponse } from './HttpClient.js';
|
|
3
|
+
import { HttpClient, HttpClientResponse, } from './HttpClient.js';
|
|
4
4
|
const defaultHttpAgent = new http.Agent({ keepAlive: true });
|
|
5
5
|
const defaultHttpsAgent = new https.Agent({ keepAlive: true });
|
|
6
6
|
/**
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec
|
|
2
|
+
import { StripeResource } from '../../StripeResource.js';
|
|
3
|
+
const stripeMethod = StripeResource.method;
|
|
4
|
+
export const Calculations = StripeResource.extend({
|
|
5
|
+
create: stripeMethod({
|
|
6
|
+
method: 'POST',
|
|
7
|
+
fullPath: '/v1/tax/calculations',
|
|
8
|
+
}),
|
|
9
|
+
listLineItems: stripeMethod({
|
|
10
|
+
method: 'GET',
|
|
11
|
+
fullPath: '/v1/tax/calculations/{calculation}/line_items',
|
|
12
|
+
methodType: 'list',
|
|
13
|
+
}),
|
|
14
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec
|
|
2
|
+
import { StripeResource } from '../../StripeResource.js';
|
|
3
|
+
const stripeMethod = StripeResource.method;
|
|
4
|
+
export const Transactions = StripeResource.extend({
|
|
5
|
+
create: stripeMethod({
|
|
6
|
+
method: 'POST',
|
|
7
|
+
fullPath: '/v1/tax/transactions',
|
|
8
|
+
}),
|
|
9
|
+
retrieve: stripeMethod({
|
|
10
|
+
method: 'GET',
|
|
11
|
+
fullPath: '/v1/tax/transactions/{transaction}',
|
|
12
|
+
}),
|
|
13
|
+
createFromCalculation: stripeMethod({
|
|
14
|
+
method: 'POST',
|
|
15
|
+
fullPath: '/v1/tax/transactions/create_from_calculation',
|
|
16
|
+
}),
|
|
17
|
+
createReversal: stripeMethod({
|
|
18
|
+
method: 'POST',
|
|
19
|
+
fullPath: '/v1/tax/transactions/create_reversal',
|
|
20
|
+
}),
|
|
21
|
+
listLineItems: stripeMethod({
|
|
22
|
+
method: 'GET',
|
|
23
|
+
fullPath: '/v1/tax/transactions/{transaction}/line_items',
|
|
24
|
+
methodType: 'list',
|
|
25
|
+
}),
|
|
26
|
+
});
|
package/esm/resources.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { resourceNamespace } from './ResourceNamespace.js';
|
|
3
3
|
import { Accounts as FinancialConnectionsAccounts } from './resources/FinancialConnections/Accounts.js';
|
|
4
4
|
import { Authorizations as IssuingAuthorizations } from './resources/Issuing/Authorizations.js';
|
|
5
|
+
import { Calculations as TaxCalculations } from './resources/Tax/Calculations.js';
|
|
5
6
|
import { Cardholders as IssuingCardholders } from './resources/Issuing/Cardholders.js';
|
|
6
7
|
import { Cards as TestHelpersIssuingCards } from './resources/TestHelpers/Issuing/Cards.js';
|
|
7
8
|
import { Cards as IssuingCards } from './resources/Issuing/Cards.js';
|
|
@@ -38,6 +39,7 @@ import { Sessions as FinancialConnectionsSessions } from './resources/FinancialC
|
|
|
38
39
|
import { TestClocks as TestHelpersTestClocks } from './resources/TestHelpers/TestClocks.js';
|
|
39
40
|
import { TransactionEntries as TreasuryTransactionEntries } from './resources/Treasury/TransactionEntries.js';
|
|
40
41
|
import { Transactions as IssuingTransactions } from './resources/Issuing/Transactions.js';
|
|
42
|
+
import { Transactions as TaxTransactions } from './resources/Tax/Transactions.js';
|
|
41
43
|
import { Transactions as TreasuryTransactions } from './resources/Treasury/Transactions.js';
|
|
42
44
|
import { ValueListItems as RadarValueListItems } from './resources/Radar/ValueListItems.js';
|
|
43
45
|
import { ValueLists as RadarValueLists } from './resources/Radar/ValueLists.js';
|
|
@@ -124,6 +126,10 @@ export const Reporting = resourceNamespace('reporting', {
|
|
|
124
126
|
export const Sigma = resourceNamespace('sigma', {
|
|
125
127
|
ScheduledQueryRuns: SigmaScheduledQueryRuns,
|
|
126
128
|
});
|
|
129
|
+
export const Tax = resourceNamespace('tax', {
|
|
130
|
+
Calculations: TaxCalculations,
|
|
131
|
+
Transactions: TaxTransactions,
|
|
132
|
+
});
|
|
127
133
|
export const Terminal = resourceNamespace('terminal', {
|
|
128
134
|
Configurations: TerminalConfigurations,
|
|
129
135
|
ConnectionTokens: TerminalConnectionTokens,
|
package/esm/stripe.core.js
CHANGED
|
@@ -30,7 +30,7 @@ const ALLOWED_CONFIG_PROPERTIES = [
|
|
|
30
30
|
];
|
|
31
31
|
const defaultRequestSenderFactory = (stripe) => new RequestSender(stripe, StripeResource.MAX_BUFFERED_REQUEST_METRICS);
|
|
32
32
|
export function createStripe(platformFunctions, requestSender = defaultRequestSenderFactory) {
|
|
33
|
-
Stripe.PACKAGE_VERSION = '11.
|
|
33
|
+
Stripe.PACKAGE_VERSION = '11.16.0';
|
|
34
34
|
Stripe.USER_AGENT = Object.assign({ bindings_version: Stripe.PACKAGE_VERSION, lang: 'node', publisher: 'stripe', uname: null, typescript: false }, determineProcessUserAgentProperties());
|
|
35
35
|
Stripe.StripeResource = StripeResource;
|
|
36
36
|
Stripe.resources = resources;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stripe",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.16.0",
|
|
4
4
|
"description": "Stripe API wrapper",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"stripe",
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"eslint": "^7.32.0",
|
|
40
40
|
"eslint-config-prettier": "^8.5.0",
|
|
41
41
|
"eslint-plugin-chai-friendly": "^0.7.2",
|
|
42
|
+
"eslint-plugin-import": "^2.27.5",
|
|
42
43
|
"eslint-plugin-prettier": "^3.4.1",
|
|
43
44
|
"mocha": "^8.4.0",
|
|
44
45
|
"mocha-junit-reporter": "^2.1.0",
|
|
@@ -79,6 +80,10 @@
|
|
|
79
80
|
"import": "./esm/stripe.esm.worker.js",
|
|
80
81
|
"require": "./cjs/stripe.cjs.worker.js"
|
|
81
82
|
},
|
|
83
|
+
"deno": {
|
|
84
|
+
"import": "./esm/stripe.esm.worker.js",
|
|
85
|
+
"require": "./cjs/stripe.cjs.worker.js"
|
|
86
|
+
},
|
|
82
87
|
"worker": {
|
|
83
88
|
"import": "./esm/stripe.esm.worker.js",
|
|
84
89
|
"require": "./cjs/stripe.cjs.worker.js"
|
|
@@ -89,6 +89,11 @@ declare module 'stripe' {
|
|
|
89
89
|
*/
|
|
90
90
|
currency: string | null;
|
|
91
91
|
|
|
92
|
+
/**
|
|
93
|
+
* Currency conversion details for automatic currency conversion sessions
|
|
94
|
+
*/
|
|
95
|
+
currency_conversion?: Session.CurrencyConversion | null;
|
|
96
|
+
|
|
92
97
|
/**
|
|
93
98
|
* Collect additional information from your customer using custom fields. Up to 2 fields are supported.
|
|
94
99
|
*/
|
|
@@ -355,6 +360,28 @@ declare module 'stripe' {
|
|
|
355
360
|
type TermsOfService = 'none' | 'required';
|
|
356
361
|
}
|
|
357
362
|
|
|
363
|
+
interface CurrencyConversion {
|
|
364
|
+
/**
|
|
365
|
+
* Total of all items in source currency before discounts or taxes are applied.
|
|
366
|
+
*/
|
|
367
|
+
amount_subtotal: number;
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* Total of all items in source currency after discounts and taxes are applied.
|
|
371
|
+
*/
|
|
372
|
+
amount_total: number;
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* Exchange rate used to convert source currency amounts to customer currency amounts
|
|
376
|
+
*/
|
|
377
|
+
fx_rate: string;
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* Creation currency of the CheckoutSession before localization
|
|
381
|
+
*/
|
|
382
|
+
source_currency: string;
|
|
383
|
+
}
|
|
384
|
+
|
|
358
385
|
type CustomerCreation = 'always' | 'if_required';
|
|
359
386
|
|
|
360
387
|
interface CustomerDetails {
|
package/types/Disputes.d.ts
CHANGED
|
@@ -227,7 +227,7 @@ declare module 'stripe' {
|
|
|
227
227
|
|
|
228
228
|
interface EvidenceDetails {
|
|
229
229
|
/**
|
|
230
|
-
* Date by which evidence must be submitted in order to successfully challenge dispute. Will be
|
|
230
|
+
* Date by which evidence must be submitted in order to successfully challenge dispute. Will be 0 if the customer's bank or credit card company doesn't allow a response for this particular dispute.
|
|
231
231
|
*/
|
|
232
232
|
due_by: number | null;
|
|
233
233
|
|
package/types/PaymentLinks.d.ts
CHANGED
|
@@ -457,6 +457,7 @@ declare module 'stripe' {
|
|
|
457
457
|
| 'ideal'
|
|
458
458
|
| 'klarna'
|
|
459
459
|
| 'konbini'
|
|
460
|
+
| 'link'
|
|
460
461
|
| 'oxxo'
|
|
461
462
|
| 'p24'
|
|
462
463
|
| 'paynow'
|
|
@@ -1129,6 +1130,7 @@ declare module 'stripe' {
|
|
|
1129
1130
|
| 'ideal'
|
|
1130
1131
|
| 'klarna'
|
|
1131
1132
|
| 'konbini'
|
|
1133
|
+
| 'link'
|
|
1132
1134
|
| 'oxxo'
|
|
1133
1135
|
| 'p24'
|
|
1134
1136
|
| 'paynow'
|
package/types/SetupIntents.d.ts
CHANGED
|
@@ -49,6 +49,11 @@ declare module 'stripe' {
|
|
|
49
49
|
*/
|
|
50
50
|
attach_to_self?: boolean;
|
|
51
51
|
|
|
52
|
+
/**
|
|
53
|
+
* Settings for automatic payment methods compatible with this Setup Intent
|
|
54
|
+
*/
|
|
55
|
+
automatic_payment_methods: SetupIntent.AutomaticPaymentMethods | null;
|
|
56
|
+
|
|
52
57
|
/**
|
|
53
58
|
* Reason for cancellation of this SetupIntent, one of `abandoned`, `requested_by_customer`, or `duplicate`.
|
|
54
59
|
*/
|
|
@@ -154,6 +159,13 @@ declare module 'stripe' {
|
|
|
154
159
|
}
|
|
155
160
|
|
|
156
161
|
namespace SetupIntent {
|
|
162
|
+
interface AutomaticPaymentMethods {
|
|
163
|
+
/**
|
|
164
|
+
* Automatically calculates compatible payment methods
|
|
165
|
+
*/
|
|
166
|
+
enabled: boolean | null;
|
|
167
|
+
}
|
|
168
|
+
|
|
157
169
|
type CancellationReason =
|
|
158
170
|
| 'abandoned'
|
|
159
171
|
| 'duplicate'
|
|
@@ -10,6 +10,11 @@ declare module 'stripe' {
|
|
|
10
10
|
*/
|
|
11
11
|
attach_to_self?: boolean;
|
|
12
12
|
|
|
13
|
+
/**
|
|
14
|
+
* When enabled, this SetupIntent will accept payment methods that you have enabled in the Dashboard and are compatible with this SetupIntent's other parameters.
|
|
15
|
+
*/
|
|
16
|
+
automatic_payment_methods?: SetupIntentCreateParams.AutomaticPaymentMethods;
|
|
17
|
+
|
|
13
18
|
/**
|
|
14
19
|
* Set to `true` to attempt to confirm this SetupIntent immediately. This parameter defaults to `false`. If the payment method attached is a card, a return_url may be provided in case additional authentication is required.
|
|
15
20
|
*/
|
|
@@ -92,6 +97,13 @@ declare module 'stripe' {
|
|
|
92
97
|
}
|
|
93
98
|
|
|
94
99
|
namespace SetupIntentCreateParams {
|
|
100
|
+
interface AutomaticPaymentMethods {
|
|
101
|
+
/**
|
|
102
|
+
* Whether this feature is enabled.
|
|
103
|
+
*/
|
|
104
|
+
enabled: boolean;
|
|
105
|
+
}
|
|
106
|
+
|
|
95
107
|
type FlowDirection = 'inbound' | 'outbound';
|
|
96
108
|
|
|
97
109
|
interface MandateData {
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec
|
|
2
|
+
|
|
3
|
+
declare module 'stripe' {
|
|
4
|
+
namespace Stripe {
|
|
5
|
+
namespace Tax {
|
|
6
|
+
/**
|
|
7
|
+
* The CalculationLineItem object.
|
|
8
|
+
*/
|
|
9
|
+
interface CalculationLineItem {
|
|
10
|
+
/**
|
|
11
|
+
* Unique identifier for the object.
|
|
12
|
+
*/
|
|
13
|
+
id: string;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* String representing the object's type. Objects of the same type share the same value.
|
|
17
|
+
*/
|
|
18
|
+
object: 'tax.calculation_line_item';
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* The line item amount in integer cents. If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount.
|
|
22
|
+
*/
|
|
23
|
+
amount: number;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* The amount of tax calculated for this line item, in integer cents.
|
|
27
|
+
*/
|
|
28
|
+
amount_tax: number;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
|
32
|
+
*/
|
|
33
|
+
livemode: boolean;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* A Product ID.
|
|
37
|
+
*/
|
|
38
|
+
product: string | null;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* The number of units of the item being purchased. For reversals, this is the quantity reversed.
|
|
42
|
+
*/
|
|
43
|
+
quantity: number;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* A custom identifier for this line item.
|
|
47
|
+
*/
|
|
48
|
+
reference: string | null;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes.
|
|
52
|
+
*/
|
|
53
|
+
tax_behavior: CalculationLineItem.TaxBehavior;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Detailed account of taxes relevant to this line item.
|
|
57
|
+
*/
|
|
58
|
+
tax_breakdown: Array<CalculationLineItem.TaxBreakdown> | null;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for this resource.
|
|
62
|
+
*/
|
|
63
|
+
tax_code: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
namespace CalculationLineItem {
|
|
67
|
+
type TaxBehavior = 'exclusive' | 'inclusive';
|
|
68
|
+
|
|
69
|
+
interface TaxBreakdown {
|
|
70
|
+
/**
|
|
71
|
+
* The amount of tax, in integer cents.
|
|
72
|
+
*/
|
|
73
|
+
amount: number;
|
|
74
|
+
|
|
75
|
+
jurisdiction: TaxBreakdown.Jurisdiction;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Indicates whether the jurisdiction was determined by the origin (merchant's address) or destination (customer's address).
|
|
79
|
+
*/
|
|
80
|
+
sourcing: TaxBreakdown.Sourcing;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Details regarding the rate for this tax. This field will be `null` when the tax is not imposed, for example if the product is exempt from tax.
|
|
84
|
+
*/
|
|
85
|
+
tax_rate_details: TaxBreakdown.TaxRateDetails | null;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
|
|
89
|
+
*/
|
|
90
|
+
taxability_reason: TaxBreakdown.TaxabilityReason;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* The amount on which tax is calculated, in integer cents.
|
|
94
|
+
*/
|
|
95
|
+
taxable_amount: number;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
namespace TaxBreakdown {
|
|
99
|
+
interface Jurisdiction {
|
|
100
|
+
/**
|
|
101
|
+
* Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
|
102
|
+
*/
|
|
103
|
+
country: string;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* A human-readable name for the jurisdiction imposing the tax.
|
|
107
|
+
*/
|
|
108
|
+
display_name: string;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Indicates the level of the jurisdiction imposing the tax.
|
|
112
|
+
*/
|
|
113
|
+
level: Jurisdiction.Level;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States.
|
|
117
|
+
*/
|
|
118
|
+
state: string | null;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
namespace Jurisdiction {
|
|
122
|
+
type Level = 'city' | 'country' | 'county' | 'district' | 'state';
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
type Sourcing = 'destination' | 'origin';
|
|
126
|
+
|
|
127
|
+
type TaxabilityReason =
|
|
128
|
+
| 'customer_exempt'
|
|
129
|
+
| 'not_collecting'
|
|
130
|
+
| 'not_subject_to_tax'
|
|
131
|
+
| 'not_supported'
|
|
132
|
+
| 'portion_product_exempt'
|
|
133
|
+
| 'portion_reduced_rated'
|
|
134
|
+
| 'portion_standard_rated'
|
|
135
|
+
| 'product_exempt'
|
|
136
|
+
| 'product_exempt_holiday'
|
|
137
|
+
| 'proportionally_rated'
|
|
138
|
+
| 'reduced_rated'
|
|
139
|
+
| 'reverse_charge'
|
|
140
|
+
| 'standard_rated'
|
|
141
|
+
| 'taxable_basis_reduced'
|
|
142
|
+
| 'zero_rated';
|
|
143
|
+
|
|
144
|
+
interface TaxRateDetails {
|
|
145
|
+
/**
|
|
146
|
+
* A localized display name for tax type, intended to be human-readable. For example, "Local Sales and Use Tax", "Value-added tax (VAT)", or "Umsatzsteuer (USt.)".
|
|
147
|
+
*/
|
|
148
|
+
display_name: string;
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* The tax rate percentage as a string. For example, 8.5% is represented as "8.5".
|
|
152
|
+
*/
|
|
153
|
+
percentage_decimal: string;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* The tax type, such as `vat` or `sales_tax`.
|
|
157
|
+
*/
|
|
158
|
+
tax_type: TaxRateDetails.TaxType;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
namespace TaxRateDetails {
|
|
162
|
+
type TaxType =
|
|
163
|
+
| 'gst'
|
|
164
|
+
| 'hst'
|
|
165
|
+
| 'igst'
|
|
166
|
+
| 'jct'
|
|
167
|
+
| 'lease_tax'
|
|
168
|
+
| 'pst'
|
|
169
|
+
| 'qst'
|
|
170
|
+
| 'rst'
|
|
171
|
+
| 'sales_tax'
|
|
172
|
+
| 'vat';
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|