stripe 8.221.0 → 8.222.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,5 +1,12 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 8.222.0 - 2022-05-05
4
+ * [#1414](https://github.com/stripe/stripe-node/pull/1414) API Updates
5
+ * Add support for `default_price_data` on `ProductCreateParams`
6
+ * Add support for `default_price` on `ProductUpdateParams` and `Product`
7
+ * Add support for `instructions_email` on `RefundCreateParams` and `Refund`
8
+
9
+
3
10
  ## 8.221.0 - 2022-05-05
4
11
  * [#1413](https://github.com/stripe/stripe-node/pull/1413) API Updates
5
12
  * Add support for new resources `FinancialConnections.AccountOwner`, `FinancialConnections.AccountOwnership`, `FinancialConnections.Account`, and `FinancialConnections.Session`
package/VERSION CHANGED
@@ -1 +1 @@
1
- 8.221.0
1
+ 8.222.0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stripe",
3
- "version": "8.221.0",
3
+ "version": "8.222.0",
4
4
  "description": "Stripe API wrapper",
5
5
  "keywords": [
6
6
  "stripe",
@@ -41,6 +41,11 @@ declare module 'stripe' {
41
41
  */
42
42
  deactivate_on?: Array<string>;
43
43
 
44
+ /**
45
+ * The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product.
46
+ */
47
+ default_price?: string | Stripe.Price | null;
48
+
44
49
  deleted?: void;
45
50
 
46
51
  /**
@@ -181,6 +186,11 @@ declare module 'stripe' {
181
186
  */
182
187
  deactivate_on?: Array<string>;
183
188
 
189
+ /**
190
+ * Data used to generate a new [Price](https://stripe.com/docs/api/prices) object. This Price will be set as the default price for this product.
191
+ */
192
+ default_price_data?: ProductCreateParams.DefaultPriceData;
193
+
184
194
  /**
185
195
  * The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
186
196
  */
@@ -246,6 +256,53 @@ declare module 'stripe' {
246
256
  }
247
257
 
248
258
  namespace ProductCreateParams {
259
+ interface DefaultPriceData {
260
+ /**
261
+ * 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).
262
+ */
263
+ currency: string;
264
+
265
+ /**
266
+ * The recurring components of a price such as `interval` and `interval_count`.
267
+ */
268
+ recurring?: DefaultPriceData.Recurring;
269
+
270
+ /**
271
+ * Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
272
+ */
273
+ tax_behavior?: DefaultPriceData.TaxBehavior;
274
+
275
+ /**
276
+ * A positive integer in %s (or 0 for a free price) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required.
277
+ */
278
+ unit_amount?: number;
279
+
280
+ /**
281
+ * Same as `unit_amount`, but accepts a decimal value in %s with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
282
+ */
283
+ unit_amount_decimal?: string;
284
+ }
285
+
286
+ namespace DefaultPriceData {
287
+ interface Recurring {
288
+ /**
289
+ * Specifies billing frequency. Either `day`, `week`, `month` or `year`.
290
+ */
291
+ interval: Recurring.Interval;
292
+
293
+ /**
294
+ * The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks).
295
+ */
296
+ interval_count?: number;
297
+ }
298
+
299
+ namespace Recurring {
300
+ type Interval = 'day' | 'month' | 'week' | 'year';
301
+ }
302
+
303
+ type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
304
+ }
305
+
249
306
  interface PackageDimensions {
250
307
  /**
251
308
  * Height, in inches. Maximum precision is 2 decimal places.
@@ -299,6 +356,11 @@ declare module 'stripe' {
299
356
  */
300
357
  deactivate_on?: Array<string>;
301
358
 
359
+ /**
360
+ * The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product.
361
+ */
362
+ default_price?: string;
363
+
302
364
  /**
303
365
  * The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
304
366
  */
@@ -56,6 +56,11 @@ declare module 'stripe' {
56
56
  */
57
57
  failure_reason?: string;
58
58
 
59
+ /**
60
+ * Email to which refund instructions, if required, are sent to.
61
+ */
62
+ instructions_email?: string;
63
+
59
64
  /**
60
65
  * 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.
61
66
  */
@@ -149,6 +154,8 @@ declare module 'stripe' {
149
154
  */
150
155
  expand?: Array<string>;
151
156
 
157
+ instructions_email?: string;
158
+
152
159
  /**
153
160
  * 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`.
154
161
  */