Skip to content

Commit ffe44f5

Browse files
authored
API Updates (#1414)
1 parent 59e8199 commit ffe44f5

File tree

2 files changed

+69
-0
lines changed

2 files changed

+69
-0
lines changed

types/2020-08-27/Products.d.ts

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ declare module 'stripe' {
4141
*/
4242
deactivate_on?: Array<string>;
4343

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+
4449
deleted?: void;
4550

4651
/**
@@ -181,6 +186,11 @@ declare module 'stripe' {
181186
*/
182187
deactivate_on?: Array<string>;
183188

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+
184194
/**
185195
* 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.
186196
*/
@@ -246,6 +256,53 @@ declare module 'stripe' {
246256
}
247257

248258
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+
249306
interface PackageDimensions {
250307
/**
251308
* Height, in inches. Maximum precision is 2 decimal places.
@@ -299,6 +356,11 @@ declare module 'stripe' {
299356
*/
300357
deactivate_on?: Array<string>;
301358

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+
302364
/**
303365
* 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.
304366
*/

types/2020-08-27/Refunds.d.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ declare module 'stripe' {
5656
*/
5757
failure_reason?: string;
5858

59+
/**
60+
* Email to which refund instructions, if required, are sent to.
61+
*/
62+
instructions_email?: string;
63+
5964
/**
6065
* 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.
6166
*/
@@ -149,6 +154,8 @@ declare module 'stripe' {
149154
*/
150155
expand?: Array<string>;
151156

157+
instructions_email?: string;
158+
152159
/**
153160
* 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`.
154161
*/

0 commit comments

Comments
 (0)