orb-billing 6.14.0 → 6.16.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 +14 -0
- package/package.json +1 -1
- package/resources/beta/beta.d.mts +276 -2
- package/resources/beta/beta.d.mts.map +1 -1
- package/resources/beta/beta.d.ts +276 -2
- 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.mts +276 -2
- package/resources/beta/external-plan-id.d.mts.map +1 -1
- package/resources/beta/external-plan-id.d.ts +276 -2
- package/resources/beta/external-plan-id.d.ts.map +1 -1
- package/resources/customers/credits/top-ups.d.mts +14 -2
- package/resources/customers/credits/top-ups.d.mts.map +1 -1
- package/resources/customers/credits/top-ups.d.ts +14 -2
- package/resources/customers/credits/top-ups.d.ts.map +1 -1
- package/resources/customers/credits/top-ups.js +14 -2
- package/resources/customers/credits/top-ups.js.map +1 -1
- package/resources/customers/credits/top-ups.mjs +14 -2
- package/resources/customers/credits/top-ups.mjs.map +1 -1
- package/resources/dimensional-price-groups/dimensional-price-groups.d.mts +11 -2
- package/resources/dimensional-price-groups/dimensional-price-groups.d.mts.map +1 -1
- package/resources/dimensional-price-groups/dimensional-price-groups.d.ts +11 -2
- package/resources/dimensional-price-groups/dimensional-price-groups.d.ts.map +1 -1
- package/resources/dimensional-price-groups/dimensional-price-groups.js +11 -2
- package/resources/dimensional-price-groups/dimensional-price-groups.js.map +1 -1
- package/resources/dimensional-price-groups/dimensional-price-groups.mjs +11 -2
- package/resources/dimensional-price-groups/dimensional-price-groups.mjs.map +1 -1
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.mts +4 -1
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.mts.map +1 -1
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.ts +4 -1
- 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 +4 -1
- 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 +4 -1
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.mjs.map +1 -1
- package/resources/items.d.mts +3 -1
- package/resources/items.d.mts.map +1 -1
- package/resources/items.d.ts +3 -1
- package/resources/items.d.ts.map +1 -1
- package/resources/items.js +3 -1
- package/resources/items.js.map +1 -1
- package/resources/items.mjs +3 -1
- package/resources/items.mjs.map +1 -1
- package/resources/plans/migrations.d.mts +3 -1
- package/resources/plans/migrations.d.mts.map +1 -1
- package/resources/plans/migrations.d.ts +3 -1
- package/resources/plans/migrations.d.ts.map +1 -1
- package/resources/plans/migrations.js +3 -1
- package/resources/plans/migrations.js.map +1 -1
- package/resources/plans/migrations.mjs +3 -1
- package/resources/plans/migrations.mjs.map +1 -1
- package/resources/plans/plans.d.mts +138 -1
- package/resources/plans/plans.d.mts.map +1 -1
- package/resources/plans/plans.d.ts +138 -1
- package/resources/plans/plans.d.ts.map +1 -1
- package/resources/plans/plans.js.map +1 -1
- package/resources/plans/plans.mjs.map +1 -1
- package/resources/prices/prices.d.mts +396 -3
- package/resources/prices/prices.d.mts.map +1 -1
- package/resources/prices/prices.d.ts +396 -3
- package/resources/prices/prices.d.ts.map +1 -1
- package/resources/prices/prices.js.map +1 -1
- package/resources/prices/prices.mjs.map +1 -1
- package/resources/shared.d.mts +153 -1
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +153 -1
- package/resources/shared.d.ts.map +1 -1
- package/resources/subscriptions.d.mts +702 -23
- package/resources/subscriptions.d.mts.map +1 -1
- package/resources/subscriptions.d.ts +702 -23
- package/resources/subscriptions.d.ts.map +1 -1
- package/src/resources/beta/beta.ts +324 -0
- package/src/resources/beta/external-plan-id.ts +324 -0
- package/src/resources/customers/credits/top-ups.ts +14 -2
- package/src/resources/dimensional-price-groups/dimensional-price-groups.ts +11 -2
- package/src/resources/dimensional-price-groups/external-dimensional-price-group-id.ts +4 -1
- package/src/resources/items.ts +3 -1
- package/src/resources/plans/migrations.ts +3 -1
- package/src/resources/plans/plans.ts +162 -0
- package/src/resources/prices/prices.ts +465 -0
- package/src/resources/shared.ts +194 -0
- package/src/resources/subscriptions.ts +931 -128
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -324,6 +324,7 @@ export type PriceCreateParams =
|
|
|
324
324
|
| PriceCreateParams.NewFloatingPackageWithAllocationPrice
|
|
325
325
|
| PriceCreateParams.NewFloatingUnitWithPercentPrice
|
|
326
326
|
| PriceCreateParams.NewFloatingMatrixWithAllocationPrice
|
|
327
|
+
| PriceCreateParams.NewFloatingTieredMatrixWithAllocationPrice
|
|
327
328
|
| PriceCreateParams.NewFloatingMatrixWithThresholdDiscountsPrice
|
|
328
329
|
| PriceCreateParams.NewFloatingTieredWithProrationPrice
|
|
329
330
|
| PriceCreateParams.NewFloatingUnitWithProrationPrice
|
|
@@ -2174,6 +2175,160 @@ export declare namespace PriceCreateParams {
|
|
|
2174
2175
|
metadata?: { [key: string]: string | null } | null;
|
|
2175
2176
|
}
|
|
2176
2177
|
|
|
2178
|
+
export interface NewFloatingTieredMatrixWithAllocationPrice {
|
|
2179
|
+
/**
|
|
2180
|
+
* The cadence to bill for this price on.
|
|
2181
|
+
*/
|
|
2182
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
2183
|
+
|
|
2184
|
+
/**
|
|
2185
|
+
* An ISO 4217 currency string for which this price is billed in.
|
|
2186
|
+
*/
|
|
2187
|
+
currency: string;
|
|
2188
|
+
|
|
2189
|
+
/**
|
|
2190
|
+
* The id of the item the price will be associated with.
|
|
2191
|
+
*/
|
|
2192
|
+
item_id: string;
|
|
2193
|
+
|
|
2194
|
+
/**
|
|
2195
|
+
* The pricing model type
|
|
2196
|
+
*/
|
|
2197
|
+
model_type: 'tiered_matrix_with_allocation';
|
|
2198
|
+
|
|
2199
|
+
/**
|
|
2200
|
+
* The name of the price.
|
|
2201
|
+
*/
|
|
2202
|
+
name: string;
|
|
2203
|
+
|
|
2204
|
+
/**
|
|
2205
|
+
* Configuration for tiered_matrix_with_allocation pricing
|
|
2206
|
+
*/
|
|
2207
|
+
tiered_matrix_with_allocation_config: NewFloatingTieredMatrixWithAllocationPrice.TieredMatrixWithAllocationConfig;
|
|
2208
|
+
|
|
2209
|
+
/**
|
|
2210
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
2211
|
+
* usage-based.
|
|
2212
|
+
*/
|
|
2213
|
+
billable_metric_id?: string | null;
|
|
2214
|
+
|
|
2215
|
+
/**
|
|
2216
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
2217
|
+
* this is true, and in-arrears if this is false.
|
|
2218
|
+
*/
|
|
2219
|
+
billed_in_advance?: boolean | null;
|
|
2220
|
+
|
|
2221
|
+
/**
|
|
2222
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
2223
|
+
* months.
|
|
2224
|
+
*/
|
|
2225
|
+
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
2226
|
+
|
|
2227
|
+
/**
|
|
2228
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
2229
|
+
*/
|
|
2230
|
+
conversion_rate?: number | null;
|
|
2231
|
+
|
|
2232
|
+
/**
|
|
2233
|
+
* The configuration for the rate of the price currency to the invoicing currency.
|
|
2234
|
+
*/
|
|
2235
|
+
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
2236
|
+
|
|
2237
|
+
/**
|
|
2238
|
+
* For dimensional price: specifies a price group and dimension values
|
|
2239
|
+
*/
|
|
2240
|
+
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
|
|
2241
|
+
|
|
2242
|
+
/**
|
|
2243
|
+
* An alias for the price.
|
|
2244
|
+
*/
|
|
2245
|
+
external_price_id?: string | null;
|
|
2246
|
+
|
|
2247
|
+
/**
|
|
2248
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
2249
|
+
* applied.
|
|
2250
|
+
*/
|
|
2251
|
+
fixed_price_quantity?: number | null;
|
|
2252
|
+
|
|
2253
|
+
/**
|
|
2254
|
+
* The property used to group this price on an invoice
|
|
2255
|
+
*/
|
|
2256
|
+
invoice_grouping_key?: string | null;
|
|
2257
|
+
|
|
2258
|
+
/**
|
|
2259
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
2260
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
2261
|
+
*/
|
|
2262
|
+
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
2263
|
+
|
|
2264
|
+
/**
|
|
2265
|
+
* The ID of the license type to associate with this price. On a usage price this
|
|
2266
|
+
* also marks the price as eligible to draw down from that license type's
|
|
2267
|
+
* allocation; a usage price created without it is billed normally. Usage prices
|
|
2268
|
+
* with a license type must use the `unit` model, and only draw down when their
|
|
2269
|
+
* currency matches the allocation's.
|
|
2270
|
+
*/
|
|
2271
|
+
license_type_id?: string | null;
|
|
2272
|
+
|
|
2273
|
+
/**
|
|
2274
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
2275
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
2276
|
+
* by setting `metadata` to `null`.
|
|
2277
|
+
*/
|
|
2278
|
+
metadata?: { [key: string]: string | null } | null;
|
|
2279
|
+
}
|
|
2280
|
+
|
|
2281
|
+
export namespace NewFloatingTieredMatrixWithAllocationPrice {
|
|
2282
|
+
/**
|
|
2283
|
+
* Configuration for tiered_matrix_with_allocation pricing
|
|
2284
|
+
*/
|
|
2285
|
+
export interface TieredMatrixWithAllocationConfig {
|
|
2286
|
+
/**
|
|
2287
|
+
* Usage allocation, pooled across all matrix cells
|
|
2288
|
+
*/
|
|
2289
|
+
allocation: string;
|
|
2290
|
+
|
|
2291
|
+
/**
|
|
2292
|
+
* Per unit rate for usage whose matrix cell has no configured tiers
|
|
2293
|
+
*/
|
|
2294
|
+
default_unit_amount: string;
|
|
2295
|
+
|
|
2296
|
+
/**
|
|
2297
|
+
* One or two event property values to evaluate matrix cells by
|
|
2298
|
+
*/
|
|
2299
|
+
dimensions: Array<string>;
|
|
2300
|
+
|
|
2301
|
+
/**
|
|
2302
|
+
* Graduated tiers keyed by matrix cell; usage in a cell is tiered only against its
|
|
2303
|
+
* own rows
|
|
2304
|
+
*/
|
|
2305
|
+
tiers: Array<TieredMatrixWithAllocationConfig.Tier>;
|
|
2306
|
+
}
|
|
2307
|
+
|
|
2308
|
+
export namespace TieredMatrixWithAllocationConfig {
|
|
2309
|
+
/**
|
|
2310
|
+
* Configuration for a single tier scoped to one matrix cell
|
|
2311
|
+
*/
|
|
2312
|
+
export interface Tier {
|
|
2313
|
+
/**
|
|
2314
|
+
* The matrix cell this tier applies to, as one or two dimension values
|
|
2315
|
+
*/
|
|
2316
|
+
dimension_values: Array<string>;
|
|
2317
|
+
|
|
2318
|
+
/**
|
|
2319
|
+
* Exclusive tier starting value. The tier runs up to and including the next bound
|
|
2320
|
+
* configured for the same matrix cell.
|
|
2321
|
+
*/
|
|
2322
|
+
tier_lower_bound: string;
|
|
2323
|
+
|
|
2324
|
+
/**
|
|
2325
|
+
* Per unit amount
|
|
2326
|
+
*/
|
|
2327
|
+
unit_amount: string;
|
|
2328
|
+
}
|
|
2329
|
+
}
|
|
2330
|
+
}
|
|
2331
|
+
|
|
2177
2332
|
export interface NewFloatingMatrixWithThresholdDiscountsPrice {
|
|
2178
2333
|
/**
|
|
2179
2334
|
* The cadence to bill for this price on.
|
|
@@ -5059,6 +5214,7 @@ export namespace PriceEvaluateMultipleParams {
|
|
|
5059
5214
|
| Shared.NewFloatingPackageWithAllocationPrice
|
|
5060
5215
|
| Shared.NewFloatingUnitWithPercentPrice
|
|
5061
5216
|
| Shared.NewFloatingMatrixWithAllocationPrice
|
|
5217
|
+
| PriceEvaluation.NewFloatingTieredMatrixWithAllocationPrice
|
|
5062
5218
|
| PriceEvaluation.NewFloatingMatrixWithThresholdDiscountsPrice
|
|
5063
5219
|
| Shared.NewFloatingTieredWithProrationPrice
|
|
5064
5220
|
| Shared.NewFloatingUnitWithProrationPrice
|
|
@@ -5385,6 +5541,160 @@ export namespace PriceEvaluateMultipleParams {
|
|
|
5385
5541
|
}
|
|
5386
5542
|
}
|
|
5387
5543
|
|
|
5544
|
+
export interface NewFloatingTieredMatrixWithAllocationPrice {
|
|
5545
|
+
/**
|
|
5546
|
+
* The cadence to bill for this price on.
|
|
5547
|
+
*/
|
|
5548
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
5549
|
+
|
|
5550
|
+
/**
|
|
5551
|
+
* An ISO 4217 currency string for which this price is billed in.
|
|
5552
|
+
*/
|
|
5553
|
+
currency: string;
|
|
5554
|
+
|
|
5555
|
+
/**
|
|
5556
|
+
* The id of the item the price will be associated with.
|
|
5557
|
+
*/
|
|
5558
|
+
item_id: string;
|
|
5559
|
+
|
|
5560
|
+
/**
|
|
5561
|
+
* The pricing model type
|
|
5562
|
+
*/
|
|
5563
|
+
model_type: 'tiered_matrix_with_allocation';
|
|
5564
|
+
|
|
5565
|
+
/**
|
|
5566
|
+
* The name of the price.
|
|
5567
|
+
*/
|
|
5568
|
+
name: string;
|
|
5569
|
+
|
|
5570
|
+
/**
|
|
5571
|
+
* Configuration for tiered_matrix_with_allocation pricing
|
|
5572
|
+
*/
|
|
5573
|
+
tiered_matrix_with_allocation_config: NewFloatingTieredMatrixWithAllocationPrice.TieredMatrixWithAllocationConfig;
|
|
5574
|
+
|
|
5575
|
+
/**
|
|
5576
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
5577
|
+
* usage-based.
|
|
5578
|
+
*/
|
|
5579
|
+
billable_metric_id?: string | null;
|
|
5580
|
+
|
|
5581
|
+
/**
|
|
5582
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
5583
|
+
* this is true, and in-arrears if this is false.
|
|
5584
|
+
*/
|
|
5585
|
+
billed_in_advance?: boolean | null;
|
|
5586
|
+
|
|
5587
|
+
/**
|
|
5588
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
5589
|
+
* months.
|
|
5590
|
+
*/
|
|
5591
|
+
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
5592
|
+
|
|
5593
|
+
/**
|
|
5594
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
5595
|
+
*/
|
|
5596
|
+
conversion_rate?: number | null;
|
|
5597
|
+
|
|
5598
|
+
/**
|
|
5599
|
+
* The configuration for the rate of the price currency to the invoicing currency.
|
|
5600
|
+
*/
|
|
5601
|
+
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
5602
|
+
|
|
5603
|
+
/**
|
|
5604
|
+
* For dimensional price: specifies a price group and dimension values
|
|
5605
|
+
*/
|
|
5606
|
+
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
|
|
5607
|
+
|
|
5608
|
+
/**
|
|
5609
|
+
* An alias for the price.
|
|
5610
|
+
*/
|
|
5611
|
+
external_price_id?: string | null;
|
|
5612
|
+
|
|
5613
|
+
/**
|
|
5614
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
5615
|
+
* applied.
|
|
5616
|
+
*/
|
|
5617
|
+
fixed_price_quantity?: number | null;
|
|
5618
|
+
|
|
5619
|
+
/**
|
|
5620
|
+
* The property used to group this price on an invoice
|
|
5621
|
+
*/
|
|
5622
|
+
invoice_grouping_key?: string | null;
|
|
5623
|
+
|
|
5624
|
+
/**
|
|
5625
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
5626
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
5627
|
+
*/
|
|
5628
|
+
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
5629
|
+
|
|
5630
|
+
/**
|
|
5631
|
+
* The ID of the license type to associate with this price. On a usage price this
|
|
5632
|
+
* also marks the price as eligible to draw down from that license type's
|
|
5633
|
+
* allocation; a usage price created without it is billed normally. Usage prices
|
|
5634
|
+
* with a license type must use the `unit` model, and only draw down when their
|
|
5635
|
+
* currency matches the allocation's.
|
|
5636
|
+
*/
|
|
5637
|
+
license_type_id?: string | null;
|
|
5638
|
+
|
|
5639
|
+
/**
|
|
5640
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
5641
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
5642
|
+
* by setting `metadata` to `null`.
|
|
5643
|
+
*/
|
|
5644
|
+
metadata?: { [key: string]: string | null } | null;
|
|
5645
|
+
}
|
|
5646
|
+
|
|
5647
|
+
export namespace NewFloatingTieredMatrixWithAllocationPrice {
|
|
5648
|
+
/**
|
|
5649
|
+
* Configuration for tiered_matrix_with_allocation pricing
|
|
5650
|
+
*/
|
|
5651
|
+
export interface TieredMatrixWithAllocationConfig {
|
|
5652
|
+
/**
|
|
5653
|
+
* Usage allocation, pooled across all matrix cells
|
|
5654
|
+
*/
|
|
5655
|
+
allocation: string;
|
|
5656
|
+
|
|
5657
|
+
/**
|
|
5658
|
+
* Per unit rate for usage whose matrix cell has no configured tiers
|
|
5659
|
+
*/
|
|
5660
|
+
default_unit_amount: string;
|
|
5661
|
+
|
|
5662
|
+
/**
|
|
5663
|
+
* One or two event property values to evaluate matrix cells by
|
|
5664
|
+
*/
|
|
5665
|
+
dimensions: Array<string>;
|
|
5666
|
+
|
|
5667
|
+
/**
|
|
5668
|
+
* Graduated tiers keyed by matrix cell; usage in a cell is tiered only against its
|
|
5669
|
+
* own rows
|
|
5670
|
+
*/
|
|
5671
|
+
tiers: Array<TieredMatrixWithAllocationConfig.Tier>;
|
|
5672
|
+
}
|
|
5673
|
+
|
|
5674
|
+
export namespace TieredMatrixWithAllocationConfig {
|
|
5675
|
+
/**
|
|
5676
|
+
* Configuration for a single tier scoped to one matrix cell
|
|
5677
|
+
*/
|
|
5678
|
+
export interface Tier {
|
|
5679
|
+
/**
|
|
5680
|
+
* The matrix cell this tier applies to, as one or two dimension values
|
|
5681
|
+
*/
|
|
5682
|
+
dimension_values: Array<string>;
|
|
5683
|
+
|
|
5684
|
+
/**
|
|
5685
|
+
* Exclusive tier starting value. The tier runs up to and including the next bound
|
|
5686
|
+
* configured for the same matrix cell.
|
|
5687
|
+
*/
|
|
5688
|
+
tier_lower_bound: string;
|
|
5689
|
+
|
|
5690
|
+
/**
|
|
5691
|
+
* Per unit amount
|
|
5692
|
+
*/
|
|
5693
|
+
unit_amount: string;
|
|
5694
|
+
}
|
|
5695
|
+
}
|
|
5696
|
+
}
|
|
5697
|
+
|
|
5388
5698
|
export interface NewFloatingMatrixWithThresholdDiscountsPrice {
|
|
5389
5699
|
/**
|
|
5390
5700
|
* The cadence to bill for this price on.
|
|
@@ -6483,6 +6793,7 @@ export namespace PriceEvaluatePreviewEventsParams {
|
|
|
6483
6793
|
| Shared.NewFloatingPackageWithAllocationPrice
|
|
6484
6794
|
| Shared.NewFloatingUnitWithPercentPrice
|
|
6485
6795
|
| Shared.NewFloatingMatrixWithAllocationPrice
|
|
6796
|
+
| PriceEvaluation.NewFloatingTieredMatrixWithAllocationPrice
|
|
6486
6797
|
| PriceEvaluation.NewFloatingMatrixWithThresholdDiscountsPrice
|
|
6487
6798
|
| Shared.NewFloatingTieredWithProrationPrice
|
|
6488
6799
|
| Shared.NewFloatingUnitWithProrationPrice
|
|
@@ -6809,6 +7120,160 @@ export namespace PriceEvaluatePreviewEventsParams {
|
|
|
6809
7120
|
}
|
|
6810
7121
|
}
|
|
6811
7122
|
|
|
7123
|
+
export interface NewFloatingTieredMatrixWithAllocationPrice {
|
|
7124
|
+
/**
|
|
7125
|
+
* The cadence to bill for this price on.
|
|
7126
|
+
*/
|
|
7127
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
7128
|
+
|
|
7129
|
+
/**
|
|
7130
|
+
* An ISO 4217 currency string for which this price is billed in.
|
|
7131
|
+
*/
|
|
7132
|
+
currency: string;
|
|
7133
|
+
|
|
7134
|
+
/**
|
|
7135
|
+
* The id of the item the price will be associated with.
|
|
7136
|
+
*/
|
|
7137
|
+
item_id: string;
|
|
7138
|
+
|
|
7139
|
+
/**
|
|
7140
|
+
* The pricing model type
|
|
7141
|
+
*/
|
|
7142
|
+
model_type: 'tiered_matrix_with_allocation';
|
|
7143
|
+
|
|
7144
|
+
/**
|
|
7145
|
+
* The name of the price.
|
|
7146
|
+
*/
|
|
7147
|
+
name: string;
|
|
7148
|
+
|
|
7149
|
+
/**
|
|
7150
|
+
* Configuration for tiered_matrix_with_allocation pricing
|
|
7151
|
+
*/
|
|
7152
|
+
tiered_matrix_with_allocation_config: NewFloatingTieredMatrixWithAllocationPrice.TieredMatrixWithAllocationConfig;
|
|
7153
|
+
|
|
7154
|
+
/**
|
|
7155
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
7156
|
+
* usage-based.
|
|
7157
|
+
*/
|
|
7158
|
+
billable_metric_id?: string | null;
|
|
7159
|
+
|
|
7160
|
+
/**
|
|
7161
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
7162
|
+
* this is true, and in-arrears if this is false.
|
|
7163
|
+
*/
|
|
7164
|
+
billed_in_advance?: boolean | null;
|
|
7165
|
+
|
|
7166
|
+
/**
|
|
7167
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
7168
|
+
* months.
|
|
7169
|
+
*/
|
|
7170
|
+
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
7171
|
+
|
|
7172
|
+
/**
|
|
7173
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
7174
|
+
*/
|
|
7175
|
+
conversion_rate?: number | null;
|
|
7176
|
+
|
|
7177
|
+
/**
|
|
7178
|
+
* The configuration for the rate of the price currency to the invoicing currency.
|
|
7179
|
+
*/
|
|
7180
|
+
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
7181
|
+
|
|
7182
|
+
/**
|
|
7183
|
+
* For dimensional price: specifies a price group and dimension values
|
|
7184
|
+
*/
|
|
7185
|
+
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
|
|
7186
|
+
|
|
7187
|
+
/**
|
|
7188
|
+
* An alias for the price.
|
|
7189
|
+
*/
|
|
7190
|
+
external_price_id?: string | null;
|
|
7191
|
+
|
|
7192
|
+
/**
|
|
7193
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
7194
|
+
* applied.
|
|
7195
|
+
*/
|
|
7196
|
+
fixed_price_quantity?: number | null;
|
|
7197
|
+
|
|
7198
|
+
/**
|
|
7199
|
+
* The property used to group this price on an invoice
|
|
7200
|
+
*/
|
|
7201
|
+
invoice_grouping_key?: string | null;
|
|
7202
|
+
|
|
7203
|
+
/**
|
|
7204
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
7205
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
7206
|
+
*/
|
|
7207
|
+
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
7208
|
+
|
|
7209
|
+
/**
|
|
7210
|
+
* The ID of the license type to associate with this price. On a usage price this
|
|
7211
|
+
* also marks the price as eligible to draw down from that license type's
|
|
7212
|
+
* allocation; a usage price created without it is billed normally. Usage prices
|
|
7213
|
+
* with a license type must use the `unit` model, and only draw down when their
|
|
7214
|
+
* currency matches the allocation's.
|
|
7215
|
+
*/
|
|
7216
|
+
license_type_id?: string | null;
|
|
7217
|
+
|
|
7218
|
+
/**
|
|
7219
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
7220
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
7221
|
+
* by setting `metadata` to `null`.
|
|
7222
|
+
*/
|
|
7223
|
+
metadata?: { [key: string]: string | null } | null;
|
|
7224
|
+
}
|
|
7225
|
+
|
|
7226
|
+
export namespace NewFloatingTieredMatrixWithAllocationPrice {
|
|
7227
|
+
/**
|
|
7228
|
+
* Configuration for tiered_matrix_with_allocation pricing
|
|
7229
|
+
*/
|
|
7230
|
+
export interface TieredMatrixWithAllocationConfig {
|
|
7231
|
+
/**
|
|
7232
|
+
* Usage allocation, pooled across all matrix cells
|
|
7233
|
+
*/
|
|
7234
|
+
allocation: string;
|
|
7235
|
+
|
|
7236
|
+
/**
|
|
7237
|
+
* Per unit rate for usage whose matrix cell has no configured tiers
|
|
7238
|
+
*/
|
|
7239
|
+
default_unit_amount: string;
|
|
7240
|
+
|
|
7241
|
+
/**
|
|
7242
|
+
* One or two event property values to evaluate matrix cells by
|
|
7243
|
+
*/
|
|
7244
|
+
dimensions: Array<string>;
|
|
7245
|
+
|
|
7246
|
+
/**
|
|
7247
|
+
* Graduated tiers keyed by matrix cell; usage in a cell is tiered only against its
|
|
7248
|
+
* own rows
|
|
7249
|
+
*/
|
|
7250
|
+
tiers: Array<TieredMatrixWithAllocationConfig.Tier>;
|
|
7251
|
+
}
|
|
7252
|
+
|
|
7253
|
+
export namespace TieredMatrixWithAllocationConfig {
|
|
7254
|
+
/**
|
|
7255
|
+
* Configuration for a single tier scoped to one matrix cell
|
|
7256
|
+
*/
|
|
7257
|
+
export interface Tier {
|
|
7258
|
+
/**
|
|
7259
|
+
* The matrix cell this tier applies to, as one or two dimension values
|
|
7260
|
+
*/
|
|
7261
|
+
dimension_values: Array<string>;
|
|
7262
|
+
|
|
7263
|
+
/**
|
|
7264
|
+
* Exclusive tier starting value. The tier runs up to and including the next bound
|
|
7265
|
+
* configured for the same matrix cell.
|
|
7266
|
+
*/
|
|
7267
|
+
tier_lower_bound: string;
|
|
7268
|
+
|
|
7269
|
+
/**
|
|
7270
|
+
* Per unit amount
|
|
7271
|
+
*/
|
|
7272
|
+
unit_amount: string;
|
|
7273
|
+
}
|
|
7274
|
+
}
|
|
7275
|
+
}
|
|
7276
|
+
|
|
6812
7277
|
export interface NewFloatingMatrixWithThresholdDiscountsPrice {
|
|
6813
7278
|
/**
|
|
6814
7279
|
* The cadence to bill for this price on.
|
package/src/resources/shared.ts
CHANGED
|
@@ -10759,6 +10759,7 @@ export type Price =
|
|
|
10759
10759
|
| Price.PackageWithAllocationPrice
|
|
10760
10760
|
| Price.UnitWithPercentPrice
|
|
10761
10761
|
| Price.MatrixWithAllocationPrice
|
|
10762
|
+
| Price.TieredMatrixWithAllocationPrice
|
|
10762
10763
|
| Price.MatrixWithThresholdDiscountsPrice
|
|
10763
10764
|
| Price.TieredWithProrationPrice
|
|
10764
10765
|
| Price.UnitWithProrationPrice
|
|
@@ -13206,6 +13207,199 @@ export namespace Price {
|
|
|
13206
13207
|
}
|
|
13207
13208
|
}
|
|
13208
13209
|
|
|
13210
|
+
export interface TieredMatrixWithAllocationPrice {
|
|
13211
|
+
id: string;
|
|
13212
|
+
|
|
13213
|
+
billable_metric: Shared.BillableMetricTiny | null;
|
|
13214
|
+
|
|
13215
|
+
billing_cycle_configuration: Shared.BillingCycleConfiguration;
|
|
13216
|
+
|
|
13217
|
+
billing_mode: 'in_advance' | 'in_arrear';
|
|
13218
|
+
|
|
13219
|
+
cadence: 'one_time' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | 'custom';
|
|
13220
|
+
|
|
13221
|
+
composite_price_filters: Array<TieredMatrixWithAllocationPrice.CompositePriceFilter> | null;
|
|
13222
|
+
|
|
13223
|
+
conversion_rate: number | null;
|
|
13224
|
+
|
|
13225
|
+
conversion_rate_config: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
13226
|
+
|
|
13227
|
+
created_at: string;
|
|
13228
|
+
|
|
13229
|
+
credit_allocation: Shared.Allocation | null;
|
|
13230
|
+
|
|
13231
|
+
currency: string;
|
|
13232
|
+
|
|
13233
|
+
/**
|
|
13234
|
+
* @deprecated
|
|
13235
|
+
*/
|
|
13236
|
+
discount: Shared.Discount | null;
|
|
13237
|
+
|
|
13238
|
+
external_price_id: string | null;
|
|
13239
|
+
|
|
13240
|
+
fixed_price_quantity: number | null;
|
|
13241
|
+
|
|
13242
|
+
invoice_grouping_key: string | null;
|
|
13243
|
+
|
|
13244
|
+
invoicing_cycle_configuration: Shared.BillingCycleConfiguration | null;
|
|
13245
|
+
|
|
13246
|
+
/**
|
|
13247
|
+
* A minimal representation of an Item containing only the essential identifying
|
|
13248
|
+
* information.
|
|
13249
|
+
*/
|
|
13250
|
+
item: Shared.ItemSlim;
|
|
13251
|
+
|
|
13252
|
+
/**
|
|
13253
|
+
* @deprecated
|
|
13254
|
+
*/
|
|
13255
|
+
maximum: Shared.Maximum | null;
|
|
13256
|
+
|
|
13257
|
+
/**
|
|
13258
|
+
* @deprecated
|
|
13259
|
+
*/
|
|
13260
|
+
maximum_amount: string | null;
|
|
13261
|
+
|
|
13262
|
+
/**
|
|
13263
|
+
* User specified key-value pairs for the resource. If not present, this defaults
|
|
13264
|
+
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
13265
|
+
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
13266
|
+
* `null`.
|
|
13267
|
+
*/
|
|
13268
|
+
metadata: { [key: string]: string };
|
|
13269
|
+
|
|
13270
|
+
/**
|
|
13271
|
+
* @deprecated
|
|
13272
|
+
*/
|
|
13273
|
+
minimum: Shared.Minimum | null;
|
|
13274
|
+
|
|
13275
|
+
/**
|
|
13276
|
+
* @deprecated
|
|
13277
|
+
*/
|
|
13278
|
+
minimum_amount: string | null;
|
|
13279
|
+
|
|
13280
|
+
/**
|
|
13281
|
+
* The pricing model type
|
|
13282
|
+
*/
|
|
13283
|
+
model_type: 'tiered_matrix_with_allocation';
|
|
13284
|
+
|
|
13285
|
+
name: string;
|
|
13286
|
+
|
|
13287
|
+
plan_phase_order: number | null;
|
|
13288
|
+
|
|
13289
|
+
price_type: 'usage_price' | 'fixed_price' | 'composite_price';
|
|
13290
|
+
|
|
13291
|
+
/**
|
|
13292
|
+
* The price id this price replaces. This price will take the place of the replaced
|
|
13293
|
+
* price in plan version migrations.
|
|
13294
|
+
*/
|
|
13295
|
+
replaces_price_id: string | null;
|
|
13296
|
+
|
|
13297
|
+
/**
|
|
13298
|
+
* Configuration for tiered_matrix_with_allocation pricing
|
|
13299
|
+
*/
|
|
13300
|
+
tiered_matrix_with_allocation_config: TieredMatrixWithAllocationPrice.TieredMatrixWithAllocationConfig;
|
|
13301
|
+
|
|
13302
|
+
dimensional_price_configuration?: Shared.DimensionalPriceConfiguration | null;
|
|
13303
|
+
|
|
13304
|
+
/**
|
|
13305
|
+
* The LicenseType resource represents a type of license that can be assigned to
|
|
13306
|
+
* users. License types are used during billing by grouping metrics on the
|
|
13307
|
+
* configured grouping key.
|
|
13308
|
+
*/
|
|
13309
|
+
license_type?: TieredMatrixWithAllocationPrice.LicenseType | null;
|
|
13310
|
+
}
|
|
13311
|
+
|
|
13312
|
+
export namespace TieredMatrixWithAllocationPrice {
|
|
13313
|
+
export interface CompositePriceFilter {
|
|
13314
|
+
/**
|
|
13315
|
+
* The property of the price to filter on.
|
|
13316
|
+
*/
|
|
13317
|
+
field: 'price_id' | 'item_id' | 'price_type' | 'currency' | 'pricing_unit_id';
|
|
13318
|
+
|
|
13319
|
+
/**
|
|
13320
|
+
* Should prices that match the filter be included or excluded.
|
|
13321
|
+
*/
|
|
13322
|
+
operator: 'includes' | 'excludes';
|
|
13323
|
+
|
|
13324
|
+
/**
|
|
13325
|
+
* The IDs or values that match this filter.
|
|
13326
|
+
*/
|
|
13327
|
+
values: Array<string>;
|
|
13328
|
+
}
|
|
13329
|
+
|
|
13330
|
+
/**
|
|
13331
|
+
* Configuration for tiered_matrix_with_allocation pricing
|
|
13332
|
+
*/
|
|
13333
|
+
export interface TieredMatrixWithAllocationConfig {
|
|
13334
|
+
/**
|
|
13335
|
+
* Usage allocation, pooled across all matrix cells
|
|
13336
|
+
*/
|
|
13337
|
+
allocation: string;
|
|
13338
|
+
|
|
13339
|
+
/**
|
|
13340
|
+
* Per unit rate for usage whose matrix cell has no configured tiers
|
|
13341
|
+
*/
|
|
13342
|
+
default_unit_amount: string;
|
|
13343
|
+
|
|
13344
|
+
/**
|
|
13345
|
+
* One or two event property values to evaluate matrix cells by
|
|
13346
|
+
*/
|
|
13347
|
+
dimensions: Array<string>;
|
|
13348
|
+
|
|
13349
|
+
/**
|
|
13350
|
+
* Graduated tiers keyed by matrix cell; usage in a cell is tiered only against its
|
|
13351
|
+
* own rows
|
|
13352
|
+
*/
|
|
13353
|
+
tiers: Array<TieredMatrixWithAllocationConfig.Tier>;
|
|
13354
|
+
}
|
|
13355
|
+
|
|
13356
|
+
export namespace TieredMatrixWithAllocationConfig {
|
|
13357
|
+
/**
|
|
13358
|
+
* Configuration for a single tier scoped to one matrix cell
|
|
13359
|
+
*/
|
|
13360
|
+
export interface Tier {
|
|
13361
|
+
/**
|
|
13362
|
+
* The matrix cell this tier applies to, as one or two dimension values
|
|
13363
|
+
*/
|
|
13364
|
+
dimension_values: Array<string>;
|
|
13365
|
+
|
|
13366
|
+
/**
|
|
13367
|
+
* Exclusive tier starting value. The tier runs up to and including the next bound
|
|
13368
|
+
* configured for the same matrix cell.
|
|
13369
|
+
*/
|
|
13370
|
+
tier_lower_bound: string;
|
|
13371
|
+
|
|
13372
|
+
/**
|
|
13373
|
+
* Per unit amount
|
|
13374
|
+
*/
|
|
13375
|
+
unit_amount: string;
|
|
13376
|
+
}
|
|
13377
|
+
}
|
|
13378
|
+
|
|
13379
|
+
/**
|
|
13380
|
+
* The LicenseType resource represents a type of license that can be assigned to
|
|
13381
|
+
* users. License types are used during billing by grouping metrics on the
|
|
13382
|
+
* configured grouping key.
|
|
13383
|
+
*/
|
|
13384
|
+
export interface LicenseType {
|
|
13385
|
+
/**
|
|
13386
|
+
* The Orb-assigned unique identifier for the license type.
|
|
13387
|
+
*/
|
|
13388
|
+
id: string;
|
|
13389
|
+
|
|
13390
|
+
/**
|
|
13391
|
+
* The key used for grouping licenses of this type. This is typically a user
|
|
13392
|
+
* identifier field.
|
|
13393
|
+
*/
|
|
13394
|
+
grouping_key: string;
|
|
13395
|
+
|
|
13396
|
+
/**
|
|
13397
|
+
* The name of the license type.
|
|
13398
|
+
*/
|
|
13399
|
+
name: string;
|
|
13400
|
+
}
|
|
13401
|
+
}
|
|
13402
|
+
|
|
13209
13403
|
export interface MatrixWithThresholdDiscountsPrice {
|
|
13210
13404
|
id: string;
|
|
13211
13405
|
|