stripe 10.4.0-beta.1 → 10.4.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 CHANGED
@@ -1,10 +1,14 @@
1
1
  # Changelog
2
2
 
3
- ## 10.4.0-beta.1 - 2022-08-23
4
- * [#1523](https://github.com/stripe/stripe-node/pull/1523) API Updates for beta branch
5
- - Updated stable APIs to the latest version
6
- - `Stripe-Version` beta headers are not pinned by-default and need to be manually specified, please refer to [beta SDKs README section](https://github.com/stripe/stripe-node/blob/master/README.md#beta-sdks)
7
- * [#1521](https://github.com/stripe/stripe-node/pull/1521) fix: Update FetchHttpClient to send empty string for empty POST/PUT/PATCH requests.
3
+ ## 10.4.0 - 2022-08-23
4
+ * [#1520](https://github.com/stripe/stripe-node/pull/1520) Add beta readme.md section
5
+ * [#1524](https://github.com/stripe/stripe-node/pull/1524) API Updates
6
+ * Change `Terminal.Reader.action` to be required
7
+ * Change `TreasuryOutboundTransferCreateParams.destination_payment_method` to be optional
8
+ * Change type of `Treasury.OutboundTransfer.destination_payment_method` from `string` to `string | null`
9
+ * Change the return type of `Customer.fundCashBalance` test helper from `CustomerBalanceTransaction` to `CustomerCashBalanceTransaction`.
10
+ * This would generally be considered a breaking change, but we've worked with all existing users to migrate and are comfortable releasing this as a minor as it is solely a test helper method. This was essentially broken prior to this change.
11
+
8
12
 
9
13
  ## 10.3.0 - 2022-08-19
10
14
  * [#1516](https://github.com/stripe/stripe-node/pull/1516) API Updates
@@ -17,40 +21,64 @@
17
21
  * Add support for new value `customer_cash_balance_transaction.created` on enums `WebhookEndpointCreateParams.enabled_events[]` and `WebhookEndpointUpdateParams.enabled_events[]`
18
22
  * [#1515](https://github.com/stripe/stripe-node/pull/1515) Add a support section to the readme
19
23
 
20
- ## 10.3.0-beta.1 - 2022-08-11
21
- * [#1511](https://github.com/stripe/stripe-node/pull/1511) API Updates for beta branch
22
- - Updated stable APIs to the latest version
23
- - Add refund_payment method to Terminal resource
24
-
25
24
  ## 10.2.0 - 2022-08-11
26
25
  * [#1510](https://github.com/stripe/stripe-node/pull/1510) API Updates
27
- * Add support for `payment_method_collection` on `Checkout.Session`, `CheckoutSessionCreateParams`, `PaymentLinkCreateParams`, `PaymentLinkUpdateParams`, and `PaymentLink`
26
+ * Add support for `payment_method_collection` on `Checkout.Session`, `CheckoutSessionCreateParams`, `PaymentLinkCreateParams`, `PaymentLinkUpdateParams`, and `PaymentLink`
27
+
28
28
 
29
29
  ## 10.1.0 - 2022-08-09
30
30
  * [#1506](https://github.com/stripe/stripe-node/pull/1506) API Updates
31
31
  * Add support for `process_config` on `Terminal.Reader.action.process_payment_intent`
32
32
  * [#1505](https://github.com/stripe/stripe-node/pull/1505) Simplify AddressParam definitions
33
- - Rename `AddressParam` to `ShippingAddressParam`, and change type of `Source.source_order.shipping.address`, `SourceUpdateParams.SourceOrder.Shipping.address`, and `SessionCreateParams.PaymentIntentData.Shipping.address` to `ShippingAddressParam`
33
+ - Rename `AddressParam` to `ShippingAddressParam`, and change type of `Source.source_order.shipping.address`, `SourceUpdateParams.SourceOrder.Shipping.address`, and `SessionCreateParams.PaymentIntentData.Shipping.address` to `ShippingAddressParam`
34
34
  - Rename `AccountAddressParam` go `AddressParam`, and change type of `AccountCreateParams.BusinessProfile.support_address`, `AccountCreateParams.Company.address`, `AccountCreateParams.Individual.address `, `AccountCreateParams.Individual.registered_address`, `AccountUpdateParams.BusinessProfile.support_address`, `AccountUpdateParams.Company.address`, `AccountUpdateParams.Individual.address`, `AccountUpdateParams.Individual.registered_address`, `ChargeCreateParams.Shipping.address`, `ChargeUpdateParams.Shipping.address`, `CustomerCreateParams.Shipping.address`, `CustomerUpdateParams.Shipping.address`, `CustomerSourceUpdateParams.Owner.address`, `InvoiceListUpcomingLinesParams.CustomerDetails.Shipping.address`, `InvoiceRetrieveUpcomingParams.CustomerDetails.Shipping.address`, `OrderCreateParams.BillingDetails.address`, `OrderCreateParams.ShippingDetails.address`, `OrderUpdateParams.BillingDetails.address`, `OrderUpdateParams.ShippingDetails.address`, `PaymentIntentCreateParams.Shipping.address`, `PaymentIntentUpdateParams.Shipping.address`, `PaymentIntentConfirmParams.Shipping.address`, `PersonCreateParams.address`, `PersonCreateParams.registered_address`, `PersonUpdateParams.address`, `PersonUpdateParams.registered_address`, `SourceCreateParams.Owner.address`, `SourceUpdateParams.Owner.address`, `TokenCreateParams.Account.Company.address`, `TokenCreateParams.Account.Individual.address`, `TokenCreateParams.Account.Individual.registered_address`, `TokenCreateParams.Person.address`, `TokenCreateParams.Person.registered_address`, and `Terminal.LocationUpdateParams.address` to `AddressParam`
35
35
  * [#1503](https://github.com/stripe/stripe-node/pull/1503) API Updates
36
36
  * Add support for `expires_at` on `Apps.Secret` and `AppsSecretCreateParams`
37
37
 
38
- ## 10.1.0-beta.1 - 2022-08-03
39
- * [#1498](https://github.com/stripe/stripe-node/pull/1498) API Updates for beta branch
40
- - Updated stable APIs to the latest version
41
- - Added the `Order` resource support
42
-
43
38
  ## 10.0.0 - 2022-08-02
44
39
 
45
- Major version release for API version 2022-08-01. Default API version changed to "2022-08-01".
40
+ This release includes breaking changes resulting from:
46
41
 
47
- Breaking changes that arose during code generation of the library that we postponed for the next major version. For changes to the SDK, read more detailed description at https://github.com/stripe/stripe-node/wiki/Migration-guide-for-v10. For changes to the Stripe products, read more at https://stripe.com/docs/upgrades#2022-08-01.
42
+ * Moving to use the new API version "2022-08-01". To learn more about these changes to Stripe products, see https://stripe.com/docs/upgrades#2022-08-01
43
+ * Cleaning up the SDK to remove deprecated/unused APIs and rename classes/methods/properties to sync with product APIs. Read more detailed description at https://github.com/stripe/stripe-node/wiki/Migration-guide-for-v10.
48
44
 
49
45
  "⚠️" symbol highlights breaking changes.
50
46
 
51
47
  * [#1497](https://github.com/stripe/stripe-node/pull/1497) API Updates
52
48
  * [#1493](https://github.com/stripe/stripe-node/pull/1493) Next major release changes
53
49
 
50
+ ### Added
51
+ * Add support for new value `invalid_tos_acceptance` on enums `Account.future_requirements.errors[].code`, `Account.requirements.errors[].code`, `Capability.future_requirements.errors[].code`, `Capability.requirements.errors[].code`, `Person.future_requirements.errors[].code`, and `Person.requirements.errors[].code`
52
+ * Add support for `shipping_cost` and `shipping_details` on `Checkout.Session`
53
+
54
+ ### ⚠️ Changed
55
+ * Change type of `business_profile`, `business_type`, `country`, `default_currency`, and `settings` properties on `Account` resource to be nullable.
56
+ * Change type of `currency` property on `Checkout.Session` resource from `string` to `'cad' | 'usd'`.
57
+ * Change location of TypeScript definitions for `CreditNoteLineItemListPreviewParams`, `CreditNoteLineItemListPreviewParams.Line`, `CreditNoteLineItemListPreviewParams.Line.Type`, and `CreditNoteLineItemListPreviewParams.Line.Reason` interfaces from `CreditNoteLineItems.d.ts` to `CreditNotes.d.ts`.
58
+ * Change type of `address`, `currency`, `delinquent`, `discount`, `invoice_prefix`, `name`, `phone`, and `preferred_locales` properties on `Customer` resource to be nullable.
59
+ * Rename `InvoiceRetrieveUpcomingParams` to `InvoiceListUpcomingLinesParams`.
60
+
61
+ ### ⚠️ Removed
62
+ * Remove for `AlipayAccount`, `DeletedAlipayAccount`, `BitcoinReceiver`, `DeletedBitcoinReceiver`, `BitcoinTransaction`, and `BitcoinTransactionListParams` definitions.
63
+ * Remove `AlipayAccount` and `BitcoinReceiver` from `CustomerSource`.
64
+ * Remove `Stripe.DeletedAlipayAccount` and `Stripe.DeletedBitcoinReceiver` from possible values of `source` property in `PaymentIntent`.
65
+ * Remove `IssuerFraudRecord`, `IssuerFraudRecordRetrieveParams`, `IssuerFraudRecordListParams`, and `IssuerFraudRecordsResource`, definitions.
66
+ * Remove `treasury.received_credit.reversed` webhook event constant. Please use `treasury.received_credit.returned` instead.
67
+ * Remove `order.payment_failed`, `transfer.failed`, and `transfer.paid`. The events were deprecated.
68
+ * Remove `retrieveDetails` method from `Issuing.Card` resource. The method was unsupported. Read more at https://stripe.com/docs/issuing/cards/virtual.
69
+ * Remove `Issuing.CardDetails` and `CardRetrieveDetailsParams` definition.
70
+ * Remove `IssuerFraudRecords` resource.
71
+ * Remove `Recipient` resource and`recipient` property from `Card` resource.
72
+ * Remove `InvoiceMarkUncollectibleParams` definition.
73
+ * Remove deprecated `Stripe.Errors` and `StripeError` (and derived `StripeCardError`, `StripeInvalidRequestError`, `StripeAPIError`, `StripeAuthenticationError`, `StripePermissionError`, `StripeRateLimitError`, `StripeConnectionError`, `StripeSignatureVerificationError`, `StripeIdempotencyError`, and `StripeInvalidGrantError`) definitions.
74
+ * Remove `redirect_url` from `LoginLinks` definition. The property is no longer supported.
75
+ * Remove `LineItemListParams` definition. The interface was no longer in use.
76
+
77
+ ### ⚠️ Renamed
78
+ * Rename `listUpcomingLineItems` method on `Invoice` resource to `listUpcomingLines`.
79
+ * Rename `InvoiceLineItemListUpcomingParams` to `InvoiceListUpcomingLinesParams`.
80
+ * Rename `InvoiceRetrieveUpcomingParams` to `InvoiceListUpcomingLinesParams`.
81
+
54
82
  ## 9.16.0 - 2022-07-26
55
83
  * [#1492](https://github.com/stripe/stripe-node/pull/1492) API Updates
56
84
  * Add support for new value `exempted` on enums `Charge.payment_method_details.card.three_d_secure.result` and `SetupAttempt.payment_method_details.card.three_d_secure.result`
@@ -67,20 +95,6 @@ Breaking changes that arose during code generation of the library that we postpo
67
95
  * Add support for `mandate` on `InvoicePayParams`
68
96
  * Add support for `product_data` on `OrderCreateParams.line_items[]` and `OrderUpdateParams.line_items[]`
69
97
 
70
- ## 9.15.0-beta.1 - 2022-07-22
71
- * [#1485](https://github.com/stripe/stripe-node/pull/1485) API Updates for beta branch
72
- - Updated stable APIs to the latest version
73
- * [#1483](https://github.com/stripe/stripe-node/pull/1483) API Updates for beta branch
74
- - Updated stable APIs to the latest version
75
- - Add `QuotePhase` resource
76
- * [#1479](https://github.com/stripe/stripe-node/pull/1479) API Updates for beta branch
77
- - Updated stable APIs to the latest version
78
- - Add `Price.migrate_to` property
79
- - Add `SubscriptionSchedule.amend` method.
80
- - Add `Discount.subscription_item` property.
81
- - Add `Quote.subscription_data.billing_behavior`, `billing_cycle_anchor`, `end_behavior`, `from_schedule`, `from_subscription`, `prebilling`, `proration_behavior` properties.
82
- - Add `phases` parameter to `Quote.create`
83
- - Add `Subscription.discounts`, `prebilling` properties.
84
98
 
85
99
  ## 9.14.0 - 2022-07-18
86
100
  * [#1477](https://github.com/stripe/stripe-node/pull/1477) API Updates
@@ -103,18 +117,6 @@ Breaking changes that arose during code generation of the library that we postpo
103
117
  * Change `Transfer.source_type` to be optional and not nullable
104
118
  * [#1471](https://github.com/stripe/stripe-node/pull/1471) Update readme to include a note on beta packages
105
119
 
106
- ## 9.13.0-beta.1 - 2022-07-07
107
- * [#1469](https://github.com/stripe/stripe-node/pull/1469) API Updates for beta branch
108
- - Include `server_side_confirmation_beta=v1` beta
109
- - Add `secretKeyConfirmation` to `PaymentIntent`
110
- * [#1451](https://github.com/stripe/stripe-node/pull/1451) API Updates
111
- - Updated stable APIs to the latest version
112
- * [#1457](https://github.com/stripe/stripe-node/pull/1457) Use the generated API version
113
- * [#1445](https://github.com/stripe/stripe-node/pull/1445) Support updating pre-release versions
114
- * [#1442](https://github.com/stripe/stripe-node/pull/1442) API Updates
115
- * Add support for `network_details` method on resource `ReceivedCredits`/`ReceivedDebits`
116
- * [#1444](https://github.com/stripe/stripe-node/pull/1444) Merge master branch into beta branch
117
-
118
120
  ## 9.12.0 - 2022-07-07
119
121
  * [#1468](https://github.com/stripe/stripe-node/pull/1468) API Updates
120
122
  * Add support for `currency` on `CheckoutSessionCreateParams`, `InvoiceUpcomingLinesParams`, `InvoiceUpcomingParams`, `PaymentLinkCreateParams`, `SubscriptionCreateParams`, `SubscriptionSchedule.phases[]`, `SubscriptionScheduleCreateParams.phases[]`, `SubscriptionScheduleUpdateParams.phases[]`, and `Subscription`
@@ -177,10 +179,6 @@ Breaking changes that arose during code generation of the library that we postpo
177
179
  * Change type of `Order.payment.settings.payment_method_options.customer_balance.bank_transfer.requested_address_types[]`, `OrderCreateParams.payment.settings.payment_method_options.customer_balance.bank_transfer.requested_address_types[]`, `OrderUpdateParams.payment.settings.payment_method_options.customer_balance.bank_transfer.requested_address_types[]`, `PaymentIntent.payment_method_options.customer_balance.bank_transfer.requested_address_types[]`, `PaymentIntentConfirmParams.payment_method_options.customer_balance.bank_transfer.requested_address_types[]`, `PaymentIntentCreateParams.payment_method_options.customer_balance.bank_transfer.requested_address_types[]`, and `PaymentIntentUpdateParams.payment_method_options.customer_balance.bank_transfer.requested_address_types[]` from `literal('zengin')` to `enum`
178
180
  * Add support for `custom_unit_amount` on `PriceCreateParams` and `Price`
179
181
 
180
- ## 9.8.0-beta.1 - 2022-06-08
181
- * [#1442](https://github.com/stripe/stripe-node/pull/1442) API Updates
182
- * Add support for `network_details` method on resource `ReceivedCredits`/`ReceivedDebits`
183
-
184
182
  ## 9.7.0 - 2022-06-08
185
183
  * [#1441](https://github.com/stripe/stripe-node/pull/1441) API Updates
186
184
  * Add support for `affirm`, `bancontact`, `card`, `ideal`, `p24`, and `sofort` on `Checkout.Session.payment_method_options` and `CheckoutSessionCreateParams.payment_method_options`
@@ -201,6 +199,7 @@ Breaking changes that arose during code generation of the library that we postpo
201
199
  * Add support for `network` on `SetupIntent.payment_method_options.card`
202
200
  * Add support for new value `simulated_wisepos_e` on enums `Terminal.Reader.device_type` and `TerminalReaderListParams.device_type`
203
201
 
202
+
204
203
  ## 9.5.0 - 2022-05-26
205
204
  * [#1434](https://github.com/stripe/stripe-node/pull/1434) API Updates
206
205
  * Add support for `affirm_payments` and `link_payments` on `Account.capabilities`, `AccountCreateParams.capabilities`, and `AccountUpdateParams.capabilities`
@@ -271,6 +270,7 @@ Major version release - The [migration guide](https://github.com/stripe/stripe-n
271
270
  * Add support for `default_price` on `ProductUpdateParams` and `Product`
272
271
  * Add support for `instructions_email` on `RefundCreateParams` and `Refund`
273
272
 
273
+
274
274
  ## 8.221.0 - 2022-05-05
275
275
  * [#1413](https://github.com/stripe/stripe-node/pull/1413) API Updates
276
276
  * Add support for new resources `FinancialConnections.AccountOwner`, `FinancialConnections.AccountOwnership`, `FinancialConnections.Account`, and `FinancialConnections.Session`
@@ -547,6 +547,7 @@ Major version release - The [migration guide](https://github.com/stripe/stripe-n
547
547
  * [#1297](https://github.com/stripe/stripe-node/pull/1297) API Updates
548
548
  * Add support for `automatic_payment_methods` on `PaymentIntentCreateParams` and `PaymentIntent`
549
549
 
550
+
550
551
  ## 8.189.0 - 2021-11-16
551
552
  * [#1295](https://github.com/stripe/stripe-node/pull/1295) API Updates
552
553
  * Add support for new resource `ShippingRate`
@@ -569,6 +570,7 @@ Major version release - The [migration guide](https://github.com/stripe/stripe-n
569
570
  * Remove support for `ownership_declaration_shown_and_signed` on `TokenCreateParams.account`. This API was unused.
570
571
  * Add support for `ownership_declaration_shown_and_signed` on `TokenCreateParams.account.company`
571
572
 
573
+
572
574
  ## 8.186.0 - 2021-11-01
573
575
  * [#1283](https://github.com/stripe/stripe-node/pull/1283) API Updates
574
576
  * Add support for `ownership_declaration` on `AccountUpdateParams.company`, `AccountCreateParams.company`, `Account.company`, and `TokenCreateParams.account.company`
@@ -712,6 +714,7 @@ Major version release - The [migration guide](https://github.com/stripe/stripe-n
712
714
  * Add support for `wallet` on `Issuing.Transaction`
713
715
  * Add support for `ideal` on `PaymentIntentCreateParams.payment_method_options`, `PaymentIntentUpdateParams.payment_method_options`, `PaymentIntentConfirmParams.payment_method_options`, and `PaymentIntent.payment_method_options`
714
716
 
717
+
715
718
  ## 8.163.0 - 2021-07-15
716
719
  * [#1102](https://github.com/stripe/stripe-node/pull/1102), [#1191](https://github.com/stripe/stripe-node/pull/1191) Add support for `stripeAccount` when initializing the client
717
720
 
@@ -2244,7 +2247,7 @@ Pull requests included in this release (cf. [#606](https://github.com/stripe/str
2244
2247
 
2245
2248
  - [BUGFIX] Fix incorrect deleteDiscount method & related spec(s)
2246
2249
 
2247
- ## 2.2.1 - 2013-12-01
2250
+ ### 2.2.1 - 2013-12-01
2248
2251
 
2249
2252
  - [BUGFIX] Fix user-agent header issue (see issue #75)
2250
2253
 
@@ -2307,4 +2310,3 @@ Pull requests included in this release (cf. [#606](https://github.com/stripe/str
2307
2310
  ## 0.0.2 - 2011-09-28
2308
2311
 
2309
2312
  - Initial release with customers and tokens APIs
2310
-
package/README.md CHANGED
@@ -10,10 +10,6 @@ applications written in server-side JavaScript.
10
10
 
11
11
  For collecting customer and payment information in the browser, use [Stripe.js][stripe-js].
12
12
 
13
- ## Support
14
-
15
- New features and bug fixes are released on the latest major version of the `stripe` package. If you are on an older major version, we recommend that you upgrade to the latest in order to use the new features and bug fixes including those for security vulnerabilities. Older major versions of the package will continue to be available for use, but will not be receiving any updates.
16
-
17
13
  ## Documentation
18
14
 
19
15
  See the [`stripe-node` API docs](https://stripe.com/docs/api?lang=node) for Node.js.
@@ -34,20 +30,6 @@ npm install stripe --save
34
30
  yarn add stripe
35
31
  ```
36
32
 
37
- ### Beta version
38
-
39
- Stripe has features in the beta phase that can be accessed via the beta version of this package.
40
- We would love for you to try these and share feedback with us before these features reach the stable phase.
41
- The beta versions can be installed in one of two ways
42
- - To install the latest beta version, run the command `npm install stripe@beta --save`
43
- - To install a specific beta version, replace the term "beta" in the above command with the version number like `npm install stripe@1.2.3-beta.1 --save`
44
-
45
- > Note: There can be breaking changes between beta versions. Therefore we recommend pinning the package version to a specific beta version in your package.json file. This way you can install the same version each time without breaking changes unless you are intentionally looking for the latest beta version.
46
-
47
- We highly recommend keeping an eye on when the beta feature you are interested in goes from beta to stable so that you can move from using a beta version of the SDK to the stable version.
48
-
49
- The versions tab on the [stripe page on npm](https://www.npmjs.com/package/stripe) lists the current tags in use. The `beta` tag here corresponds to the the latest beta version of the package.
50
-
51
33
  ## Usage
52
34
 
53
35
  The package needs to be configured with your account's secret key, which is
@@ -490,6 +472,32 @@ const stripe = new Stripe('sk_test_...', {
490
472
  });
491
473
  ```
492
474
 
475
+ ### Beta version
476
+
477
+ Stripe has features in the beta phase that can be accessed via the beta version of this package.
478
+ We would love for you to try these and share feedback with us before these features reach the stable phase.
479
+ The beta versions can be installed in one of two ways
480
+ - To install the latest beta version, run the command `npm install stripe@beta --save`
481
+ - To install a specific beta version, replace the term "beta" in the above command with the version number like `npm install stripe@1.2.3-beta.1 --save`
482
+
483
+ > Note: There can be breaking changes between beta versions. Therefore we recommend pinning the package version to a specific beta version in your package.json file. This way you can install the same version each time without breaking changes unless you are intentionally looking for the latest beta version.
484
+
485
+ We highly recommend keeping an eye on when the beta feature you are interested in goes from beta to stable so that you can move from using a beta version of the SDK to the stable version.
486
+
487
+ The versions tab on the [stripe page on npm](https://www.npmjs.com/package/stripe) lists the current tags in use. The `beta` tag here corresponds to the the latest beta version of the package.
488
+
489
+ If your beta feature requires a `Stripe-Version` header to be sent, use the `apiVersion` property of `config` object to set it:
490
+
491
+ ```js
492
+ const stripe = new Stripe('sk_test_...', {
493
+ apiVersion: '2022-08-01; feature_beta=v3',
494
+ });
495
+ ```
496
+
497
+ ## Support
498
+
499
+ New features and bug fixes are released on the latest major version of the `stripe` package. If you are on an older major version, we recommend that you upgrade to the latest in order to use the new features and bug fixes including those for security vulnerabilities. Older major versions of the package will continue to be available for use, but will not be receiving any updates.
500
+
493
501
  ## More Information
494
502
 
495
503
  - [REST API Version](https://github.com/stripe/stripe-node/wiki/REST-API-Version)
package/VERSION CHANGED
@@ -1 +1 @@
1
- 10.4.0-beta.1
1
+ 10.4.0
@@ -39,19 +39,11 @@ class FetchHttpClient extends HttpClient {
39
39
  );
40
40
  url.port = port;
41
41
 
42
- // For methods which expect payloads, we should always pass a body value
43
- // even when it is empty. Without this, some JS runtimes (eg. Deno) will
44
- // inject a second Content-Length header. See https://github.com/stripe/stripe-node/issues/1519
45
- // for more details.
46
- const methodHasPayload =
47
- method == 'POST' || method == 'PUT' || method == 'PATCH';
48
- const body = requestData || (methodHasPayload ? '' : undefined);
49
-
50
42
  const fetchFn = this._fetchFn || fetch;
51
43
  const fetchPromise = fetchFn(url.toString(), {
52
44
  method,
53
45
  headers,
54
- body,
46
+ body: requestData || undefined,
55
47
  });
56
48
 
57
49
  // The Fetch API does not support passing in a timeout natively, so a
@@ -29,11 +29,6 @@ module.exports = StripeResource.extend({
29
29
  methodType: 'list',
30
30
  }),
31
31
 
32
- amend: stripeMethod({
33
- method: 'POST',
34
- path: '/{schedule}/amend',
35
- }),
36
-
37
32
  cancel: stripeMethod({
38
33
  method: 'POST',
39
34
  path: '/{schedule}/cancel',
@@ -49,11 +49,6 @@ module.exports = StripeResource.extend({
49
49
  path: '/{reader}/process_setup_intent',
50
50
  }),
51
51
 
52
- refundPayment: stripeMethod({
53
- method: 'POST',
54
- path: '/{reader}/refund_payment',
55
- }),
56
-
57
52
  setReaderDisplay: stripeMethod({
58
53
  method: 'POST',
59
54
  path: '/{reader}/set_reader_display',
package/lib/resources.js CHANGED
@@ -9,7 +9,6 @@ module.exports = {
9
9
  // Support Accounts for consistency, Account for backwards compatibility
10
10
  Account: require('./resources/Accounts'),
11
11
  AccountLinks: require('./resources/AccountLinks'),
12
- AccountSessions: require('./resources/AccountSessions'),
13
12
  ApplePayDomains: require('./resources/ApplePayDomains'),
14
13
  ApplicationFees: require('./resources/ApplicationFees'),
15
14
  Balance: require('./resources/Balance'),
@@ -39,7 +38,6 @@ module.exports = {
39
38
  Products: require('./resources/Products'),
40
39
  PromotionCodes: require('./resources/PromotionCodes'),
41
40
  Quotes: require('./resources/Quotes'),
42
- QuotePhases: require('./resources/QuotePhases'),
43
41
  Refunds: require('./resources/Refunds'),
44
42
  Reviews: require('./resources/Reviews'),
45
43
  SetupAttempts: require('./resources/SetupAttempts'),
package/lib/stripe.js CHANGED
@@ -1,12 +1,11 @@
1
1
  'use strict';
2
2
 
3
3
  const resources = require('./resources');
4
- const apiVersion = require('./apiVersion');
5
4
 
6
5
  const DEFAULT_HOST = 'api.stripe.com';
7
6
  const DEFAULT_PORT = '443';
8
7
  const DEFAULT_BASE_PATH = '/v1/';
9
- const DEFAULT_API_VERSION = apiVersion.ApiVersion;
8
+ const DEFAULT_API_VERSION = null;
10
9
 
11
10
  const DEFAULT_TIMEOUT = 80000;
12
11
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stripe",
3
- "version": "10.4.0-beta.1",
3
+ "version": "10.4.0",
4
4
  "description": "Stripe API wrapper",
5
5
  "keywords": [
6
6
  "stripe",
@@ -67,11 +67,6 @@ declare module 'stripe' {
67
67
  * The subscription that this coupon is applied to, if it is applied to a particular subscription.
68
68
  */
69
69
  subscription: string | null;
70
-
71
- /**
72
- * The subscription item that this coupon is applied to, if it is applied to a particular subscription item.
73
- */
74
- subscription_item?: string | null;
75
70
  }
76
71
 
77
72
  /**
@@ -134,11 +129,6 @@ declare module 'stripe' {
134
129
  * The subscription that this coupon is applied to, if it is applied to a particular subscription.
135
130
  */
136
131
  subscription: string | null;
137
-
138
- /**
139
- * The subscription item that this coupon is applied to, if it is applied to a particular subscription item.
140
- */
141
- subscription_item?: string | null;
142
132
  }
143
133
  }
144
134
  }
@@ -1943,11 +1943,6 @@ declare module 'stripe' {
1943
1943
  InvoiceListUpcomingLinesParams.SubscriptionItem
1944
1944
  >;
1945
1945
 
1946
- /**
1947
- * The pre-billing to apply to the subscription as a preview.
1948
- */
1949
- subscription_prebilling?: InvoiceListUpcomingLinesParams.SubscriptionPrebilling;
1950
-
1951
1946
  /**
1952
1947
  * Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes.
1953
1948
  */
@@ -2260,11 +2255,6 @@ declare module 'stripe' {
2260
2255
  */
2261
2256
  deleted?: boolean;
2262
2257
 
2263
- /**
2264
- * The coupons to redeem into discounts for the subscription item.
2265
- */
2266
- discounts?: Stripe.Emptyable<Array<SubscriptionItem.Discount>>;
2267
-
2268
2258
  /**
2269
2259
  * Subscription item to update.
2270
2260
  */
@@ -2309,18 +2299,6 @@ declare module 'stripe' {
2309
2299
  usage_gte: number;
2310
2300
  }
2311
2301
 
2312
- interface Discount {
2313
- /**
2314
- * ID of the coupon to create a new discount for.
2315
- */
2316
- coupon?: string;
2317
-
2318
- /**
2319
- * ID of an existing discount on the object (or one of its ancestors) to reuse.
2320
- */
2321
- discount?: string;
2322
- }
2323
-
2324
2302
  interface PriceData {
2325
2303
  /**
2326
2304
  * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
@@ -2374,13 +2352,6 @@ declare module 'stripe' {
2374
2352
  }
2375
2353
  }
2376
2354
 
2377
- interface SubscriptionPrebilling {
2378
- /**
2379
- * This is used to determine the number of billing cycles to prebill.
2380
- */
2381
- iterations: number;
2382
- }
2383
-
2384
2355
  type SubscriptionProrationBehavior =
2385
2356
  | 'always_invoice'
2386
2357
  | 'create_prorations'
@@ -2520,11 +2491,6 @@ declare module 'stripe' {
2520
2491
  InvoiceRetrieveUpcomingParams.SubscriptionItem
2521
2492
  >;
2522
2493
 
2523
- /**
2524
- * The pre-billing to apply to the subscription as a preview.
2525
- */
2526
- subscription_prebilling?: InvoiceRetrieveUpcomingParams.SubscriptionPrebilling;
2527
-
2528
2494
  /**
2529
2495
  * Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes.
2530
2496
  */
@@ -2837,11 +2803,6 @@ declare module 'stripe' {
2837
2803
  */
2838
2804
  deleted?: boolean;
2839
2805
 
2840
- /**
2841
- * The coupons to redeem into discounts for the subscription item.
2842
- */
2843
- discounts?: Stripe.Emptyable<Array<SubscriptionItem.Discount>>;
2844
-
2845
2806
  /**
2846
2807
  * Subscription item to update.
2847
2808
  */
@@ -2886,18 +2847,6 @@ declare module 'stripe' {
2886
2847
  usage_gte: number;
2887
2848
  }
2888
2849
 
2889
- interface Discount {
2890
- /**
2891
- * ID of the coupon to create a new discount for.
2892
- */
2893
- coupon?: string;
2894
-
2895
- /**
2896
- * ID of an existing discount on the object (or one of its ancestors) to reuse.
2897
- */
2898
- discount?: string;
2899
- }
2900
-
2901
2850
  interface PriceData {
2902
2851
  /**
2903
2852
  * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
@@ -2951,13 +2900,6 @@ declare module 'stripe' {
2951
2900
  }
2952
2901
  }
2953
2902
 
2954
- interface SubscriptionPrebilling {
2955
- /**
2956
- * This is used to determine the number of billing cycles to prebill.
2957
- */
2958
- iterations: number;
2959
- }
2960
-
2961
2903
  type SubscriptionProrationBehavior =
2962
2904
  | 'always_invoice'
2963
2905
  | 'create_prorations'
@@ -173,11 +173,6 @@ declare module 'stripe' {
173
173
  */
174
174
  review: string | Stripe.Review | null;
175
175
 
176
- /**
177
- * Indicates whether confirmation for this PaymentIntent using a secret key is `required` or `optional`.
178
- */
179
- secret_key_confirmation?: PaymentIntent.SecretKeyConfirmation;
180
-
181
176
  /**
182
177
  * Indicates that you intend to make future payments with this PaymentIntent's payment method.
183
178
  *
@@ -1700,8 +1695,6 @@ declare module 'stripe' {
1700
1695
  }
1701
1696
  }
1702
1697
 
1703
- type SecretKeyConfirmation = 'optional' | 'required';
1704
-
1705
1698
  type SetupFutureUsage = 'off_session' | 'on_session';
1706
1699
 
1707
1700
  interface Shipping {
@@ -1873,11 +1866,6 @@ declare module 'stripe' {
1873
1866
  */
1874
1867
  return_url?: string;
1875
1868
 
1876
- /**
1877
- * Indicates whether confirmation for this PaymentIntent using a secret key is `required` or `optional`.
1878
- */
1879
- secret_key_confirmation?: PaymentIntentCreateParams.SecretKeyConfirmation;
1880
-
1881
1869
  /**
1882
1870
  * Indicates that you intend to make future payments with this PaymentIntent's payment method.
1883
1871
  *
@@ -3517,8 +3505,6 @@ declare module 'stripe' {
3517
3505
  session?: string;
3518
3506
  }
3519
3507
 
3520
- type SecretKeyConfirmation = 'optional' | 'required';
3521
-
3522
3508
  type SetupFutureUsage = 'off_session' | 'on_session';
3523
3509
 
3524
3510
  interface Shipping {
@@ -3622,11 +3608,6 @@ declare module 'stripe' {
3622
3608
  */
3623
3609
  expand?: Array<string>;
3624
3610
 
3625
- /**
3626
- * This hash contains details about the Mandate to create.
3627
- */
3628
- mandate_data?: PaymentIntentUpdateParams.MandateData;
3629
-
3630
3611
  /**
3631
3612
  * 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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
3632
3613
  */
@@ -3701,41 +3682,6 @@ declare module 'stripe' {
3701
3682
  namespace PaymentIntentUpdateParams {
3702
3683
  type CaptureMethod = 'automatic' | 'manual';
3703
3684
 
3704
- interface MandateData {
3705
- /**
3706
- * This hash contains details about the customer acceptance of the Mandate.
3707
- */
3708
- customer_acceptance: MandateData.CustomerAcceptance;
3709
- }
3710
-
3711
- namespace MandateData {
3712
- interface CustomerAcceptance {
3713
- /**
3714
- * If this is a Mandate accepted online, this hash contains details about the online acceptance.
3715
- */
3716
- online: CustomerAcceptance.Online;
3717
-
3718
- /**
3719
- * The type of customer acceptance information included with the Mandate.
3720
- */
3721
- type: 'online';
3722
- }
3723
-
3724
- namespace CustomerAcceptance {
3725
- interface Online {
3726
- /**
3727
- * The IP address from which the Mandate was accepted by the customer.
3728
- */
3729
- ip_address?: string;
3730
-
3731
- /**
3732
- * The user agent of the browser from which the Mandate was accepted by the customer.
3733
- */
3734
- user_agent?: string;
3735
- }
3736
- }
3737
- }
3738
-
3739
3685
  interface PaymentMethodData {
3740
3686
  /**
3741
3687
  * If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
@@ -5404,11 +5350,6 @@ declare module 'stripe' {
5404
5350
  }
5405
5351
 
5406
5352
  interface PaymentIntentConfirmParams {
5407
- /**
5408
- * The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
5409
- */
5410
- application_fee_amount?: Stripe.Emptyable<number>;
5411
-
5412
5353
  /**
5413
5354
  * Controls when the funds will be captured from the customer's account.
5414
5355
  */