stripe 8.222.0 → 9.2.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 +38 -0
- package/VERSION +1 -1
- package/lib/StripeResource.js +10 -2
- package/lib/net/HttpClient.js +1 -0
- package/lib/resources/Customers.js +5 -0
- package/lib/resources/FinancialConnections/Accounts.js +12 -0
- package/lib/resources/Orders.js +15 -4
- package/lib/resources/TestHelpers/Treasury/InboundTransfers.js +25 -0
- package/lib/resources/TestHelpers/Treasury/OutboundPayments.js +25 -0
- package/lib/resources/TestHelpers/Treasury/OutboundTransfers.js +25 -0
- package/lib/resources/TestHelpers/Treasury/ReceivedCredits.js +15 -0
- package/lib/resources/TestHelpers/Treasury/ReceivedDebits.js +15 -0
- package/lib/resources/Treasury/CreditReversals.js +26 -0
- package/lib/resources/Treasury/DebitReversals.js +26 -0
- package/lib/resources/Treasury/FinancialAccounts.js +41 -0
- package/lib/resources/Treasury/InboundTransfers.js +31 -0
- package/lib/resources/Treasury/OutboundPayments.js +31 -0
- package/lib/resources/Treasury/OutboundTransfers.js +31 -0
- package/lib/resources/Treasury/ReceivedCredits.js +21 -0
- package/lib/resources/Treasury/ReceivedDebits.js +21 -0
- package/lib/resources/Treasury/TransactionEntries.js +21 -0
- package/lib/resources/{OrderReturns.js → Treasury/Transactions.js} +2 -2
- package/lib/resources.js +19 -1
- package/package.json +1 -1
- package/types/2020-08-27/Accounts.d.ts +5 -5
- package/types/2020-08-27/BillingPortal/Configurations.d.ts +1 -1
- package/types/2020-08-27/BillingPortal/Sessions.d.ts +1 -1
- package/types/2020-08-27/Charges.d.ts +1 -6
- package/types/2020-08-27/Checkout/Sessions.d.ts +52 -4
- package/types/2020-08-27/Customers.d.ts +23 -1
- package/types/2020-08-27/Discounts.d.ts +4 -4
- package/types/2020-08-27/FinancialConnections/Accounts.d.ts +63 -0
- package/types/2020-08-27/Invoices.d.ts +1 -1
- package/types/2020-08-27/Issuing/Authorizations.d.ts +22 -0
- package/types/2020-08-27/Issuing/Cards.d.ts +7 -0
- package/types/2020-08-27/Issuing/Disputes.d.ts +29 -0
- package/types/2020-08-27/Issuing/Transactions.d.ts +17 -0
- package/types/2020-08-27/LineItems.d.ts +19 -3
- package/types/2020-08-27/Orders.d.ts +2690 -309
- package/types/2020-08-27/PaymentIntents.d.ts +51 -3
- package/types/2020-08-27/PaymentLinks.d.ts +167 -0
- package/types/2020-08-27/PaymentMethods.d.ts +21 -0
- package/types/2020-08-27/PromotionCodes.d.ts +2 -2
- package/types/2020-08-27/Quotes.d.ts +6 -9
- package/types/2020-08-27/Refunds.d.ts +1 -1
- package/types/2020-08-27/SetupIntents.d.ts +64 -0
- package/types/2020-08-27/Sources.d.ts +1 -1
- package/types/2020-08-27/SubscriptionSchedules.d.ts +15 -0
- package/types/2020-08-27/Subscriptions.d.ts +38 -2
- package/types/2020-08-27/Terminal/Configurations.d.ts +63 -0
- package/types/2020-08-27/TestHelpers/Treasury/InboundTransfers.d.ts +108 -0
- package/types/2020-08-27/TestHelpers/Treasury/OutboundPayments.d.ts +105 -0
- package/types/2020-08-27/TestHelpers/Treasury/OutboundTransfers.d.ts +105 -0
- package/types/2020-08-27/TestHelpers/Treasury/ReceivedCredits.d.ts +93 -0
- package/types/2020-08-27/TestHelpers/Treasury/ReceivedDebits.d.ts +91 -0
- package/types/2020-08-27/Tokens.d.ts +2 -2
- package/types/2020-08-27/Treasury/CreditReversals.d.ts +168 -0
- package/types/2020-08-27/Treasury/DebitReversals.d.ts +187 -0
- package/types/2020-08-27/Treasury/FinancialAccountFeatures.d.ts +622 -0
- package/types/2020-08-27/Treasury/FinancialAccounts.d.ts +833 -0
- package/types/2020-08-27/Treasury/InboundTransfers.d.ts +349 -0
- package/types/2020-08-27/Treasury/OutboundPayments.d.ts +550 -0
- package/types/2020-08-27/Treasury/OutboundTransfers.d.ts +385 -0
- package/types/2020-08-27/Treasury/ReceivedCredits.d.ts +303 -0
- package/types/2020-08-27/Treasury/ReceivedDebits.d.ts +231 -0
- package/types/2020-08-27/Treasury/TransactionEntries.d.ts +257 -0
- package/types/2020-08-27/Treasury/Transactions.d.ts +268 -0
- package/types/2020-08-27/WebhookEndpoints.d.ts +62 -8
- package/types/2020-08-27/index.d.ts +35 -3
- package/types/2020-08-27/OrderItems.d.ts +0 -45
- package/types/2020-08-27/OrderReturns.d.ts +0 -103
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,43 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
## 9.2.0 - 2022-05-19
|
|
4
|
+
* [#1422](https://github.com/stripe/stripe-node/pull/1422) API Updates
|
|
5
|
+
* Add support for new `Treasury` APIs: `CreditReversal`, `DebitReversal`, `FinancialAccountFeatures`, `FinancialAccount`, `FlowDetails`, `InboundTransfer`, `OutboundPayment`, `OutboundTransfer`, `ReceivedCredit`, `ReceivedDebit`, `TransactionEntry`, and `Transaction`
|
|
6
|
+
* Add support for `treasury` on `Issuing.Authorization`, `Issuing.Dispute`, `Issuing.Transaction`, and `IssuingDisputeCreateParams`
|
|
7
|
+
* Add support for `retrieve_payment_method` method on resource `Customer`
|
|
8
|
+
* Add support for `list_owners` and `list` methods on resource `FinancialConnections.Account`
|
|
9
|
+
* Change `BillingPortalConfigurationCreateParams.features.customer_update.allowed_updates` to be optional
|
|
10
|
+
* Change type of `BillingPortal.Session.return_url` from `string` to `nullable(string)`
|
|
11
|
+
* Add support for `afterpay_clearpay`, `au_becs_debit`, `bacs_debit`, `eps`, `fpx`, `giropay`, `grabpay`, `klarna`, `paynow`, and `sepa_debit` on `Checkout.Session.payment_method_options`
|
|
12
|
+
* Add support for `financial_account` on `Issuing.Card` and `IssuingCardCreateParams`
|
|
13
|
+
* Add support for `client_secret` on `Order`
|
|
14
|
+
* Add support for `networks` on `PaymentIntentConfirmParams.payment_method_options.us_bank_account`, `PaymentIntentCreateParams.payment_method_options.us_bank_account`, `PaymentIntentUpdateParams.payment_method_options.us_bank_account`, `PaymentMethod.us_bank_account`, `SetupIntentConfirmParams.payment_method_options.us_bank_account`, `SetupIntentCreateParams.payment_method_options.us_bank_account`, and `SetupIntentUpdateParams.payment_method_options.us_bank_account`
|
|
15
|
+
* Add support for `attach_to_self` and `flow_directions` on `SetupIntent`
|
|
16
|
+
* Add support for `save_default_payment_method` on `Subscription.payment_settings`, `SubscriptionCreateParams.payment_settings`, and `SubscriptionUpdateParams.payment_settings`
|
|
17
|
+
* Add support for `czk` on `Terminal.Configuration.tipping`, `TerminalConfigurationCreateParams.tipping`, and `TerminalConfigurationUpdateParams.tipping`
|
|
18
|
+
|
|
19
|
+
## 9.1.0 - 2022-05-11
|
|
20
|
+
* [#1420](https://github.com/stripe/stripe-node/pull/1420) API Updates
|
|
21
|
+
* Add support for `description` on `CheckoutSessionCreateParams.subscription_data`, `SubscriptionCreateParams`, `SubscriptionUpdateParams`, and `Subscription`
|
|
22
|
+
* Add support for `consent_collection`, `payment_intent_data`, `shipping_options`, `submit_type`, and `tax_id_collection` on `PaymentLinkCreateParams` and `PaymentLink`
|
|
23
|
+
* Add support for `customer_creation` on `PaymentLinkCreateParams`, `PaymentLinkUpdateParams`, and `PaymentLink`
|
|
24
|
+
* Add support for `metadata` on `SubscriptionSchedule.phases[]`, `SubscriptionScheduleCreateParams.phases[]`, and `SubscriptionScheduleUpdateParams.phases[]`
|
|
25
|
+
* Add support for new value `billing_portal.session.created` on enums `WebhookEndpointCreateParams.enabled_events[]` and `WebhookEndpointUpdateParams.enabled_events[]`
|
|
26
|
+
|
|
27
|
+
## 9.0.0 - 2022-05-09
|
|
28
|
+
Major version release - The [migration guide](https://github.com/stripe/stripe-node/wiki/Migration-Guide-for-v9) contains a detailed list of backwards-incompatible changes with upgrade instructions.
|
|
29
|
+
(⚠️ = breaking changes):
|
|
30
|
+
* ⚠️[#1336](https://github.com/stripe/stripe-node/pull/1336) feat(http-client): retry closed connection errors
|
|
31
|
+
* [#1415](https://github.com/stripe/stripe-node/pull/1415) [#1417](https://github.com/stripe/stripe-node/pull/1417) API Updates
|
|
32
|
+
* ⚠️ Replace the legacy `Order` API with the new `Order` API.
|
|
33
|
+
* Resource modified: `Order`.
|
|
34
|
+
* New methods: `cancel`, `list_line_items`, `reopen`, and `submit`
|
|
35
|
+
* Removed methods: `pay` and `return_order`
|
|
36
|
+
* Removed resources: `OrderItem` and `OrderReturn`
|
|
37
|
+
* Removed references from other resources: `Charge.order`
|
|
38
|
+
* Add support for `amount_discount`, `amount_tax`, and `product` on `LineItem`
|
|
39
|
+
* Change type of `Charge.shipping.name`, `Checkout.Session.shipping.name`, `Customer.shipping.name`, `Invoice.customer_shipping.name`, `PaymentIntent.shipping.name`, `ShippingDetails.name`, and `Source.source_order.shipping.name` from `nullable(string)` to `string`
|
|
40
|
+
|
|
3
41
|
## 8.222.0 - 2022-05-05
|
|
4
42
|
* [#1414](https://github.com/stripe/stripe-node/pull/1414) API Updates
|
|
5
43
|
* Add support for `default_price_data` on `ProductCreateParams`
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
9.2.0
|
package/lib/StripeResource.js
CHANGED
|
@@ -273,7 +273,15 @@ StripeResource.prototype = {
|
|
|
273
273
|
},
|
|
274
274
|
|
|
275
275
|
// For more on when and how to retry API requests, see https://stripe.com/docs/error-handling#safely-retrying-requests-with-idempotency
|
|
276
|
-
_shouldRetry(res, numRetries, maxRetries) {
|
|
276
|
+
_shouldRetry(res, numRetries, maxRetries, error) {
|
|
277
|
+
if (
|
|
278
|
+
error &&
|
|
279
|
+
numRetries === 0 &&
|
|
280
|
+
HttpClient.CONNECTION_CLOSED_ERROR_CODES.includes(error.code)
|
|
281
|
+
) {
|
|
282
|
+
return true;
|
|
283
|
+
}
|
|
284
|
+
|
|
277
285
|
// Do not retry if we are out of retries.
|
|
278
286
|
if (numRetries >= maxRetries) {
|
|
279
287
|
return false;
|
|
@@ -529,7 +537,7 @@ StripeResource.prototype = {
|
|
|
529
537
|
}
|
|
530
538
|
})
|
|
531
539
|
.catch((error) => {
|
|
532
|
-
if (this._shouldRetry(null, requestRetries, maxRetries)) {
|
|
540
|
+
if (this._shouldRetry(null, requestRetries, maxRetries, error)) {
|
|
533
541
|
return retryRequest(
|
|
534
542
|
makeRequest,
|
|
535
543
|
apiVersion,
|
package/lib/net/HttpClient.js
CHANGED
|
@@ -50,6 +50,11 @@ module.exports = StripeResource.extend({
|
|
|
50
50
|
methodType: 'list',
|
|
51
51
|
}),
|
|
52
52
|
|
|
53
|
+
retrievePaymentMethod: stripeMethod({
|
|
54
|
+
method: 'GET',
|
|
55
|
+
path: '/{customer}/payment_methods/{paymentMethod}',
|
|
56
|
+
}),
|
|
57
|
+
|
|
53
58
|
search: stripeMethod({
|
|
54
59
|
method: 'GET',
|
|
55
60
|
path: '/search',
|
|
@@ -13,11 +13,23 @@ module.exports = StripeResource.extend({
|
|
|
13
13
|
path: '/{account}',
|
|
14
14
|
}),
|
|
15
15
|
|
|
16
|
+
list: stripeMethod({
|
|
17
|
+
method: 'GET',
|
|
18
|
+
path: '',
|
|
19
|
+
methodType: 'list',
|
|
20
|
+
}),
|
|
21
|
+
|
|
16
22
|
disconnect: stripeMethod({
|
|
17
23
|
method: 'POST',
|
|
18
24
|
path: '/{account}/disconnect',
|
|
19
25
|
}),
|
|
20
26
|
|
|
27
|
+
listOwners: stripeMethod({
|
|
28
|
+
method: 'GET',
|
|
29
|
+
path: '/{account}/owners',
|
|
30
|
+
methodType: 'list',
|
|
31
|
+
}),
|
|
32
|
+
|
|
21
33
|
refresh: stripeMethod({
|
|
22
34
|
method: 'POST',
|
|
23
35
|
path: '/{account}/refresh',
|
package/lib/resources/Orders.js
CHANGED
|
@@ -29,13 +29,24 @@ module.exports = StripeResource.extend({
|
|
|
29
29
|
methodType: 'list',
|
|
30
30
|
}),
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
cancel: stripeMethod({
|
|
33
33
|
method: 'POST',
|
|
34
|
-
path: '/{id}/
|
|
34
|
+
path: '/{id}/cancel',
|
|
35
35
|
}),
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
listLineItems: stripeMethod({
|
|
38
|
+
method: 'GET',
|
|
39
|
+
path: '/{id}/line_items',
|
|
40
|
+
methodType: 'list',
|
|
41
|
+
}),
|
|
42
|
+
|
|
43
|
+
reopen: stripeMethod({
|
|
44
|
+
method: 'POST',
|
|
45
|
+
path: '/{id}/reopen',
|
|
46
|
+
}),
|
|
47
|
+
|
|
48
|
+
submit: stripeMethod({
|
|
38
49
|
method: 'POST',
|
|
39
|
-
path: '/{id}/
|
|
50
|
+
path: '/{id}/submit',
|
|
40
51
|
}),
|
|
41
52
|
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec
|
|
2
|
+
|
|
3
|
+
'use strict';
|
|
4
|
+
|
|
5
|
+
const StripeResource = require('../../../StripeResource');
|
|
6
|
+
const stripeMethod = StripeResource.method;
|
|
7
|
+
|
|
8
|
+
module.exports = StripeResource.extend({
|
|
9
|
+
path: 'test_helpers/treasury/inbound_transfers',
|
|
10
|
+
|
|
11
|
+
fail: stripeMethod({
|
|
12
|
+
method: 'POST',
|
|
13
|
+
path: '/{id}/fail',
|
|
14
|
+
}),
|
|
15
|
+
|
|
16
|
+
returnInboundTransfer: stripeMethod({
|
|
17
|
+
method: 'POST',
|
|
18
|
+
path: '/{id}/return',
|
|
19
|
+
}),
|
|
20
|
+
|
|
21
|
+
succeed: stripeMethod({
|
|
22
|
+
method: 'POST',
|
|
23
|
+
path: '/{id}/succeed',
|
|
24
|
+
}),
|
|
25
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec
|
|
2
|
+
|
|
3
|
+
'use strict';
|
|
4
|
+
|
|
5
|
+
const StripeResource = require('../../../StripeResource');
|
|
6
|
+
const stripeMethod = StripeResource.method;
|
|
7
|
+
|
|
8
|
+
module.exports = StripeResource.extend({
|
|
9
|
+
path: 'test_helpers/treasury/outbound_payments',
|
|
10
|
+
|
|
11
|
+
fail: stripeMethod({
|
|
12
|
+
method: 'POST',
|
|
13
|
+
path: '/{id}/fail',
|
|
14
|
+
}),
|
|
15
|
+
|
|
16
|
+
post: stripeMethod({
|
|
17
|
+
method: 'POST',
|
|
18
|
+
path: '/{id}/post',
|
|
19
|
+
}),
|
|
20
|
+
|
|
21
|
+
returnOutboundPayment: stripeMethod({
|
|
22
|
+
method: 'POST',
|
|
23
|
+
path: '/{id}/return',
|
|
24
|
+
}),
|
|
25
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec
|
|
2
|
+
|
|
3
|
+
'use strict';
|
|
4
|
+
|
|
5
|
+
const StripeResource = require('../../../StripeResource');
|
|
6
|
+
const stripeMethod = StripeResource.method;
|
|
7
|
+
|
|
8
|
+
module.exports = StripeResource.extend({
|
|
9
|
+
path: 'test_helpers/treasury/outbound_transfers',
|
|
10
|
+
|
|
11
|
+
fail: stripeMethod({
|
|
12
|
+
method: 'POST',
|
|
13
|
+
path: '/{outboundTransfer}/fail',
|
|
14
|
+
}),
|
|
15
|
+
|
|
16
|
+
post: stripeMethod({
|
|
17
|
+
method: 'POST',
|
|
18
|
+
path: '/{outboundTransfer}/post',
|
|
19
|
+
}),
|
|
20
|
+
|
|
21
|
+
returnOutboundTransfer: stripeMethod({
|
|
22
|
+
method: 'POST',
|
|
23
|
+
path: '/{outboundTransfer}/return',
|
|
24
|
+
}),
|
|
25
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec
|
|
2
|
+
|
|
3
|
+
'use strict';
|
|
4
|
+
|
|
5
|
+
const StripeResource = require('../../../StripeResource');
|
|
6
|
+
const stripeMethod = StripeResource.method;
|
|
7
|
+
|
|
8
|
+
module.exports = StripeResource.extend({
|
|
9
|
+
path: 'test_helpers/treasury/received_credits',
|
|
10
|
+
|
|
11
|
+
create: stripeMethod({
|
|
12
|
+
method: 'POST',
|
|
13
|
+
path: '',
|
|
14
|
+
}),
|
|
15
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec
|
|
2
|
+
|
|
3
|
+
'use strict';
|
|
4
|
+
|
|
5
|
+
const StripeResource = require('../../../StripeResource');
|
|
6
|
+
const stripeMethod = StripeResource.method;
|
|
7
|
+
|
|
8
|
+
module.exports = StripeResource.extend({
|
|
9
|
+
path: 'test_helpers/treasury/received_debits',
|
|
10
|
+
|
|
11
|
+
create: stripeMethod({
|
|
12
|
+
method: 'POST',
|
|
13
|
+
path: '',
|
|
14
|
+
}),
|
|
15
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec
|
|
2
|
+
|
|
3
|
+
'use strict';
|
|
4
|
+
|
|
5
|
+
const StripeResource = require('../../StripeResource');
|
|
6
|
+
const stripeMethod = StripeResource.method;
|
|
7
|
+
|
|
8
|
+
module.exports = StripeResource.extend({
|
|
9
|
+
path: 'treasury/credit_reversals',
|
|
10
|
+
|
|
11
|
+
create: stripeMethod({
|
|
12
|
+
method: 'POST',
|
|
13
|
+
path: '',
|
|
14
|
+
}),
|
|
15
|
+
|
|
16
|
+
retrieve: stripeMethod({
|
|
17
|
+
method: 'GET',
|
|
18
|
+
path: '/{creditReversal}',
|
|
19
|
+
}),
|
|
20
|
+
|
|
21
|
+
list: stripeMethod({
|
|
22
|
+
method: 'GET',
|
|
23
|
+
path: '',
|
|
24
|
+
methodType: 'list',
|
|
25
|
+
}),
|
|
26
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec
|
|
2
|
+
|
|
3
|
+
'use strict';
|
|
4
|
+
|
|
5
|
+
const StripeResource = require('../../StripeResource');
|
|
6
|
+
const stripeMethod = StripeResource.method;
|
|
7
|
+
|
|
8
|
+
module.exports = StripeResource.extend({
|
|
9
|
+
path: 'treasury/debit_reversals',
|
|
10
|
+
|
|
11
|
+
create: stripeMethod({
|
|
12
|
+
method: 'POST',
|
|
13
|
+
path: '',
|
|
14
|
+
}),
|
|
15
|
+
|
|
16
|
+
retrieve: stripeMethod({
|
|
17
|
+
method: 'GET',
|
|
18
|
+
path: '/{debitReversal}',
|
|
19
|
+
}),
|
|
20
|
+
|
|
21
|
+
list: stripeMethod({
|
|
22
|
+
method: 'GET',
|
|
23
|
+
path: '',
|
|
24
|
+
methodType: 'list',
|
|
25
|
+
}),
|
|
26
|
+
});
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec
|
|
2
|
+
|
|
3
|
+
'use strict';
|
|
4
|
+
|
|
5
|
+
const StripeResource = require('../../StripeResource');
|
|
6
|
+
const stripeMethod = StripeResource.method;
|
|
7
|
+
|
|
8
|
+
module.exports = StripeResource.extend({
|
|
9
|
+
path: 'treasury/financial_accounts',
|
|
10
|
+
|
|
11
|
+
create: stripeMethod({
|
|
12
|
+
method: 'POST',
|
|
13
|
+
path: '',
|
|
14
|
+
}),
|
|
15
|
+
|
|
16
|
+
retrieve: stripeMethod({
|
|
17
|
+
method: 'GET',
|
|
18
|
+
path: '/{financialAccount}',
|
|
19
|
+
}),
|
|
20
|
+
|
|
21
|
+
update: stripeMethod({
|
|
22
|
+
method: 'POST',
|
|
23
|
+
path: '/{financialAccount}',
|
|
24
|
+
}),
|
|
25
|
+
|
|
26
|
+
list: stripeMethod({
|
|
27
|
+
method: 'GET',
|
|
28
|
+
path: '',
|
|
29
|
+
methodType: 'list',
|
|
30
|
+
}),
|
|
31
|
+
|
|
32
|
+
retrieveFeatures: stripeMethod({
|
|
33
|
+
method: 'GET',
|
|
34
|
+
path: '/{financialAccount}/features',
|
|
35
|
+
}),
|
|
36
|
+
|
|
37
|
+
updateFeatures: stripeMethod({
|
|
38
|
+
method: 'POST',
|
|
39
|
+
path: '/{financialAccount}/features',
|
|
40
|
+
}),
|
|
41
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec
|
|
2
|
+
|
|
3
|
+
'use strict';
|
|
4
|
+
|
|
5
|
+
const StripeResource = require('../../StripeResource');
|
|
6
|
+
const stripeMethod = StripeResource.method;
|
|
7
|
+
|
|
8
|
+
module.exports = StripeResource.extend({
|
|
9
|
+
path: 'treasury/inbound_transfers',
|
|
10
|
+
|
|
11
|
+
create: stripeMethod({
|
|
12
|
+
method: 'POST',
|
|
13
|
+
path: '',
|
|
14
|
+
}),
|
|
15
|
+
|
|
16
|
+
retrieve: stripeMethod({
|
|
17
|
+
method: 'GET',
|
|
18
|
+
path: '/{id}',
|
|
19
|
+
}),
|
|
20
|
+
|
|
21
|
+
list: stripeMethod({
|
|
22
|
+
method: 'GET',
|
|
23
|
+
path: '',
|
|
24
|
+
methodType: 'list',
|
|
25
|
+
}),
|
|
26
|
+
|
|
27
|
+
cancel: stripeMethod({
|
|
28
|
+
method: 'POST',
|
|
29
|
+
path: '/{inboundTransfer}/cancel',
|
|
30
|
+
}),
|
|
31
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec
|
|
2
|
+
|
|
3
|
+
'use strict';
|
|
4
|
+
|
|
5
|
+
const StripeResource = require('../../StripeResource');
|
|
6
|
+
const stripeMethod = StripeResource.method;
|
|
7
|
+
|
|
8
|
+
module.exports = StripeResource.extend({
|
|
9
|
+
path: 'treasury/outbound_payments',
|
|
10
|
+
|
|
11
|
+
create: stripeMethod({
|
|
12
|
+
method: 'POST',
|
|
13
|
+
path: '',
|
|
14
|
+
}),
|
|
15
|
+
|
|
16
|
+
retrieve: stripeMethod({
|
|
17
|
+
method: 'GET',
|
|
18
|
+
path: '/{id}',
|
|
19
|
+
}),
|
|
20
|
+
|
|
21
|
+
list: stripeMethod({
|
|
22
|
+
method: 'GET',
|
|
23
|
+
path: '',
|
|
24
|
+
methodType: 'list',
|
|
25
|
+
}),
|
|
26
|
+
|
|
27
|
+
cancel: stripeMethod({
|
|
28
|
+
method: 'POST',
|
|
29
|
+
path: '/{id}/cancel',
|
|
30
|
+
}),
|
|
31
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec
|
|
2
|
+
|
|
3
|
+
'use strict';
|
|
4
|
+
|
|
5
|
+
const StripeResource = require('../../StripeResource');
|
|
6
|
+
const stripeMethod = StripeResource.method;
|
|
7
|
+
|
|
8
|
+
module.exports = StripeResource.extend({
|
|
9
|
+
path: 'treasury/outbound_transfers',
|
|
10
|
+
|
|
11
|
+
create: stripeMethod({
|
|
12
|
+
method: 'POST',
|
|
13
|
+
path: '',
|
|
14
|
+
}),
|
|
15
|
+
|
|
16
|
+
retrieve: stripeMethod({
|
|
17
|
+
method: 'GET',
|
|
18
|
+
path: '/{outboundTransfer}',
|
|
19
|
+
}),
|
|
20
|
+
|
|
21
|
+
list: stripeMethod({
|
|
22
|
+
method: 'GET',
|
|
23
|
+
path: '',
|
|
24
|
+
methodType: 'list',
|
|
25
|
+
}),
|
|
26
|
+
|
|
27
|
+
cancel: stripeMethod({
|
|
28
|
+
method: 'POST',
|
|
29
|
+
path: '/{outboundTransfer}/cancel',
|
|
30
|
+
}),
|
|
31
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec
|
|
2
|
+
|
|
3
|
+
'use strict';
|
|
4
|
+
|
|
5
|
+
const StripeResource = require('../../StripeResource');
|
|
6
|
+
const stripeMethod = StripeResource.method;
|
|
7
|
+
|
|
8
|
+
module.exports = StripeResource.extend({
|
|
9
|
+
path: 'treasury/received_credits',
|
|
10
|
+
|
|
11
|
+
retrieve: stripeMethod({
|
|
12
|
+
method: 'GET',
|
|
13
|
+
path: '/{id}',
|
|
14
|
+
}),
|
|
15
|
+
|
|
16
|
+
list: stripeMethod({
|
|
17
|
+
method: 'GET',
|
|
18
|
+
path: '',
|
|
19
|
+
methodType: 'list',
|
|
20
|
+
}),
|
|
21
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec
|
|
2
|
+
|
|
3
|
+
'use strict';
|
|
4
|
+
|
|
5
|
+
const StripeResource = require('../../StripeResource');
|
|
6
|
+
const stripeMethod = StripeResource.method;
|
|
7
|
+
|
|
8
|
+
module.exports = StripeResource.extend({
|
|
9
|
+
path: 'treasury/received_debits',
|
|
10
|
+
|
|
11
|
+
retrieve: stripeMethod({
|
|
12
|
+
method: 'GET',
|
|
13
|
+
path: '/{id}',
|
|
14
|
+
}),
|
|
15
|
+
|
|
16
|
+
list: stripeMethod({
|
|
17
|
+
method: 'GET',
|
|
18
|
+
path: '',
|
|
19
|
+
methodType: 'list',
|
|
20
|
+
}),
|
|
21
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec
|
|
2
|
+
|
|
3
|
+
'use strict';
|
|
4
|
+
|
|
5
|
+
const StripeResource = require('../../StripeResource');
|
|
6
|
+
const stripeMethod = StripeResource.method;
|
|
7
|
+
|
|
8
|
+
module.exports = StripeResource.extend({
|
|
9
|
+
path: 'treasury/transaction_entries',
|
|
10
|
+
|
|
11
|
+
retrieve: stripeMethod({
|
|
12
|
+
method: 'GET',
|
|
13
|
+
path: '/{id}',
|
|
14
|
+
}),
|
|
15
|
+
|
|
16
|
+
list: stripeMethod({
|
|
17
|
+
method: 'GET',
|
|
18
|
+
path: '',
|
|
19
|
+
methodType: 'list',
|
|
20
|
+
}),
|
|
21
|
+
});
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
|
-
const StripeResource = require('
|
|
5
|
+
const StripeResource = require('../../StripeResource');
|
|
6
6
|
const stripeMethod = StripeResource.method;
|
|
7
7
|
|
|
8
8
|
module.exports = StripeResource.extend({
|
|
9
|
-
path: '
|
|
9
|
+
path: 'treasury/transactions',
|
|
10
10
|
|
|
11
11
|
retrieve: stripeMethod({
|
|
12
12
|
method: 'GET',
|
package/lib/resources.js
CHANGED
|
@@ -30,7 +30,6 @@ module.exports = {
|
|
|
30
30
|
Mandates: require('./resources/Mandates'),
|
|
31
31
|
OAuth: require('./resources/OAuth'),
|
|
32
32
|
Orders: require('./resources/Orders'),
|
|
33
|
-
OrderReturns: require('./resources/OrderReturns'),
|
|
34
33
|
PaymentIntents: require('./resources/PaymentIntents'),
|
|
35
34
|
PaymentLinks: require('./resources/PaymentLinks'),
|
|
36
35
|
PaymentMethods: require('./resources/PaymentMethods'),
|
|
@@ -102,5 +101,24 @@ module.exports = {
|
|
|
102
101
|
Terminal: resourceNamespace('terminal', {
|
|
103
102
|
Readers: require('./resources/TestHelpers/Terminal/Readers'),
|
|
104
103
|
}),
|
|
104
|
+
Treasury: resourceNamespace('treasury', {
|
|
105
|
+
InboundTransfers: require('./resources/TestHelpers/Treasury/InboundTransfers'),
|
|
106
|
+
OutboundPayments: require('./resources/TestHelpers/Treasury/OutboundPayments'),
|
|
107
|
+
OutboundTransfers: require('./resources/TestHelpers/Treasury/OutboundTransfers'),
|
|
108
|
+
ReceivedCredits: require('./resources/TestHelpers/Treasury/ReceivedCredits'),
|
|
109
|
+
ReceivedDebits: require('./resources/TestHelpers/Treasury/ReceivedDebits'),
|
|
110
|
+
}),
|
|
111
|
+
}),
|
|
112
|
+
Treasury: resourceNamespace('treasury', {
|
|
113
|
+
CreditReversals: require('./resources/Treasury/CreditReversals'),
|
|
114
|
+
DebitReversals: require('./resources/Treasury/DebitReversals'),
|
|
115
|
+
FinancialAccounts: require('./resources/Treasury/FinancialAccounts'),
|
|
116
|
+
InboundTransfers: require('./resources/Treasury/InboundTransfers'),
|
|
117
|
+
OutboundPayments: require('./resources/Treasury/OutboundPayments'),
|
|
118
|
+
OutboundTransfers: require('./resources/Treasury/OutboundTransfers'),
|
|
119
|
+
ReceivedCredits: require('./resources/Treasury/ReceivedCredits'),
|
|
120
|
+
ReceivedDebits: require('./resources/Treasury/ReceivedDebits'),
|
|
121
|
+
Transactions: require('./resources/Treasury/Transactions'),
|
|
122
|
+
TransactionEntries: require('./resources/Treasury/TransactionEntries'),
|
|
105
123
|
}),
|
|
106
124
|
};
|
package/package.json
CHANGED
|
@@ -1078,7 +1078,7 @@ declare module 'stripe' {
|
|
|
1078
1078
|
company?: AccountCreateParams.Company;
|
|
1079
1079
|
|
|
1080
1080
|
/**
|
|
1081
|
-
* The country in which the account holder resides, or in which the business is legally established. This should be an ISO 3166-1 alpha-2 country code. For example, if you are in the United States and the business for which you're creating an account is legally represented in Canada, you would use `CA` as the country for the account being created.
|
|
1081
|
+
* The country in which the account holder resides, or in which the business is legally established. This should be an ISO 3166-1 alpha-2 country code. For example, if you are in the United States and the business for which you're creating an account is legally represented in Canada, you would use `CA` as the country for the account being created. Available countries include [Stripe's global markets](https://stripe.com/global) as well as countries where [cross-border payouts](https://stripe.com/docs/connect/cross-border-payouts) are supported.
|
|
1082
1082
|
*/
|
|
1083
1083
|
country?: string;
|
|
1084
1084
|
|
|
@@ -1870,12 +1870,12 @@ declare module 'stripe' {
|
|
|
1870
1870
|
last_name?: string;
|
|
1871
1871
|
|
|
1872
1872
|
/**
|
|
1873
|
-
* The Kana
|
|
1873
|
+
* The Kana variation of the individual's last name (Japan only).
|
|
1874
1874
|
*/
|
|
1875
1875
|
last_name_kana?: string;
|
|
1876
1876
|
|
|
1877
1877
|
/**
|
|
1878
|
-
* The Kanji
|
|
1878
|
+
* The Kanji variation of the individual's last name (Japan only).
|
|
1879
1879
|
*/
|
|
1880
1880
|
last_name_kanji?: string;
|
|
1881
1881
|
|
|
@@ -2960,12 +2960,12 @@ declare module 'stripe' {
|
|
|
2960
2960
|
last_name?: string;
|
|
2961
2961
|
|
|
2962
2962
|
/**
|
|
2963
|
-
* The Kana
|
|
2963
|
+
* The Kana variation of the individual's last name (Japan only).
|
|
2964
2964
|
*/
|
|
2965
2965
|
last_name_kana?: string;
|
|
2966
2966
|
|
|
2967
2967
|
/**
|
|
2968
|
-
* The Kanji
|
|
2968
|
+
* The Kanji variation of the individual's last name (Japan only).
|
|
2969
2969
|
*/
|
|
2970
2970
|
last_name_kanji?: string;
|
|
2971
2971
|
|
|
@@ -322,7 +322,7 @@ declare module 'stripe' {
|
|
|
322
322
|
/**
|
|
323
323
|
* The types of customer updates that are supported. When empty, customers are not updateable.
|
|
324
324
|
*/
|
|
325
|
-
allowed_updates
|
|
325
|
+
allowed_updates?: Stripe.Emptyable<
|
|
326
326
|
Array<CustomerUpdate.AllowedUpdate>
|
|
327
327
|
>;
|
|
328
328
|
|
|
@@ -50,7 +50,7 @@ declare module 'stripe' {
|
|
|
50
50
|
/**
|
|
51
51
|
* The URL to redirect customers to when they click on the portal's link to return to your website.
|
|
52
52
|
*/
|
|
53
|
-
return_url: string;
|
|
53
|
+
return_url: string | null;
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
56
|
* The short-lived URL of the session that gives customers access to the customer portal.
|
|
@@ -147,11 +147,6 @@ declare module 'stripe' {
|
|
|
147
147
|
*/
|
|
148
148
|
on_behalf_of: string | Stripe.Account | null;
|
|
149
149
|
|
|
150
|
-
/**
|
|
151
|
-
* ID of the order this charge is for if one exists.
|
|
152
|
-
*/
|
|
153
|
-
order: string | Stripe.Order | null;
|
|
154
|
-
|
|
155
150
|
/**
|
|
156
151
|
* Details about whether the payment was accepted, and why. See [understanding declines](https://stripe.com/docs/declines) for details.
|
|
157
152
|
*/
|
|
@@ -1723,7 +1718,7 @@ declare module 'stripe' {
|
|
|
1723
1718
|
/**
|
|
1724
1719
|
* Recipient name.
|
|
1725
1720
|
*/
|
|
1726
|
-
name?: string
|
|
1721
|
+
name?: string;
|
|
1727
1722
|
|
|
1728
1723
|
/**
|
|
1729
1724
|
* Recipient phone (including extension).
|