orb-billing 5.48.0 → 5.75.1
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 +241 -0
- package/core.js +2 -2
- package/core.js.map +1 -1
- package/core.mjs +2 -2
- package/core.mjs.map +1 -1
- package/index.d.ts.map +1 -1
- package/index.js +11 -0
- package/index.js.map +1 -1
- package/index.mjs +11 -0
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/alerts.d.ts +140 -3
- 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 +738 -7570
- package/resources/beta/beta.d.ts.map +1 -1
- package/resources/beta/beta.js.map +1 -1
- package/resources/beta/beta.mjs.map +1 -1
- package/resources/beta/external-plan-id.d.ts +664 -7572
- package/resources/beta/external-plan-id.d.ts.map +1 -1
- package/resources/coupons/coupons.d.ts +29 -0
- package/resources/coupons/coupons.d.ts.map +1 -1
- package/resources/coupons/coupons.js +21 -0
- package/resources/coupons/coupons.js.map +1 -1
- package/resources/coupons/coupons.mjs +21 -0
- package/resources/coupons/coupons.mjs.map +1 -1
- package/resources/coupons/subscriptions.d.ts +10 -0
- package/resources/coupons/subscriptions.d.ts.map +1 -1
- package/resources/coupons/subscriptions.js.map +1 -1
- package/resources/coupons/subscriptions.mjs.map +1 -1
- package/resources/credit-blocks.d.ts +98 -7
- package/resources/credit-blocks.d.ts.map +1 -1
- package/resources/credit-blocks.js +10 -7
- package/resources/credit-blocks.js.map +1 -1
- package/resources/credit-blocks.mjs +10 -7
- package/resources/credit-blocks.mjs.map +1 -1
- package/resources/credit-notes.d.ts +28 -0
- package/resources/credit-notes.d.ts.map +1 -1
- package/resources/credit-notes.js +20 -0
- package/resources/credit-notes.js.map +1 -1
- package/resources/credit-notes.mjs +20 -0
- package/resources/credit-notes.mjs.map +1 -1
- package/resources/customers/credits/credits.d.ts +89 -0
- package/resources/customers/credits/credits.d.ts.map +1 -1
- package/resources/customers/credits/credits.js.map +1 -1
- package/resources/customers/credits/credits.mjs.map +1 -1
- package/resources/customers/credits/ledger.d.ts +34 -20
- package/resources/customers/credits/ledger.d.ts.map +1 -1
- package/resources/customers/credits/ledger.js +28 -14
- package/resources/customers/credits/ledger.js.map +1 -1
- package/resources/customers/credits/ledger.mjs +28 -14
- package/resources/customers/credits/ledger.mjs.map +1 -1
- package/resources/customers/customers.d.ts +89 -6
- 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/dimensional-price-groups/dimensional-price-groups.d.ts +35 -1
- package/resources/dimensional-price-groups/dimensional-price-groups.d.ts.map +1 -1
- package/resources/dimensional-price-groups/dimensional-price-groups.js +26 -0
- package/resources/dimensional-price-groups/dimensional-price-groups.js.map +1 -1
- package/resources/dimensional-price-groups/dimensional-price-groups.mjs +26 -0
- package/resources/dimensional-price-groups/dimensional-price-groups.mjs.map +1 -1
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.ts +16 -0
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.ts.map +1 -1
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.js +16 -0
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.js.map +1 -1
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.mjs +16 -0
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.mjs.map +1 -1
- package/resources/events/backfills.d.ts +37 -0
- package/resources/events/backfills.d.ts.map +1 -1
- package/resources/events/backfills.js +29 -0
- package/resources/events/backfills.js.map +1 -1
- package/resources/events/backfills.mjs +29 -0
- package/resources/events/backfills.mjs.map +1 -1
- package/resources/events/events.d.ts +41 -33
- package/resources/events/events.d.ts.map +1 -1
- package/resources/events/events.js +39 -31
- package/resources/events/events.js.map +1 -1
- package/resources/events/events.mjs +39 -31
- package/resources/events/events.mjs.map +1 -1
- package/resources/events/volume.d.ts +7 -0
- package/resources/events/volume.d.ts.map +1 -1
- package/resources/events/volume.js +7 -0
- package/resources/events/volume.js.map +1 -1
- package/resources/events/volume.mjs +7 -0
- package/resources/events/volume.mjs.map +1 -1
- package/resources/invoice-line-items.d.ts +89 -1
- package/resources/invoice-line-items.d.ts.map +1 -1
- package/resources/invoice-line-items.js +12 -0
- package/resources/invoice-line-items.js.map +1 -1
- package/resources/invoice-line-items.mjs +12 -0
- package/resources/invoice-line-items.mjs.map +1 -1
- package/resources/invoices.d.ts +200 -12
- package/resources/invoices.d.ts.map +1 -1
- package/resources/invoices.js +64 -0
- package/resources/invoices.js.map +1 -1
- package/resources/invoices.mjs +64 -0
- package/resources/invoices.mjs.map +1 -1
- package/resources/items.d.ts +30 -0
- package/resources/items.d.ts.map +1 -1
- package/resources/items.js +22 -0
- package/resources/items.js.map +1 -1
- package/resources/items.mjs +22 -0
- package/resources/items.mjs.map +1 -1
- package/resources/licenses/external-licenses.d.ts +13 -1
- package/resources/licenses/external-licenses.d.ts.map +1 -1
- package/resources/licenses/external-licenses.js +12 -0
- package/resources/licenses/external-licenses.js.map +1 -1
- package/resources/licenses/external-licenses.mjs +12 -0
- package/resources/licenses/external-licenses.mjs.map +1 -1
- package/resources/licenses/licenses.d.ts +44 -0
- package/resources/licenses/licenses.d.ts.map +1 -1
- package/resources/licenses/licenses.js +44 -0
- package/resources/licenses/licenses.js.map +1 -1
- package/resources/licenses/licenses.mjs +44 -0
- package/resources/licenses/licenses.mjs.map +1 -1
- package/resources/licenses/usage.d.ts +17 -2
- package/resources/licenses/usage.d.ts.map +1 -1
- package/resources/licenses/usage.js +8 -0
- package/resources/licenses/usage.js.map +1 -1
- package/resources/licenses/usage.mjs +8 -0
- package/resources/licenses/usage.mjs.map +1 -1
- package/resources/metrics.d.ts +37 -5
- package/resources/metrics.d.ts.map +1 -1
- package/resources/metrics.js +27 -2
- package/resources/metrics.js.map +1 -1
- package/resources/metrics.mjs +27 -2
- package/resources/metrics.mjs.map +1 -1
- package/resources/plans/external-plan-id.d.ts +6 -2
- package/resources/plans/external-plan-id.d.ts.map +1 -1
- package/resources/plans/external-plan-id.js +2 -2
- package/resources/plans/external-plan-id.mjs +2 -2
- package/resources/plans/migrations.d.ts +42 -0
- package/resources/plans/migrations.d.ts.map +1 -1
- package/resources/plans/migrations.js.map +1 -1
- package/resources/plans/migrations.mjs.map +1 -1
- package/resources/plans/plans.d.ts +382 -3754
- package/resources/plans/plans.d.ts.map +1 -1
- package/resources/plans/plans.js +2 -2
- package/resources/plans/plans.js.map +1 -1
- package/resources/plans/plans.mjs +2 -2
- package/resources/plans/plans.mjs.map +1 -1
- package/resources/prices/external-price-id.d.ts +14 -0
- package/resources/prices/external-price-id.d.ts.map +1 -1
- package/resources/prices/external-price-id.js +14 -0
- package/resources/prices/external-price-id.js.map +1 -1
- package/resources/prices/external-price-id.mjs +14 -0
- package/resources/prices/external-price-id.mjs.map +1 -1
- package/resources/prices/prices.d.ts +1632 -393
- package/resources/prices/prices.d.ts.map +1 -1
- package/resources/prices/prices.js +46 -0
- package/resources/prices/prices.js.map +1 -1
- package/resources/prices/prices.mjs +46 -0
- package/resources/prices/prices.mjs.map +1 -1
- package/resources/shared.d.ts +922 -52
- package/resources/shared.d.ts.map +1 -1
- package/resources/shared.js.map +1 -1
- package/resources/shared.mjs.map +1 -1
- package/resources/subscription-changes.d.ts +72 -1
- package/resources/subscription-changes.d.ts.map +1 -1
- package/resources/subscription-changes.js.map +1 -1
- package/resources/subscription-changes.mjs.map +1 -1
- package/resources/subscriptions.d.ts +3075 -464
- package/resources/subscriptions.d.ts.map +1 -1
- package/resources/subscriptions.js +111 -0
- package/resources/subscriptions.js.map +1 -1
- package/resources/subscriptions.mjs +111 -0
- package/resources/subscriptions.mjs.map +1 -1
- package/src/core.ts +2 -2
- package/src/index.ts +12 -0
- package/src/resources/alerts.ts +161 -3
- package/src/resources/beta/beta.ts +828 -8988
- package/src/resources/beta/external-plan-id.ts +745 -8997
- package/src/resources/coupons/coupons.ts +29 -0
- package/src/resources/coupons/subscriptions.ts +10 -0
- package/src/resources/credit-blocks.ts +120 -7
- package/src/resources/credit-notes.ts +28 -0
- package/src/resources/customers/credits/credits.ts +111 -0
- package/src/resources/customers/credits/ledger.ts +34 -20
- package/src/resources/customers/customers.ts +99 -6
- package/src/resources/dimensional-price-groups/dimensional-price-groups.ts +35 -1
- package/src/resources/dimensional-price-groups/external-dimensional-price-group-id.ts +16 -0
- package/src/resources/events/backfills.ts +37 -0
- package/src/resources/events/events.ts +41 -33
- package/src/resources/events/volume.ts +7 -0
- package/src/resources/invoice-line-items.ts +104 -0
- package/src/resources/invoices.ts +215 -11
- package/src/resources/items.ts +30 -0
- package/src/resources/licenses/external-licenses.ts +13 -1
- package/src/resources/licenses/licenses.ts +44 -0
- package/src/resources/licenses/usage.ts +17 -2
- package/src/resources/metrics.ts +37 -5
- package/src/resources/plans/external-plan-id.ts +7 -2
- package/src/resources/plans/migrations.ts +42 -0
- package/src/resources/plans/plans.ts +456 -4482
- package/src/resources/prices/external-price-id.ts +14 -0
- package/src/resources/prices/prices.ts +1743 -264
- package/src/resources/shared.ts +1172 -50
- package/src/resources/subscription-changes.ts +88 -1
- package/src/resources/subscriptions.ts +4707 -1585
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/resources/shared.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export interface Address {
|
|
|
10
10
|
}
|
|
11
11
|
export interface AdjustmentInterval {
|
|
12
12
|
id: string;
|
|
13
|
-
adjustment: PlanPhaseUsageDiscountAdjustment | PlanPhaseAmountDiscountAdjustment | PlanPhasePercentageDiscountAdjustment | PlanPhaseMinimumAdjustment | PlanPhaseMaximumAdjustment;
|
|
13
|
+
adjustment: PlanPhaseUsageDiscountAdjustment | PlanPhaseAmountDiscountAdjustment | PlanPhasePercentageDiscountAdjustment | AdjustmentInterval.PlanPhaseTieredPercentageDiscountAdjustment | PlanPhaseMinimumAdjustment | PlanPhaseMaximumAdjustment;
|
|
14
14
|
/**
|
|
15
15
|
* The price interval IDs that this adjustment applies to.
|
|
16
16
|
*/
|
|
@@ -24,6 +24,82 @@ export interface AdjustmentInterval {
|
|
|
24
24
|
*/
|
|
25
25
|
start_date: string;
|
|
26
26
|
}
|
|
27
|
+
export declare namespace AdjustmentInterval {
|
|
28
|
+
interface PlanPhaseTieredPercentageDiscountAdjustment {
|
|
29
|
+
id: string;
|
|
30
|
+
adjustment_type: 'tiered_percentage_discount';
|
|
31
|
+
/**
|
|
32
|
+
* @deprecated The price IDs that this adjustment applies to.
|
|
33
|
+
*/
|
|
34
|
+
applies_to_price_ids: Array<string>;
|
|
35
|
+
/**
|
|
36
|
+
* The filters that determine which prices to apply this adjustment to.
|
|
37
|
+
*/
|
|
38
|
+
filters: Array<PlanPhaseTieredPercentageDiscountAdjustment.Filter>;
|
|
39
|
+
/**
|
|
40
|
+
* True for adjustments that apply to an entire invoice, false for adjustments that
|
|
41
|
+
* apply to only one price.
|
|
42
|
+
*/
|
|
43
|
+
is_invoice_level: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* The plan phase in which this adjustment is active.
|
|
46
|
+
*/
|
|
47
|
+
plan_phase_order: number | null;
|
|
48
|
+
/**
|
|
49
|
+
* The reason for the adjustment.
|
|
50
|
+
*/
|
|
51
|
+
reason: string | null;
|
|
52
|
+
/**
|
|
53
|
+
* The adjustment id this adjustment replaces. This adjustment will take the place
|
|
54
|
+
* of the replaced adjustment in plan version migrations.
|
|
55
|
+
*/
|
|
56
|
+
replaces_adjustment_id: string | null;
|
|
57
|
+
/**
|
|
58
|
+
* The ordered, contiguous bands of cumulative eligible spend, each discounted at
|
|
59
|
+
* its own percentage (progressive fill-a-tier), applied to the prices this
|
|
60
|
+
* adjustment covers in a given billing period.
|
|
61
|
+
*/
|
|
62
|
+
tiers: Array<PlanPhaseTieredPercentageDiscountAdjustment.Tier>;
|
|
63
|
+
}
|
|
64
|
+
namespace PlanPhaseTieredPercentageDiscountAdjustment {
|
|
65
|
+
interface Filter {
|
|
66
|
+
/**
|
|
67
|
+
* The property of the price to filter on.
|
|
68
|
+
*/
|
|
69
|
+
field: 'price_id' | 'item_id' | 'price_type' | 'currency' | 'pricing_unit_id';
|
|
70
|
+
/**
|
|
71
|
+
* Should prices that match the filter be included or excluded.
|
|
72
|
+
*/
|
|
73
|
+
operator: 'includes' | 'excludes';
|
|
74
|
+
/**
|
|
75
|
+
* The IDs or values that match this filter.
|
|
76
|
+
*/
|
|
77
|
+
values: Array<string>;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* One band of a tiered percentage discount. Bounds are denominated in the
|
|
81
|
+
* discount's currency. `lower_bound` is the exclusive start of the band and
|
|
82
|
+
* `upper_bound` is the inclusive end; `upper_bound` is null only for the
|
|
83
|
+
* open-ended final tier.
|
|
84
|
+
*/
|
|
85
|
+
interface Tier {
|
|
86
|
+
/**
|
|
87
|
+
* Exclusive lower bound of cumulative spend for this tier.
|
|
88
|
+
*/
|
|
89
|
+
lower_bound: number;
|
|
90
|
+
/**
|
|
91
|
+
* The percentage (between 0 and 1) discounted from spend that falls within this
|
|
92
|
+
* tier.
|
|
93
|
+
*/
|
|
94
|
+
percentage: number;
|
|
95
|
+
/**
|
|
96
|
+
* Inclusive upper bound of cumulative spend for this tier; null for the final
|
|
97
|
+
* open-ended tier.
|
|
98
|
+
*/
|
|
99
|
+
upper_bound?: number | null;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
27
103
|
export interface AggregatedCost {
|
|
28
104
|
per_price_costs: Array<PerPriceCost>;
|
|
29
105
|
/**
|
|
@@ -282,11 +358,13 @@ export declare namespace ChangedSubscriptionResources {
|
|
|
282
358
|
* | Estonia | `eu_vat` | European VAT Number |
|
|
283
359
|
* | Ethiopia | `et_tin` | Ethiopia Tax Identification Number |
|
|
284
360
|
* | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme |
|
|
361
|
+
* | Faroe Islands | `fo_vat` | Faroe Islands VAT Number |
|
|
285
362
|
* | Finland | `eu_vat` | European VAT Number |
|
|
286
363
|
* | France | `eu_vat` | European VAT Number |
|
|
287
364
|
* | Georgia | `ge_vat` | Georgian VAT |
|
|
288
365
|
* | Germany | `de_stn` | German Tax Number (Steuernummer) |
|
|
289
366
|
* | Germany | `eu_vat` | European VAT Number |
|
|
367
|
+
* | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number |
|
|
290
368
|
* | Greece | `eu_vat` | European VAT Number |
|
|
291
369
|
* | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) |
|
|
292
370
|
* | Hong Kong | `hk_br` | Hong Kong BR Number |
|
|
@@ -298,6 +376,7 @@ export declare namespace ChangedSubscriptionResources {
|
|
|
298
376
|
* | Ireland | `eu_vat` | European VAT Number |
|
|
299
377
|
* | Israel | `il_vat` | Israel VAT |
|
|
300
378
|
* | Italy | `eu_vat` | European VAT Number |
|
|
379
|
+
* | Italy | `it_cf` | Italian Codice Fiscale Number |
|
|
301
380
|
* | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) |
|
|
302
381
|
* | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) |
|
|
303
382
|
* | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) |
|
|
@@ -328,6 +407,7 @@ export declare namespace ChangedSubscriptionResources {
|
|
|
328
407
|
* | Norway | `no_vat` | Norwegian VAT Number |
|
|
329
408
|
* | Norway | `no_voec` | Norwegian VAT on e-commerce Number |
|
|
330
409
|
* | Oman | `om_vat` | Omani VAT Number |
|
|
410
|
+
* | Paraguay | `py_ruc` | Paraguayan RUC Number |
|
|
331
411
|
* | Peru | `pe_ruc` | Peruvian RUC Number |
|
|
332
412
|
* | Philippines | `ph_tin` | Philippines Tax Identification Number |
|
|
333
413
|
* | Poland | `eu_vat` | European VAT Number |
|
|
@@ -349,6 +429,7 @@ export declare namespace ChangedSubscriptionResources {
|
|
|
349
429
|
* | South Korea | `kr_brn` | Korean BRN |
|
|
350
430
|
* | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) |
|
|
351
431
|
* | Spain | `eu_vat` | European VAT Number |
|
|
432
|
+
* | Sri Lanka | `lk_vat` | Sri Lanka VAT Number |
|
|
352
433
|
* | Suriname | `sr_fin` | Suriname FIN Number |
|
|
353
434
|
* | Sweden | `eu_vat` | European VAT Number |
|
|
354
435
|
* | Switzerland | `ch_uid` | Switzerland UID Number |
|
|
@@ -391,8 +472,8 @@ export declare namespace ChangedSubscriptionResources {
|
|
|
391
472
|
*/
|
|
392
473
|
eligible_to_issue_at: string | null;
|
|
393
474
|
/**
|
|
394
|
-
* A URL for the customer-facing invoice portal. This URL expires
|
|
395
|
-
*
|
|
475
|
+
* A URL for the customer-facing invoice portal. This URL expires 60 days after the
|
|
476
|
+
* link is generated, or 30 days after the invoice's due date — whichever is later.
|
|
396
477
|
*/
|
|
397
478
|
hosted_invoice_url: string | null;
|
|
398
479
|
/**
|
|
@@ -587,7 +668,7 @@ export declare namespace ChangedSubscriptionResources {
|
|
|
587
668
|
* invoice calculations (ie. usage discounts -> amount discounts -> percentage
|
|
588
669
|
* discounts -> minimums -> maximums).
|
|
589
670
|
*/
|
|
590
|
-
adjustments: Array<Shared.MonetaryUsageDiscountAdjustment | Shared.MonetaryAmountDiscountAdjustment | Shared.MonetaryPercentageDiscountAdjustment | Shared.MonetaryMinimumAdjustment | Shared.MonetaryMaximumAdjustment>;
|
|
671
|
+
adjustments: Array<Shared.MonetaryUsageDiscountAdjustment | Shared.MonetaryAmountDiscountAdjustment | Shared.MonetaryPercentageDiscountAdjustment | LineItem.MonetaryTieredPercentageDiscountAdjustment | Shared.MonetaryMinimumAdjustment | Shared.MonetaryMaximumAdjustment>;
|
|
591
672
|
/**
|
|
592
673
|
* The final amount for a line item after all adjustments and pre paid credits have
|
|
593
674
|
* been applied.
|
|
@@ -659,6 +740,82 @@ export declare namespace ChangedSubscriptionResources {
|
|
|
659
740
|
*/
|
|
660
741
|
usage_customer_ids: Array<string> | null;
|
|
661
742
|
}
|
|
743
|
+
namespace LineItem {
|
|
744
|
+
interface MonetaryTieredPercentageDiscountAdjustment {
|
|
745
|
+
id: string;
|
|
746
|
+
adjustment_type: 'tiered_percentage_discount';
|
|
747
|
+
/**
|
|
748
|
+
* The value applied by an adjustment.
|
|
749
|
+
*/
|
|
750
|
+
amount: string;
|
|
751
|
+
/**
|
|
752
|
+
* @deprecated The price IDs that this adjustment applies to.
|
|
753
|
+
*/
|
|
754
|
+
applies_to_price_ids: Array<string>;
|
|
755
|
+
/**
|
|
756
|
+
* The filters that determine which prices to apply this adjustment to.
|
|
757
|
+
*/
|
|
758
|
+
filters: Array<MonetaryTieredPercentageDiscountAdjustment.Filter>;
|
|
759
|
+
/**
|
|
760
|
+
* True for adjustments that apply to an entire invoice, false for adjustments that
|
|
761
|
+
* apply to only one price.
|
|
762
|
+
*/
|
|
763
|
+
is_invoice_level: boolean;
|
|
764
|
+
/**
|
|
765
|
+
* The reason for the adjustment.
|
|
766
|
+
*/
|
|
767
|
+
reason: string | null;
|
|
768
|
+
/**
|
|
769
|
+
* The adjustment id this adjustment replaces. This adjustment will take the place
|
|
770
|
+
* of the replaced adjustment in plan version migrations.
|
|
771
|
+
*/
|
|
772
|
+
replaces_adjustment_id: string | null;
|
|
773
|
+
/**
|
|
774
|
+
* The ordered, contiguous bands of cumulative eligible spend, each discounted at
|
|
775
|
+
* its own percentage (progressive fill-a-tier), applied to the prices this
|
|
776
|
+
* adjustment covers in a given billing period.
|
|
777
|
+
*/
|
|
778
|
+
tiers: Array<MonetaryTieredPercentageDiscountAdjustment.Tier>;
|
|
779
|
+
}
|
|
780
|
+
namespace MonetaryTieredPercentageDiscountAdjustment {
|
|
781
|
+
interface Filter {
|
|
782
|
+
/**
|
|
783
|
+
* The property of the price to filter on.
|
|
784
|
+
*/
|
|
785
|
+
field: 'price_id' | 'item_id' | 'price_type' | 'currency' | 'pricing_unit_id';
|
|
786
|
+
/**
|
|
787
|
+
* Should prices that match the filter be included or excluded.
|
|
788
|
+
*/
|
|
789
|
+
operator: 'includes' | 'excludes';
|
|
790
|
+
/**
|
|
791
|
+
* The IDs or values that match this filter.
|
|
792
|
+
*/
|
|
793
|
+
values: Array<string>;
|
|
794
|
+
}
|
|
795
|
+
/**
|
|
796
|
+
* One band of a tiered percentage discount. Bounds are denominated in the
|
|
797
|
+
* discount's currency. `lower_bound` is the exclusive start of the band and
|
|
798
|
+
* `upper_bound` is the inclusive end; `upper_bound` is null only for the
|
|
799
|
+
* open-ended final tier.
|
|
800
|
+
*/
|
|
801
|
+
interface Tier {
|
|
802
|
+
/**
|
|
803
|
+
* Exclusive lower bound of cumulative spend for this tier.
|
|
804
|
+
*/
|
|
805
|
+
lower_bound: number;
|
|
806
|
+
/**
|
|
807
|
+
* The percentage (between 0 and 1) discounted from spend that falls within this
|
|
808
|
+
* tier.
|
|
809
|
+
*/
|
|
810
|
+
percentage: number;
|
|
811
|
+
/**
|
|
812
|
+
* Inclusive upper bound of cumulative spend for this tier; null for the final
|
|
813
|
+
* open-ended tier.
|
|
814
|
+
*/
|
|
815
|
+
upper_bound?: number | null;
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
}
|
|
662
819
|
interface PaymentAttempt {
|
|
663
820
|
/**
|
|
664
821
|
* The ID of the payment attempt.
|
|
@@ -675,7 +832,7 @@ export declare namespace ChangedSubscriptionResources {
|
|
|
675
832
|
/**
|
|
676
833
|
* The payment provider that attempted to collect the payment.
|
|
677
834
|
*/
|
|
678
|
-
payment_provider: 'stripe' | null;
|
|
835
|
+
payment_provider: 'stripe' | 'adyen' | null;
|
|
679
836
|
/**
|
|
680
837
|
* The ID of the payment attempt in the payment provider.
|
|
681
838
|
*/
|
|
@@ -940,11 +1097,13 @@ export interface CustomerMinified {
|
|
|
940
1097
|
* | Estonia | `eu_vat` | European VAT Number |
|
|
941
1098
|
* | Ethiopia | `et_tin` | Ethiopia Tax Identification Number |
|
|
942
1099
|
* | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme |
|
|
1100
|
+
* | Faroe Islands | `fo_vat` | Faroe Islands VAT Number |
|
|
943
1101
|
* | Finland | `eu_vat` | European VAT Number |
|
|
944
1102
|
* | France | `eu_vat` | European VAT Number |
|
|
945
1103
|
* | Georgia | `ge_vat` | Georgian VAT |
|
|
946
1104
|
* | Germany | `de_stn` | German Tax Number (Steuernummer) |
|
|
947
1105
|
* | Germany | `eu_vat` | European VAT Number |
|
|
1106
|
+
* | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number |
|
|
948
1107
|
* | Greece | `eu_vat` | European VAT Number |
|
|
949
1108
|
* | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) |
|
|
950
1109
|
* | Hong Kong | `hk_br` | Hong Kong BR Number |
|
|
@@ -956,6 +1115,7 @@ export interface CustomerMinified {
|
|
|
956
1115
|
* | Ireland | `eu_vat` | European VAT Number |
|
|
957
1116
|
* | Israel | `il_vat` | Israel VAT |
|
|
958
1117
|
* | Italy | `eu_vat` | European VAT Number |
|
|
1118
|
+
* | Italy | `it_cf` | Italian Codice Fiscale Number |
|
|
959
1119
|
* | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) |
|
|
960
1120
|
* | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) |
|
|
961
1121
|
* | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) |
|
|
@@ -986,6 +1146,7 @@ export interface CustomerMinified {
|
|
|
986
1146
|
* | Norway | `no_vat` | Norwegian VAT Number |
|
|
987
1147
|
* | Norway | `no_voec` | Norwegian VAT on e-commerce Number |
|
|
988
1148
|
* | Oman | `om_vat` | Omani VAT Number |
|
|
1149
|
+
* | Paraguay | `py_ruc` | Paraguayan RUC Number |
|
|
989
1150
|
* | Peru | `pe_ruc` | Peruvian RUC Number |
|
|
990
1151
|
* | Philippines | `ph_tin` | Philippines Tax Identification Number |
|
|
991
1152
|
* | Poland | `eu_vat` | European VAT Number |
|
|
@@ -1007,6 +1168,7 @@ export interface CustomerMinified {
|
|
|
1007
1168
|
* | South Korea | `kr_brn` | Korean BRN |
|
|
1008
1169
|
* | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) |
|
|
1009
1170
|
* | Spain | `eu_vat` | European VAT Number |
|
|
1171
|
+
* | Sri Lanka | `lk_vat` | Sri Lanka VAT Number |
|
|
1010
1172
|
* | Suriname | `sr_fin` | Suriname FIN Number |
|
|
1011
1173
|
* | Sweden | `eu_vat` | European VAT Number |
|
|
1012
1174
|
* | Switzerland | `ch_uid` | Switzerland UID Number |
|
|
@@ -1030,15 +1192,74 @@ export interface CustomerMinified {
|
|
|
1030
1192
|
* | Zimbabwe | `zw_tin` | Zimbabwe Tax Identification Number |
|
|
1031
1193
|
*/
|
|
1032
1194
|
export interface CustomerTaxID {
|
|
1033
|
-
country: 'AD' | 'AE' | 'AL' | 'AM' | 'AO' | 'AR' | 'AT' | 'AU' | 'AW' | 'AZ' | 'BA' | 'BB' | 'BD' | 'BE' | 'BF' | 'BG' | 'BH' | 'BJ' | 'BO' | 'BR' | 'BS' | 'BY' | 'CA' | 'CD' | 'CH' | 'CL' | 'CM' | 'CN' | 'CO' | 'CR' | 'CV' | '
|
|
1034
|
-
type: 'ad_nrt' | 'ae_trn' | 'al_tin' | 'am_tin' | 'ao_tin' | 'ar_cuit' | 'eu_vat' | 'au_abn' | 'au_arn' | 'aw_tin' | 'az_tin' | 'ba_tin' | 'bb_tin' | 'bd_bin' | 'bf_ifu' | 'bg_uic' | 'bh_vat' | 'bj_ifu' | 'bo_tin' | 'br_cnpj' | 'br_cpf' | 'bs_tin' | 'by_tin' | 'ca_bn' | 'ca_gst_hst' | 'ca_pst_bc' | 'ca_pst_mb' | 'ca_pst_sk' | 'ca_qst' | 'cd_nif' | 'ch_uid' | 'ch_vat' | 'cl_tin' | 'cm_niu' | 'cn_tin' | 'co_nit' | 'cr_tin' | 'cv_nif' | 'de_stn' | 'do_rcn' | 'ec_ruc' | 'eg_tin' | 'es_cif' | 'et_tin' | 'eu_oss_vat' | 'gb_vat' | 'ge_vat' | 'gn_nif' | 'hk_br' | 'hr_oib' | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' | 'is_vat' | 'jp_cn' | 'jp_rn' | 'jp_trn' | 'ke_pin' | 'kg_tin' | 'kh_tin' | 'kr_brn' | 'kz_bin' | 'la_tin' | 'li_uid' | 'li_vat' | 'ma_vat' | 'md_vat' | 'me_pib' | 'mk_vat' | 'mr_nif' | 'mx_rfc' | 'my_frp' | 'my_itn' | 'my_sst' | 'ng_tin' | 'no_vat' | 'no_voec' | 'np_pan' | 'nz_gst' | 'om_vat' | 'pe_ruc' | 'ph_tin' | 'pl_nip' | 'ro_tin' | 'rs_pib' | 'ru_inn' | 'ru_kpp' | 'sa_vat' | 'sg_gst' | 'sg_uen' | 'si_tin' | 'sn_ninea' | 'sr_fin' | 'sv_nit' | 'th_vat' | 'tj_tin' | 'tr_tin' | 'tw_vat' | 'tz_vat' | 'ua_vat' | 'ug_tin' | 'us_ein' | 'uy_ruc' | 'uz_tin' | 'uz_vat' | 've_rif' | 'vn_tin' | 'za_vat' | 'zm_tin' | 'zw_tin';
|
|
1195
|
+
country: 'AD' | 'AE' | 'AL' | 'AM' | 'AO' | 'AR' | 'AT' | 'AU' | 'AW' | 'AZ' | 'BA' | 'BB' | 'BD' | 'BE' | 'BF' | 'BG' | 'BH' | 'BJ' | 'BO' | 'BR' | 'BS' | 'BY' | 'CA' | 'CD' | 'CH' | 'CL' | 'CM' | 'CN' | 'CO' | 'CR' | 'CV' | 'CY' | 'CZ' | 'DE' | 'DK' | 'DO' | 'EC' | 'EE' | 'EG' | 'ES' | 'ET' | 'EU' | 'FI' | 'FO' | 'FR' | 'GB' | 'GE' | 'GI' | 'GN' | 'GR' | 'HK' | 'HR' | 'HU' | 'ID' | 'IE' | 'IL' | 'IN' | 'IS' | 'IT' | 'JP' | 'KE' | 'KG' | 'KH' | 'KR' | 'KZ' | 'LA' | 'LI' | 'LK' | 'LT' | 'LU' | 'LV' | 'MA' | 'MD' | 'ME' | 'MK' | 'MR' | 'MT' | 'MX' | 'MY' | 'NG' | 'NL' | 'NO' | 'NP' | 'NZ' | 'OM' | 'PE' | 'PH' | 'PL' | 'PT' | 'PY' | 'RO' | 'RS' | 'RU' | 'SA' | 'SE' | 'SG' | 'SI' | 'SK' | 'SN' | 'SR' | 'SV' | 'TH' | 'TJ' | 'TR' | 'TW' | 'TZ' | 'UA' | 'UG' | 'US' | 'UY' | 'UZ' | 'VE' | 'VN' | 'ZA' | 'ZM' | 'ZW';
|
|
1196
|
+
type: 'ad_nrt' | 'ae_trn' | 'al_tin' | 'am_tin' | 'ao_tin' | 'ar_cuit' | 'eu_vat' | 'au_abn' | 'au_arn' | 'aw_tin' | 'az_tin' | 'ba_tin' | 'bb_tin' | 'bd_bin' | 'bf_ifu' | 'bg_uic' | 'bh_vat' | 'bj_ifu' | 'bo_tin' | 'br_cnpj' | 'br_cpf' | 'bs_tin' | 'by_tin' | 'ca_bn' | 'ca_gst_hst' | 'ca_pst_bc' | 'ca_pst_mb' | 'ca_pst_sk' | 'ca_qst' | 'cd_nif' | 'ch_uid' | 'ch_vat' | 'cl_tin' | 'cm_niu' | 'cn_tin' | 'co_nit' | 'cr_tin' | 'cv_nif' | 'de_stn' | 'do_rcn' | 'ec_ruc' | 'eg_tin' | 'es_cif' | 'et_tin' | 'eu_oss_vat' | 'fo_vat' | 'gb_vat' | 'ge_vat' | 'gi_tin' | 'gn_nif' | 'hk_br' | 'hr_oib' | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' | 'is_vat' | 'it_cf' | 'jp_cn' | 'jp_rn' | 'jp_trn' | 'ke_pin' | 'kg_tin' | 'kh_tin' | 'kr_brn' | 'kz_bin' | 'la_tin' | 'li_uid' | 'li_vat' | 'lk_vat' | 'ma_vat' | 'md_vat' | 'me_pib' | 'mk_vat' | 'mr_nif' | 'mx_rfc' | 'my_frp' | 'my_itn' | 'my_sst' | 'ng_tin' | 'no_vat' | 'no_voec' | 'np_pan' | 'nz_gst' | 'om_vat' | 'pe_ruc' | 'ph_tin' | 'pl_nip' | 'py_ruc' | 'ro_tin' | 'rs_pib' | 'ru_inn' | 'ru_kpp' | 'sa_vat' | 'sg_gst' | 'sg_uen' | 'si_tin' | 'sn_ninea' | 'sr_fin' | 'sv_nit' | 'th_vat' | 'tj_tin' | 'tr_tin' | 'tw_vat' | 'tz_vat' | 'ua_vat' | 'ug_tin' | 'us_ein' | 'uy_ruc' | 'uz_tin' | 'uz_vat' | 've_rif' | 'vn_tin' | 'za_vat' | 'zm_tin' | 'zw_tin';
|
|
1035
1197
|
value: string;
|
|
1036
1198
|
}
|
|
1037
1199
|
export interface DimensionalPriceConfiguration {
|
|
1038
1200
|
dimension_values: Array<string>;
|
|
1039
1201
|
dimensional_price_group_id: string;
|
|
1040
1202
|
}
|
|
1041
|
-
export type Discount = PercentageDiscount | TrialDiscount | UsageDiscount | AmountDiscount;
|
|
1203
|
+
export type Discount = PercentageDiscount | TrialDiscount | UsageDiscount | AmountDiscount | Discount.TieredPercentageDiscount;
|
|
1204
|
+
export declare namespace Discount {
|
|
1205
|
+
interface TieredPercentageDiscount {
|
|
1206
|
+
discount_type: 'tiered_percentage';
|
|
1207
|
+
/**
|
|
1208
|
+
* Only available if discount_type is `tiered_percentage`. The ordered, contiguous
|
|
1209
|
+
* bands of cumulative eligible spend, each discounted at its own percentage
|
|
1210
|
+
* (progressive fill-a-tier).
|
|
1211
|
+
*/
|
|
1212
|
+
tiers: Array<TieredPercentageDiscount.Tier>;
|
|
1213
|
+
/**
|
|
1214
|
+
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
1215
|
+
* this can be a subset of prices.
|
|
1216
|
+
*/
|
|
1217
|
+
applies_to_price_ids?: Array<string> | null;
|
|
1218
|
+
/**
|
|
1219
|
+
* The filters that determine which prices to apply this discount to.
|
|
1220
|
+
*/
|
|
1221
|
+
filters?: Array<TieredPercentageDiscount.Filter> | null;
|
|
1222
|
+
reason?: string | null;
|
|
1223
|
+
}
|
|
1224
|
+
namespace TieredPercentageDiscount {
|
|
1225
|
+
/**
|
|
1226
|
+
* One band of a tiered percentage discount. Bounds are denominated in the
|
|
1227
|
+
* discount's currency. `lower_bound` is the exclusive start of the band and
|
|
1228
|
+
* `upper_bound` is the inclusive end; `upper_bound` is null only for the
|
|
1229
|
+
* open-ended final tier.
|
|
1230
|
+
*/
|
|
1231
|
+
interface Tier {
|
|
1232
|
+
/**
|
|
1233
|
+
* Exclusive lower bound of cumulative spend for this tier.
|
|
1234
|
+
*/
|
|
1235
|
+
lower_bound: number;
|
|
1236
|
+
/**
|
|
1237
|
+
* The percentage (between 0 and 1) discounted from spend that falls within this
|
|
1238
|
+
* tier.
|
|
1239
|
+
*/
|
|
1240
|
+
percentage: number;
|
|
1241
|
+
/**
|
|
1242
|
+
* Inclusive upper bound of cumulative spend for this tier; null for the final
|
|
1243
|
+
* open-ended tier.
|
|
1244
|
+
*/
|
|
1245
|
+
upper_bound?: number | null;
|
|
1246
|
+
}
|
|
1247
|
+
interface Filter {
|
|
1248
|
+
/**
|
|
1249
|
+
* The property of the price to filter on.
|
|
1250
|
+
*/
|
|
1251
|
+
field: 'price_id' | 'item_id' | 'price_type' | 'currency' | 'pricing_unit_id';
|
|
1252
|
+
/**
|
|
1253
|
+
* Should prices that match the filter be included or excluded.
|
|
1254
|
+
*/
|
|
1255
|
+
operator: 'includes' | 'excludes';
|
|
1256
|
+
/**
|
|
1257
|
+
* The IDs or values that match this filter.
|
|
1258
|
+
*/
|
|
1259
|
+
values: Array<string>;
|
|
1260
|
+
}
|
|
1261
|
+
}
|
|
1262
|
+
}
|
|
1042
1263
|
export interface FixedFeeQuantityScheduleEntry {
|
|
1043
1264
|
end_date: string | null;
|
|
1044
1265
|
price_id: string;
|
|
@@ -1138,11 +1359,13 @@ export interface Invoice {
|
|
|
1138
1359
|
* | Estonia | `eu_vat` | European VAT Number |
|
|
1139
1360
|
* | Ethiopia | `et_tin` | Ethiopia Tax Identification Number |
|
|
1140
1361
|
* | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme |
|
|
1362
|
+
* | Faroe Islands | `fo_vat` | Faroe Islands VAT Number |
|
|
1141
1363
|
* | Finland | `eu_vat` | European VAT Number |
|
|
1142
1364
|
* | France | `eu_vat` | European VAT Number |
|
|
1143
1365
|
* | Georgia | `ge_vat` | Georgian VAT |
|
|
1144
1366
|
* | Germany | `de_stn` | German Tax Number (Steuernummer) |
|
|
1145
1367
|
* | Germany | `eu_vat` | European VAT Number |
|
|
1368
|
+
* | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number |
|
|
1146
1369
|
* | Greece | `eu_vat` | European VAT Number |
|
|
1147
1370
|
* | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) |
|
|
1148
1371
|
* | Hong Kong | `hk_br` | Hong Kong BR Number |
|
|
@@ -1154,6 +1377,7 @@ export interface Invoice {
|
|
|
1154
1377
|
* | Ireland | `eu_vat` | European VAT Number |
|
|
1155
1378
|
* | Israel | `il_vat` | Israel VAT |
|
|
1156
1379
|
* | Italy | `eu_vat` | European VAT Number |
|
|
1380
|
+
* | Italy | `it_cf` | Italian Codice Fiscale Number |
|
|
1157
1381
|
* | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) |
|
|
1158
1382
|
* | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) |
|
|
1159
1383
|
* | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) |
|
|
@@ -1184,6 +1408,7 @@ export interface Invoice {
|
|
|
1184
1408
|
* | Norway | `no_vat` | Norwegian VAT Number |
|
|
1185
1409
|
* | Norway | `no_voec` | Norwegian VAT on e-commerce Number |
|
|
1186
1410
|
* | Oman | `om_vat` | Omani VAT Number |
|
|
1411
|
+
* | Paraguay | `py_ruc` | Paraguayan RUC Number |
|
|
1187
1412
|
* | Peru | `pe_ruc` | Peruvian RUC Number |
|
|
1188
1413
|
* | Philippines | `ph_tin` | Philippines Tax Identification Number |
|
|
1189
1414
|
* | Poland | `eu_vat` | European VAT Number |
|
|
@@ -1205,6 +1430,7 @@ export interface Invoice {
|
|
|
1205
1430
|
* | South Korea | `kr_brn` | Korean BRN |
|
|
1206
1431
|
* | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) |
|
|
1207
1432
|
* | Spain | `eu_vat` | European VAT Number |
|
|
1433
|
+
* | Sri Lanka | `lk_vat` | Sri Lanka VAT Number |
|
|
1208
1434
|
* | Suriname | `sr_fin` | Suriname FIN Number |
|
|
1209
1435
|
* | Sweden | `eu_vat` | European VAT Number |
|
|
1210
1436
|
* | Switzerland | `ch_uid` | Switzerland UID Number |
|
|
@@ -1247,8 +1473,8 @@ export interface Invoice {
|
|
|
1247
1473
|
*/
|
|
1248
1474
|
eligible_to_issue_at: string | null;
|
|
1249
1475
|
/**
|
|
1250
|
-
* A URL for the customer-facing invoice portal. This URL expires
|
|
1251
|
-
*
|
|
1476
|
+
* A URL for the customer-facing invoice portal. This URL expires 60 days after the
|
|
1477
|
+
* link is generated, or 30 days after the invoice's due date — whichever is later.
|
|
1252
1478
|
*/
|
|
1253
1479
|
hosted_invoice_url: string | null;
|
|
1254
1480
|
/**
|
|
@@ -1439,7 +1665,7 @@ export declare namespace Invoice {
|
|
|
1439
1665
|
* invoice calculations (ie. usage discounts -> amount discounts -> percentage
|
|
1440
1666
|
* discounts -> minimums -> maximums).
|
|
1441
1667
|
*/
|
|
1442
|
-
adjustments: Array<Shared.MonetaryUsageDiscountAdjustment | Shared.MonetaryAmountDiscountAdjustment | Shared.MonetaryPercentageDiscountAdjustment | Shared.MonetaryMinimumAdjustment | Shared.MonetaryMaximumAdjustment>;
|
|
1668
|
+
adjustments: Array<Shared.MonetaryUsageDiscountAdjustment | Shared.MonetaryAmountDiscountAdjustment | Shared.MonetaryPercentageDiscountAdjustment | LineItem.MonetaryTieredPercentageDiscountAdjustment | Shared.MonetaryMinimumAdjustment | Shared.MonetaryMaximumAdjustment>;
|
|
1443
1669
|
/**
|
|
1444
1670
|
* The final amount for a line item after all adjustments and pre paid credits have
|
|
1445
1671
|
* been applied.
|
|
@@ -1511,6 +1737,82 @@ export declare namespace Invoice {
|
|
|
1511
1737
|
*/
|
|
1512
1738
|
usage_customer_ids: Array<string> | null;
|
|
1513
1739
|
}
|
|
1740
|
+
namespace LineItem {
|
|
1741
|
+
interface MonetaryTieredPercentageDiscountAdjustment {
|
|
1742
|
+
id: string;
|
|
1743
|
+
adjustment_type: 'tiered_percentage_discount';
|
|
1744
|
+
/**
|
|
1745
|
+
* The value applied by an adjustment.
|
|
1746
|
+
*/
|
|
1747
|
+
amount: string;
|
|
1748
|
+
/**
|
|
1749
|
+
* @deprecated The price IDs that this adjustment applies to.
|
|
1750
|
+
*/
|
|
1751
|
+
applies_to_price_ids: Array<string>;
|
|
1752
|
+
/**
|
|
1753
|
+
* The filters that determine which prices to apply this adjustment to.
|
|
1754
|
+
*/
|
|
1755
|
+
filters: Array<MonetaryTieredPercentageDiscountAdjustment.Filter>;
|
|
1756
|
+
/**
|
|
1757
|
+
* True for adjustments that apply to an entire invoice, false for adjustments that
|
|
1758
|
+
* apply to only one price.
|
|
1759
|
+
*/
|
|
1760
|
+
is_invoice_level: boolean;
|
|
1761
|
+
/**
|
|
1762
|
+
* The reason for the adjustment.
|
|
1763
|
+
*/
|
|
1764
|
+
reason: string | null;
|
|
1765
|
+
/**
|
|
1766
|
+
* The adjustment id this adjustment replaces. This adjustment will take the place
|
|
1767
|
+
* of the replaced adjustment in plan version migrations.
|
|
1768
|
+
*/
|
|
1769
|
+
replaces_adjustment_id: string | null;
|
|
1770
|
+
/**
|
|
1771
|
+
* The ordered, contiguous bands of cumulative eligible spend, each discounted at
|
|
1772
|
+
* its own percentage (progressive fill-a-tier), applied to the prices this
|
|
1773
|
+
* adjustment covers in a given billing period.
|
|
1774
|
+
*/
|
|
1775
|
+
tiers: Array<MonetaryTieredPercentageDiscountAdjustment.Tier>;
|
|
1776
|
+
}
|
|
1777
|
+
namespace MonetaryTieredPercentageDiscountAdjustment {
|
|
1778
|
+
interface Filter {
|
|
1779
|
+
/**
|
|
1780
|
+
* The property of the price to filter on.
|
|
1781
|
+
*/
|
|
1782
|
+
field: 'price_id' | 'item_id' | 'price_type' | 'currency' | 'pricing_unit_id';
|
|
1783
|
+
/**
|
|
1784
|
+
* Should prices that match the filter be included or excluded.
|
|
1785
|
+
*/
|
|
1786
|
+
operator: 'includes' | 'excludes';
|
|
1787
|
+
/**
|
|
1788
|
+
* The IDs or values that match this filter.
|
|
1789
|
+
*/
|
|
1790
|
+
values: Array<string>;
|
|
1791
|
+
}
|
|
1792
|
+
/**
|
|
1793
|
+
* One band of a tiered percentage discount. Bounds are denominated in the
|
|
1794
|
+
* discount's currency. `lower_bound` is the exclusive start of the band and
|
|
1795
|
+
* `upper_bound` is the inclusive end; `upper_bound` is null only for the
|
|
1796
|
+
* open-ended final tier.
|
|
1797
|
+
*/
|
|
1798
|
+
interface Tier {
|
|
1799
|
+
/**
|
|
1800
|
+
* Exclusive lower bound of cumulative spend for this tier.
|
|
1801
|
+
*/
|
|
1802
|
+
lower_bound: number;
|
|
1803
|
+
/**
|
|
1804
|
+
* The percentage (between 0 and 1) discounted from spend that falls within this
|
|
1805
|
+
* tier.
|
|
1806
|
+
*/
|
|
1807
|
+
percentage: number;
|
|
1808
|
+
/**
|
|
1809
|
+
* Inclusive upper bound of cumulative spend for this tier; null for the final
|
|
1810
|
+
* open-ended tier.
|
|
1811
|
+
*/
|
|
1812
|
+
upper_bound?: number | null;
|
|
1813
|
+
}
|
|
1814
|
+
}
|
|
1815
|
+
}
|
|
1514
1816
|
interface PaymentAttempt {
|
|
1515
1817
|
/**
|
|
1516
1818
|
* The ID of the payment attempt.
|
|
@@ -1527,7 +1829,7 @@ export declare namespace Invoice {
|
|
|
1527
1829
|
/**
|
|
1528
1830
|
* The payment provider that attempted to collect the payment.
|
|
1529
1831
|
*/
|
|
1530
|
-
payment_provider: 'stripe' | null;
|
|
1832
|
+
payment_provider: 'stripe' | 'adyen' | null;
|
|
1531
1833
|
/**
|
|
1532
1834
|
* The ID of the payment attempt in the payment provider.
|
|
1533
1835
|
*/
|
|
@@ -1543,7 +1845,66 @@ export declare namespace Invoice {
|
|
|
1543
1845
|
succeeded: boolean;
|
|
1544
1846
|
}
|
|
1545
1847
|
}
|
|
1546
|
-
export type InvoiceLevelDiscount = PercentageDiscount | AmountDiscount | TrialDiscount;
|
|
1848
|
+
export type InvoiceLevelDiscount = PercentageDiscount | AmountDiscount | TrialDiscount | InvoiceLevelDiscount.TieredPercentageDiscount;
|
|
1849
|
+
export declare namespace InvoiceLevelDiscount {
|
|
1850
|
+
interface TieredPercentageDiscount {
|
|
1851
|
+
discount_type: 'tiered_percentage';
|
|
1852
|
+
/**
|
|
1853
|
+
* Only available if discount_type is `tiered_percentage`. The ordered, contiguous
|
|
1854
|
+
* bands of cumulative eligible spend, each discounted at its own percentage
|
|
1855
|
+
* (progressive fill-a-tier).
|
|
1856
|
+
*/
|
|
1857
|
+
tiers: Array<TieredPercentageDiscount.Tier>;
|
|
1858
|
+
/**
|
|
1859
|
+
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
1860
|
+
* this can be a subset of prices.
|
|
1861
|
+
*/
|
|
1862
|
+
applies_to_price_ids?: Array<string> | null;
|
|
1863
|
+
/**
|
|
1864
|
+
* The filters that determine which prices to apply this discount to.
|
|
1865
|
+
*/
|
|
1866
|
+
filters?: Array<TieredPercentageDiscount.Filter> | null;
|
|
1867
|
+
reason?: string | null;
|
|
1868
|
+
}
|
|
1869
|
+
namespace TieredPercentageDiscount {
|
|
1870
|
+
/**
|
|
1871
|
+
* One band of a tiered percentage discount. Bounds are denominated in the
|
|
1872
|
+
* discount's currency. `lower_bound` is the exclusive start of the band and
|
|
1873
|
+
* `upper_bound` is the inclusive end; `upper_bound` is null only for the
|
|
1874
|
+
* open-ended final tier.
|
|
1875
|
+
*/
|
|
1876
|
+
interface Tier {
|
|
1877
|
+
/**
|
|
1878
|
+
* Exclusive lower bound of cumulative spend for this tier.
|
|
1879
|
+
*/
|
|
1880
|
+
lower_bound: number;
|
|
1881
|
+
/**
|
|
1882
|
+
* The percentage (between 0 and 1) discounted from spend that falls within this
|
|
1883
|
+
* tier.
|
|
1884
|
+
*/
|
|
1885
|
+
percentage: number;
|
|
1886
|
+
/**
|
|
1887
|
+
* Inclusive upper bound of cumulative spend for this tier; null for the final
|
|
1888
|
+
* open-ended tier.
|
|
1889
|
+
*/
|
|
1890
|
+
upper_bound?: number | null;
|
|
1891
|
+
}
|
|
1892
|
+
interface Filter {
|
|
1893
|
+
/**
|
|
1894
|
+
* The property of the price to filter on.
|
|
1895
|
+
*/
|
|
1896
|
+
field: 'price_id' | 'item_id' | 'price_type' | 'currency' | 'pricing_unit_id';
|
|
1897
|
+
/**
|
|
1898
|
+
* Should prices that match the filter be included or excluded.
|
|
1899
|
+
*/
|
|
1900
|
+
operator: 'includes' | 'excludes';
|
|
1901
|
+
/**
|
|
1902
|
+
* The IDs or values that match this filter.
|
|
1903
|
+
*/
|
|
1904
|
+
values: Array<string>;
|
|
1905
|
+
}
|
|
1906
|
+
}
|
|
1907
|
+
}
|
|
1547
1908
|
export interface InvoiceTiny {
|
|
1548
1909
|
/**
|
|
1549
1910
|
* The Invoice id
|
|
@@ -2083,6 +2444,14 @@ export interface NewAllocationPrice {
|
|
|
2083
2444
|
* The license type ID to associate the price with license allocation.
|
|
2084
2445
|
*/
|
|
2085
2446
|
license_type_id?: string | null;
|
|
2447
|
+
/**
|
|
2448
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
2449
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
2450
|
+
* by setting `metadata` to `null`.
|
|
2451
|
+
*/
|
|
2452
|
+
metadata?: {
|
|
2453
|
+
[key: string]: string | null;
|
|
2454
|
+
} | null;
|
|
2086
2455
|
/**
|
|
2087
2456
|
* The (per-unit) cost basis of each created block. If non-zero, a customer will be
|
|
2088
2457
|
* invoiced according to the quantity and per unit cost basis specified for the
|
|
@@ -8200,7 +8569,7 @@ export declare namespace PlanPhaseUsageDiscountAdjustment {
|
|
|
8200
8569
|
* For more on the types of prices, see
|
|
8201
8570
|
* [the core concepts documentation](/core-concepts#plan-and-price)
|
|
8202
8571
|
*/
|
|
8203
|
-
export type Price = Price.UnitPrice | Price.TieredPrice | Price.BulkPrice | Price.BulkWithFiltersPrice | Price.PackagePrice | Price.MatrixPrice | Price.ThresholdTotalAmountPrice | Price.TieredPackagePrice | Price.TieredWithMinimumPrice | Price.GroupedTieredPrice | Price.TieredPackageWithMinimumPrice | Price.PackageWithAllocationPrice | Price.UnitWithPercentPrice | Price.MatrixWithAllocationPrice | Price.TieredWithProrationPrice | Price.UnitWithProrationPrice | Price.GroupedAllocationPrice | Price.BulkWithProrationPrice | Price.GroupedWithProratedMinimumPrice | Price.GroupedWithMeteredMinimumPrice | Price.GroupedWithMinMaxThresholdsPrice | Price.MatrixWithDisplayNamePrice | Price.GroupedTieredPackagePrice | Price.MaxGroupTieredPackagePrice | Price.ScalableMatrixWithUnitPricingPrice | Price.ScalableMatrixWithTieredPricingPrice | Price.CumulativeGroupedBulkPrice | Price.CumulativeGroupedAllocationPrice | Price.MinimumCompositePrice | Price.PercentCompositePrice | Price.EventOutputPrice;
|
|
8572
|
+
export type Price = Price.UnitPrice | Price.TieredPrice | Price.BulkPrice | Price.BulkWithFiltersPrice | Price.PackagePrice | Price.MatrixPrice | Price.ThresholdTotalAmountPrice | Price.TieredPackagePrice | Price.TieredWithMinimumPrice | Price.GroupedTieredPrice | Price.TieredPackageWithMinimumPrice | Price.PackageWithAllocationPrice | Price.UnitWithPercentPrice | Price.MatrixWithAllocationPrice | Price.MatrixWithThresholdDiscountsPrice | Price.TieredWithProrationPrice | Price.UnitWithProrationPrice | Price.GroupedAllocationPrice | Price.BulkWithProrationPrice | Price.GroupedWithProratedMinimumPrice | Price.GroupedWithMeteredMinimumPrice | Price.GroupedWithMinMaxThresholdsPrice | Price.MatrixWithDisplayNamePrice | Price.GroupedTieredPackagePrice | Price.MaxGroupTieredPackagePrice | Price.ScalableMatrixWithUnitPricingPrice | Price.ScalableMatrixWithTieredPricingPrice | Price.CumulativeGroupedBulkPrice | Price.CumulativeGroupedAllocationPrice | Price.DailyCreditAllowancePrice | Price.MeteredAllowancePrice | Price.MinimumCompositePrice | Price.PercentCompositePrice | Price.EventOutputPrice;
|
|
8204
8573
|
export declare namespace Price {
|
|
8205
8574
|
interface UnitPrice {
|
|
8206
8575
|
id: string;
|
|
@@ -8220,6 +8589,7 @@ export declare namespace Price {
|
|
|
8220
8589
|
discount: Shared.Discount | null;
|
|
8221
8590
|
external_price_id: string | null;
|
|
8222
8591
|
fixed_price_quantity: number | null;
|
|
8592
|
+
invoice_grouping_key: string | null;
|
|
8223
8593
|
invoicing_cycle_configuration: Shared.BillingCycleConfiguration | null;
|
|
8224
8594
|
/**
|
|
8225
8595
|
* A minimal representation of an Item containing only the essential identifying
|
|
@@ -8329,6 +8699,7 @@ export declare namespace Price {
|
|
|
8329
8699
|
discount: Shared.Discount | null;
|
|
8330
8700
|
external_price_id: string | null;
|
|
8331
8701
|
fixed_price_quantity: number | null;
|
|
8702
|
+
invoice_grouping_key: string | null;
|
|
8332
8703
|
invoicing_cycle_configuration: Shared.BillingCycleConfiguration | null;
|
|
8333
8704
|
/**
|
|
8334
8705
|
* A minimal representation of an Item containing only the essential identifying
|
|
@@ -8442,6 +8813,7 @@ export declare namespace Price {
|
|
|
8442
8813
|
discount: Shared.Discount | null;
|
|
8443
8814
|
external_price_id: string | null;
|
|
8444
8815
|
fixed_price_quantity: number | null;
|
|
8816
|
+
invoice_grouping_key: string | null;
|
|
8445
8817
|
invoicing_cycle_configuration: Shared.BillingCycleConfiguration | null;
|
|
8446
8818
|
/**
|
|
8447
8819
|
* A minimal representation of an Item containing only the essential identifying
|
|
@@ -8551,6 +8923,7 @@ export declare namespace Price {
|
|
|
8551
8923
|
discount: Shared.Discount | null;
|
|
8552
8924
|
external_price_id: string | null;
|
|
8553
8925
|
fixed_price_quantity: number | null;
|
|
8926
|
+
invoice_grouping_key: string | null;
|
|
8554
8927
|
invoicing_cycle_configuration: Shared.BillingCycleConfiguration | null;
|
|
8555
8928
|
/**
|
|
8556
8929
|
* A minimal representation of an Item containing only the essential identifying
|
|
@@ -8697,6 +9070,7 @@ export declare namespace Price {
|
|
|
8697
9070
|
discount: Shared.Discount | null;
|
|
8698
9071
|
external_price_id: string | null;
|
|
8699
9072
|
fixed_price_quantity: number | null;
|
|
9073
|
+
invoice_grouping_key: string | null;
|
|
8700
9074
|
invoicing_cycle_configuration: Shared.BillingCycleConfiguration | null;
|
|
8701
9075
|
/**
|
|
8702
9076
|
* A minimal representation of an Item containing only the essential identifying
|
|
@@ -8806,6 +9180,7 @@ export declare namespace Price {
|
|
|
8806
9180
|
discount: Shared.Discount | null;
|
|
8807
9181
|
external_price_id: string | null;
|
|
8808
9182
|
fixed_price_quantity: number | null;
|
|
9183
|
+
invoice_grouping_key: string | null;
|
|
8809
9184
|
invoicing_cycle_configuration: Shared.BillingCycleConfiguration | null;
|
|
8810
9185
|
/**
|
|
8811
9186
|
* A minimal representation of an Item containing only the essential identifying
|
|
@@ -8915,6 +9290,7 @@ export declare namespace Price {
|
|
|
8915
9290
|
discount: Shared.Discount | null;
|
|
8916
9291
|
external_price_id: string | null;
|
|
8917
9292
|
fixed_price_quantity: number | null;
|
|
9293
|
+
invoice_grouping_key: string | null;
|
|
8918
9294
|
invoicing_cycle_configuration: Shared.BillingCycleConfiguration | null;
|
|
8919
9295
|
/**
|
|
8920
9296
|
* A minimal representation of an Item containing only the essential identifying
|
|
@@ -9050,6 +9426,7 @@ export declare namespace Price {
|
|
|
9050
9426
|
discount: Shared.Discount | null;
|
|
9051
9427
|
external_price_id: string | null;
|
|
9052
9428
|
fixed_price_quantity: number | null;
|
|
9429
|
+
invoice_grouping_key: string | null;
|
|
9053
9430
|
invoicing_cycle_configuration: Shared.BillingCycleConfiguration | null;
|
|
9054
9431
|
/**
|
|
9055
9432
|
* A minimal representation of an Item containing only the essential identifying
|
|
@@ -9184,6 +9561,7 @@ export declare namespace Price {
|
|
|
9184
9561
|
discount: Shared.Discount | null;
|
|
9185
9562
|
external_price_id: string | null;
|
|
9186
9563
|
fixed_price_quantity: number | null;
|
|
9564
|
+
invoice_grouping_key: string | null;
|
|
9187
9565
|
invoicing_cycle_configuration: Shared.BillingCycleConfiguration | null;
|
|
9188
9566
|
/**
|
|
9189
9567
|
* A minimal representation of an Item containing only the essential identifying
|
|
@@ -9328,6 +9706,7 @@ export declare namespace Price {
|
|
|
9328
9706
|
* Configuration for grouped_tiered pricing
|
|
9329
9707
|
*/
|
|
9330
9708
|
grouped_tiered_config: GroupedTieredPrice.GroupedTieredConfig;
|
|
9709
|
+
invoice_grouping_key: string | null;
|
|
9331
9710
|
invoicing_cycle_configuration: Shared.BillingCycleConfiguration | null;
|
|
9332
9711
|
/**
|
|
9333
9712
|
* A minimal representation of an Item containing only the essential identifying
|
|
@@ -9459,6 +9838,7 @@ export declare namespace Price {
|
|
|
9459
9838
|
discount: Shared.Discount | null;
|
|
9460
9839
|
external_price_id: string | null;
|
|
9461
9840
|
fixed_price_quantity: number | null;
|
|
9841
|
+
invoice_grouping_key: string | null;
|
|
9462
9842
|
invoicing_cycle_configuration: Shared.BillingCycleConfiguration | null;
|
|
9463
9843
|
/**
|
|
9464
9844
|
* A minimal representation of an Item containing only the essential identifying
|
|
@@ -9589,6 +9969,7 @@ export declare namespace Price {
|
|
|
9589
9969
|
discount: Shared.Discount | null;
|
|
9590
9970
|
external_price_id: string | null;
|
|
9591
9971
|
fixed_price_quantity: number | null;
|
|
9972
|
+
invoice_grouping_key: string | null;
|
|
9592
9973
|
invoicing_cycle_configuration: Shared.BillingCycleConfiguration | null;
|
|
9593
9974
|
/**
|
|
9594
9975
|
* A minimal representation of an Item containing only the essential identifying
|
|
@@ -9706,6 +10087,7 @@ export declare namespace Price {
|
|
|
9706
10087
|
discount: Shared.Discount | null;
|
|
9707
10088
|
external_price_id: string | null;
|
|
9708
10089
|
fixed_price_quantity: number | null;
|
|
10090
|
+
invoice_grouping_key: string | null;
|
|
9709
10091
|
invoicing_cycle_configuration: Shared.BillingCycleConfiguration | null;
|
|
9710
10092
|
/**
|
|
9711
10093
|
* A minimal representation of an Item containing only the essential identifying
|
|
@@ -9828,6 +10210,7 @@ export declare namespace Price {
|
|
|
9828
10210
|
discount: Shared.Discount | null;
|
|
9829
10211
|
external_price_id: string | null;
|
|
9830
10212
|
fixed_price_quantity: number | null;
|
|
10213
|
+
invoice_grouping_key: string | null;
|
|
9831
10214
|
invoicing_cycle_configuration: Shared.BillingCycleConfiguration | null;
|
|
9832
10215
|
/**
|
|
9833
10216
|
* A minimal representation of an Item containing only the essential identifying
|
|
@@ -9919,13 +10302,13 @@ export declare namespace Price {
|
|
|
9919
10302
|
name: string;
|
|
9920
10303
|
}
|
|
9921
10304
|
}
|
|
9922
|
-
interface
|
|
10305
|
+
interface MatrixWithThresholdDiscountsPrice {
|
|
9923
10306
|
id: string;
|
|
9924
10307
|
billable_metric: Shared.BillableMetricTiny | null;
|
|
9925
10308
|
billing_cycle_configuration: Shared.BillingCycleConfiguration;
|
|
9926
10309
|
billing_mode: 'in_advance' | 'in_arrear';
|
|
9927
10310
|
cadence: 'one_time' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | 'custom';
|
|
9928
|
-
composite_price_filters: Array<
|
|
10311
|
+
composite_price_filters: Array<MatrixWithThresholdDiscountsPrice.CompositePriceFilter> | null;
|
|
9929
10312
|
conversion_rate: number | null;
|
|
9930
10313
|
conversion_rate_config: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
9931
10314
|
created_at: string;
|
|
@@ -9937,12 +10320,17 @@ export declare namespace Price {
|
|
|
9937
10320
|
discount: Shared.Discount | null;
|
|
9938
10321
|
external_price_id: string | null;
|
|
9939
10322
|
fixed_price_quantity: number | null;
|
|
10323
|
+
invoice_grouping_key: string | null;
|
|
9940
10324
|
invoicing_cycle_configuration: Shared.BillingCycleConfiguration | null;
|
|
9941
10325
|
/**
|
|
9942
10326
|
* A minimal representation of an Item containing only the essential identifying
|
|
9943
10327
|
* information.
|
|
9944
10328
|
*/
|
|
9945
10329
|
item: Shared.ItemSlim;
|
|
10330
|
+
/**
|
|
10331
|
+
* Configuration for matrix_with_threshold_discounts pricing
|
|
10332
|
+
*/
|
|
10333
|
+
matrix_with_threshold_discounts_config: MatrixWithThresholdDiscountsPrice.MatrixWithThresholdDiscountsConfig;
|
|
9946
10334
|
/**
|
|
9947
10335
|
* @deprecated
|
|
9948
10336
|
*/
|
|
@@ -9971,7 +10359,7 @@ export declare namespace Price {
|
|
|
9971
10359
|
/**
|
|
9972
10360
|
* The pricing model type
|
|
9973
10361
|
*/
|
|
9974
|
-
model_type: '
|
|
10362
|
+
model_type: 'matrix_with_threshold_discounts';
|
|
9975
10363
|
name: string;
|
|
9976
10364
|
plan_phase_order: number | null;
|
|
9977
10365
|
price_type: 'usage_price' | 'fixed_price' | 'composite_price';
|
|
@@ -9980,19 +10368,15 @@ export declare namespace Price {
|
|
|
9980
10368
|
* price in plan version migrations.
|
|
9981
10369
|
*/
|
|
9982
10370
|
replaces_price_id: string | null;
|
|
9983
|
-
/**
|
|
9984
|
-
* Configuration for tiered_with_proration pricing
|
|
9985
|
-
*/
|
|
9986
|
-
tiered_with_proration_config: TieredWithProrationPrice.TieredWithProrationConfig;
|
|
9987
10371
|
dimensional_price_configuration?: Shared.DimensionalPriceConfiguration | null;
|
|
9988
10372
|
/**
|
|
9989
10373
|
* The LicenseType resource represents a type of license that can be assigned to
|
|
9990
10374
|
* users. License types are used during billing by grouping metrics on the
|
|
9991
10375
|
* configured grouping key.
|
|
9992
10376
|
*/
|
|
9993
|
-
license_type?:
|
|
10377
|
+
license_type?: MatrixWithThresholdDiscountsPrice.LicenseType | null;
|
|
9994
10378
|
}
|
|
9995
|
-
namespace
|
|
10379
|
+
namespace MatrixWithThresholdDiscountsPrice {
|
|
9996
10380
|
interface CompositePriceFilter {
|
|
9997
10381
|
/**
|
|
9998
10382
|
* The property of the price to filter on.
|
|
@@ -10008,28 +10392,51 @@ export declare namespace Price {
|
|
|
10008
10392
|
values: Array<string>;
|
|
10009
10393
|
}
|
|
10010
10394
|
/**
|
|
10011
|
-
* Configuration for
|
|
10395
|
+
* Configuration for matrix_with_threshold_discounts pricing
|
|
10012
10396
|
*/
|
|
10013
|
-
interface
|
|
10397
|
+
interface MatrixWithThresholdDiscountsConfig {
|
|
10014
10398
|
/**
|
|
10015
|
-
*
|
|
10016
|
-
* proration
|
|
10399
|
+
* Unit price used for usage that does not match any defined matrix cell.
|
|
10017
10400
|
*/
|
|
10018
|
-
|
|
10019
|
-
}
|
|
10020
|
-
namespace TieredWithProrationConfig {
|
|
10401
|
+
default_unit_amount: string;
|
|
10021
10402
|
/**
|
|
10022
|
-
*
|
|
10403
|
+
* First matrix dimension key.
|
|
10023
10404
|
*/
|
|
10024
|
-
|
|
10405
|
+
first_dimension: string;
|
|
10406
|
+
/**
|
|
10407
|
+
* Per-cell unit prices.
|
|
10408
|
+
*/
|
|
10409
|
+
matrix_values: Array<MatrixWithThresholdDiscountsConfig.MatrixValue>;
|
|
10410
|
+
/**
|
|
10411
|
+
* Optional second matrix dimension key.
|
|
10412
|
+
*/
|
|
10413
|
+
second_dimension?: string | null;
|
|
10414
|
+
threshold_discount_groups?: Array<MatrixWithThresholdDiscountsConfig.ThresholdDiscountGroup>;
|
|
10415
|
+
}
|
|
10416
|
+
namespace MatrixWithThresholdDiscountsConfig {
|
|
10417
|
+
interface MatrixValue {
|
|
10418
|
+
first_dimension_value: string;
|
|
10419
|
+
unit_amount: string;
|
|
10420
|
+
second_dimension_value?: string | null;
|
|
10421
|
+
}
|
|
10422
|
+
interface ThresholdDiscountGroup {
|
|
10025
10423
|
/**
|
|
10026
|
-
*
|
|
10424
|
+
* Discount rate applied to spend above the threshold.
|
|
10027
10425
|
*/
|
|
10028
|
-
|
|
10426
|
+
above_threshold_discount_percentage: string;
|
|
10029
10427
|
/**
|
|
10030
|
-
*
|
|
10428
|
+
* Discount rate applied to spend at or below the threshold. Set to 0 for no
|
|
10429
|
+
* baseline discount.
|
|
10031
10430
|
*/
|
|
10032
|
-
|
|
10431
|
+
below_threshold_discount_percentage: string;
|
|
10432
|
+
/**
|
|
10433
|
+
* Semicolon-separated list of matrix cell coordinates targeted by this group. Each
|
|
10434
|
+
* coordinate is `first,second` when the matrix has two dimensions, or just `first`
|
|
10435
|
+
* for a single-dimension matrix. Example: `blue,circle;green,triangle`.
|
|
10436
|
+
*/
|
|
10437
|
+
cell_coordinates: string;
|
|
10438
|
+
threshold_amount: string;
|
|
10439
|
+
description?: string | null;
|
|
10033
10440
|
}
|
|
10034
10441
|
}
|
|
10035
10442
|
/**
|
|
@@ -10053,13 +10460,13 @@ export declare namespace Price {
|
|
|
10053
10460
|
name: string;
|
|
10054
10461
|
}
|
|
10055
10462
|
}
|
|
10056
|
-
interface
|
|
10463
|
+
interface TieredWithProrationPrice {
|
|
10057
10464
|
id: string;
|
|
10058
10465
|
billable_metric: Shared.BillableMetricTiny | null;
|
|
10059
10466
|
billing_cycle_configuration: Shared.BillingCycleConfiguration;
|
|
10060
10467
|
billing_mode: 'in_advance' | 'in_arrear';
|
|
10061
10468
|
cadence: 'one_time' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | 'custom';
|
|
10062
|
-
composite_price_filters: Array<
|
|
10469
|
+
composite_price_filters: Array<TieredWithProrationPrice.CompositePriceFilter> | null;
|
|
10063
10470
|
conversion_rate: number | null;
|
|
10064
10471
|
conversion_rate_config: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
10065
10472
|
created_at: string;
|
|
@@ -10071,6 +10478,7 @@ export declare namespace Price {
|
|
|
10071
10478
|
discount: Shared.Discount | null;
|
|
10072
10479
|
external_price_id: string | null;
|
|
10073
10480
|
fixed_price_quantity: number | null;
|
|
10481
|
+
invoice_grouping_key: string | null;
|
|
10074
10482
|
invoicing_cycle_configuration: Shared.BillingCycleConfiguration | null;
|
|
10075
10483
|
/**
|
|
10076
10484
|
* A minimal representation of an Item containing only the essential identifying
|
|
@@ -10105,7 +10513,7 @@ export declare namespace Price {
|
|
|
10105
10513
|
/**
|
|
10106
10514
|
* The pricing model type
|
|
10107
10515
|
*/
|
|
10108
|
-
model_type: '
|
|
10516
|
+
model_type: 'tiered_with_proration';
|
|
10109
10517
|
name: string;
|
|
10110
10518
|
plan_phase_order: number | null;
|
|
10111
10519
|
price_type: 'usage_price' | 'fixed_price' | 'composite_price';
|
|
@@ -10115,18 +10523,18 @@ export declare namespace Price {
|
|
|
10115
10523
|
*/
|
|
10116
10524
|
replaces_price_id: string | null;
|
|
10117
10525
|
/**
|
|
10118
|
-
* Configuration for
|
|
10526
|
+
* Configuration for tiered_with_proration pricing
|
|
10119
10527
|
*/
|
|
10120
|
-
|
|
10528
|
+
tiered_with_proration_config: TieredWithProrationPrice.TieredWithProrationConfig;
|
|
10121
10529
|
dimensional_price_configuration?: Shared.DimensionalPriceConfiguration | null;
|
|
10122
10530
|
/**
|
|
10123
10531
|
* The LicenseType resource represents a type of license that can be assigned to
|
|
10124
10532
|
* users. License types are used during billing by grouping metrics on the
|
|
10125
10533
|
* configured grouping key.
|
|
10126
10534
|
*/
|
|
10127
|
-
license_type?:
|
|
10535
|
+
license_type?: TieredWithProrationPrice.LicenseType | null;
|
|
10128
10536
|
}
|
|
10129
|
-
namespace
|
|
10537
|
+
namespace TieredWithProrationPrice {
|
|
10130
10538
|
interface CompositePriceFilter {
|
|
10131
10539
|
/**
|
|
10132
10540
|
* The property of the price to filter on.
|
|
@@ -10142,13 +10550,29 @@ export declare namespace Price {
|
|
|
10142
10550
|
values: Array<string>;
|
|
10143
10551
|
}
|
|
10144
10552
|
/**
|
|
10145
|
-
* Configuration for
|
|
10553
|
+
* Configuration for tiered_with_proration pricing
|
|
10146
10554
|
*/
|
|
10147
|
-
interface
|
|
10555
|
+
interface TieredWithProrationConfig {
|
|
10148
10556
|
/**
|
|
10149
|
-
*
|
|
10557
|
+
* Tiers for rating based on total usage quantities into the specified tier with
|
|
10558
|
+
* proration
|
|
10150
10559
|
*/
|
|
10151
|
-
|
|
10560
|
+
tiers: Array<TieredWithProrationConfig.Tier>;
|
|
10561
|
+
}
|
|
10562
|
+
namespace TieredWithProrationConfig {
|
|
10563
|
+
/**
|
|
10564
|
+
* Configuration for a single tiered with proration tier
|
|
10565
|
+
*/
|
|
10566
|
+
interface Tier {
|
|
10567
|
+
/**
|
|
10568
|
+
* Inclusive tier starting value
|
|
10569
|
+
*/
|
|
10570
|
+
tier_lower_bound: string;
|
|
10571
|
+
/**
|
|
10572
|
+
* Amount per unit
|
|
10573
|
+
*/
|
|
10574
|
+
unit_amount: string;
|
|
10575
|
+
}
|
|
10152
10576
|
}
|
|
10153
10577
|
/**
|
|
10154
10578
|
* The LicenseType resource represents a type of license that can be assigned to
|
|
@@ -10171,13 +10595,13 @@ export declare namespace Price {
|
|
|
10171
10595
|
name: string;
|
|
10172
10596
|
}
|
|
10173
10597
|
}
|
|
10174
|
-
interface
|
|
10598
|
+
interface UnitWithProrationPrice {
|
|
10175
10599
|
id: string;
|
|
10176
10600
|
billable_metric: Shared.BillableMetricTiny | null;
|
|
10177
10601
|
billing_cycle_configuration: Shared.BillingCycleConfiguration;
|
|
10178
10602
|
billing_mode: 'in_advance' | 'in_arrear';
|
|
10179
10603
|
cadence: 'one_time' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | 'custom';
|
|
10180
|
-
composite_price_filters: Array<
|
|
10604
|
+
composite_price_filters: Array<UnitWithProrationPrice.CompositePriceFilter> | null;
|
|
10181
10605
|
conversion_rate: number | null;
|
|
10182
10606
|
conversion_rate_config: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
10183
10607
|
created_at: string;
|
|
@@ -10189,10 +10613,130 @@ export declare namespace Price {
|
|
|
10189
10613
|
discount: Shared.Discount | null;
|
|
10190
10614
|
external_price_id: string | null;
|
|
10191
10615
|
fixed_price_quantity: number | null;
|
|
10616
|
+
invoice_grouping_key: string | null;
|
|
10617
|
+
invoicing_cycle_configuration: Shared.BillingCycleConfiguration | null;
|
|
10192
10618
|
/**
|
|
10193
|
-
*
|
|
10194
|
-
|
|
10619
|
+
* A minimal representation of an Item containing only the essential identifying
|
|
10620
|
+
* information.
|
|
10621
|
+
*/
|
|
10622
|
+
item: Shared.ItemSlim;
|
|
10623
|
+
/**
|
|
10624
|
+
* @deprecated
|
|
10625
|
+
*/
|
|
10626
|
+
maximum: Shared.Maximum | null;
|
|
10627
|
+
/**
|
|
10628
|
+
* @deprecated
|
|
10629
|
+
*/
|
|
10630
|
+
maximum_amount: string | null;
|
|
10631
|
+
/**
|
|
10632
|
+
* User specified key-value pairs for the resource. If not present, this defaults
|
|
10633
|
+
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
10634
|
+
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
10635
|
+
* `null`.
|
|
10636
|
+
*/
|
|
10637
|
+
metadata: {
|
|
10638
|
+
[key: string]: string;
|
|
10639
|
+
};
|
|
10640
|
+
/**
|
|
10641
|
+
* @deprecated
|
|
10642
|
+
*/
|
|
10643
|
+
minimum: Shared.Minimum | null;
|
|
10644
|
+
/**
|
|
10645
|
+
* @deprecated
|
|
10646
|
+
*/
|
|
10647
|
+
minimum_amount: string | null;
|
|
10648
|
+
/**
|
|
10649
|
+
* The pricing model type
|
|
10650
|
+
*/
|
|
10651
|
+
model_type: 'unit_with_proration';
|
|
10652
|
+
name: string;
|
|
10653
|
+
plan_phase_order: number | null;
|
|
10654
|
+
price_type: 'usage_price' | 'fixed_price' | 'composite_price';
|
|
10655
|
+
/**
|
|
10656
|
+
* The price id this price replaces. This price will take the place of the replaced
|
|
10657
|
+
* price in plan version migrations.
|
|
10658
|
+
*/
|
|
10659
|
+
replaces_price_id: string | null;
|
|
10660
|
+
/**
|
|
10661
|
+
* Configuration for unit_with_proration pricing
|
|
10662
|
+
*/
|
|
10663
|
+
unit_with_proration_config: UnitWithProrationPrice.UnitWithProrationConfig;
|
|
10664
|
+
dimensional_price_configuration?: Shared.DimensionalPriceConfiguration | null;
|
|
10665
|
+
/**
|
|
10666
|
+
* The LicenseType resource represents a type of license that can be assigned to
|
|
10667
|
+
* users. License types are used during billing by grouping metrics on the
|
|
10668
|
+
* configured grouping key.
|
|
10669
|
+
*/
|
|
10670
|
+
license_type?: UnitWithProrationPrice.LicenseType | null;
|
|
10671
|
+
}
|
|
10672
|
+
namespace UnitWithProrationPrice {
|
|
10673
|
+
interface CompositePriceFilter {
|
|
10674
|
+
/**
|
|
10675
|
+
* The property of the price to filter on.
|
|
10676
|
+
*/
|
|
10677
|
+
field: 'price_id' | 'item_id' | 'price_type' | 'currency' | 'pricing_unit_id';
|
|
10678
|
+
/**
|
|
10679
|
+
* Should prices that match the filter be included or excluded.
|
|
10680
|
+
*/
|
|
10681
|
+
operator: 'includes' | 'excludes';
|
|
10682
|
+
/**
|
|
10683
|
+
* The IDs or values that match this filter.
|
|
10684
|
+
*/
|
|
10685
|
+
values: Array<string>;
|
|
10686
|
+
}
|
|
10687
|
+
/**
|
|
10688
|
+
* Configuration for unit_with_proration pricing
|
|
10689
|
+
*/
|
|
10690
|
+
interface UnitWithProrationConfig {
|
|
10691
|
+
/**
|
|
10692
|
+
* Rate per unit of usage
|
|
10693
|
+
*/
|
|
10694
|
+
unit_amount: string;
|
|
10695
|
+
}
|
|
10696
|
+
/**
|
|
10697
|
+
* The LicenseType resource represents a type of license that can be assigned to
|
|
10698
|
+
* users. License types are used during billing by grouping metrics on the
|
|
10699
|
+
* configured grouping key.
|
|
10700
|
+
*/
|
|
10701
|
+
interface LicenseType {
|
|
10702
|
+
/**
|
|
10703
|
+
* The Orb-assigned unique identifier for the license type.
|
|
10704
|
+
*/
|
|
10705
|
+
id: string;
|
|
10706
|
+
/**
|
|
10707
|
+
* The key used for grouping licenses of this type. This is typically a user
|
|
10708
|
+
* identifier field.
|
|
10709
|
+
*/
|
|
10710
|
+
grouping_key: string;
|
|
10711
|
+
/**
|
|
10712
|
+
* The name of the license type.
|
|
10713
|
+
*/
|
|
10714
|
+
name: string;
|
|
10715
|
+
}
|
|
10716
|
+
}
|
|
10717
|
+
interface GroupedAllocationPrice {
|
|
10718
|
+
id: string;
|
|
10719
|
+
billable_metric: Shared.BillableMetricTiny | null;
|
|
10720
|
+
billing_cycle_configuration: Shared.BillingCycleConfiguration;
|
|
10721
|
+
billing_mode: 'in_advance' | 'in_arrear';
|
|
10722
|
+
cadence: 'one_time' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | 'custom';
|
|
10723
|
+
composite_price_filters: Array<GroupedAllocationPrice.CompositePriceFilter> | null;
|
|
10724
|
+
conversion_rate: number | null;
|
|
10725
|
+
conversion_rate_config: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
10726
|
+
created_at: string;
|
|
10727
|
+
credit_allocation: Shared.Allocation | null;
|
|
10728
|
+
currency: string;
|
|
10729
|
+
/**
|
|
10730
|
+
* @deprecated
|
|
10731
|
+
*/
|
|
10732
|
+
discount: Shared.Discount | null;
|
|
10733
|
+
external_price_id: string | null;
|
|
10734
|
+
fixed_price_quantity: number | null;
|
|
10735
|
+
/**
|
|
10736
|
+
* Configuration for grouped_allocation pricing
|
|
10737
|
+
*/
|
|
10195
10738
|
grouped_allocation_config: GroupedAllocationPrice.GroupedAllocationConfig;
|
|
10739
|
+
invoice_grouping_key: string | null;
|
|
10196
10740
|
invoicing_cycle_configuration: Shared.BillingCycleConfiguration | null;
|
|
10197
10741
|
/**
|
|
10198
10742
|
* A minimal representation of an Item containing only the essential identifying
|
|
@@ -10319,6 +10863,7 @@ export declare namespace Price {
|
|
|
10319
10863
|
discount: Shared.Discount | null;
|
|
10320
10864
|
external_price_id: string | null;
|
|
10321
10865
|
fixed_price_quantity: number | null;
|
|
10866
|
+
invoice_grouping_key: string | null;
|
|
10322
10867
|
invoicing_cycle_configuration: Shared.BillingCycleConfiguration | null;
|
|
10323
10868
|
/**
|
|
10324
10869
|
* A minimal representation of an Item containing only the essential identifying
|
|
@@ -10452,6 +10997,7 @@ export declare namespace Price {
|
|
|
10452
10997
|
* Configuration for grouped_with_prorated_minimum pricing
|
|
10453
10998
|
*/
|
|
10454
10999
|
grouped_with_prorated_minimum_config: GroupedWithProratedMinimumPrice.GroupedWithProratedMinimumConfig;
|
|
11000
|
+
invoice_grouping_key: string | null;
|
|
10455
11001
|
invoicing_cycle_configuration: Shared.BillingCycleConfiguration | null;
|
|
10456
11002
|
/**
|
|
10457
11003
|
* A minimal representation of an Item containing only the essential identifying
|
|
@@ -10578,6 +11124,7 @@ export declare namespace Price {
|
|
|
10578
11124
|
* Configuration for grouped_with_metered_minimum pricing
|
|
10579
11125
|
*/
|
|
10580
11126
|
grouped_with_metered_minimum_config: GroupedWithMeteredMinimumPrice.GroupedWithMeteredMinimumConfig;
|
|
11127
|
+
invoice_grouping_key: string | null;
|
|
10581
11128
|
invoicing_cycle_configuration: Shared.BillingCycleConfiguration | null;
|
|
10582
11129
|
/**
|
|
10583
11130
|
* A minimal representation of an Item containing only the essential identifying
|
|
@@ -10737,6 +11284,7 @@ export declare namespace Price {
|
|
|
10737
11284
|
* Configuration for grouped_with_min_max_thresholds pricing
|
|
10738
11285
|
*/
|
|
10739
11286
|
grouped_with_min_max_thresholds_config: GroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
|
|
11287
|
+
invoice_grouping_key: string | null;
|
|
10740
11288
|
invoicing_cycle_configuration: Shared.BillingCycleConfiguration | null;
|
|
10741
11289
|
/**
|
|
10742
11290
|
* A minimal representation of an Item containing only the essential identifying
|
|
@@ -10863,6 +11411,7 @@ export declare namespace Price {
|
|
|
10863
11411
|
discount: Shared.Discount | null;
|
|
10864
11412
|
external_price_id: string | null;
|
|
10865
11413
|
fixed_price_quantity: number | null;
|
|
11414
|
+
invoice_grouping_key: string | null;
|
|
10866
11415
|
invoicing_cycle_configuration: Shared.BillingCycleConfiguration | null;
|
|
10867
11416
|
/**
|
|
10868
11417
|
* A minimal representation of an Item containing only the essential identifying
|
|
@@ -11008,6 +11557,7 @@ export declare namespace Price {
|
|
|
11008
11557
|
* Configuration for grouped_tiered_package pricing
|
|
11009
11558
|
*/
|
|
11010
11559
|
grouped_tiered_package_config: GroupedTieredPackagePrice.GroupedTieredPackageConfig;
|
|
11560
|
+
invoice_grouping_key: string | null;
|
|
11011
11561
|
invoicing_cycle_configuration: Shared.BillingCycleConfiguration | null;
|
|
11012
11562
|
/**
|
|
11013
11563
|
* A minimal representation of an Item containing only the essential identifying
|
|
@@ -11140,6 +11690,7 @@ export declare namespace Price {
|
|
|
11140
11690
|
discount: Shared.Discount | null;
|
|
11141
11691
|
external_price_id: string | null;
|
|
11142
11692
|
fixed_price_quantity: number | null;
|
|
11693
|
+
invoice_grouping_key: string | null;
|
|
11143
11694
|
invoicing_cycle_configuration: Shared.BillingCycleConfiguration | null;
|
|
11144
11695
|
/**
|
|
11145
11696
|
* A minimal representation of an Item containing only the essential identifying
|
|
@@ -11275,6 +11826,7 @@ export declare namespace Price {
|
|
|
11275
11826
|
discount: Shared.Discount | null;
|
|
11276
11827
|
external_price_id: string | null;
|
|
11277
11828
|
fixed_price_quantity: number | null;
|
|
11829
|
+
invoice_grouping_key: string | null;
|
|
11278
11830
|
invoicing_cycle_configuration: Shared.BillingCycleConfiguration | null;
|
|
11279
11831
|
/**
|
|
11280
11832
|
* A minimal representation of an Item containing only the essential identifying
|
|
@@ -11423,6 +11975,7 @@ export declare namespace Price {
|
|
|
11423
11975
|
discount: Shared.Discount | null;
|
|
11424
11976
|
external_price_id: string | null;
|
|
11425
11977
|
fixed_price_quantity: number | null;
|
|
11978
|
+
invoice_grouping_key: string | null;
|
|
11426
11979
|
invoicing_cycle_configuration: Shared.BillingCycleConfiguration | null;
|
|
11427
11980
|
/**
|
|
11428
11981
|
* A minimal representation of an Item containing only the essential identifying
|
|
@@ -11571,6 +12124,7 @@ export declare namespace Price {
|
|
|
11571
12124
|
discount: Shared.Discount | null;
|
|
11572
12125
|
external_price_id: string | null;
|
|
11573
12126
|
fixed_price_quantity: number | null;
|
|
12127
|
+
invoice_grouping_key: string | null;
|
|
11574
12128
|
invoicing_cycle_configuration: Shared.BillingCycleConfiguration | null;
|
|
11575
12129
|
/**
|
|
11576
12130
|
* A minimal representation of an Item containing only the essential identifying
|
|
@@ -11709,6 +12263,7 @@ export declare namespace Price {
|
|
|
11709
12263
|
discount: Shared.Discount | null;
|
|
11710
12264
|
external_price_id: string | null;
|
|
11711
12265
|
fixed_price_quantity: number | null;
|
|
12266
|
+
invoice_grouping_key: string | null;
|
|
11712
12267
|
invoicing_cycle_configuration: Shared.BillingCycleConfiguration | null;
|
|
11713
12268
|
/**
|
|
11714
12269
|
* A minimal representation of an Item containing only the essential identifying
|
|
@@ -11817,6 +12372,304 @@ export declare namespace Price {
|
|
|
11817
12372
|
name: string;
|
|
11818
12373
|
}
|
|
11819
12374
|
}
|
|
12375
|
+
interface DailyCreditAllowancePrice {
|
|
12376
|
+
id: string;
|
|
12377
|
+
billable_metric: Shared.BillableMetricTiny | null;
|
|
12378
|
+
billing_cycle_configuration: Shared.BillingCycleConfiguration;
|
|
12379
|
+
billing_mode: 'in_advance' | 'in_arrear';
|
|
12380
|
+
cadence: 'one_time' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | 'custom';
|
|
12381
|
+
composite_price_filters: Array<DailyCreditAllowancePrice.CompositePriceFilter> | null;
|
|
12382
|
+
conversion_rate: number | null;
|
|
12383
|
+
conversion_rate_config: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
12384
|
+
created_at: string;
|
|
12385
|
+
credit_allocation: Shared.Allocation | null;
|
|
12386
|
+
currency: string;
|
|
12387
|
+
/**
|
|
12388
|
+
* Configuration for daily_credit_allowance pricing
|
|
12389
|
+
*/
|
|
12390
|
+
daily_credit_allowance_config: DailyCreditAllowancePrice.DailyCreditAllowanceConfig;
|
|
12391
|
+
/**
|
|
12392
|
+
* @deprecated
|
|
12393
|
+
*/
|
|
12394
|
+
discount: Shared.Discount | null;
|
|
12395
|
+
external_price_id: string | null;
|
|
12396
|
+
fixed_price_quantity: number | null;
|
|
12397
|
+
invoice_grouping_key: string | null;
|
|
12398
|
+
invoicing_cycle_configuration: Shared.BillingCycleConfiguration | null;
|
|
12399
|
+
/**
|
|
12400
|
+
* A minimal representation of an Item containing only the essential identifying
|
|
12401
|
+
* information.
|
|
12402
|
+
*/
|
|
12403
|
+
item: Shared.ItemSlim;
|
|
12404
|
+
/**
|
|
12405
|
+
* @deprecated
|
|
12406
|
+
*/
|
|
12407
|
+
maximum: Shared.Maximum | null;
|
|
12408
|
+
/**
|
|
12409
|
+
* @deprecated
|
|
12410
|
+
*/
|
|
12411
|
+
maximum_amount: string | null;
|
|
12412
|
+
/**
|
|
12413
|
+
* User specified key-value pairs for the resource. If not present, this defaults
|
|
12414
|
+
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
12415
|
+
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
12416
|
+
* `null`.
|
|
12417
|
+
*/
|
|
12418
|
+
metadata: {
|
|
12419
|
+
[key: string]: string;
|
|
12420
|
+
};
|
|
12421
|
+
/**
|
|
12422
|
+
* @deprecated
|
|
12423
|
+
*/
|
|
12424
|
+
minimum: Shared.Minimum | null;
|
|
12425
|
+
/**
|
|
12426
|
+
* @deprecated
|
|
12427
|
+
*/
|
|
12428
|
+
minimum_amount: string | null;
|
|
12429
|
+
/**
|
|
12430
|
+
* The pricing model type
|
|
12431
|
+
*/
|
|
12432
|
+
model_type: 'daily_credit_allowance';
|
|
12433
|
+
name: string;
|
|
12434
|
+
plan_phase_order: number | null;
|
|
12435
|
+
price_type: 'usage_price' | 'fixed_price' | 'composite_price';
|
|
12436
|
+
/**
|
|
12437
|
+
* The price id this price replaces. This price will take the place of the replaced
|
|
12438
|
+
* price in plan version migrations.
|
|
12439
|
+
*/
|
|
12440
|
+
replaces_price_id: string | null;
|
|
12441
|
+
dimensional_price_configuration?: Shared.DimensionalPriceConfiguration | null;
|
|
12442
|
+
/**
|
|
12443
|
+
* The LicenseType resource represents a type of license that can be assigned to
|
|
12444
|
+
* users. License types are used during billing by grouping metrics on the
|
|
12445
|
+
* configured grouping key.
|
|
12446
|
+
*/
|
|
12447
|
+
license_type?: DailyCreditAllowancePrice.LicenseType | null;
|
|
12448
|
+
}
|
|
12449
|
+
namespace DailyCreditAllowancePrice {
|
|
12450
|
+
interface CompositePriceFilter {
|
|
12451
|
+
/**
|
|
12452
|
+
* The property of the price to filter on.
|
|
12453
|
+
*/
|
|
12454
|
+
field: 'price_id' | 'item_id' | 'price_type' | 'currency' | 'pricing_unit_id';
|
|
12455
|
+
/**
|
|
12456
|
+
* Should prices that match the filter be included or excluded.
|
|
12457
|
+
*/
|
|
12458
|
+
operator: 'includes' | 'excludes';
|
|
12459
|
+
/**
|
|
12460
|
+
* The IDs or values that match this filter.
|
|
12461
|
+
*/
|
|
12462
|
+
values: Array<string>;
|
|
12463
|
+
}
|
|
12464
|
+
/**
|
|
12465
|
+
* Configuration for daily_credit_allowance pricing
|
|
12466
|
+
*/
|
|
12467
|
+
interface DailyCreditAllowanceConfig {
|
|
12468
|
+
/**
|
|
12469
|
+
* Credits granted per day. Lose-it-or-use-it; does not roll over.
|
|
12470
|
+
*/
|
|
12471
|
+
daily_allowance: string;
|
|
12472
|
+
/**
|
|
12473
|
+
* Default per-unit credit rate for any usage not bucketed into a specified
|
|
12474
|
+
* matrix_value
|
|
12475
|
+
*/
|
|
12476
|
+
default_unit_amount: string;
|
|
12477
|
+
/**
|
|
12478
|
+
* One or two event property values to evaluate matrix groups by
|
|
12479
|
+
*/
|
|
12480
|
+
dimensions: Array<string | null>;
|
|
12481
|
+
/**
|
|
12482
|
+
* Event property whose value identifies the day bucket the event belongs to (e.g.
|
|
12483
|
+
* 'event_day' set to an ISO date string in the customer's timezone). The allowance
|
|
12484
|
+
* resets per distinct value of this property.
|
|
12485
|
+
*/
|
|
12486
|
+
event_day_property: string;
|
|
12487
|
+
/**
|
|
12488
|
+
* Per-dimension credit rates
|
|
12489
|
+
*/
|
|
12490
|
+
matrix_values: Array<DailyCreditAllowanceConfig.MatrixValue>;
|
|
12491
|
+
}
|
|
12492
|
+
namespace DailyCreditAllowanceConfig {
|
|
12493
|
+
/**
|
|
12494
|
+
* Per-dimension credit price for the daily credit allowance model.
|
|
12495
|
+
*/
|
|
12496
|
+
interface MatrixValue {
|
|
12497
|
+
/**
|
|
12498
|
+
* One or two matrix keys to filter usage to this value by. For example, ["model"]
|
|
12499
|
+
* could be used to apply a different credit rate to each AI model.
|
|
12500
|
+
*/
|
|
12501
|
+
dimension_values: Array<string | null>;
|
|
12502
|
+
/**
|
|
12503
|
+
* Credits charged per unit of usage matching the specified dimension_values
|
|
12504
|
+
*/
|
|
12505
|
+
unit_amount: string;
|
|
12506
|
+
}
|
|
12507
|
+
}
|
|
12508
|
+
/**
|
|
12509
|
+
* The LicenseType resource represents a type of license that can be assigned to
|
|
12510
|
+
* users. License types are used during billing by grouping metrics on the
|
|
12511
|
+
* configured grouping key.
|
|
12512
|
+
*/
|
|
12513
|
+
interface LicenseType {
|
|
12514
|
+
/**
|
|
12515
|
+
* The Orb-assigned unique identifier for the license type.
|
|
12516
|
+
*/
|
|
12517
|
+
id: string;
|
|
12518
|
+
/**
|
|
12519
|
+
* The key used for grouping licenses of this type. This is typically a user
|
|
12520
|
+
* identifier field.
|
|
12521
|
+
*/
|
|
12522
|
+
grouping_key: string;
|
|
12523
|
+
/**
|
|
12524
|
+
* The name of the license type.
|
|
12525
|
+
*/
|
|
12526
|
+
name: string;
|
|
12527
|
+
}
|
|
12528
|
+
}
|
|
12529
|
+
interface MeteredAllowancePrice {
|
|
12530
|
+
id: string;
|
|
12531
|
+
billable_metric: Shared.BillableMetricTiny | null;
|
|
12532
|
+
billing_cycle_configuration: Shared.BillingCycleConfiguration;
|
|
12533
|
+
billing_mode: 'in_advance' | 'in_arrear';
|
|
12534
|
+
cadence: 'one_time' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | 'custom';
|
|
12535
|
+
composite_price_filters: Array<MeteredAllowancePrice.CompositePriceFilter> | null;
|
|
12536
|
+
conversion_rate: number | null;
|
|
12537
|
+
conversion_rate_config: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
12538
|
+
created_at: string;
|
|
12539
|
+
credit_allocation: Shared.Allocation | null;
|
|
12540
|
+
currency: string;
|
|
12541
|
+
/**
|
|
12542
|
+
* @deprecated
|
|
12543
|
+
*/
|
|
12544
|
+
discount: Shared.Discount | null;
|
|
12545
|
+
external_price_id: string | null;
|
|
12546
|
+
fixed_price_quantity: number | null;
|
|
12547
|
+
invoice_grouping_key: string | null;
|
|
12548
|
+
invoicing_cycle_configuration: Shared.BillingCycleConfiguration | null;
|
|
12549
|
+
/**
|
|
12550
|
+
* A minimal representation of an Item containing only the essential identifying
|
|
12551
|
+
* information.
|
|
12552
|
+
*/
|
|
12553
|
+
item: Shared.ItemSlim;
|
|
12554
|
+
/**
|
|
12555
|
+
* @deprecated
|
|
12556
|
+
*/
|
|
12557
|
+
maximum: Shared.Maximum | null;
|
|
12558
|
+
/**
|
|
12559
|
+
* @deprecated
|
|
12560
|
+
*/
|
|
12561
|
+
maximum_amount: string | null;
|
|
12562
|
+
/**
|
|
12563
|
+
* User specified key-value pairs for the resource. If not present, this defaults
|
|
12564
|
+
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
12565
|
+
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
12566
|
+
* `null`.
|
|
12567
|
+
*/
|
|
12568
|
+
metadata: {
|
|
12569
|
+
[key: string]: string;
|
|
12570
|
+
};
|
|
12571
|
+
/**
|
|
12572
|
+
* Configuration for metered_allowance pricing
|
|
12573
|
+
*/
|
|
12574
|
+
metered_allowance_config: MeteredAllowancePrice.MeteredAllowanceConfig;
|
|
12575
|
+
/**
|
|
12576
|
+
* @deprecated
|
|
12577
|
+
*/
|
|
12578
|
+
minimum: Shared.Minimum | null;
|
|
12579
|
+
/**
|
|
12580
|
+
* @deprecated
|
|
12581
|
+
*/
|
|
12582
|
+
minimum_amount: string | null;
|
|
12583
|
+
/**
|
|
12584
|
+
* The pricing model type
|
|
12585
|
+
*/
|
|
12586
|
+
model_type: 'metered_allowance';
|
|
12587
|
+
name: string;
|
|
12588
|
+
plan_phase_order: number | null;
|
|
12589
|
+
price_type: 'usage_price' | 'fixed_price' | 'composite_price';
|
|
12590
|
+
/**
|
|
12591
|
+
* The price id this price replaces. This price will take the place of the replaced
|
|
12592
|
+
* price in plan version migrations.
|
|
12593
|
+
*/
|
|
12594
|
+
replaces_price_id: string | null;
|
|
12595
|
+
dimensional_price_configuration?: Shared.DimensionalPriceConfiguration | null;
|
|
12596
|
+
/**
|
|
12597
|
+
* The LicenseType resource represents a type of license that can be assigned to
|
|
12598
|
+
* users. License types are used during billing by grouping metrics on the
|
|
12599
|
+
* configured grouping key.
|
|
12600
|
+
*/
|
|
12601
|
+
license_type?: MeteredAllowancePrice.LicenseType | null;
|
|
12602
|
+
}
|
|
12603
|
+
namespace MeteredAllowancePrice {
|
|
12604
|
+
interface CompositePriceFilter {
|
|
12605
|
+
/**
|
|
12606
|
+
* The property of the price to filter on.
|
|
12607
|
+
*/
|
|
12608
|
+
field: 'price_id' | 'item_id' | 'price_type' | 'currency' | 'pricing_unit_id';
|
|
12609
|
+
/**
|
|
12610
|
+
* Should prices that match the filter be included or excluded.
|
|
12611
|
+
*/
|
|
12612
|
+
operator: 'includes' | 'excludes';
|
|
12613
|
+
/**
|
|
12614
|
+
* The IDs or values that match this filter.
|
|
12615
|
+
*/
|
|
12616
|
+
values: Array<string>;
|
|
12617
|
+
}
|
|
12618
|
+
/**
|
|
12619
|
+
* Configuration for metered_allowance pricing
|
|
12620
|
+
*/
|
|
12621
|
+
interface MeteredAllowanceConfig {
|
|
12622
|
+
/**
|
|
12623
|
+
* The grouping_key value whose summed quantity represents the allowance for this
|
|
12624
|
+
* period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption
|
|
12625
|
+
* — credit can never exceed actual usage.
|
|
12626
|
+
*/
|
|
12627
|
+
allowance_grouping_value: string;
|
|
12628
|
+
/**
|
|
12629
|
+
* The grouping_key value whose summed quantity represents consumption (e.g.
|
|
12630
|
+
* 'download'). Charged at unit_amount.
|
|
12631
|
+
*/
|
|
12632
|
+
consumption_grouping_value: string;
|
|
12633
|
+
/**
|
|
12634
|
+
* Event property used to partition the metric into consumption and allowance
|
|
12635
|
+
* quantities (e.g. 'event_name'). The metric is queried with this key and the two
|
|
12636
|
+
* values below select which partition is which.
|
|
12637
|
+
*/
|
|
12638
|
+
grouping_key: string;
|
|
12639
|
+
/**
|
|
12640
|
+
* Per-unit price applied to gross consumption and to the allowance credit.
|
|
12641
|
+
*/
|
|
12642
|
+
unit_amount: string;
|
|
12643
|
+
/**
|
|
12644
|
+
* Sub-line label for the credit row (e.g. 'Up to 3x free egress').
|
|
12645
|
+
*/
|
|
12646
|
+
allowance_display_name?: string;
|
|
12647
|
+
/**
|
|
12648
|
+
* Sub-line label for the gross consumption row (e.g. 'bytes gotten').
|
|
12649
|
+
*/
|
|
12650
|
+
consumption_display_name?: string;
|
|
12651
|
+
}
|
|
12652
|
+
/**
|
|
12653
|
+
* The LicenseType resource represents a type of license that can be assigned to
|
|
12654
|
+
* users. License types are used during billing by grouping metrics on the
|
|
12655
|
+
* configured grouping key.
|
|
12656
|
+
*/
|
|
12657
|
+
interface LicenseType {
|
|
12658
|
+
/**
|
|
12659
|
+
* The Orb-assigned unique identifier for the license type.
|
|
12660
|
+
*/
|
|
12661
|
+
id: string;
|
|
12662
|
+
/**
|
|
12663
|
+
* The key used for grouping licenses of this type. This is typically a user
|
|
12664
|
+
* identifier field.
|
|
12665
|
+
*/
|
|
12666
|
+
grouping_key: string;
|
|
12667
|
+
/**
|
|
12668
|
+
* The name of the license type.
|
|
12669
|
+
*/
|
|
12670
|
+
name: string;
|
|
12671
|
+
}
|
|
12672
|
+
}
|
|
11820
12673
|
interface MinimumCompositePrice {
|
|
11821
12674
|
id: string;
|
|
11822
12675
|
billable_metric: Shared.BillableMetricTiny | null;
|
|
@@ -11835,6 +12688,7 @@ export declare namespace Price {
|
|
|
11835
12688
|
discount: Shared.Discount | null;
|
|
11836
12689
|
external_price_id: string | null;
|
|
11837
12690
|
fixed_price_quantity: number | null;
|
|
12691
|
+
invoice_grouping_key: string | null;
|
|
11838
12692
|
invoicing_cycle_configuration: Shared.BillingCycleConfiguration | null;
|
|
11839
12693
|
/**
|
|
11840
12694
|
* A minimal representation of an Item containing only the essential identifying
|
|
@@ -11957,6 +12811,7 @@ export declare namespace Price {
|
|
|
11957
12811
|
discount: Shared.Discount | null;
|
|
11958
12812
|
external_price_id: string | null;
|
|
11959
12813
|
fixed_price_quantity: number | null;
|
|
12814
|
+
invoice_grouping_key: string | null;
|
|
11960
12815
|
invoicing_cycle_configuration: Shared.BillingCycleConfiguration | null;
|
|
11961
12816
|
/**
|
|
11962
12817
|
* A minimal representation of an Item containing only the essential identifying
|
|
@@ -12032,9 +12887,23 @@ export declare namespace Price {
|
|
|
12032
12887
|
*/
|
|
12033
12888
|
interface PercentConfig {
|
|
12034
12889
|
/**
|
|
12035
|
-
*
|
|
12890
|
+
* Fraction of the component subtotals to charge (0 < percent <= 1).
|
|
12036
12891
|
*/
|
|
12037
12892
|
percent: number;
|
|
12893
|
+
/**
|
|
12894
|
+
* Maximum amount to charge. If unset, the fee has no upper bound.
|
|
12895
|
+
*/
|
|
12896
|
+
maximum_amount?: string | null;
|
|
12897
|
+
/**
|
|
12898
|
+
* Minimum amount to charge. If unset, the fee is bounded below by 0.
|
|
12899
|
+
*/
|
|
12900
|
+
minimum_amount?: string | null;
|
|
12901
|
+
/**
|
|
12902
|
+
* If true, the minimum_amount is prorated based on the service period. The
|
|
12903
|
+
* maximum_amount is an absolute cap (never prorated), and the percent applied to
|
|
12904
|
+
* upstream subtotals is never prorated either.
|
|
12905
|
+
*/
|
|
12906
|
+
prorated?: boolean;
|
|
12038
12907
|
}
|
|
12039
12908
|
/**
|
|
12040
12909
|
* The LicenseType resource represents a type of license that can be assigned to
|
|
@@ -12079,6 +12948,7 @@ export declare namespace Price {
|
|
|
12079
12948
|
event_output_config: EventOutputPrice.EventOutputConfig;
|
|
12080
12949
|
external_price_id: string | null;
|
|
12081
12950
|
fixed_price_quantity: number | null;
|
|
12951
|
+
invoice_grouping_key: string | null;
|
|
12082
12952
|
invoicing_cycle_configuration: Shared.BillingCycleConfiguration | null;
|
|
12083
12953
|
/**
|
|
12084
12954
|
* A minimal representation of an Item containing only the essential identifying
|