stripe 17.0.0 → 17.1.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,50 +1,35 @@
1
1
  # Changelog
2
+ ## 17.1.0 - 2024-10-03
3
+ * [#2199](https://github.com/stripe/stripe-node/pull/2199) Update generated code
4
+ * Remove the support for resource `Margin` that was accidentally made public in the last release
2
5
 
3
6
  ## 17.0.0 - 2024-10-01
4
7
  * [#2192](https://github.com/stripe/stripe-node/pull/2192) Support for APIs in the new API version 2024-09-30.acacia
5
-
6
- This release changes the pinned API version to `2024-09-30.acacia`. Please read the [API Upgrade Guide](https://stripe.com/docs/upgrades#2024-09-30.acacia) and carefully review the API changes before upgrading.
7
-
8
- ### ⚠️ Breaking changes due to changes in the Stripe API
9
- - Rename `usage_threshold_config` to `usage_threshold` on `Billing.AlertCreateParams` and `Billing.Alert`
10
- - Remove support for `filter` on `Billing.AlertCreateParams` and `Billing.Alert`. Use the filters on the `usage_threshold` instead
11
- - Remove support for `customer_consent_collected` on `Terminal.ReaderProcessSetupIntentParams`.
12
-
13
- ### ⚠️ Other Breaking changes in the SDK
14
- - Adjusted default values around reties for HTTP requests. You can use the old defaults by setting them explicitly. New values are:
15
- - max retries: `1` -> `2`
16
- - max timeout (seconds): `2` -> `5`
17
-
18
-
19
- ### Additions
20
- * Add support for `custom_unit_amount` on `ProductCreateParams.default_price_data`
21
- * Add support for `allow_redisplay` on `Terminal.ReaderProcessPaymentIntentParams.process_config` and `Terminal.ReaderProcessSetupIntentParams`
22
- * Add support for new value `international_transaction` on enum `Treasury.ReceivedCredit.failure_code`
23
- * Add support for new value `2024-09-30.acacia` on enum `WebhookEndpointCreateParams.api_version`
24
- * Add support for new Usage Billing APIs `Billing.MeterEvent`, `Billing.MeterEventAdjustments`, `Billing.MeterEventSession`, `Billing.MeterEventStream` and the new Events API `Core.Events` in the [v2 namespace ](https://docs.corp.stripe.com/api-v2-overview)
25
- * Add method `parseThinEvent()` on the `Stripe` class to parse [thin events](https://docs.corp.stripe.com/event-destinations#events-overview).
26
- * Add method [rawRequest()](https://github.com/stripe/stripe-node/tree/master?tab=readme-ov-file#custom-requests) on the `Stripe` class that takes a HTTP method type, url and relevant parameters to make requests to the Stripe API that are not yet supported in the SDK.
27
-
28
- ### Changes
29
- * Change `BillingPortal.ConfigurationCreateParams.features.subscription_update.default_allowed_updates` and `BillingPortal.ConfigurationCreateParams.features.subscription_update.products` to be optional
30
- * [#2195](https://github.com/stripe/stripe-node/pull/2195) Remove parseSnapshotEvent
31
- * [#2188](https://github.com/stripe/stripe-node/pull/2188) Revert "Add raw_request (#2185)"
32
- * [#2185](https://github.com/stripe/stripe-node/pull/2185) Add raw_request
33
- Adds the ability to make raw requests to the Stripe API, by providing an HTTP method and url.
34
-
35
- Example:
36
- ```node
37
- import Stripe from 'stripe';
38
- const stripe = new Stripe('sk_test_...');
39
-
40
- const response = await stripe.rawRequest(
41
- 'POST',
42
- '/v1/beta_endpoint',
43
- { param: 123 },
44
- { apiVersion: '2022-11-15; feature_beta=v3' }
45
- );
46
-
47
- ```
8
+
9
+ This release changes the pinned API version to `2024-09-30.acacia`. Please read the [API Upgrade Guide](https://stripe.com/docs/upgrades#2024-09-30.acacia) and carefully review the API changes before upgrading.
10
+
11
+ ### ⚠️ Breaking changes due to changes in the Stripe API
12
+ - Rename `usage_threshold_config` to `usage_threshold` on `Billing.AlertCreateParams` and `Billing.Alert`
13
+ - Remove support for `filter` on `Billing.AlertCreateParams` and `Billing.Alert`. Use the filters on the `usage_threshold` instead
14
+ - Remove support for `customer_consent_collected` on `Terminal.ReaderProcessSetupIntentParams`.
15
+
16
+ ### ⚠️ Other Breaking changes in the SDK
17
+ - Adjusted default values around reties for HTTP requests. You can use the old defaults by setting them explicitly. New values are:
18
+ - max retries: `1` -> `2`
19
+ - max timeout (seconds): `2` -> `5`
20
+
21
+
22
+ ### Additions
23
+ * Add support for `custom_unit_amount` on `ProductCreateParams.default_price_data`
24
+ * Add support for `allow_redisplay` on `Terminal.ReaderProcessPaymentIntentParams.process_config` and `Terminal.ReaderProcessSetupIntentParams`
25
+ * Add support for new value `international_transaction` on enum `Treasury.ReceivedCredit.failure_code`
26
+ * Add support for new value `2024-09-30.acacia` on enum `WebhookEndpointCreateParams.api_version`
27
+ * Add support for new Usage Billing APIs `Billing.MeterEvent`, `Billing.MeterEventAdjustments`, `Billing.MeterEventSession`, `Billing.MeterEventStream` and the new Events API `Core.Events` in the [v2 namespace ](https://docs.corp.stripe.com/api-v2-overview)
28
+ * Add method `parseThinEvent()` on the `Stripe` class to parse [thin events](https://docs.corp.stripe.com/event-destinations#events-overview).
29
+ * Add method [rawRequest()](https://github.com/stripe/stripe-node/tree/master?tab=readme-ov-file#custom-requests) on the `Stripe` class that takes a HTTP method type, url and relevant parameters to make requests to the Stripe API that are not yet supported in the SDK.
30
+
31
+ ### Changes
32
+ * Change `BillingPortal.ConfigurationCreateParams.features.subscription_update.default_allowed_updates` and `BillingPortal.ConfigurationCreateParams.features.subscription_update.products` to be optional
48
33
 
49
34
  ## 16.12.0 - 2024-09-18
50
35
  * [#2177](https://github.com/stripe/stripe-node/pull/2177) Update generated code
package/VERSION CHANGED
@@ -1 +1 @@
1
- 17.0.0
1
+ 17.1.0
@@ -36,7 +36,7 @@ const ALLOWED_CONFIG_PROPERTIES = [
36
36
  ];
37
37
  const defaultRequestSenderFactory = (stripe) => new RequestSender_js_1.RequestSender(stripe, StripeResource_js_1.StripeResource.MAX_BUFFERED_REQUEST_METRICS);
38
38
  function createStripe(platformFunctions, requestSender = defaultRequestSenderFactory) {
39
- Stripe.PACKAGE_VERSION = '17.0.0';
39
+ Stripe.PACKAGE_VERSION = '17.1.0';
40
40
  Stripe.USER_AGENT = Object.assign({ bindings_version: Stripe.PACKAGE_VERSION, lang: 'node', publisher: 'stripe', uname: null, typescript: false }, (0, utils_js_1.determineProcessUserAgentProperties)());
41
41
  Stripe.StripeResource = StripeResource_js_1.StripeResource;
42
42
  Stripe.resources = resources;
@@ -33,7 +33,7 @@ const ALLOWED_CONFIG_PROPERTIES = [
33
33
  ];
34
34
  const defaultRequestSenderFactory = (stripe) => new RequestSender(stripe, StripeResource.MAX_BUFFERED_REQUEST_METRICS);
35
35
  export function createStripe(platformFunctions, requestSender = defaultRequestSenderFactory) {
36
- Stripe.PACKAGE_VERSION = '17.0.0';
36
+ Stripe.PACKAGE_VERSION = '17.1.0';
37
37
  Stripe.USER_AGENT = Object.assign({ bindings_version: Stripe.PACKAGE_VERSION, lang: 'node', publisher: 'stripe', uname: null, typescript: false }, determineProcessUserAgentProperties());
38
38
  Stripe.StripeResource = StripeResource;
39
39
  Stripe.resources = resources;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stripe",
3
- "version": "17.0.0",
3
+ "version": "17.1.0",
4
4
  "description": "Stripe API wrapper",
5
5
  "keywords": [
6
6
  "stripe",
@@ -177,11 +177,6 @@ declare module 'stripe' {
177
177
  */
178
178
  discount?: string | Stripe.Discount | Stripe.DeletedDiscount;
179
179
 
180
- /**
181
- * The margin that was applied to get this pretax credit amount.
182
- */
183
- margin?: string | Stripe.Margin;
184
-
185
180
  /**
186
181
  * Type of the pretax credit amount referenced.
187
182
  */
@@ -1419,11 +1419,6 @@ declare module 'stripe' {
1419
1419
  */
1420
1420
  discount?: string | Stripe.Discount | Stripe.DeletedDiscount;
1421
1421
 
1422
- /**
1423
- * The margin that was applied to get this pretax credit amount.
1424
- */
1425
- margin?: string | Stripe.Margin;
1426
-
1427
1422
  /**
1428
1423
  * Type of the pretax credit amount referenced.
1429
1424
  */
package/types/index.d.ts CHANGED
@@ -215,7 +215,6 @@
215
215
  ///<reference path='./LineItems.d.ts' />
216
216
  ///<reference path='./LoginLinks.d.ts' />
217
217
  ///<reference path='./Mandates.d.ts' />
218
- ///<reference path='./Margins.d.ts' />
219
218
  ///<reference path='./PaymentIntents.d.ts' />
220
219
  ///<reference path='./PaymentLinks.d.ts' />
221
220
  ///<reference path='./PaymentMethodConfigurations.d.ts' />
@@ -1,56 +0,0 @@
1
- // File generated from our OpenAPI spec
2
-
3
- declare module 'stripe' {
4
- namespace Stripe {
5
- /**
6
- * A (partner) margin represents a specific discount distributed in partner reseller programs to business partners who
7
- * resell products and services and earn a discount (margin) for doing so.
8
- */
9
- interface Margin {
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: 'margin';
19
-
20
- /**
21
- * Whether the margin can be applied to invoices, invoice items, or invoice line items. Defaults to `true`.
22
- */
23
- active: boolean;
24
-
25
- /**
26
- * Time at which the object was created. Measured in seconds since the Unix epoch.
27
- */
28
- created: 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
- * 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.
37
- */
38
- metadata: Stripe.Metadata | null;
39
-
40
- /**
41
- * Name of the margin that's displayed on, for example, invoices.
42
- */
43
- name: string | null;
44
-
45
- /**
46
- * Percent that will be taken off the subtotal before tax (after all other discounts and promotions) of any invoice to which the margin is applied.
47
- */
48
- percent_off: number;
49
-
50
- /**
51
- * Time at which the object was last updated. Measured in seconds since the Unix epoch.
52
- */
53
- updated: number;
54
- }
55
- }
56
- }