orb-billing 4.72.3 → 4.74.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 +30 -0
- package/README.md +18 -30
- package/index.d.mts +7 -4
- package/index.d.ts +7 -4
- package/index.d.ts.map +1 -1
- package/index.js +3 -0
- package/index.js.map +1 -1
- package/index.mjs +3 -0
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/alerts.d.ts +18 -0
- package/resources/alerts.d.ts.map +1 -1
- package/resources/alerts.js.map +1 -1
- package/resources/alerts.mjs.map +1 -1
- package/resources/beta/beta.d.ts +7492 -0
- package/resources/beta/beta.d.ts.map +1 -0
- package/resources/beta/beta.js +67 -0
- package/resources/beta/beta.js.map +1 -0
- package/resources/beta/beta.mjs +40 -0
- package/resources/beta/beta.mjs.map +1 -0
- package/resources/beta/external-plan-id.d.ts +7218 -0
- package/resources/beta/external-plan-id.d.ts.map +1 -0
- package/resources/beta/external-plan-id.js +40 -0
- package/resources/beta/external-plan-id.js.map +1 -0
- package/resources/beta/external-plan-id.mjs +36 -0
- package/resources/beta/external-plan-id.mjs.map +1 -0
- package/resources/beta/index.d.ts +3 -0
- package/resources/beta/index.d.ts.map +1 -0
- package/resources/beta/index.js +9 -0
- package/resources/beta/index.js.map +1 -0
- package/resources/beta/index.mjs +4 -0
- package/resources/beta/index.mjs.map +1 -0
- package/resources/beta.d.ts +2 -0
- package/resources/beta.d.ts.map +1 -0
- package/resources/beta.js +19 -0
- package/resources/beta.js.map +1 -0
- package/resources/beta.mjs +3 -0
- package/resources/beta.mjs.map +1 -0
- package/resources/credit-notes.d.ts +4 -4
- package/resources/credit-notes.d.ts.map +1 -1
- package/resources/customers/balance-transactions.d.ts +0 -7
- package/resources/customers/balance-transactions.d.ts.map +1 -1
- package/resources/customers/balance-transactions.js.map +1 -1
- package/resources/customers/balance-transactions.mjs.map +1 -1
- package/resources/customers/credits/ledger.d.ts +17 -0
- package/resources/customers/credits/ledger.d.ts.map +1 -1
- package/resources/customers/credits/ledger.js.map +1 -1
- package/resources/customers/credits/ledger.mjs.map +1 -1
- package/resources/customers/credits/top-ups.d.ts +26 -14
- package/resources/customers/credits/top-ups.d.ts.map +1 -1
- package/resources/customers/credits/top-ups.js.map +1 -1
- package/resources/customers/credits/top-ups.mjs.map +1 -1
- package/resources/customers/customers.d.ts +16 -7
- package/resources/customers/customers.d.ts.map +1 -1
- package/resources/customers/customers.js +1 -4
- package/resources/customers/customers.js.map +1 -1
- package/resources/customers/customers.mjs +1 -4
- package/resources/customers/customers.mjs.map +1 -1
- package/resources/dimensional-price-groups/dimensional-price-groups.d.ts +1 -1
- package/resources/dimensional-price-groups/dimensional-price-groups.js +1 -1
- package/resources/dimensional-price-groups/dimensional-price-groups.mjs +1 -1
- package/resources/events/events.d.ts +3 -3
- package/resources/events/events.d.ts.map +1 -1
- package/resources/index.d.ts +3 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/invoice-line-items.d.ts +150 -10
- package/resources/invoice-line-items.d.ts.map +1 -1
- package/resources/invoices.d.ts +388 -28
- package/resources/invoices.d.ts.map +1 -1
- package/resources/invoices.js.map +1 -1
- package/resources/invoices.mjs.map +1 -1
- package/resources/items.d.ts +23 -0
- package/resources/items.d.ts.map +1 -1
- package/resources/items.js +6 -0
- package/resources/items.js.map +1 -1
- package/resources/items.mjs +6 -0
- package/resources/items.mjs.map +1 -1
- package/resources/plans/external-plan-id.d.ts +1 -1
- package/resources/plans/external-plan-id.js +1 -1
- package/resources/plans/external-plan-id.mjs +1 -1
- package/resources/plans/plans.d.ts +1153 -22
- package/resources/plans/plans.d.ts.map +1 -1
- package/resources/plans/plans.js +1 -1
- package/resources/plans/plans.js.map +1 -1
- package/resources/plans/plans.mjs +1 -1
- package/resources/plans/plans.mjs.map +1 -1
- package/resources/prices/index.d.ts +1 -1
- package/resources/prices/index.d.ts.map +1 -1
- package/resources/prices/index.js.map +1 -1
- package/resources/prices/index.mjs.map +1 -1
- package/resources/prices/prices.d.ts +6180 -123
- package/resources/prices/prices.d.ts.map +1 -1
- package/resources/prices/prices.js +40 -1
- package/resources/prices/prices.js.map +1 -1
- package/resources/prices/prices.mjs +40 -1
- package/resources/prices/prices.mjs.map +1 -1
- package/resources/shared.d.ts +14 -14
- package/resources/shared.d.ts.map +1 -1
- package/resources/subscription-changes.d.ts +648 -87
- package/resources/subscription-changes.d.ts.map +1 -1
- package/resources/subscriptions.d.ts +10981 -3716
- package/resources/subscriptions.d.ts.map +1 -1
- package/resources/subscriptions.js +6 -0
- package/resources/subscriptions.js.map +1 -1
- package/resources/subscriptions.mjs +6 -0
- package/resources/subscriptions.mjs.map +1 -1
- package/src/index.ts +25 -0
- package/src/resources/alerts.ts +21 -0
- package/src/resources/beta/beta.ts +9106 -0
- package/src/resources/beta/external-plan-id.ts +8748 -0
- package/src/resources/beta/index.ts +14 -0
- package/src/resources/beta.ts +3 -0
- package/src/resources/credit-notes.ts +4 -4
- package/src/resources/customers/balance-transactions.ts +0 -7
- package/src/resources/customers/credits/ledger.ts +21 -0
- package/src/resources/customers/credits/top-ups.ts +26 -14
- package/src/resources/customers/customers.ts +22 -4
- package/src/resources/dimensional-price-groups/dimensional-price-groups.ts +1 -1
- package/src/resources/events/events.ts +3 -3
- package/src/resources/index.ts +11 -0
- package/src/resources/invoice-line-items.ts +178 -10
- package/src/resources/invoices.ts +460 -28
- package/src/resources/items.ts +29 -0
- package/src/resources/plans/external-plan-id.ts +1 -1
- package/src/resources/plans/plans.ts +1375 -30
- package/src/resources/prices/index.ts +2 -0
- package/src/resources/prices/prices.ts +7345 -135
- package/src/resources/shared.ts +18 -18
- package/src/resources/subscription-changes.ts +771 -102
- package/src/resources/subscriptions.ts +13383 -4686
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
export {
|
|
4
|
+
Beta,
|
|
5
|
+
type PlanVersion,
|
|
6
|
+
type PlanVersionPhase,
|
|
7
|
+
type BetaCreatePlanVersionParams,
|
|
8
|
+
type BetaSetDefaultPlanVersionParams,
|
|
9
|
+
} from './beta';
|
|
10
|
+
export {
|
|
11
|
+
ExternalPlanID,
|
|
12
|
+
type ExternalPlanIDCreatePlanVersionParams,
|
|
13
|
+
type ExternalPlanIDSetDefaultPlanVersionParams,
|
|
14
|
+
} from './external-plan-id';
|
|
@@ -254,14 +254,14 @@ export interface CreditNoteCreateParams {
|
|
|
254
254
|
line_items: Array<CreditNoteCreateParams.LineItem>;
|
|
255
255
|
|
|
256
256
|
/**
|
|
257
|
-
* An optional
|
|
257
|
+
* An optional reason for the credit note.
|
|
258
258
|
*/
|
|
259
|
-
|
|
259
|
+
reason: 'duplicate' | 'fraudulent' | 'order_change' | 'product_unsatisfactory';
|
|
260
260
|
|
|
261
261
|
/**
|
|
262
|
-
* An optional
|
|
262
|
+
* An optional memo to attach to the credit note.
|
|
263
263
|
*/
|
|
264
|
-
|
|
264
|
+
memo?: string | null;
|
|
265
265
|
}
|
|
266
266
|
|
|
267
267
|
export namespace CreditNoteCreateParams {
|
|
@@ -40,13 +40,6 @@ export class BalanceTransactions extends APIResource {
|
|
|
40
40
|
* This endpoint retrieves all customer balance transactions in reverse
|
|
41
41
|
* chronological order for a single customer, providing a complete audit trail of
|
|
42
42
|
* all adjustments and invoice applications.
|
|
43
|
-
*
|
|
44
|
-
* ## Eligibility
|
|
45
|
-
*
|
|
46
|
-
* The customer balance can only be applied to invoices or adjusted manually if
|
|
47
|
-
* invoices are not synced to a separate invoicing provider. If a payment gateway
|
|
48
|
-
* such as Stripe is used, the balance will be applied to the invoice before
|
|
49
|
-
* forwarding payment to the gateway.
|
|
50
43
|
*/
|
|
51
44
|
list(
|
|
52
45
|
customerId: string,
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { APIResource } from '../../../resource';
|
|
4
4
|
import { isRequestOptions } from '../../../core';
|
|
5
5
|
import * as Core from '../../../core';
|
|
6
|
+
import * as InvoicesAPI from '../../invoices';
|
|
6
7
|
import { Page, type PageParams } from '../../../pagination';
|
|
7
8
|
|
|
8
9
|
export class Ledger extends APIResource {
|
|
@@ -513,6 +514,11 @@ export namespace LedgerListResponse {
|
|
|
513
514
|
metadata: Record<string, string>;
|
|
514
515
|
|
|
515
516
|
starting_balance: number;
|
|
517
|
+
|
|
518
|
+
/**
|
|
519
|
+
* If the increment resulted in invoice creation, the list of created invoices
|
|
520
|
+
*/
|
|
521
|
+
created_invoices?: Array<InvoicesAPI.Invoice> | null;
|
|
516
522
|
}
|
|
517
523
|
|
|
518
524
|
export namespace IncrementLedgerEntry {
|
|
@@ -896,6 +902,11 @@ export namespace LedgerCreateEntryResponse {
|
|
|
896
902
|
metadata: Record<string, string>;
|
|
897
903
|
|
|
898
904
|
starting_balance: number;
|
|
905
|
+
|
|
906
|
+
/**
|
|
907
|
+
* If the increment resulted in invoice creation, the list of created invoices
|
|
908
|
+
*/
|
|
909
|
+
created_invoices?: Array<InvoicesAPI.Invoice> | null;
|
|
899
910
|
}
|
|
900
911
|
|
|
901
912
|
export namespace IncrementLedgerEntry {
|
|
@@ -1279,6 +1290,11 @@ export namespace LedgerCreateEntryByExternalIDResponse {
|
|
|
1279
1290
|
metadata: Record<string, string>;
|
|
1280
1291
|
|
|
1281
1292
|
starting_balance: number;
|
|
1293
|
+
|
|
1294
|
+
/**
|
|
1295
|
+
* If the increment resulted in invoice creation, the list of created invoices
|
|
1296
|
+
*/
|
|
1297
|
+
created_invoices?: Array<InvoicesAPI.Invoice> | null;
|
|
1282
1298
|
}
|
|
1283
1299
|
|
|
1284
1300
|
export namespace IncrementLedgerEntry {
|
|
@@ -1662,6 +1678,11 @@ export namespace LedgerListByExternalIDResponse {
|
|
|
1662
1678
|
metadata: Record<string, string>;
|
|
1663
1679
|
|
|
1664
1680
|
starting_balance: number;
|
|
1681
|
+
|
|
1682
|
+
/**
|
|
1683
|
+
* If the increment resulted in invoice creation, the list of created invoices
|
|
1684
|
+
*/
|
|
1685
|
+
created_invoices?: Array<InvoicesAPI.Invoice> | null;
|
|
1665
1686
|
}
|
|
1666
1687
|
|
|
1667
1688
|
export namespace IncrementLedgerEntry {
|
|
@@ -193,8 +193,10 @@ export namespace TopUpCreateResponse {
|
|
|
193
193
|
memo?: string | null;
|
|
194
194
|
|
|
195
195
|
/**
|
|
196
|
-
*
|
|
197
|
-
* corresponding invoice is paid before they
|
|
196
|
+
* When true, credit blocks created by this top-up will require that the
|
|
197
|
+
* corresponding invoice is paid before they are drawn down from. If any topup
|
|
198
|
+
* block is pending payment, further automatic top-ups will be paused until the
|
|
199
|
+
* invoice is paid or voided.
|
|
198
200
|
*/
|
|
199
201
|
require_successful_payment?: boolean;
|
|
200
202
|
}
|
|
@@ -266,8 +268,10 @@ export namespace TopUpListResponse {
|
|
|
266
268
|
memo?: string | null;
|
|
267
269
|
|
|
268
270
|
/**
|
|
269
|
-
*
|
|
270
|
-
* corresponding invoice is paid before they
|
|
271
|
+
* When true, credit blocks created by this top-up will require that the
|
|
272
|
+
* corresponding invoice is paid before they are drawn down from. If any topup
|
|
273
|
+
* block is pending payment, further automatic top-ups will be paused until the
|
|
274
|
+
* invoice is paid or voided.
|
|
271
275
|
*/
|
|
272
276
|
require_successful_payment?: boolean;
|
|
273
277
|
}
|
|
@@ -339,8 +343,10 @@ export namespace TopUpCreateByExternalIDResponse {
|
|
|
339
343
|
memo?: string | null;
|
|
340
344
|
|
|
341
345
|
/**
|
|
342
|
-
*
|
|
343
|
-
* corresponding invoice is paid before they
|
|
346
|
+
* When true, credit blocks created by this top-up will require that the
|
|
347
|
+
* corresponding invoice is paid before they are drawn down from. If any topup
|
|
348
|
+
* block is pending payment, further automatic top-ups will be paused until the
|
|
349
|
+
* invoice is paid or voided.
|
|
344
350
|
*/
|
|
345
351
|
require_successful_payment?: boolean;
|
|
346
352
|
}
|
|
@@ -412,8 +418,10 @@ export namespace TopUpListByExternalIDResponse {
|
|
|
412
418
|
memo?: string | null;
|
|
413
419
|
|
|
414
420
|
/**
|
|
415
|
-
*
|
|
416
|
-
* corresponding invoice is paid before they
|
|
421
|
+
* When true, credit blocks created by this top-up will require that the
|
|
422
|
+
* corresponding invoice is paid before they are drawn down from. If any topup
|
|
423
|
+
* block is pending payment, further automatic top-ups will be paused until the
|
|
424
|
+
* invoice is paid or voided.
|
|
417
425
|
*/
|
|
418
426
|
require_successful_payment?: boolean;
|
|
419
427
|
}
|
|
@@ -449,7 +457,7 @@ export interface TopUpCreateParams {
|
|
|
449
457
|
|
|
450
458
|
/**
|
|
451
459
|
* The date from which the top-up is active. If unspecified, the top-up is active
|
|
452
|
-
* immediately.
|
|
460
|
+
* immediately. This should not be more than 10 days in the past.
|
|
453
461
|
*/
|
|
454
462
|
active_from?: string | null;
|
|
455
463
|
|
|
@@ -489,8 +497,10 @@ export namespace TopUpCreateParams {
|
|
|
489
497
|
memo?: string | null;
|
|
490
498
|
|
|
491
499
|
/**
|
|
492
|
-
*
|
|
493
|
-
* corresponding invoice is paid before they
|
|
500
|
+
* When true, credit blocks created by this top-up will require that the
|
|
501
|
+
* corresponding invoice is paid before they are drawn down from. If any topup
|
|
502
|
+
* block is pending payment, further automatic top-ups will be paused until the
|
|
503
|
+
* invoice is paid or voided.
|
|
494
504
|
*/
|
|
495
505
|
require_successful_payment?: boolean;
|
|
496
506
|
}
|
|
@@ -528,7 +538,7 @@ export interface TopUpCreateByExternalIDParams {
|
|
|
528
538
|
|
|
529
539
|
/**
|
|
530
540
|
* The date from which the top-up is active. If unspecified, the top-up is active
|
|
531
|
-
* immediately.
|
|
541
|
+
* immediately. This should not be more than 10 days in the past.
|
|
532
542
|
*/
|
|
533
543
|
active_from?: string | null;
|
|
534
544
|
|
|
@@ -568,8 +578,10 @@ export namespace TopUpCreateByExternalIDParams {
|
|
|
568
578
|
memo?: string | null;
|
|
569
579
|
|
|
570
580
|
/**
|
|
571
|
-
*
|
|
572
|
-
* corresponding invoice is paid before they
|
|
581
|
+
* When true, credit blocks created by this top-up will require that the
|
|
582
|
+
* corresponding invoice is paid before they are drawn down from. If any topup
|
|
583
|
+
* block is pending payment, further automatic top-ups will be paused until the
|
|
584
|
+
* invoice is paid or voided.
|
|
573
585
|
*/
|
|
574
586
|
require_successful_payment?: boolean;
|
|
575
587
|
}
|
|
@@ -103,10 +103,7 @@ export class Customers extends APIResource {
|
|
|
103
103
|
* **Note**: This operation happens asynchronously and can be expected to take a
|
|
104
104
|
* few minutes to propagate to related resources. However, querying for the
|
|
105
105
|
* customer on subsequent GET requests while deletion is in process will reflect
|
|
106
|
-
* its deletion
|
|
107
|
-
* been fully processed, the customer will not be returned in the API.
|
|
108
|
-
*
|
|
109
|
-
* On successful processing, this returns an empty dictionary (`{}`) in the API.
|
|
106
|
+
* its deletion.
|
|
110
107
|
*/
|
|
111
108
|
delete(customerId: string, options?: Core.RequestOptions): Core.APIPromise<void> {
|
|
112
109
|
return this._client.delete(`/customers/${customerId}`, {
|
|
@@ -812,6 +809,7 @@ export interface CustomerCreateParams {
|
|
|
812
809
|
tax_configuration?:
|
|
813
810
|
| CustomerCreateParams.NewAvalaraTaxConfiguration
|
|
814
811
|
| CustomerCreateParams.NewTaxJarConfiguration
|
|
812
|
+
| CustomerCreateParams.NewSphereConfiguration
|
|
815
813
|
| null;
|
|
816
814
|
|
|
817
815
|
/**
|
|
@@ -1009,6 +1007,12 @@ export namespace CustomerCreateParams {
|
|
|
1009
1007
|
tax_provider: 'taxjar';
|
|
1010
1008
|
}
|
|
1011
1009
|
|
|
1010
|
+
export interface NewSphereConfiguration {
|
|
1011
|
+
tax_exempt: boolean;
|
|
1012
|
+
|
|
1013
|
+
tax_provider: 'sphere';
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1012
1016
|
/**
|
|
1013
1017
|
* Tax IDs are commonly required to be displayed on customer invoices, which are
|
|
1014
1018
|
* added to the headers of invoices.
|
|
@@ -1352,6 +1356,7 @@ export interface CustomerUpdateParams {
|
|
|
1352
1356
|
tax_configuration?:
|
|
1353
1357
|
| CustomerUpdateParams.NewAvalaraTaxConfiguration
|
|
1354
1358
|
| CustomerUpdateParams.NewTaxJarConfiguration
|
|
1359
|
+
| CustomerUpdateParams.NewSphereConfiguration
|
|
1355
1360
|
| null;
|
|
1356
1361
|
|
|
1357
1362
|
/**
|
|
@@ -1542,6 +1547,12 @@ export namespace CustomerUpdateParams {
|
|
|
1542
1547
|
tax_provider: 'taxjar';
|
|
1543
1548
|
}
|
|
1544
1549
|
|
|
1550
|
+
export interface NewSphereConfiguration {
|
|
1551
|
+
tax_exempt: boolean;
|
|
1552
|
+
|
|
1553
|
+
tax_provider: 'sphere';
|
|
1554
|
+
}
|
|
1555
|
+
|
|
1545
1556
|
/**
|
|
1546
1557
|
* Tax IDs are commonly required to be displayed on customer invoices, which are
|
|
1547
1558
|
* added to the headers of invoices.
|
|
@@ -1895,6 +1906,7 @@ export interface CustomerUpdateByExternalIDParams {
|
|
|
1895
1906
|
tax_configuration?:
|
|
1896
1907
|
| CustomerUpdateByExternalIDParams.NewAvalaraTaxConfiguration
|
|
1897
1908
|
| CustomerUpdateByExternalIDParams.NewTaxJarConfiguration
|
|
1909
|
+
| CustomerUpdateByExternalIDParams.NewSphereConfiguration
|
|
1898
1910
|
| null;
|
|
1899
1911
|
|
|
1900
1912
|
/**
|
|
@@ -2085,6 +2097,12 @@ export namespace CustomerUpdateByExternalIDParams {
|
|
|
2085
2097
|
tax_provider: 'taxjar';
|
|
2086
2098
|
}
|
|
2087
2099
|
|
|
2100
|
+
export interface NewSphereConfiguration {
|
|
2101
|
+
tax_exempt: boolean;
|
|
2102
|
+
|
|
2103
|
+
tax_provider: 'sphere';
|
|
2104
|
+
}
|
|
2105
|
+
|
|
2088
2106
|
/**
|
|
2089
2107
|
* Tax IDs are commonly required to be displayed on customer invoices, which are
|
|
2090
2108
|
* added to the headers of invoices.
|
|
@@ -20,7 +20,7 @@ export class DimensionalPriceGroups extends APIResource {
|
|
|
20
20
|
* For example, suppose we have a billable metric that measures the number of
|
|
21
21
|
* widgets used and we want to charge differently depending on the color of the
|
|
22
22
|
* widget. We can create a price group with a dimension "color" and two prices: one
|
|
23
|
-
* that charges
|
|
23
|
+
* that charges \$10 per red widget and one that charges \$20 per blue widget.
|
|
24
24
|
*/
|
|
25
25
|
create(
|
|
26
26
|
body: DimensionalPriceGroupCreateParams,
|
|
@@ -451,7 +451,7 @@ export namespace EventSearchResponse {
|
|
|
451
451
|
* A dictionary of custom properties. Values in this dictionary must be numeric,
|
|
452
452
|
* boolean, or strings. Nested dictionaries are disallowed.
|
|
453
453
|
*/
|
|
454
|
-
properties: unknown
|
|
454
|
+
properties: Record<string, unknown>;
|
|
455
455
|
|
|
456
456
|
/**
|
|
457
457
|
* An ISO 8601 format date with no timezone offset (i.e. UTC). This should
|
|
@@ -472,7 +472,7 @@ export interface EventUpdateParams {
|
|
|
472
472
|
* A dictionary of custom properties. Values in this dictionary must be numeric,
|
|
473
473
|
* boolean, or strings. Nested dictionaries are disallowed.
|
|
474
474
|
*/
|
|
475
|
-
properties: unknown
|
|
475
|
+
properties: Record<string, unknown>;
|
|
476
476
|
|
|
477
477
|
/**
|
|
478
478
|
* An ISO 8601 format date with no timezone offset (i.e. UTC). This should
|
|
@@ -530,7 +530,7 @@ export namespace EventIngestParams {
|
|
|
530
530
|
* A dictionary of custom properties. Values in this dictionary must be numeric,
|
|
531
531
|
* boolean, or strings. Nested dictionaries are disallowed.
|
|
532
532
|
*/
|
|
533
|
-
properties: unknown
|
|
533
|
+
properties: Record<string, unknown>;
|
|
534
534
|
|
|
535
535
|
/**
|
|
536
536
|
* An ISO 8601 format date with no timezone offset (i.e. UTC). This should
|
package/src/resources/index.ts
CHANGED
|
@@ -13,6 +13,13 @@ export {
|
|
|
13
13
|
type AlertDisableParams,
|
|
14
14
|
type AlertEnableParams,
|
|
15
15
|
} from './alerts';
|
|
16
|
+
export {
|
|
17
|
+
Beta,
|
|
18
|
+
type PlanVersion,
|
|
19
|
+
type PlanVersionPhase,
|
|
20
|
+
type BetaCreatePlanVersionParams,
|
|
21
|
+
type BetaSetDefaultPlanVersionParams,
|
|
22
|
+
} from './beta/beta';
|
|
16
23
|
export {
|
|
17
24
|
BillableMetricsPage,
|
|
18
25
|
Metrics,
|
|
@@ -100,10 +107,12 @@ export {
|
|
|
100
107
|
type EvaluatePriceGroup,
|
|
101
108
|
type Price,
|
|
102
109
|
type PriceEvaluateResponse,
|
|
110
|
+
type PriceEvaluateMultipleResponse,
|
|
103
111
|
type PriceCreateParams,
|
|
104
112
|
type PriceUpdateParams,
|
|
105
113
|
type PriceListParams,
|
|
106
114
|
type PriceEvaluateParams,
|
|
115
|
+
type PriceEvaluateMultipleParams,
|
|
107
116
|
} from './prices/prices';
|
|
108
117
|
export {
|
|
109
118
|
SubscriptionChanges,
|
|
@@ -123,6 +132,7 @@ export {
|
|
|
123
132
|
type SubscriptionFetchCostsResponse,
|
|
124
133
|
type SubscriptionFetchScheduleResponse,
|
|
125
134
|
type SubscriptionPriceIntervalsResponse,
|
|
135
|
+
type SubscriptionRedeemCouponResponse,
|
|
126
136
|
type SubscriptionSchedulePlanChangeResponse,
|
|
127
137
|
type SubscriptionTriggerPhaseResponse,
|
|
128
138
|
type SubscriptionUnscheduleCancellationResponse,
|
|
@@ -138,6 +148,7 @@ export {
|
|
|
138
148
|
type SubscriptionFetchScheduleParams,
|
|
139
149
|
type SubscriptionFetchUsageParams,
|
|
140
150
|
type SubscriptionPriceIntervalsParams,
|
|
151
|
+
type SubscriptionRedeemCouponParams,
|
|
141
152
|
type SubscriptionSchedulePlanChangeParams,
|
|
142
153
|
type SubscriptionTriggerPhaseParams,
|
|
143
154
|
type SubscriptionUnscheduleFixedFeeQuantityUpdatesParams,
|
|
@@ -115,7 +115,7 @@ export interface InvoiceLineItemCreateResponse {
|
|
|
115
115
|
* For more on the types of prices, see
|
|
116
116
|
* [the core concepts documentation](/core-concepts#plan-and-price)
|
|
117
117
|
*/
|
|
118
|
-
price: PricesAPI.Price
|
|
118
|
+
price: PricesAPI.Price;
|
|
119
119
|
|
|
120
120
|
/**
|
|
121
121
|
* Either the fixed fee quantity or the usage during the service period.
|
|
@@ -166,10 +166,15 @@ export namespace InvoiceLineItemCreateResponse {
|
|
|
166
166
|
amount: string;
|
|
167
167
|
|
|
168
168
|
/**
|
|
169
|
-
* The price IDs that this adjustment applies to.
|
|
169
|
+
* @deprecated The price IDs that this adjustment applies to.
|
|
170
170
|
*/
|
|
171
171
|
applies_to_price_ids: Array<string>;
|
|
172
172
|
|
|
173
|
+
/**
|
|
174
|
+
* The filters that determine which prices to apply this adjustment to.
|
|
175
|
+
*/
|
|
176
|
+
filters: Array<MonetaryUsageDiscountAdjustment.Filter>;
|
|
177
|
+
|
|
173
178
|
/**
|
|
174
179
|
* True for adjustments that apply to an entire invocice, false for adjustments
|
|
175
180
|
* that apply to only one price.
|
|
@@ -188,6 +193,25 @@ export namespace InvoiceLineItemCreateResponse {
|
|
|
188
193
|
usage_discount: number;
|
|
189
194
|
}
|
|
190
195
|
|
|
196
|
+
export namespace MonetaryUsageDiscountAdjustment {
|
|
197
|
+
export interface Filter {
|
|
198
|
+
/**
|
|
199
|
+
* The property of the price to filter on.
|
|
200
|
+
*/
|
|
201
|
+
field: 'price_id' | 'item_id' | 'price_type' | 'currency' | 'pricing_unit_id';
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Should prices that match the filter be included or excluded.
|
|
205
|
+
*/
|
|
206
|
+
operator: 'includes' | 'excludes';
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* The IDs or values that match this filter.
|
|
210
|
+
*/
|
|
211
|
+
values: Array<string>;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
191
215
|
export interface MonetaryAmountDiscountAdjustment {
|
|
192
216
|
id: string;
|
|
193
217
|
|
|
@@ -205,10 +229,15 @@ export namespace InvoiceLineItemCreateResponse {
|
|
|
205
229
|
amount_discount: string;
|
|
206
230
|
|
|
207
231
|
/**
|
|
208
|
-
* The price IDs that this adjustment applies to.
|
|
232
|
+
* @deprecated The price IDs that this adjustment applies to.
|
|
209
233
|
*/
|
|
210
234
|
applies_to_price_ids: Array<string>;
|
|
211
235
|
|
|
236
|
+
/**
|
|
237
|
+
* The filters that determine which prices to apply this adjustment to.
|
|
238
|
+
*/
|
|
239
|
+
filters: Array<MonetaryAmountDiscountAdjustment.Filter>;
|
|
240
|
+
|
|
212
241
|
/**
|
|
213
242
|
* True for adjustments that apply to an entire invocice, false for adjustments
|
|
214
243
|
* that apply to only one price.
|
|
@@ -221,6 +250,25 @@ export namespace InvoiceLineItemCreateResponse {
|
|
|
221
250
|
reason: string | null;
|
|
222
251
|
}
|
|
223
252
|
|
|
253
|
+
export namespace MonetaryAmountDiscountAdjustment {
|
|
254
|
+
export interface Filter {
|
|
255
|
+
/**
|
|
256
|
+
* The property of the price to filter on.
|
|
257
|
+
*/
|
|
258
|
+
field: 'price_id' | 'item_id' | 'price_type' | 'currency' | 'pricing_unit_id';
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* Should prices that match the filter be included or excluded.
|
|
262
|
+
*/
|
|
263
|
+
operator: 'includes' | 'excludes';
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* The IDs or values that match this filter.
|
|
267
|
+
*/
|
|
268
|
+
values: Array<string>;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
|
|
224
272
|
export interface MonetaryPercentageDiscountAdjustment {
|
|
225
273
|
id: string;
|
|
226
274
|
|
|
@@ -232,10 +280,15 @@ export namespace InvoiceLineItemCreateResponse {
|
|
|
232
280
|
amount: string;
|
|
233
281
|
|
|
234
282
|
/**
|
|
235
|
-
* The price IDs that this adjustment applies to.
|
|
283
|
+
* @deprecated The price IDs that this adjustment applies to.
|
|
236
284
|
*/
|
|
237
285
|
applies_to_price_ids: Array<string>;
|
|
238
286
|
|
|
287
|
+
/**
|
|
288
|
+
* The filters that determine which prices to apply this adjustment to.
|
|
289
|
+
*/
|
|
290
|
+
filters: Array<MonetaryPercentageDiscountAdjustment.Filter>;
|
|
291
|
+
|
|
239
292
|
/**
|
|
240
293
|
* True for adjustments that apply to an entire invocice, false for adjustments
|
|
241
294
|
* that apply to only one price.
|
|
@@ -254,6 +307,25 @@ export namespace InvoiceLineItemCreateResponse {
|
|
|
254
307
|
reason: string | null;
|
|
255
308
|
}
|
|
256
309
|
|
|
310
|
+
export namespace MonetaryPercentageDiscountAdjustment {
|
|
311
|
+
export interface Filter {
|
|
312
|
+
/**
|
|
313
|
+
* The property of the price to filter on.
|
|
314
|
+
*/
|
|
315
|
+
field: 'price_id' | 'item_id' | 'price_type' | 'currency' | 'pricing_unit_id';
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* Should prices that match the filter be included or excluded.
|
|
319
|
+
*/
|
|
320
|
+
operator: 'includes' | 'excludes';
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* The IDs or values that match this filter.
|
|
324
|
+
*/
|
|
325
|
+
values: Array<string>;
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
|
|
257
329
|
export interface MonetaryMinimumAdjustment {
|
|
258
330
|
id: string;
|
|
259
331
|
|
|
@@ -265,10 +337,15 @@ export namespace InvoiceLineItemCreateResponse {
|
|
|
265
337
|
amount: string;
|
|
266
338
|
|
|
267
339
|
/**
|
|
268
|
-
* The price IDs that this adjustment applies to.
|
|
340
|
+
* @deprecated The price IDs that this adjustment applies to.
|
|
269
341
|
*/
|
|
270
342
|
applies_to_price_ids: Array<string>;
|
|
271
343
|
|
|
344
|
+
/**
|
|
345
|
+
* The filters that determine which prices to apply this adjustment to.
|
|
346
|
+
*/
|
|
347
|
+
filters: Array<MonetaryMinimumAdjustment.Filter>;
|
|
348
|
+
|
|
272
349
|
/**
|
|
273
350
|
* True for adjustments that apply to an entire invocice, false for adjustments
|
|
274
351
|
* that apply to only one price.
|
|
@@ -292,6 +369,25 @@ export namespace InvoiceLineItemCreateResponse {
|
|
|
292
369
|
reason: string | null;
|
|
293
370
|
}
|
|
294
371
|
|
|
372
|
+
export namespace MonetaryMinimumAdjustment {
|
|
373
|
+
export interface Filter {
|
|
374
|
+
/**
|
|
375
|
+
* The property of the price to filter on.
|
|
376
|
+
*/
|
|
377
|
+
field: 'price_id' | 'item_id' | 'price_type' | 'currency' | 'pricing_unit_id';
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* Should prices that match the filter be included or excluded.
|
|
381
|
+
*/
|
|
382
|
+
operator: 'includes' | 'excludes';
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* The IDs or values that match this filter.
|
|
386
|
+
*/
|
|
387
|
+
values: Array<string>;
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
|
|
295
391
|
export interface MonetaryMaximumAdjustment {
|
|
296
392
|
id: string;
|
|
297
393
|
|
|
@@ -303,10 +399,15 @@ export namespace InvoiceLineItemCreateResponse {
|
|
|
303
399
|
amount: string;
|
|
304
400
|
|
|
305
401
|
/**
|
|
306
|
-
* The price IDs that this adjustment applies to.
|
|
402
|
+
* @deprecated The price IDs that this adjustment applies to.
|
|
307
403
|
*/
|
|
308
404
|
applies_to_price_ids: Array<string>;
|
|
309
405
|
|
|
406
|
+
/**
|
|
407
|
+
* The filters that determine which prices to apply this adjustment to.
|
|
408
|
+
*/
|
|
409
|
+
filters: Array<MonetaryMaximumAdjustment.Filter>;
|
|
410
|
+
|
|
310
411
|
/**
|
|
311
412
|
* True for adjustments that apply to an entire invocice, false for adjustments
|
|
312
413
|
* that apply to only one price.
|
|
@@ -325,38 +426,105 @@ export namespace InvoiceLineItemCreateResponse {
|
|
|
325
426
|
reason: string | null;
|
|
326
427
|
}
|
|
327
428
|
|
|
429
|
+
export namespace MonetaryMaximumAdjustment {
|
|
430
|
+
export interface Filter {
|
|
431
|
+
/**
|
|
432
|
+
* The property of the price to filter on.
|
|
433
|
+
*/
|
|
434
|
+
field: 'price_id' | 'item_id' | 'price_type' | 'currency' | 'pricing_unit_id';
|
|
435
|
+
|
|
436
|
+
/**
|
|
437
|
+
* Should prices that match the filter be included or excluded.
|
|
438
|
+
*/
|
|
439
|
+
operator: 'includes' | 'excludes';
|
|
440
|
+
|
|
441
|
+
/**
|
|
442
|
+
* The IDs or values that match this filter.
|
|
443
|
+
*/
|
|
444
|
+
values: Array<string>;
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
|
|
328
448
|
/**
|
|
329
449
|
* @deprecated This field is deprecated in favor of `adjustments`.
|
|
330
450
|
*/
|
|
331
451
|
export interface Maximum {
|
|
332
452
|
/**
|
|
333
|
-
* List of price_ids that this maximum amount applies to. For plan/plan
|
|
334
|
-
* maximums, this can be a subset of prices.
|
|
453
|
+
* @deprecated List of price_ids that this maximum amount applies to. For plan/plan
|
|
454
|
+
* phase maximums, this can be a subset of prices.
|
|
335
455
|
*/
|
|
336
456
|
applies_to_price_ids: Array<string>;
|
|
337
457
|
|
|
458
|
+
/**
|
|
459
|
+
* The filters that determine which prices to apply this maximum to.
|
|
460
|
+
*/
|
|
461
|
+
filters: Array<Maximum.Filter>;
|
|
462
|
+
|
|
338
463
|
/**
|
|
339
464
|
* Maximum amount applied
|
|
340
465
|
*/
|
|
341
466
|
maximum_amount: string;
|
|
342
467
|
}
|
|
343
468
|
|
|
469
|
+
export namespace Maximum {
|
|
470
|
+
export interface Filter {
|
|
471
|
+
/**
|
|
472
|
+
* The property of the price to filter on.
|
|
473
|
+
*/
|
|
474
|
+
field: 'price_id' | 'item_id' | 'price_type' | 'currency' | 'pricing_unit_id';
|
|
475
|
+
|
|
476
|
+
/**
|
|
477
|
+
* Should prices that match the filter be included or excluded.
|
|
478
|
+
*/
|
|
479
|
+
operator: 'includes' | 'excludes';
|
|
480
|
+
|
|
481
|
+
/**
|
|
482
|
+
* The IDs or values that match this filter.
|
|
483
|
+
*/
|
|
484
|
+
values: Array<string>;
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
|
|
344
488
|
/**
|
|
345
489
|
* @deprecated This field is deprecated in favor of `adjustments`.
|
|
346
490
|
*/
|
|
347
491
|
export interface Minimum {
|
|
348
492
|
/**
|
|
349
|
-
* List of price_ids that this minimum amount applies to. For plan/plan
|
|
350
|
-
* minimums, this can be a subset of prices.
|
|
493
|
+
* @deprecated List of price_ids that this minimum amount applies to. For plan/plan
|
|
494
|
+
* phase minimums, this can be a subset of prices.
|
|
351
495
|
*/
|
|
352
496
|
applies_to_price_ids: Array<string>;
|
|
353
497
|
|
|
498
|
+
/**
|
|
499
|
+
* The filters that determine which prices to apply this minimum to.
|
|
500
|
+
*/
|
|
501
|
+
filters: Array<Minimum.Filter>;
|
|
502
|
+
|
|
354
503
|
/**
|
|
355
504
|
* Minimum amount applied
|
|
356
505
|
*/
|
|
357
506
|
minimum_amount: string;
|
|
358
507
|
}
|
|
359
508
|
|
|
509
|
+
export namespace Minimum {
|
|
510
|
+
export interface Filter {
|
|
511
|
+
/**
|
|
512
|
+
* The property of the price to filter on.
|
|
513
|
+
*/
|
|
514
|
+
field: 'price_id' | 'item_id' | 'price_type' | 'currency' | 'pricing_unit_id';
|
|
515
|
+
|
|
516
|
+
/**
|
|
517
|
+
* Should prices that match the filter be included or excluded.
|
|
518
|
+
*/
|
|
519
|
+
operator: 'includes' | 'excludes';
|
|
520
|
+
|
|
521
|
+
/**
|
|
522
|
+
* The IDs or values that match this filter.
|
|
523
|
+
*/
|
|
524
|
+
values: Array<string>;
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
|
|
360
528
|
export interface MatrixSubLineItem {
|
|
361
529
|
/**
|
|
362
530
|
* The total amount for this sub line item.
|