orb-billing 4.21.0 → 4.24.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 +31 -0
- package/core.d.ts +3 -1
- package/core.d.ts.map +1 -1
- package/core.js +7 -5
- package/core.js.map +1 -1
- package/core.mjs +7 -5
- package/core.mjs.map +1 -1
- package/index.d.mts +4 -0
- package/index.d.ts +4 -0
- package/index.d.ts.map +1 -1
- package/index.js.map +1 -1
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/coupons/coupons.d.ts +2 -30
- package/resources/coupons/coupons.d.ts.map +1 -1
- package/resources/coupons/coupons.js.map +1 -1
- package/resources/coupons/coupons.mjs.map +1 -1
- package/resources/customers/costs.d.ts +0 -34
- package/resources/customers/costs.d.ts.map +1 -1
- package/resources/customers/costs.js.map +1 -1
- package/resources/customers/costs.mjs.map +1 -1
- package/resources/customers/customers.d.ts +31 -0
- package/resources/customers/customers.d.ts.map +1 -1
- package/resources/customers/customers.js.map +1 -1
- package/resources/customers/customers.mjs.map +1 -1
- package/resources/invoices.d.ts +10 -186
- package/resources/invoices.d.ts.map +1 -1
- package/resources/invoices.js.map +1 -1
- package/resources/invoices.mjs.map +1 -1
- package/resources/plans/plans.d.ts +95 -1
- package/resources/plans/plans.d.ts.map +1 -1
- package/resources/plans/plans.js.map +1 -1
- package/resources/plans/plans.mjs.map +1 -1
- package/resources/prices/prices.d.ts +169 -2
- package/resources/prices/prices.d.ts.map +1 -1
- package/resources/prices/prices.js.map +1 -1
- package/resources/prices/prices.mjs.map +1 -1
- package/resources/shared.d.ts +46 -45
- package/resources/shared.d.ts.map +1 -1
- package/resources/subscriptions.d.ts +11018 -3071
- package/resources/subscriptions.d.ts.map +1 -1
- package/resources/subscriptions.js.map +1 -1
- package/resources/subscriptions.mjs.map +1 -1
- package/src/core.ts +12 -4
- package/src/index.ts +4 -0
- package/src/resources/coupons/coupons.ts +2 -38
- package/src/resources/customers/costs.ts +0 -34
- package/src/resources/customers/customers.ts +59 -0
- package/src/resources/invoices.ts +10 -246
- package/src/resources/plans/plans.ts +114 -0
- package/src/resources/prices/prices.ts +224 -0
- package/src/resources/shared.ts +57 -59
- package/src/resources/subscriptions.ts +13372 -3713
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscriptions.js","sourceRoot":"","sources":["../src/resources/subscriptions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtF,6CAA0C;AAC1C,qCAA2C;AAE3C,qEAAoD;AAKpD,iDAAsD;AAEtD,MAAa,aAAc,SAAQ,sBAAW;IA2Y5C,MAAM,CACJ,OAAuD,EAAE,EACzD,OAA6B;QAE7B,IAAI,IAAA,uBAAgB,EAAC,IAAI,CAAC,EAAE;YAC1B,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;SAC9B;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnE,CAAC;IAaD,MAAM,CACJ,cAAsB,EACtB,OAAuD,EAAE,EACzD,OAA6B;QAE7B,IAAI,IAAA,uBAAgB,EAAC,IAAI,CAAC,EAAE;YAC1B,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;SAC9C;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,cAAc,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpF,CAAC;IAkBD,IAAI,CACF,QAAsD,EAAE,EACxD,OAA6B;QAE7B,IAAI,IAAA,uBAAgB,EAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,IAAI,CAAC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BAAkB,cAAc,0BAA0B,EAAE,OAAO,CAAC,CAAC;IAChG,CAAC;IAED;;;;;;OAMG;IACH,iCAAiC,CAC/B,cAAsB,EACtB,IAAyD,EACzD,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,cAAc,wCAAwC,EAAE;YACjG,IAAI;YACJ,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,4BAA4B,CAC1B,cAAsB,EACtB,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,cAAc,kCAAkC,EAAE,OAAO,CAAC,CAAC;IACxG,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,sBAAsB,CACpB,cAAsB,EACtB,IAA8C,EAC9C,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,cAAc,4BAA4B,EAAE;YACrF,IAAI;YACJ,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF;AAED,MAAM,OAAO,iBAAkB,SAAQ,IAAkB;CAAG;AAE5D,MAAM,OAAO,sCAAuC,SAAQ,IAAuC;CAAG;AAkzhBtG,WAAiB,aAAa;IAGd,2BAAa,GAAG,gBAAgB,CAAC,aAAa,CAAC;IAG/C,+BAAiB,GAAG,gBAAgB,CAAC,iBAAiB,CAAC;IACvD,oDAAsC,GAAG,gBAAgB,CAAC,sCAAsC,CAAC;AAajH,CAAC,EApBgB,aAAa,KAAb,aAAa,QAoB7B"}
|
package/src/core.ts
CHANGED
|
@@ -274,7 +274,10 @@ export abstract class APIClient {
|
|
|
274
274
|
return null;
|
|
275
275
|
}
|
|
276
276
|
|
|
277
|
-
buildRequest<Req>(
|
|
277
|
+
buildRequest<Req>(
|
|
278
|
+
options: FinalRequestOptions<Req>,
|
|
279
|
+
{ retryCount = 0 }: { retryCount?: number } = {},
|
|
280
|
+
): { req: RequestInit; url: string; timeout: number } {
|
|
278
281
|
const { method, path, query, headers: headers = {} } = options;
|
|
279
282
|
|
|
280
283
|
const body =
|
|
@@ -306,7 +309,7 @@ export abstract class APIClient {
|
|
|
306
309
|
headers[this.idempotencyHeader] = options.idempotencyKey;
|
|
307
310
|
}
|
|
308
311
|
|
|
309
|
-
const reqHeaders = this.buildHeaders({ options, headers, contentLength });
|
|
312
|
+
const reqHeaders = this.buildHeaders({ options, headers, contentLength, retryCount });
|
|
310
313
|
|
|
311
314
|
const req: RequestInit = {
|
|
312
315
|
method,
|
|
@@ -325,10 +328,12 @@ export abstract class APIClient {
|
|
|
325
328
|
options,
|
|
326
329
|
headers,
|
|
327
330
|
contentLength,
|
|
331
|
+
retryCount,
|
|
328
332
|
}: {
|
|
329
333
|
options: FinalRequestOptions;
|
|
330
334
|
headers: Record<string, string | null | undefined>;
|
|
331
335
|
contentLength: string | null | undefined;
|
|
336
|
+
retryCount: number;
|
|
332
337
|
}): Record<string, string> {
|
|
333
338
|
const reqHeaders: Record<string, string> = {};
|
|
334
339
|
if (contentLength) {
|
|
@@ -344,6 +349,8 @@ export abstract class APIClient {
|
|
|
344
349
|
delete reqHeaders['content-type'];
|
|
345
350
|
}
|
|
346
351
|
|
|
352
|
+
reqHeaders['x-stainless-retry-count'] = String(retryCount);
|
|
353
|
+
|
|
347
354
|
this.validateHeaders(reqHeaders, headers);
|
|
348
355
|
|
|
349
356
|
return reqHeaders;
|
|
@@ -395,13 +402,14 @@ export abstract class APIClient {
|
|
|
395
402
|
retriesRemaining: number | null,
|
|
396
403
|
): Promise<APIResponseProps> {
|
|
397
404
|
const options = await optionsInput;
|
|
405
|
+
const maxRetries = options.maxRetries ?? this.maxRetries;
|
|
398
406
|
if (retriesRemaining == null) {
|
|
399
|
-
retriesRemaining =
|
|
407
|
+
retriesRemaining = maxRetries;
|
|
400
408
|
}
|
|
401
409
|
|
|
402
410
|
await this.prepareOptions(options);
|
|
403
411
|
|
|
404
|
-
const { req, url, timeout } = this.buildRequest(options);
|
|
412
|
+
const { req, url, timeout } = this.buildRequest(options, { retryCount: maxRetries - retriesRemaining });
|
|
405
413
|
|
|
406
414
|
await this.prepareRequest(req, { url, options });
|
|
407
415
|
|
package/src/index.ts
CHANGED
|
@@ -342,9 +342,13 @@ export namespace Orb {
|
|
|
342
342
|
export import AlertCreateForExternalCustomerParams = API.AlertCreateForExternalCustomerParams;
|
|
343
343
|
export import AlertCreateForSubscriptionParams = API.AlertCreateForSubscriptionParams;
|
|
344
344
|
|
|
345
|
+
export import AmountDiscount = API.AmountDiscount;
|
|
345
346
|
export import BillingCycleRelativeDate = API.BillingCycleRelativeDate;
|
|
346
347
|
export import Discount = API.Discount;
|
|
348
|
+
export import InvoiceLevelDiscount = API.InvoiceLevelDiscount;
|
|
347
349
|
export import PaginationMetadata = API.PaginationMetadata;
|
|
350
|
+
export import PercentageDiscount = API.PercentageDiscount;
|
|
351
|
+
export import TrialDiscount = API.TrialDiscount;
|
|
348
352
|
}
|
|
349
353
|
|
|
350
354
|
export default Orb;
|
|
@@ -4,6 +4,7 @@ import { APIResource } from '../../resource';
|
|
|
4
4
|
import { isRequestOptions } from '../../core';
|
|
5
5
|
import * as Core from '../../core';
|
|
6
6
|
import * as CouponsAPI from './coupons';
|
|
7
|
+
import * as Shared from '../shared';
|
|
7
8
|
import * as SubscriptionsAPI from './subscriptions';
|
|
8
9
|
import { Page, type PageParams } from '../../pagination';
|
|
9
10
|
|
|
@@ -112,7 +113,7 @@ export interface Coupon {
|
|
|
112
113
|
*/
|
|
113
114
|
archived_at: string | null;
|
|
114
115
|
|
|
115
|
-
discount:
|
|
116
|
+
discount: Shared.PercentageDiscount | Shared.AmountDiscount;
|
|
116
117
|
|
|
117
118
|
/**
|
|
118
119
|
* This allows for a coupon's discount to apply for a limited time (determined in
|
|
@@ -137,43 +138,6 @@ export interface Coupon {
|
|
|
137
138
|
times_redeemed: number;
|
|
138
139
|
}
|
|
139
140
|
|
|
140
|
-
export namespace Coupon {
|
|
141
|
-
export interface PercentageDiscount {
|
|
142
|
-
/**
|
|
143
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
144
|
-
* this can be a subset of prices.
|
|
145
|
-
*/
|
|
146
|
-
applies_to_price_ids: Array<string>;
|
|
147
|
-
|
|
148
|
-
discount_type: 'percentage';
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
* Only available if discount_type is `percentage`. This is a number between 0
|
|
152
|
-
* and 1.
|
|
153
|
-
*/
|
|
154
|
-
percentage_discount: number;
|
|
155
|
-
|
|
156
|
-
reason?: string | null;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
export interface AmountDiscount {
|
|
160
|
-
/**
|
|
161
|
-
* Only available if discount_type is `amount`.
|
|
162
|
-
*/
|
|
163
|
-
amount_discount: string;
|
|
164
|
-
|
|
165
|
-
/**
|
|
166
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
167
|
-
* this can be a subset of prices.
|
|
168
|
-
*/
|
|
169
|
-
applies_to_price_ids: Array<string>;
|
|
170
|
-
|
|
171
|
-
discount_type: 'amount';
|
|
172
|
-
|
|
173
|
-
reason?: string | null;
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
|
|
177
141
|
export interface CouponCreateParams {
|
|
178
142
|
discount: CouponCreateParams.NewCouponPercentageDiscount | CouponCreateParams.NewCouponAmountDiscount;
|
|
179
143
|
|
|
@@ -119,23 +119,6 @@ export class Costs extends APIResource {
|
|
|
119
119
|
* You can see this sliced timeframe visualized
|
|
120
120
|
* [here](https://i.imgur.com/TXhYgme.png).
|
|
121
121
|
*
|
|
122
|
-
* ## Grouping by custom attributes
|
|
123
|
-
*
|
|
124
|
-
* In order to view costs grouped by a specific _attribute_ that each event is
|
|
125
|
-
* tagged with (i.e. `cluster`), you can additionally specify a `group_by` key. The
|
|
126
|
-
* `group_by` key denotes the event property on which to group.
|
|
127
|
-
*
|
|
128
|
-
* When returning grouped costs, a separate `price_group` object in the
|
|
129
|
-
* `per_price_costs` array is returned for each value of the `group_by` key present
|
|
130
|
-
* in your events. The `subtotal` value of the `per_price_costs` object is the sum
|
|
131
|
-
* of each `price_group`'s total.
|
|
132
|
-
*
|
|
133
|
-
* Orb expects events will contain values in the `properties` dictionary that
|
|
134
|
-
* correspond to the `group_by` key specified. By default, Orb will return a `null`
|
|
135
|
-
* group (i.e. events that match the metric but do not have the key set).
|
|
136
|
-
* Currently, it is only possible to view costs grouped by a single attribute at a
|
|
137
|
-
* time.
|
|
138
|
-
*
|
|
139
122
|
* ### Matrix prices
|
|
140
123
|
*
|
|
141
124
|
* When a price uses matrix pricing, it's important to view costs grouped by those
|
|
@@ -272,23 +255,6 @@ export class Costs extends APIResource {
|
|
|
272
255
|
* You can see this sliced timeframe visualized
|
|
273
256
|
* [here](https://i.imgur.com/TXhYgme.png).
|
|
274
257
|
*
|
|
275
|
-
* ## Grouping by custom attributes
|
|
276
|
-
*
|
|
277
|
-
* In order to view costs grouped by a specific _attribute_ that each event is
|
|
278
|
-
* tagged with (i.e. `cluster`), you can additionally specify a `group_by` key. The
|
|
279
|
-
* `group_by` key denotes the event property on which to group.
|
|
280
|
-
*
|
|
281
|
-
* When returning grouped costs, a separate `price_group` object in the
|
|
282
|
-
* `per_price_costs` array is returned for each value of the `group_by` key present
|
|
283
|
-
* in your events. The `subtotal` value of the `per_price_costs` object is the sum
|
|
284
|
-
* of each `price_group`'s total.
|
|
285
|
-
*
|
|
286
|
-
* Orb expects events will contain values in the `properties` dictionary that
|
|
287
|
-
* correspond to the `group_by` key specified. By default, Orb will return a `null`
|
|
288
|
-
* group (i.e. events that match the metric but do not have the key set).
|
|
289
|
-
* Currently, it is only possible to view costs grouped by a single attribute at a
|
|
290
|
-
* time.
|
|
291
|
-
*
|
|
292
258
|
* ### Matrix prices
|
|
293
259
|
*
|
|
294
260
|
* When a price uses matrix pricing, it's important to view costs grouped by those
|
|
@@ -197,6 +197,8 @@ export interface Customer {
|
|
|
197
197
|
|
|
198
198
|
email_delivery: boolean;
|
|
199
199
|
|
|
200
|
+
exempt_from_automated_tax: boolean | null;
|
|
201
|
+
|
|
200
202
|
/**
|
|
201
203
|
* An optional user-defined ID for this customer resource, used throughout the
|
|
202
204
|
* system as an alias for this Customer. Use this field to identify a customer by
|
|
@@ -736,6 +738,11 @@ export interface CustomerCreateParams {
|
|
|
736
738
|
|
|
737
739
|
shipping_address?: CustomerCreateParams.ShippingAddress | null;
|
|
738
740
|
|
|
741
|
+
tax_configuration?:
|
|
742
|
+
| CustomerCreateParams.NewAvalaraTaxConfiguration
|
|
743
|
+
| CustomerCreateParams.NewTaxJarConfiguration
|
|
744
|
+
| null;
|
|
745
|
+
|
|
739
746
|
/**
|
|
740
747
|
* Tax IDs are commonly required to be displayed on customer invoices, which are
|
|
741
748
|
* added to the headers of invoices.
|
|
@@ -900,6 +907,20 @@ export namespace CustomerCreateParams {
|
|
|
900
907
|
state?: string | null;
|
|
901
908
|
}
|
|
902
909
|
|
|
910
|
+
export interface NewAvalaraTaxConfiguration {
|
|
911
|
+
tax_exempt: boolean;
|
|
912
|
+
|
|
913
|
+
tax_provider: 'avalara';
|
|
914
|
+
|
|
915
|
+
tax_exemption_code?: string | null;
|
|
916
|
+
}
|
|
917
|
+
|
|
918
|
+
export interface NewTaxJarConfiguration {
|
|
919
|
+
tax_exempt: boolean;
|
|
920
|
+
|
|
921
|
+
tax_provider: 'taxjar';
|
|
922
|
+
}
|
|
923
|
+
|
|
903
924
|
/**
|
|
904
925
|
* Tax IDs are commonly required to be displayed on customer invoices, which are
|
|
905
926
|
* added to the headers of invoices.
|
|
@@ -1235,6 +1256,11 @@ export interface CustomerUpdateParams {
|
|
|
1235
1256
|
|
|
1236
1257
|
shipping_address?: CustomerUpdateParams.ShippingAddress | null;
|
|
1237
1258
|
|
|
1259
|
+
tax_configuration?:
|
|
1260
|
+
| CustomerUpdateParams.NewAvalaraTaxConfiguration
|
|
1261
|
+
| CustomerUpdateParams.NewTaxJarConfiguration
|
|
1262
|
+
| null;
|
|
1263
|
+
|
|
1238
1264
|
/**
|
|
1239
1265
|
* Tax IDs are commonly required to be displayed on customer invoices, which are
|
|
1240
1266
|
* added to the headers of invoices.
|
|
@@ -1392,6 +1418,20 @@ export namespace CustomerUpdateParams {
|
|
|
1392
1418
|
state?: string | null;
|
|
1393
1419
|
}
|
|
1394
1420
|
|
|
1421
|
+
export interface NewAvalaraTaxConfiguration {
|
|
1422
|
+
tax_exempt: boolean;
|
|
1423
|
+
|
|
1424
|
+
tax_provider: 'avalara';
|
|
1425
|
+
|
|
1426
|
+
tax_exemption_code?: string | null;
|
|
1427
|
+
}
|
|
1428
|
+
|
|
1429
|
+
export interface NewTaxJarConfiguration {
|
|
1430
|
+
tax_exempt: boolean;
|
|
1431
|
+
|
|
1432
|
+
tax_provider: 'taxjar';
|
|
1433
|
+
}
|
|
1434
|
+
|
|
1395
1435
|
/**
|
|
1396
1436
|
* Tax IDs are commonly required to be displayed on customer invoices, which are
|
|
1397
1437
|
* added to the headers of invoices.
|
|
@@ -1737,6 +1777,11 @@ export interface CustomerUpdateByExternalIDParams {
|
|
|
1737
1777
|
|
|
1738
1778
|
shipping_address?: CustomerUpdateByExternalIDParams.ShippingAddress | null;
|
|
1739
1779
|
|
|
1780
|
+
tax_configuration?:
|
|
1781
|
+
| CustomerUpdateByExternalIDParams.NewAvalaraTaxConfiguration
|
|
1782
|
+
| CustomerUpdateByExternalIDParams.NewTaxJarConfiguration
|
|
1783
|
+
| null;
|
|
1784
|
+
|
|
1740
1785
|
/**
|
|
1741
1786
|
* Tax IDs are commonly required to be displayed on customer invoices, which are
|
|
1742
1787
|
* added to the headers of invoices.
|
|
@@ -1894,6 +1939,20 @@ export namespace CustomerUpdateByExternalIDParams {
|
|
|
1894
1939
|
state?: string | null;
|
|
1895
1940
|
}
|
|
1896
1941
|
|
|
1942
|
+
export interface NewAvalaraTaxConfiguration {
|
|
1943
|
+
tax_exempt: boolean;
|
|
1944
|
+
|
|
1945
|
+
tax_provider: 'avalara';
|
|
1946
|
+
|
|
1947
|
+
tax_exemption_code?: string | null;
|
|
1948
|
+
}
|
|
1949
|
+
|
|
1950
|
+
export interface NewTaxJarConfiguration {
|
|
1951
|
+
tax_exempt: boolean;
|
|
1952
|
+
|
|
1953
|
+
tax_provider: 'taxjar';
|
|
1954
|
+
}
|
|
1955
|
+
|
|
1897
1956
|
/**
|
|
1898
1957
|
* Tax IDs are commonly required to be displayed on customer invoices, which are
|
|
1899
1958
|
* added to the headers of invoices.
|
|
@@ -284,13 +284,13 @@ export interface Invoice {
|
|
|
284
284
|
customer_tax_id: Invoice.CustomerTaxID | null;
|
|
285
285
|
|
|
286
286
|
/**
|
|
287
|
-
* This field is deprecated in favor of `discounts`. If a `discounts`
|
|
288
|
-
* provided, the first discount in the list will be returned. If the list
|
|
289
|
-
* `None` will be returned.
|
|
287
|
+
* @deprecated: This field is deprecated in favor of `discounts`. If a `discounts`
|
|
288
|
+
* list is provided, the first discount in the list will be returned. If the list
|
|
289
|
+
* is empty, `None` will be returned.
|
|
290
290
|
*/
|
|
291
|
-
discount:
|
|
291
|
+
discount: Shared.InvoiceLevelDiscount | null;
|
|
292
292
|
|
|
293
|
-
discounts: Array<
|
|
293
|
+
discounts: Array<Shared.InvoiceLevelDiscount>;
|
|
294
294
|
|
|
295
295
|
/**
|
|
296
296
|
* When the invoice payment is due.
|
|
@@ -831,120 +831,6 @@ export namespace Invoice {
|
|
|
831
831
|
value: string;
|
|
832
832
|
}
|
|
833
833
|
|
|
834
|
-
export interface PercentageDiscount {
|
|
835
|
-
/**
|
|
836
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
837
|
-
* this can be a subset of prices.
|
|
838
|
-
*/
|
|
839
|
-
applies_to_price_ids: Array<string>;
|
|
840
|
-
|
|
841
|
-
discount_type: 'percentage';
|
|
842
|
-
|
|
843
|
-
/**
|
|
844
|
-
* Only available if discount_type is `percentage`. This is a number between 0
|
|
845
|
-
* and 1.
|
|
846
|
-
*/
|
|
847
|
-
percentage_discount: number;
|
|
848
|
-
|
|
849
|
-
reason?: string | null;
|
|
850
|
-
}
|
|
851
|
-
|
|
852
|
-
export interface AmountDiscount {
|
|
853
|
-
/**
|
|
854
|
-
* Only available if discount_type is `amount`.
|
|
855
|
-
*/
|
|
856
|
-
amount_discount: string;
|
|
857
|
-
|
|
858
|
-
/**
|
|
859
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
860
|
-
* this can be a subset of prices.
|
|
861
|
-
*/
|
|
862
|
-
applies_to_price_ids: Array<string>;
|
|
863
|
-
|
|
864
|
-
discount_type: 'amount';
|
|
865
|
-
|
|
866
|
-
reason?: string | null;
|
|
867
|
-
}
|
|
868
|
-
|
|
869
|
-
export interface TrialDiscount {
|
|
870
|
-
/**
|
|
871
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
872
|
-
* this can be a subset of prices.
|
|
873
|
-
*/
|
|
874
|
-
applies_to_price_ids: Array<string>;
|
|
875
|
-
|
|
876
|
-
discount_type: 'trial';
|
|
877
|
-
|
|
878
|
-
reason?: string | null;
|
|
879
|
-
|
|
880
|
-
/**
|
|
881
|
-
* Only available if discount_type is `trial`
|
|
882
|
-
*/
|
|
883
|
-
trial_amount_discount?: string | null;
|
|
884
|
-
|
|
885
|
-
/**
|
|
886
|
-
* Only available if discount_type is `trial`
|
|
887
|
-
*/
|
|
888
|
-
trial_percentage_discount?: number | null;
|
|
889
|
-
}
|
|
890
|
-
|
|
891
|
-
export interface PercentageDiscount {
|
|
892
|
-
/**
|
|
893
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
894
|
-
* this can be a subset of prices.
|
|
895
|
-
*/
|
|
896
|
-
applies_to_price_ids: Array<string>;
|
|
897
|
-
|
|
898
|
-
discount_type: 'percentage';
|
|
899
|
-
|
|
900
|
-
/**
|
|
901
|
-
* Only available if discount_type is `percentage`. This is a number between 0
|
|
902
|
-
* and 1.
|
|
903
|
-
*/
|
|
904
|
-
percentage_discount: number;
|
|
905
|
-
|
|
906
|
-
reason?: string | null;
|
|
907
|
-
}
|
|
908
|
-
|
|
909
|
-
export interface AmountDiscount {
|
|
910
|
-
/**
|
|
911
|
-
* Only available if discount_type is `amount`.
|
|
912
|
-
*/
|
|
913
|
-
amount_discount: string;
|
|
914
|
-
|
|
915
|
-
/**
|
|
916
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
917
|
-
* this can be a subset of prices.
|
|
918
|
-
*/
|
|
919
|
-
applies_to_price_ids: Array<string>;
|
|
920
|
-
|
|
921
|
-
discount_type: 'amount';
|
|
922
|
-
|
|
923
|
-
reason?: string | null;
|
|
924
|
-
}
|
|
925
|
-
|
|
926
|
-
export interface TrialDiscount {
|
|
927
|
-
/**
|
|
928
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
929
|
-
* this can be a subset of prices.
|
|
930
|
-
*/
|
|
931
|
-
applies_to_price_ids: Array<string>;
|
|
932
|
-
|
|
933
|
-
discount_type: 'trial';
|
|
934
|
-
|
|
935
|
-
reason?: string | null;
|
|
936
|
-
|
|
937
|
-
/**
|
|
938
|
-
* Only available if discount_type is `trial`
|
|
939
|
-
*/
|
|
940
|
-
trial_amount_discount?: string | null;
|
|
941
|
-
|
|
942
|
-
/**
|
|
943
|
-
* Only available if discount_type is `trial`
|
|
944
|
-
*/
|
|
945
|
-
trial_percentage_discount?: number | null;
|
|
946
|
-
}
|
|
947
|
-
|
|
948
834
|
export interface LineItem {
|
|
949
835
|
/**
|
|
950
836
|
* A unique ID for this line item.
|
|
@@ -1572,21 +1458,13 @@ export interface InvoiceFetchUpcomingResponse {
|
|
|
1572
1458
|
customer_tax_id: InvoiceFetchUpcomingResponse.CustomerTaxID | null;
|
|
1573
1459
|
|
|
1574
1460
|
/**
|
|
1575
|
-
* This field is deprecated in favor of `discounts`. If a `discounts`
|
|
1576
|
-
* provided, the first discount in the list will be returned. If the list
|
|
1577
|
-
* `None` will be returned.
|
|
1461
|
+
* @deprecated: This field is deprecated in favor of `discounts`. If a `discounts`
|
|
1462
|
+
* list is provided, the first discount in the list will be returned. If the list
|
|
1463
|
+
* is empty, `None` will be returned.
|
|
1578
1464
|
*/
|
|
1579
|
-
discount:
|
|
1580
|
-
| InvoiceFetchUpcomingResponse.PercentageDiscount
|
|
1581
|
-
| InvoiceFetchUpcomingResponse.AmountDiscount
|
|
1582
|
-
| InvoiceFetchUpcomingResponse.TrialDiscount
|
|
1583
|
-
| null;
|
|
1465
|
+
discount: Shared.InvoiceLevelDiscount | null;
|
|
1584
1466
|
|
|
1585
|
-
discounts: Array<
|
|
1586
|
-
| InvoiceFetchUpcomingResponse.PercentageDiscount
|
|
1587
|
-
| InvoiceFetchUpcomingResponse.AmountDiscount
|
|
1588
|
-
| InvoiceFetchUpcomingResponse.TrialDiscount
|
|
1589
|
-
>;
|
|
1467
|
+
discounts: Array<Shared.InvoiceLevelDiscount>;
|
|
1590
1468
|
|
|
1591
1469
|
/**
|
|
1592
1470
|
* When the invoice payment is due.
|
|
@@ -2127,120 +2005,6 @@ export namespace InvoiceFetchUpcomingResponse {
|
|
|
2127
2005
|
value: string;
|
|
2128
2006
|
}
|
|
2129
2007
|
|
|
2130
|
-
export interface PercentageDiscount {
|
|
2131
|
-
/**
|
|
2132
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
2133
|
-
* this can be a subset of prices.
|
|
2134
|
-
*/
|
|
2135
|
-
applies_to_price_ids: Array<string>;
|
|
2136
|
-
|
|
2137
|
-
discount_type: 'percentage';
|
|
2138
|
-
|
|
2139
|
-
/**
|
|
2140
|
-
* Only available if discount_type is `percentage`. This is a number between 0
|
|
2141
|
-
* and 1.
|
|
2142
|
-
*/
|
|
2143
|
-
percentage_discount: number;
|
|
2144
|
-
|
|
2145
|
-
reason?: string | null;
|
|
2146
|
-
}
|
|
2147
|
-
|
|
2148
|
-
export interface AmountDiscount {
|
|
2149
|
-
/**
|
|
2150
|
-
* Only available if discount_type is `amount`.
|
|
2151
|
-
*/
|
|
2152
|
-
amount_discount: string;
|
|
2153
|
-
|
|
2154
|
-
/**
|
|
2155
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
2156
|
-
* this can be a subset of prices.
|
|
2157
|
-
*/
|
|
2158
|
-
applies_to_price_ids: Array<string>;
|
|
2159
|
-
|
|
2160
|
-
discount_type: 'amount';
|
|
2161
|
-
|
|
2162
|
-
reason?: string | null;
|
|
2163
|
-
}
|
|
2164
|
-
|
|
2165
|
-
export interface TrialDiscount {
|
|
2166
|
-
/**
|
|
2167
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
2168
|
-
* this can be a subset of prices.
|
|
2169
|
-
*/
|
|
2170
|
-
applies_to_price_ids: Array<string>;
|
|
2171
|
-
|
|
2172
|
-
discount_type: 'trial';
|
|
2173
|
-
|
|
2174
|
-
reason?: string | null;
|
|
2175
|
-
|
|
2176
|
-
/**
|
|
2177
|
-
* Only available if discount_type is `trial`
|
|
2178
|
-
*/
|
|
2179
|
-
trial_amount_discount?: string | null;
|
|
2180
|
-
|
|
2181
|
-
/**
|
|
2182
|
-
* Only available if discount_type is `trial`
|
|
2183
|
-
*/
|
|
2184
|
-
trial_percentage_discount?: number | null;
|
|
2185
|
-
}
|
|
2186
|
-
|
|
2187
|
-
export interface PercentageDiscount {
|
|
2188
|
-
/**
|
|
2189
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
2190
|
-
* this can be a subset of prices.
|
|
2191
|
-
*/
|
|
2192
|
-
applies_to_price_ids: Array<string>;
|
|
2193
|
-
|
|
2194
|
-
discount_type: 'percentage';
|
|
2195
|
-
|
|
2196
|
-
/**
|
|
2197
|
-
* Only available if discount_type is `percentage`. This is a number between 0
|
|
2198
|
-
* and 1.
|
|
2199
|
-
*/
|
|
2200
|
-
percentage_discount: number;
|
|
2201
|
-
|
|
2202
|
-
reason?: string | null;
|
|
2203
|
-
}
|
|
2204
|
-
|
|
2205
|
-
export interface AmountDiscount {
|
|
2206
|
-
/**
|
|
2207
|
-
* Only available if discount_type is `amount`.
|
|
2208
|
-
*/
|
|
2209
|
-
amount_discount: string;
|
|
2210
|
-
|
|
2211
|
-
/**
|
|
2212
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
2213
|
-
* this can be a subset of prices.
|
|
2214
|
-
*/
|
|
2215
|
-
applies_to_price_ids: Array<string>;
|
|
2216
|
-
|
|
2217
|
-
discount_type: 'amount';
|
|
2218
|
-
|
|
2219
|
-
reason?: string | null;
|
|
2220
|
-
}
|
|
2221
|
-
|
|
2222
|
-
export interface TrialDiscount {
|
|
2223
|
-
/**
|
|
2224
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
2225
|
-
* this can be a subset of prices.
|
|
2226
|
-
*/
|
|
2227
|
-
applies_to_price_ids: Array<string>;
|
|
2228
|
-
|
|
2229
|
-
discount_type: 'trial';
|
|
2230
|
-
|
|
2231
|
-
reason?: string | null;
|
|
2232
|
-
|
|
2233
|
-
/**
|
|
2234
|
-
* Only available if discount_type is `trial`
|
|
2235
|
-
*/
|
|
2236
|
-
trial_amount_discount?: string | null;
|
|
2237
|
-
|
|
2238
|
-
/**
|
|
2239
|
-
* Only available if discount_type is `trial`
|
|
2240
|
-
*/
|
|
2241
|
-
trial_percentage_discount?: number | null;
|
|
2242
|
-
}
|
|
2243
|
-
|
|
2244
2008
|
export interface LineItem {
|
|
2245
2009
|
/**
|
|
2246
2010
|
* A unique ID for this line item.
|