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
|
@@ -5326,6 +5326,7 @@ export namespace SubscriptionCreateParams {
|
|
|
5326
5326
|
| SubscriptionsAPI.NewSubscriptionPackageWithAllocationPrice
|
|
5327
5327
|
| SubscriptionsAPI.NewSubscriptionUnitWithPercentPrice
|
|
5328
5328
|
| SubscriptionsAPI.NewSubscriptionMatrixWithAllocationPrice
|
|
5329
|
+
| AddPrice.NewSubscriptionTieredMatrixWithAllocationPrice
|
|
5329
5330
|
| AddPrice.NewSubscriptionMatrixWithThresholdDiscountsPrice
|
|
5330
5331
|
| AddPrice.NewSubscriptionTieredWithProrationPrice
|
|
5331
5332
|
| SubscriptionsAPI.NewSubscriptionUnitWithProrationPrice
|
|
@@ -5673,6 +5674,167 @@ export namespace SubscriptionCreateParams {
|
|
|
5673
5674
|
}
|
|
5674
5675
|
}
|
|
5675
5676
|
|
|
5677
|
+
export interface NewSubscriptionTieredMatrixWithAllocationPrice {
|
|
5678
|
+
/**
|
|
5679
|
+
* The cadence to bill for this price on.
|
|
5680
|
+
*/
|
|
5681
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
5682
|
+
|
|
5683
|
+
/**
|
|
5684
|
+
* The id of the item the price will be associated with.
|
|
5685
|
+
*/
|
|
5686
|
+
item_id: string;
|
|
5687
|
+
|
|
5688
|
+
/**
|
|
5689
|
+
* The pricing model type
|
|
5690
|
+
*/
|
|
5691
|
+
model_type: 'tiered_matrix_with_allocation';
|
|
5692
|
+
|
|
5693
|
+
/**
|
|
5694
|
+
* The name of the price.
|
|
5695
|
+
*/
|
|
5696
|
+
name: string;
|
|
5697
|
+
|
|
5698
|
+
/**
|
|
5699
|
+
* Configuration for tiered_matrix_with_allocation pricing
|
|
5700
|
+
*/
|
|
5701
|
+
tiered_matrix_with_allocation_config: NewSubscriptionTieredMatrixWithAllocationPrice.TieredMatrixWithAllocationConfig;
|
|
5702
|
+
|
|
5703
|
+
/**
|
|
5704
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
5705
|
+
* usage-based.
|
|
5706
|
+
*/
|
|
5707
|
+
billable_metric_id?: string | null;
|
|
5708
|
+
|
|
5709
|
+
/**
|
|
5710
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
5711
|
+
* this is true, and in-arrears if this is false.
|
|
5712
|
+
*/
|
|
5713
|
+
billed_in_advance?: boolean | null;
|
|
5714
|
+
|
|
5715
|
+
/**
|
|
5716
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
5717
|
+
* months.
|
|
5718
|
+
*/
|
|
5719
|
+
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
5720
|
+
|
|
5721
|
+
/**
|
|
5722
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
5723
|
+
*/
|
|
5724
|
+
conversion_rate?: number | null;
|
|
5725
|
+
|
|
5726
|
+
/**
|
|
5727
|
+
* The configuration for the rate of the price currency to the invoicing currency.
|
|
5728
|
+
*/
|
|
5729
|
+
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
5730
|
+
|
|
5731
|
+
/**
|
|
5732
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
5733
|
+
* price is billed.
|
|
5734
|
+
*/
|
|
5735
|
+
currency?: string | null;
|
|
5736
|
+
|
|
5737
|
+
/**
|
|
5738
|
+
* For dimensional price: specifies a price group and dimension values
|
|
5739
|
+
*/
|
|
5740
|
+
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
|
|
5741
|
+
|
|
5742
|
+
/**
|
|
5743
|
+
* An alias for the price.
|
|
5744
|
+
*/
|
|
5745
|
+
external_price_id?: string | null;
|
|
5746
|
+
|
|
5747
|
+
/**
|
|
5748
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
5749
|
+
* applied.
|
|
5750
|
+
*/
|
|
5751
|
+
fixed_price_quantity?: number | null;
|
|
5752
|
+
|
|
5753
|
+
/**
|
|
5754
|
+
* The property used to group this price on an invoice
|
|
5755
|
+
*/
|
|
5756
|
+
invoice_grouping_key?: string | null;
|
|
5757
|
+
|
|
5758
|
+
/**
|
|
5759
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
5760
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
5761
|
+
*/
|
|
5762
|
+
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
5763
|
+
|
|
5764
|
+
/**
|
|
5765
|
+
* The ID of the license type to associate with this price. On a usage price this
|
|
5766
|
+
* also marks the price as eligible to draw down from that license type's
|
|
5767
|
+
* allocation; a usage price created without it is billed normally. Usage prices
|
|
5768
|
+
* with a license type must use the `unit` model, and only draw down when their
|
|
5769
|
+
* currency matches the allocation's.
|
|
5770
|
+
*/
|
|
5771
|
+
license_type_id?: string | null;
|
|
5772
|
+
|
|
5773
|
+
/**
|
|
5774
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
5775
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
5776
|
+
* by setting `metadata` to `null`.
|
|
5777
|
+
*/
|
|
5778
|
+
metadata?: { [key: string]: string | null } | null;
|
|
5779
|
+
|
|
5780
|
+
/**
|
|
5781
|
+
* A transient ID that can be used to reference this price when adding adjustments
|
|
5782
|
+
* in the same API call.
|
|
5783
|
+
*/
|
|
5784
|
+
reference_id?: string | null;
|
|
5785
|
+
}
|
|
5786
|
+
|
|
5787
|
+
export namespace NewSubscriptionTieredMatrixWithAllocationPrice {
|
|
5788
|
+
/**
|
|
5789
|
+
* Configuration for tiered_matrix_with_allocation pricing
|
|
5790
|
+
*/
|
|
5791
|
+
export interface TieredMatrixWithAllocationConfig {
|
|
5792
|
+
/**
|
|
5793
|
+
* Usage allocation, pooled across all matrix cells
|
|
5794
|
+
*/
|
|
5795
|
+
allocation: string;
|
|
5796
|
+
|
|
5797
|
+
/**
|
|
5798
|
+
* Per unit rate for usage whose matrix cell has no configured tiers
|
|
5799
|
+
*/
|
|
5800
|
+
default_unit_amount: string;
|
|
5801
|
+
|
|
5802
|
+
/**
|
|
5803
|
+
* One or two event property values to evaluate matrix cells by
|
|
5804
|
+
*/
|
|
5805
|
+
dimensions: Array<string>;
|
|
5806
|
+
|
|
5807
|
+
/**
|
|
5808
|
+
* Graduated tiers keyed by matrix cell; usage in a cell is tiered only against its
|
|
5809
|
+
* own rows
|
|
5810
|
+
*/
|
|
5811
|
+
tiers: Array<TieredMatrixWithAllocationConfig.Tier>;
|
|
5812
|
+
}
|
|
5813
|
+
|
|
5814
|
+
export namespace TieredMatrixWithAllocationConfig {
|
|
5815
|
+
/**
|
|
5816
|
+
* Configuration for a single tier scoped to one matrix cell
|
|
5817
|
+
*/
|
|
5818
|
+
export interface Tier {
|
|
5819
|
+
/**
|
|
5820
|
+
* The matrix cell this tier applies to, as one or two dimension values
|
|
5821
|
+
*/
|
|
5822
|
+
dimension_values: Array<string>;
|
|
5823
|
+
|
|
5824
|
+
/**
|
|
5825
|
+
* Exclusive tier starting value. The tier runs up to and including the next bound
|
|
5826
|
+
* configured for the same matrix cell.
|
|
5827
|
+
*/
|
|
5828
|
+
tier_lower_bound: string;
|
|
5829
|
+
|
|
5830
|
+
/**
|
|
5831
|
+
* Per unit amount
|
|
5832
|
+
*/
|
|
5833
|
+
unit_amount: string;
|
|
5834
|
+
}
|
|
5835
|
+
}
|
|
5836
|
+
}
|
|
5837
|
+
|
|
5676
5838
|
export interface NewSubscriptionMatrixWithThresholdDiscountsPrice {
|
|
5677
5839
|
/**
|
|
5678
5840
|
* The cadence to bill for this price on.
|
|
@@ -7031,6 +7193,7 @@ export namespace SubscriptionCreateParams {
|
|
|
7031
7193
|
| SubscriptionsAPI.NewSubscriptionPackageWithAllocationPrice
|
|
7032
7194
|
| SubscriptionsAPI.NewSubscriptionUnitWithPercentPrice
|
|
7033
7195
|
| SubscriptionsAPI.NewSubscriptionMatrixWithAllocationPrice
|
|
7196
|
+
| ReplacePrice.NewSubscriptionTieredMatrixWithAllocationPrice
|
|
7034
7197
|
| ReplacePrice.NewSubscriptionMatrixWithThresholdDiscountsPrice
|
|
7035
7198
|
| ReplacePrice.NewSubscriptionTieredWithProrationPrice
|
|
7036
7199
|
| SubscriptionsAPI.NewSubscriptionUnitWithProrationPrice
|
|
@@ -7371,7 +7534,7 @@ export namespace SubscriptionCreateParams {
|
|
|
7371
7534
|
}
|
|
7372
7535
|
}
|
|
7373
7536
|
|
|
7374
|
-
export interface
|
|
7537
|
+
export interface NewSubscriptionTieredMatrixWithAllocationPrice {
|
|
7375
7538
|
/**
|
|
7376
7539
|
* The cadence to bill for this price on.
|
|
7377
7540
|
*/
|
|
@@ -7382,21 +7545,21 @@ export namespace SubscriptionCreateParams {
|
|
|
7382
7545
|
*/
|
|
7383
7546
|
item_id: string;
|
|
7384
7547
|
|
|
7385
|
-
/**
|
|
7386
|
-
* Configuration for matrix_with_threshold_discounts pricing
|
|
7387
|
-
*/
|
|
7388
|
-
matrix_with_threshold_discounts_config: NewSubscriptionMatrixWithThresholdDiscountsPrice.MatrixWithThresholdDiscountsConfig;
|
|
7389
|
-
|
|
7390
7548
|
/**
|
|
7391
7549
|
* The pricing model type
|
|
7392
7550
|
*/
|
|
7393
|
-
model_type: '
|
|
7551
|
+
model_type: 'tiered_matrix_with_allocation';
|
|
7394
7552
|
|
|
7395
7553
|
/**
|
|
7396
7554
|
* The name of the price.
|
|
7397
7555
|
*/
|
|
7398
7556
|
name: string;
|
|
7399
7557
|
|
|
7558
|
+
/**
|
|
7559
|
+
* Configuration for tiered_matrix_with_allocation pricing
|
|
7560
|
+
*/
|
|
7561
|
+
tiered_matrix_with_allocation_config: NewSubscriptionTieredMatrixWithAllocationPrice.TieredMatrixWithAllocationConfig;
|
|
7562
|
+
|
|
7400
7563
|
/**
|
|
7401
7564
|
* The id of the billable metric for the price. Only needed if the price is
|
|
7402
7565
|
* usage-based.
|
|
@@ -7481,70 +7644,58 @@ export namespace SubscriptionCreateParams {
|
|
|
7481
7644
|
reference_id?: string | null;
|
|
7482
7645
|
}
|
|
7483
7646
|
|
|
7484
|
-
export namespace
|
|
7647
|
+
export namespace NewSubscriptionTieredMatrixWithAllocationPrice {
|
|
7485
7648
|
/**
|
|
7486
|
-
* Configuration for
|
|
7649
|
+
* Configuration for tiered_matrix_with_allocation pricing
|
|
7487
7650
|
*/
|
|
7488
|
-
export interface
|
|
7651
|
+
export interface TieredMatrixWithAllocationConfig {
|
|
7489
7652
|
/**
|
|
7490
|
-
*
|
|
7653
|
+
* Usage allocation, pooled across all matrix cells
|
|
7491
7654
|
*/
|
|
7492
|
-
|
|
7655
|
+
allocation: string;
|
|
7493
7656
|
|
|
7494
7657
|
/**
|
|
7495
|
-
*
|
|
7658
|
+
* Per unit rate for usage whose matrix cell has no configured tiers
|
|
7496
7659
|
*/
|
|
7497
|
-
|
|
7660
|
+
default_unit_amount: string;
|
|
7498
7661
|
|
|
7499
7662
|
/**
|
|
7500
|
-
*
|
|
7663
|
+
* One or two event property values to evaluate matrix cells by
|
|
7501
7664
|
*/
|
|
7502
|
-
|
|
7665
|
+
dimensions: Array<string>;
|
|
7503
7666
|
|
|
7504
7667
|
/**
|
|
7505
|
-
*
|
|
7668
|
+
* Graduated tiers keyed by matrix cell; usage in a cell is tiered only against its
|
|
7669
|
+
* own rows
|
|
7506
7670
|
*/
|
|
7507
|
-
|
|
7508
|
-
|
|
7509
|
-
threshold_discount_groups?: Array<MatrixWithThresholdDiscountsConfig.ThresholdDiscountGroup>;
|
|
7671
|
+
tiers: Array<TieredMatrixWithAllocationConfig.Tier>;
|
|
7510
7672
|
}
|
|
7511
7673
|
|
|
7512
|
-
export namespace
|
|
7513
|
-
|
|
7514
|
-
|
|
7515
|
-
|
|
7516
|
-
|
|
7517
|
-
|
|
7518
|
-
second_dimension_value?: string | null;
|
|
7519
|
-
}
|
|
7520
|
-
|
|
7521
|
-
export interface ThresholdDiscountGroup {
|
|
7674
|
+
export namespace TieredMatrixWithAllocationConfig {
|
|
7675
|
+
/**
|
|
7676
|
+
* Configuration for a single tier scoped to one matrix cell
|
|
7677
|
+
*/
|
|
7678
|
+
export interface Tier {
|
|
7522
7679
|
/**
|
|
7523
|
-
*
|
|
7680
|
+
* The matrix cell this tier applies to, as one or two dimension values
|
|
7524
7681
|
*/
|
|
7525
|
-
|
|
7682
|
+
dimension_values: Array<string>;
|
|
7526
7683
|
|
|
7527
7684
|
/**
|
|
7528
|
-
*
|
|
7529
|
-
*
|
|
7685
|
+
* Exclusive tier starting value. The tier runs up to and including the next bound
|
|
7686
|
+
* configured for the same matrix cell.
|
|
7530
7687
|
*/
|
|
7531
|
-
|
|
7688
|
+
tier_lower_bound: string;
|
|
7532
7689
|
|
|
7533
7690
|
/**
|
|
7534
|
-
*
|
|
7535
|
-
* coordinate is `first,second` when the matrix has two dimensions, or just `first`
|
|
7536
|
-
* for a single-dimension matrix. Example: `blue,circle;green,triangle`.
|
|
7691
|
+
* Per unit amount
|
|
7537
7692
|
*/
|
|
7538
|
-
|
|
7539
|
-
|
|
7540
|
-
threshold_amount: string;
|
|
7541
|
-
|
|
7542
|
-
description?: string | null;
|
|
7693
|
+
unit_amount: string;
|
|
7543
7694
|
}
|
|
7544
7695
|
}
|
|
7545
7696
|
}
|
|
7546
7697
|
|
|
7547
|
-
export interface
|
|
7698
|
+
export interface NewSubscriptionMatrixWithThresholdDiscountsPrice {
|
|
7548
7699
|
/**
|
|
7549
7700
|
* The cadence to bill for this price on.
|
|
7550
7701
|
*/
|
|
@@ -7556,19 +7707,19 @@ export namespace SubscriptionCreateParams {
|
|
|
7556
7707
|
item_id: string;
|
|
7557
7708
|
|
|
7558
7709
|
/**
|
|
7559
|
-
*
|
|
7710
|
+
* Configuration for matrix_with_threshold_discounts pricing
|
|
7560
7711
|
*/
|
|
7561
|
-
|
|
7712
|
+
matrix_with_threshold_discounts_config: NewSubscriptionMatrixWithThresholdDiscountsPrice.MatrixWithThresholdDiscountsConfig;
|
|
7562
7713
|
|
|
7563
7714
|
/**
|
|
7564
|
-
* The
|
|
7715
|
+
* The pricing model type
|
|
7565
7716
|
*/
|
|
7566
|
-
|
|
7717
|
+
model_type: 'matrix_with_threshold_discounts';
|
|
7567
7718
|
|
|
7568
7719
|
/**
|
|
7569
|
-
*
|
|
7720
|
+
* The name of the price.
|
|
7570
7721
|
*/
|
|
7571
|
-
|
|
7722
|
+
name: string;
|
|
7572
7723
|
|
|
7573
7724
|
/**
|
|
7574
7725
|
* The id of the billable metric for the price. Only needed if the price is
|
|
@@ -7654,32 +7805,205 @@ export namespace SubscriptionCreateParams {
|
|
|
7654
7805
|
reference_id?: string | null;
|
|
7655
7806
|
}
|
|
7656
7807
|
|
|
7657
|
-
export namespace
|
|
7808
|
+
export namespace NewSubscriptionMatrixWithThresholdDiscountsPrice {
|
|
7658
7809
|
/**
|
|
7659
|
-
* Configuration for
|
|
7810
|
+
* Configuration for matrix_with_threshold_discounts pricing
|
|
7660
7811
|
*/
|
|
7661
|
-
export interface
|
|
7812
|
+
export interface MatrixWithThresholdDiscountsConfig {
|
|
7662
7813
|
/**
|
|
7663
|
-
*
|
|
7664
|
-
* proration
|
|
7814
|
+
* Unit price used for usage that does not match any defined matrix cell.
|
|
7665
7815
|
*/
|
|
7666
|
-
|
|
7667
|
-
}
|
|
7816
|
+
default_unit_amount: string;
|
|
7668
7817
|
|
|
7669
|
-
export namespace TieredWithProrationConfig {
|
|
7670
7818
|
/**
|
|
7671
|
-
*
|
|
7819
|
+
* First matrix dimension key.
|
|
7672
7820
|
*/
|
|
7673
|
-
|
|
7821
|
+
first_dimension: string;
|
|
7822
|
+
|
|
7823
|
+
/**
|
|
7824
|
+
* Per-cell unit prices.
|
|
7825
|
+
*/
|
|
7826
|
+
matrix_values: Array<MatrixWithThresholdDiscountsConfig.MatrixValue>;
|
|
7827
|
+
|
|
7828
|
+
/**
|
|
7829
|
+
* Optional second matrix dimension key.
|
|
7830
|
+
*/
|
|
7831
|
+
second_dimension?: string | null;
|
|
7832
|
+
|
|
7833
|
+
threshold_discount_groups?: Array<MatrixWithThresholdDiscountsConfig.ThresholdDiscountGroup>;
|
|
7834
|
+
}
|
|
7835
|
+
|
|
7836
|
+
export namespace MatrixWithThresholdDiscountsConfig {
|
|
7837
|
+
export interface MatrixValue {
|
|
7838
|
+
first_dimension_value: string;
|
|
7839
|
+
|
|
7840
|
+
unit_amount: string;
|
|
7841
|
+
|
|
7842
|
+
second_dimension_value?: string | null;
|
|
7843
|
+
}
|
|
7844
|
+
|
|
7845
|
+
export interface ThresholdDiscountGroup {
|
|
7674
7846
|
/**
|
|
7675
|
-
*
|
|
7847
|
+
* Discount rate applied to spend above the threshold.
|
|
7676
7848
|
*/
|
|
7677
|
-
|
|
7849
|
+
above_threshold_discount_percentage: string;
|
|
7678
7850
|
|
|
7679
7851
|
/**
|
|
7680
|
-
*
|
|
7852
|
+
* Discount rate applied to spend at or below the threshold. Set to 0 for no
|
|
7853
|
+
* baseline discount.
|
|
7681
7854
|
*/
|
|
7682
|
-
|
|
7855
|
+
below_threshold_discount_percentage: string;
|
|
7856
|
+
|
|
7857
|
+
/**
|
|
7858
|
+
* Semicolon-separated list of matrix cell coordinates targeted by this group. Each
|
|
7859
|
+
* coordinate is `first,second` when the matrix has two dimensions, or just `first`
|
|
7860
|
+
* for a single-dimension matrix. Example: `blue,circle;green,triangle`.
|
|
7861
|
+
*/
|
|
7862
|
+
cell_coordinates: string;
|
|
7863
|
+
|
|
7864
|
+
threshold_amount: string;
|
|
7865
|
+
|
|
7866
|
+
description?: string | null;
|
|
7867
|
+
}
|
|
7868
|
+
}
|
|
7869
|
+
}
|
|
7870
|
+
|
|
7871
|
+
export interface NewSubscriptionTieredWithProrationPrice {
|
|
7872
|
+
/**
|
|
7873
|
+
* The cadence to bill for this price on.
|
|
7874
|
+
*/
|
|
7875
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
7876
|
+
|
|
7877
|
+
/**
|
|
7878
|
+
* The id of the item the price will be associated with.
|
|
7879
|
+
*/
|
|
7880
|
+
item_id: string;
|
|
7881
|
+
|
|
7882
|
+
/**
|
|
7883
|
+
* The pricing model type
|
|
7884
|
+
*/
|
|
7885
|
+
model_type: 'tiered_with_proration';
|
|
7886
|
+
|
|
7887
|
+
/**
|
|
7888
|
+
* The name of the price.
|
|
7889
|
+
*/
|
|
7890
|
+
name: string;
|
|
7891
|
+
|
|
7892
|
+
/**
|
|
7893
|
+
* Configuration for tiered_with_proration pricing
|
|
7894
|
+
*/
|
|
7895
|
+
tiered_with_proration_config: NewSubscriptionTieredWithProrationPrice.TieredWithProrationConfig;
|
|
7896
|
+
|
|
7897
|
+
/**
|
|
7898
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
7899
|
+
* usage-based.
|
|
7900
|
+
*/
|
|
7901
|
+
billable_metric_id?: string | null;
|
|
7902
|
+
|
|
7903
|
+
/**
|
|
7904
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
7905
|
+
* this is true, and in-arrears if this is false.
|
|
7906
|
+
*/
|
|
7907
|
+
billed_in_advance?: boolean | null;
|
|
7908
|
+
|
|
7909
|
+
/**
|
|
7910
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
7911
|
+
* months.
|
|
7912
|
+
*/
|
|
7913
|
+
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
7914
|
+
|
|
7915
|
+
/**
|
|
7916
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
7917
|
+
*/
|
|
7918
|
+
conversion_rate?: number | null;
|
|
7919
|
+
|
|
7920
|
+
/**
|
|
7921
|
+
* The configuration for the rate of the price currency to the invoicing currency.
|
|
7922
|
+
*/
|
|
7923
|
+
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
7924
|
+
|
|
7925
|
+
/**
|
|
7926
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
7927
|
+
* price is billed.
|
|
7928
|
+
*/
|
|
7929
|
+
currency?: string | null;
|
|
7930
|
+
|
|
7931
|
+
/**
|
|
7932
|
+
* For dimensional price: specifies a price group and dimension values
|
|
7933
|
+
*/
|
|
7934
|
+
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
|
|
7935
|
+
|
|
7936
|
+
/**
|
|
7937
|
+
* An alias for the price.
|
|
7938
|
+
*/
|
|
7939
|
+
external_price_id?: string | null;
|
|
7940
|
+
|
|
7941
|
+
/**
|
|
7942
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
7943
|
+
* applied.
|
|
7944
|
+
*/
|
|
7945
|
+
fixed_price_quantity?: number | null;
|
|
7946
|
+
|
|
7947
|
+
/**
|
|
7948
|
+
* The property used to group this price on an invoice
|
|
7949
|
+
*/
|
|
7950
|
+
invoice_grouping_key?: string | null;
|
|
7951
|
+
|
|
7952
|
+
/**
|
|
7953
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
7954
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
7955
|
+
*/
|
|
7956
|
+
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
7957
|
+
|
|
7958
|
+
/**
|
|
7959
|
+
* The ID of the license type to associate with this price. On a usage price this
|
|
7960
|
+
* also marks the price as eligible to draw down from that license type's
|
|
7961
|
+
* allocation; a usage price created without it is billed normally. Usage prices
|
|
7962
|
+
* with a license type must use the `unit` model, and only draw down when their
|
|
7963
|
+
* currency matches the allocation's.
|
|
7964
|
+
*/
|
|
7965
|
+
license_type_id?: string | null;
|
|
7966
|
+
|
|
7967
|
+
/**
|
|
7968
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
7969
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
7970
|
+
* by setting `metadata` to `null`.
|
|
7971
|
+
*/
|
|
7972
|
+
metadata?: { [key: string]: string | null } | null;
|
|
7973
|
+
|
|
7974
|
+
/**
|
|
7975
|
+
* A transient ID that can be used to reference this price when adding adjustments
|
|
7976
|
+
* in the same API call.
|
|
7977
|
+
*/
|
|
7978
|
+
reference_id?: string | null;
|
|
7979
|
+
}
|
|
7980
|
+
|
|
7981
|
+
export namespace NewSubscriptionTieredWithProrationPrice {
|
|
7982
|
+
/**
|
|
7983
|
+
* Configuration for tiered_with_proration pricing
|
|
7984
|
+
*/
|
|
7985
|
+
export interface TieredWithProrationConfig {
|
|
7986
|
+
/**
|
|
7987
|
+
* Tiers for rating based on total usage quantities into the specified tier with
|
|
7988
|
+
* proration
|
|
7989
|
+
*/
|
|
7990
|
+
tiers: Array<TieredWithProrationConfig.Tier>;
|
|
7991
|
+
}
|
|
7992
|
+
|
|
7993
|
+
export namespace TieredWithProrationConfig {
|
|
7994
|
+
/**
|
|
7995
|
+
* Configuration for a single tiered with proration tier
|
|
7996
|
+
*/
|
|
7997
|
+
export interface Tier {
|
|
7998
|
+
/**
|
|
7999
|
+
* Inclusive tier starting value
|
|
8000
|
+
*/
|
|
8001
|
+
tier_lower_bound: string;
|
|
8002
|
+
|
|
8003
|
+
/**
|
|
8004
|
+
* Amount per unit
|
|
8005
|
+
*/
|
|
8006
|
+
unit_amount: string;
|
|
7683
8007
|
}
|
|
7684
8008
|
}
|
|
7685
8009
|
}
|
|
@@ -8839,6 +9163,7 @@ export namespace SubscriptionPriceIntervalsParams {
|
|
|
8839
9163
|
| Shared.NewFloatingPackageWithAllocationPrice
|
|
8840
9164
|
| Shared.NewFloatingUnitWithPercentPrice
|
|
8841
9165
|
| Shared.NewFloatingMatrixWithAllocationPrice
|
|
9166
|
+
| Add.NewFloatingTieredMatrixWithAllocationPrice
|
|
8842
9167
|
| Add.NewFloatingMatrixWithThresholdDiscountsPrice
|
|
8843
9168
|
| Shared.NewFloatingTieredWithProrationPrice
|
|
8844
9169
|
| Shared.NewFloatingUnitWithProrationPrice
|
|
@@ -9216,6 +9541,160 @@ export namespace SubscriptionPriceIntervalsParams {
|
|
|
9216
9541
|
}
|
|
9217
9542
|
}
|
|
9218
9543
|
|
|
9544
|
+
export interface NewFloatingTieredMatrixWithAllocationPrice {
|
|
9545
|
+
/**
|
|
9546
|
+
* The cadence to bill for this price on.
|
|
9547
|
+
*/
|
|
9548
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
9549
|
+
|
|
9550
|
+
/**
|
|
9551
|
+
* An ISO 4217 currency string for which this price is billed in.
|
|
9552
|
+
*/
|
|
9553
|
+
currency: string;
|
|
9554
|
+
|
|
9555
|
+
/**
|
|
9556
|
+
* The id of the item the price will be associated with.
|
|
9557
|
+
*/
|
|
9558
|
+
item_id: string;
|
|
9559
|
+
|
|
9560
|
+
/**
|
|
9561
|
+
* The pricing model type
|
|
9562
|
+
*/
|
|
9563
|
+
model_type: 'tiered_matrix_with_allocation';
|
|
9564
|
+
|
|
9565
|
+
/**
|
|
9566
|
+
* The name of the price.
|
|
9567
|
+
*/
|
|
9568
|
+
name: string;
|
|
9569
|
+
|
|
9570
|
+
/**
|
|
9571
|
+
* Configuration for tiered_matrix_with_allocation pricing
|
|
9572
|
+
*/
|
|
9573
|
+
tiered_matrix_with_allocation_config: NewFloatingTieredMatrixWithAllocationPrice.TieredMatrixWithAllocationConfig;
|
|
9574
|
+
|
|
9575
|
+
/**
|
|
9576
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
9577
|
+
* usage-based.
|
|
9578
|
+
*/
|
|
9579
|
+
billable_metric_id?: string | null;
|
|
9580
|
+
|
|
9581
|
+
/**
|
|
9582
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
9583
|
+
* this is true, and in-arrears if this is false.
|
|
9584
|
+
*/
|
|
9585
|
+
billed_in_advance?: boolean | null;
|
|
9586
|
+
|
|
9587
|
+
/**
|
|
9588
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
9589
|
+
* months.
|
|
9590
|
+
*/
|
|
9591
|
+
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
9592
|
+
|
|
9593
|
+
/**
|
|
9594
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
9595
|
+
*/
|
|
9596
|
+
conversion_rate?: number | null;
|
|
9597
|
+
|
|
9598
|
+
/**
|
|
9599
|
+
* The configuration for the rate of the price currency to the invoicing currency.
|
|
9600
|
+
*/
|
|
9601
|
+
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
9602
|
+
|
|
9603
|
+
/**
|
|
9604
|
+
* For dimensional price: specifies a price group and dimension values
|
|
9605
|
+
*/
|
|
9606
|
+
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
|
|
9607
|
+
|
|
9608
|
+
/**
|
|
9609
|
+
* An alias for the price.
|
|
9610
|
+
*/
|
|
9611
|
+
external_price_id?: string | null;
|
|
9612
|
+
|
|
9613
|
+
/**
|
|
9614
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
9615
|
+
* applied.
|
|
9616
|
+
*/
|
|
9617
|
+
fixed_price_quantity?: number | null;
|
|
9618
|
+
|
|
9619
|
+
/**
|
|
9620
|
+
* The property used to group this price on an invoice
|
|
9621
|
+
*/
|
|
9622
|
+
invoice_grouping_key?: string | null;
|
|
9623
|
+
|
|
9624
|
+
/**
|
|
9625
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
9626
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
9627
|
+
*/
|
|
9628
|
+
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
9629
|
+
|
|
9630
|
+
/**
|
|
9631
|
+
* The ID of the license type to associate with this price. On a usage price this
|
|
9632
|
+
* also marks the price as eligible to draw down from that license type's
|
|
9633
|
+
* allocation; a usage price created without it is billed normally. Usage prices
|
|
9634
|
+
* with a license type must use the `unit` model, and only draw down when their
|
|
9635
|
+
* currency matches the allocation's.
|
|
9636
|
+
*/
|
|
9637
|
+
license_type_id?: string | null;
|
|
9638
|
+
|
|
9639
|
+
/**
|
|
9640
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
9641
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
9642
|
+
* by setting `metadata` to `null`.
|
|
9643
|
+
*/
|
|
9644
|
+
metadata?: { [key: string]: string | null } | null;
|
|
9645
|
+
}
|
|
9646
|
+
|
|
9647
|
+
export namespace NewFloatingTieredMatrixWithAllocationPrice {
|
|
9648
|
+
/**
|
|
9649
|
+
* Configuration for tiered_matrix_with_allocation pricing
|
|
9650
|
+
*/
|
|
9651
|
+
export interface TieredMatrixWithAllocationConfig {
|
|
9652
|
+
/**
|
|
9653
|
+
* Usage allocation, pooled across all matrix cells
|
|
9654
|
+
*/
|
|
9655
|
+
allocation: string;
|
|
9656
|
+
|
|
9657
|
+
/**
|
|
9658
|
+
* Per unit rate for usage whose matrix cell has no configured tiers
|
|
9659
|
+
*/
|
|
9660
|
+
default_unit_amount: string;
|
|
9661
|
+
|
|
9662
|
+
/**
|
|
9663
|
+
* One or two event property values to evaluate matrix cells by
|
|
9664
|
+
*/
|
|
9665
|
+
dimensions: Array<string>;
|
|
9666
|
+
|
|
9667
|
+
/**
|
|
9668
|
+
* Graduated tiers keyed by matrix cell; usage in a cell is tiered only against its
|
|
9669
|
+
* own rows
|
|
9670
|
+
*/
|
|
9671
|
+
tiers: Array<TieredMatrixWithAllocationConfig.Tier>;
|
|
9672
|
+
}
|
|
9673
|
+
|
|
9674
|
+
export namespace TieredMatrixWithAllocationConfig {
|
|
9675
|
+
/**
|
|
9676
|
+
* Configuration for a single tier scoped to one matrix cell
|
|
9677
|
+
*/
|
|
9678
|
+
export interface Tier {
|
|
9679
|
+
/**
|
|
9680
|
+
* The matrix cell this tier applies to, as one or two dimension values
|
|
9681
|
+
*/
|
|
9682
|
+
dimension_values: Array<string>;
|
|
9683
|
+
|
|
9684
|
+
/**
|
|
9685
|
+
* Exclusive tier starting value. The tier runs up to and including the next bound
|
|
9686
|
+
* configured for the same matrix cell.
|
|
9687
|
+
*/
|
|
9688
|
+
tier_lower_bound: string;
|
|
9689
|
+
|
|
9690
|
+
/**
|
|
9691
|
+
* Per unit amount
|
|
9692
|
+
*/
|
|
9693
|
+
unit_amount: string;
|
|
9694
|
+
}
|
|
9695
|
+
}
|
|
9696
|
+
}
|
|
9697
|
+
|
|
9219
9698
|
export interface NewFloatingMatrixWithThresholdDiscountsPrice {
|
|
9220
9699
|
/**
|
|
9221
9700
|
* The cadence to bill for this price on.
|
|
@@ -10792,6 +11271,7 @@ export namespace SubscriptionSchedulePlanChangeParams {
|
|
|
10792
11271
|
| SubscriptionsAPI.NewSubscriptionPackageWithAllocationPrice
|
|
10793
11272
|
| SubscriptionsAPI.NewSubscriptionUnitWithPercentPrice
|
|
10794
11273
|
| SubscriptionsAPI.NewSubscriptionMatrixWithAllocationPrice
|
|
11274
|
+
| AddPrice.NewSubscriptionTieredMatrixWithAllocationPrice
|
|
10795
11275
|
| AddPrice.NewSubscriptionMatrixWithThresholdDiscountsPrice
|
|
10796
11276
|
| AddPrice.NewSubscriptionTieredWithProrationPrice
|
|
10797
11277
|
| SubscriptionsAPI.NewSubscriptionUnitWithProrationPrice
|
|
@@ -10814,30 +11294,189 @@ export namespace SubscriptionSchedulePlanChangeParams {
|
|
|
10814
11294
|
| AddPrice.NewSubscriptionEventOutputPrice
|
|
10815
11295
|
| null;
|
|
10816
11296
|
|
|
10817
|
-
/**
|
|
10818
|
-
* The id of the price to add to the subscription.
|
|
10819
|
-
*/
|
|
10820
|
-
price_id?: string | null;
|
|
11297
|
+
/**
|
|
11298
|
+
* The id of the price to add to the subscription.
|
|
11299
|
+
*/
|
|
11300
|
+
price_id?: string | null;
|
|
11301
|
+
|
|
11302
|
+
/**
|
|
11303
|
+
* The start date of the price interval. This is the date that the price will start
|
|
11304
|
+
* billing on the subscription. If null, billing will start when the phase or
|
|
11305
|
+
* subscription starts.
|
|
11306
|
+
*/
|
|
11307
|
+
start_date?: string | null;
|
|
11308
|
+
}
|
|
11309
|
+
|
|
11310
|
+
export namespace AddPrice {
|
|
11311
|
+
export interface NewSubscriptionBulkWithFiltersPrice {
|
|
11312
|
+
/**
|
|
11313
|
+
* Configuration for bulk_with_filters pricing
|
|
11314
|
+
*/
|
|
11315
|
+
bulk_with_filters_config: NewSubscriptionBulkWithFiltersPrice.BulkWithFiltersConfig;
|
|
11316
|
+
|
|
11317
|
+
/**
|
|
11318
|
+
* The cadence to bill for this price on.
|
|
11319
|
+
*/
|
|
11320
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
11321
|
+
|
|
11322
|
+
/**
|
|
11323
|
+
* The id of the item the price will be associated with.
|
|
11324
|
+
*/
|
|
11325
|
+
item_id: string;
|
|
11326
|
+
|
|
11327
|
+
/**
|
|
11328
|
+
* The pricing model type
|
|
11329
|
+
*/
|
|
11330
|
+
model_type: 'bulk_with_filters';
|
|
11331
|
+
|
|
11332
|
+
/**
|
|
11333
|
+
* The name of the price.
|
|
11334
|
+
*/
|
|
11335
|
+
name: string;
|
|
11336
|
+
|
|
11337
|
+
/**
|
|
11338
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
11339
|
+
* usage-based.
|
|
11340
|
+
*/
|
|
11341
|
+
billable_metric_id?: string | null;
|
|
11342
|
+
|
|
11343
|
+
/**
|
|
11344
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
11345
|
+
* this is true, and in-arrears if this is false.
|
|
11346
|
+
*/
|
|
11347
|
+
billed_in_advance?: boolean | null;
|
|
11348
|
+
|
|
11349
|
+
/**
|
|
11350
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
11351
|
+
* months.
|
|
11352
|
+
*/
|
|
11353
|
+
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
11354
|
+
|
|
11355
|
+
/**
|
|
11356
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
11357
|
+
*/
|
|
11358
|
+
conversion_rate?: number | null;
|
|
11359
|
+
|
|
11360
|
+
/**
|
|
11361
|
+
* The configuration for the rate of the price currency to the invoicing currency.
|
|
11362
|
+
*/
|
|
11363
|
+
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
11364
|
+
|
|
11365
|
+
/**
|
|
11366
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
11367
|
+
* price is billed.
|
|
11368
|
+
*/
|
|
11369
|
+
currency?: string | null;
|
|
11370
|
+
|
|
11371
|
+
/**
|
|
11372
|
+
* For dimensional price: specifies a price group and dimension values
|
|
11373
|
+
*/
|
|
11374
|
+
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
|
|
11375
|
+
|
|
11376
|
+
/**
|
|
11377
|
+
* An alias for the price.
|
|
11378
|
+
*/
|
|
11379
|
+
external_price_id?: string | null;
|
|
11380
|
+
|
|
11381
|
+
/**
|
|
11382
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
11383
|
+
* applied.
|
|
11384
|
+
*/
|
|
11385
|
+
fixed_price_quantity?: number | null;
|
|
11386
|
+
|
|
11387
|
+
/**
|
|
11388
|
+
* The property used to group this price on an invoice
|
|
11389
|
+
*/
|
|
11390
|
+
invoice_grouping_key?: string | null;
|
|
11391
|
+
|
|
11392
|
+
/**
|
|
11393
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
11394
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
11395
|
+
*/
|
|
11396
|
+
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
11397
|
+
|
|
11398
|
+
/**
|
|
11399
|
+
* The ID of the license type to associate with this price. On a usage price this
|
|
11400
|
+
* also marks the price as eligible to draw down from that license type's
|
|
11401
|
+
* allocation; a usage price created without it is billed normally. Usage prices
|
|
11402
|
+
* with a license type must use the `unit` model, and only draw down when their
|
|
11403
|
+
* currency matches the allocation's.
|
|
11404
|
+
*/
|
|
11405
|
+
license_type_id?: string | null;
|
|
11406
|
+
|
|
11407
|
+
/**
|
|
11408
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
11409
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
11410
|
+
* by setting `metadata` to `null`.
|
|
11411
|
+
*/
|
|
11412
|
+
metadata?: { [key: string]: string | null } | null;
|
|
11413
|
+
|
|
11414
|
+
/**
|
|
11415
|
+
* A transient ID that can be used to reference this price when adding adjustments
|
|
11416
|
+
* in the same API call.
|
|
11417
|
+
*/
|
|
11418
|
+
reference_id?: string | null;
|
|
11419
|
+
}
|
|
11420
|
+
|
|
11421
|
+
export namespace NewSubscriptionBulkWithFiltersPrice {
|
|
11422
|
+
/**
|
|
11423
|
+
* Configuration for bulk_with_filters pricing
|
|
11424
|
+
*/
|
|
11425
|
+
export interface BulkWithFiltersConfig {
|
|
11426
|
+
/**
|
|
11427
|
+
* Property filters to apply (all must match)
|
|
11428
|
+
*/
|
|
11429
|
+
filters: Array<BulkWithFiltersConfig.Filter>;
|
|
11430
|
+
|
|
11431
|
+
/**
|
|
11432
|
+
* Bulk tiers for rating based on total usage volume
|
|
11433
|
+
*/
|
|
11434
|
+
tiers: Array<BulkWithFiltersConfig.Tier>;
|
|
11435
|
+
}
|
|
11436
|
+
|
|
11437
|
+
export namespace BulkWithFiltersConfig {
|
|
11438
|
+
/**
|
|
11439
|
+
* Configuration for a single property filter
|
|
11440
|
+
*/
|
|
11441
|
+
export interface Filter {
|
|
11442
|
+
/**
|
|
11443
|
+
* Event property key to filter on
|
|
11444
|
+
*/
|
|
11445
|
+
property_key: string;
|
|
11446
|
+
|
|
11447
|
+
/**
|
|
11448
|
+
* Event property value to match
|
|
11449
|
+
*/
|
|
11450
|
+
property_value: string;
|
|
11451
|
+
}
|
|
11452
|
+
|
|
11453
|
+
/**
|
|
11454
|
+
* Configuration for a single bulk pricing tier
|
|
11455
|
+
*/
|
|
11456
|
+
export interface Tier {
|
|
11457
|
+
/**
|
|
11458
|
+
* Amount per unit
|
|
11459
|
+
*/
|
|
11460
|
+
unit_amount: string;
|
|
10821
11461
|
|
|
10822
|
-
|
|
10823
|
-
|
|
10824
|
-
|
|
10825
|
-
|
|
10826
|
-
|
|
10827
|
-
|
|
10828
|
-
|
|
11462
|
+
/**
|
|
11463
|
+
* The lower bound for this tier
|
|
11464
|
+
*/
|
|
11465
|
+
tier_lower_bound?: string | null;
|
|
11466
|
+
}
|
|
11467
|
+
}
|
|
11468
|
+
}
|
|
10829
11469
|
|
|
10830
|
-
|
|
10831
|
-
export interface NewSubscriptionBulkWithFiltersPrice {
|
|
11470
|
+
export interface NewSubscriptionGroupedTieredMatrixPrice {
|
|
10832
11471
|
/**
|
|
10833
|
-
*
|
|
11472
|
+
* The cadence to bill for this price on.
|
|
10834
11473
|
*/
|
|
10835
|
-
|
|
11474
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
10836
11475
|
|
|
10837
11476
|
/**
|
|
10838
|
-
*
|
|
11477
|
+
* Configuration for grouped_tiered_matrix pricing
|
|
10839
11478
|
*/
|
|
10840
|
-
|
|
11479
|
+
grouped_tiered_matrix_config: NewSubscriptionGroupedTieredMatrixPrice.GroupedTieredMatrixConfig;
|
|
10841
11480
|
|
|
10842
11481
|
/**
|
|
10843
11482
|
* The id of the item the price will be associated with.
|
|
@@ -10847,7 +11486,7 @@ export namespace SubscriptionSchedulePlanChangeParams {
|
|
|
10847
11486
|
/**
|
|
10848
11487
|
* The pricing model type
|
|
10849
11488
|
*/
|
|
10850
|
-
model_type: '
|
|
11489
|
+
model_type: 'grouped_tiered_matrix';
|
|
10851
11490
|
|
|
10852
11491
|
/**
|
|
10853
11492
|
* The name of the price.
|
|
@@ -10938,66 +11577,54 @@ export namespace SubscriptionSchedulePlanChangeParams {
|
|
|
10938
11577
|
reference_id?: string | null;
|
|
10939
11578
|
}
|
|
10940
11579
|
|
|
10941
|
-
export namespace
|
|
11580
|
+
export namespace NewSubscriptionGroupedTieredMatrixPrice {
|
|
10942
11581
|
/**
|
|
10943
|
-
* Configuration for
|
|
11582
|
+
* Configuration for grouped_tiered_matrix pricing
|
|
10944
11583
|
*/
|
|
10945
|
-
export interface
|
|
11584
|
+
export interface GroupedTieredMatrixConfig {
|
|
10946
11585
|
/**
|
|
10947
|
-
*
|
|
11586
|
+
* Per unit rate for usage whose dimension value has no configured tiers
|
|
10948
11587
|
*/
|
|
10949
|
-
|
|
11588
|
+
default_unit_amount: string;
|
|
10950
11589
|
|
|
10951
11590
|
/**
|
|
10952
|
-
*
|
|
11591
|
+
* The billable metric property used to group usage before tiering
|
|
10953
11592
|
*/
|
|
10954
|
-
|
|
10955
|
-
}
|
|
11593
|
+
dimension: string;
|
|
10956
11594
|
|
|
10957
|
-
export namespace BulkWithFiltersConfig {
|
|
10958
11595
|
/**
|
|
10959
|
-
*
|
|
11596
|
+
* Graduated tiers keyed by dimension value; usage for a value is tiered only
|
|
11597
|
+
* against its own rows
|
|
10960
11598
|
*/
|
|
10961
|
-
|
|
10962
|
-
|
|
10963
|
-
* Event property key to filter on
|
|
10964
|
-
*/
|
|
10965
|
-
property_key: string;
|
|
10966
|
-
|
|
10967
|
-
/**
|
|
10968
|
-
* Event property value to match
|
|
10969
|
-
*/
|
|
10970
|
-
property_value: string;
|
|
10971
|
-
}
|
|
11599
|
+
tiers: Array<GroupedTieredMatrixConfig.Tier>;
|
|
11600
|
+
}
|
|
10972
11601
|
|
|
11602
|
+
export namespace GroupedTieredMatrixConfig {
|
|
10973
11603
|
/**
|
|
10974
|
-
* Configuration for a single
|
|
11604
|
+
* Configuration for a single tier scoped to a dimension value
|
|
10975
11605
|
*/
|
|
10976
11606
|
export interface Tier {
|
|
10977
11607
|
/**
|
|
10978
|
-
*
|
|
11608
|
+
* The dimension value this tier applies to
|
|
10979
11609
|
*/
|
|
10980
|
-
|
|
11610
|
+
dimension_value: string;
|
|
11611
|
+
|
|
11612
|
+
tier_lower_bound: string;
|
|
10981
11613
|
|
|
10982
11614
|
/**
|
|
10983
|
-
*
|
|
11615
|
+
* Per unit amount
|
|
10984
11616
|
*/
|
|
10985
|
-
|
|
11617
|
+
unit_amount: string;
|
|
10986
11618
|
}
|
|
10987
11619
|
}
|
|
10988
11620
|
}
|
|
10989
11621
|
|
|
10990
|
-
export interface
|
|
11622
|
+
export interface NewSubscriptionTieredMatrixWithAllocationPrice {
|
|
10991
11623
|
/**
|
|
10992
11624
|
* The cadence to bill for this price on.
|
|
10993
11625
|
*/
|
|
10994
11626
|
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
10995
11627
|
|
|
10996
|
-
/**
|
|
10997
|
-
* Configuration for grouped_tiered_matrix pricing
|
|
10998
|
-
*/
|
|
10999
|
-
grouped_tiered_matrix_config: NewSubscriptionGroupedTieredMatrixPrice.GroupedTieredMatrixConfig;
|
|
11000
|
-
|
|
11001
11628
|
/**
|
|
11002
11629
|
* The id of the item the price will be associated with.
|
|
11003
11630
|
*/
|
|
@@ -11006,13 +11633,18 @@ export namespace SubscriptionSchedulePlanChangeParams {
|
|
|
11006
11633
|
/**
|
|
11007
11634
|
* The pricing model type
|
|
11008
11635
|
*/
|
|
11009
|
-
model_type: '
|
|
11636
|
+
model_type: 'tiered_matrix_with_allocation';
|
|
11010
11637
|
|
|
11011
11638
|
/**
|
|
11012
11639
|
* The name of the price.
|
|
11013
11640
|
*/
|
|
11014
11641
|
name: string;
|
|
11015
11642
|
|
|
11643
|
+
/**
|
|
11644
|
+
* Configuration for tiered_matrix_with_allocation pricing
|
|
11645
|
+
*/
|
|
11646
|
+
tiered_matrix_with_allocation_config: NewSubscriptionTieredMatrixWithAllocationPrice.TieredMatrixWithAllocationConfig;
|
|
11647
|
+
|
|
11016
11648
|
/**
|
|
11017
11649
|
* The id of the billable metric for the price. Only needed if the price is
|
|
11018
11650
|
* usage-based.
|
|
@@ -11097,38 +11729,47 @@ export namespace SubscriptionSchedulePlanChangeParams {
|
|
|
11097
11729
|
reference_id?: string | null;
|
|
11098
11730
|
}
|
|
11099
11731
|
|
|
11100
|
-
export namespace
|
|
11732
|
+
export namespace NewSubscriptionTieredMatrixWithAllocationPrice {
|
|
11101
11733
|
/**
|
|
11102
|
-
* Configuration for
|
|
11734
|
+
* Configuration for tiered_matrix_with_allocation pricing
|
|
11103
11735
|
*/
|
|
11104
|
-
export interface
|
|
11736
|
+
export interface TieredMatrixWithAllocationConfig {
|
|
11105
11737
|
/**
|
|
11106
|
-
*
|
|
11738
|
+
* Usage allocation, pooled across all matrix cells
|
|
11739
|
+
*/
|
|
11740
|
+
allocation: string;
|
|
11741
|
+
|
|
11742
|
+
/**
|
|
11743
|
+
* Per unit rate for usage whose matrix cell has no configured tiers
|
|
11107
11744
|
*/
|
|
11108
11745
|
default_unit_amount: string;
|
|
11109
11746
|
|
|
11110
11747
|
/**
|
|
11111
|
-
*
|
|
11748
|
+
* One or two event property values to evaluate matrix cells by
|
|
11112
11749
|
*/
|
|
11113
|
-
|
|
11750
|
+
dimensions: Array<string>;
|
|
11114
11751
|
|
|
11115
11752
|
/**
|
|
11116
|
-
* Graduated tiers keyed by
|
|
11117
|
-
*
|
|
11753
|
+
* Graduated tiers keyed by matrix cell; usage in a cell is tiered only against its
|
|
11754
|
+
* own rows
|
|
11118
11755
|
*/
|
|
11119
|
-
tiers: Array<
|
|
11756
|
+
tiers: Array<TieredMatrixWithAllocationConfig.Tier>;
|
|
11120
11757
|
}
|
|
11121
11758
|
|
|
11122
|
-
export namespace
|
|
11759
|
+
export namespace TieredMatrixWithAllocationConfig {
|
|
11123
11760
|
/**
|
|
11124
|
-
* Configuration for a single tier scoped to
|
|
11761
|
+
* Configuration for a single tier scoped to one matrix cell
|
|
11125
11762
|
*/
|
|
11126
11763
|
export interface Tier {
|
|
11127
11764
|
/**
|
|
11128
|
-
* The
|
|
11765
|
+
* The matrix cell this tier applies to, as one or two dimension values
|
|
11129
11766
|
*/
|
|
11130
|
-
|
|
11767
|
+
dimension_values: Array<string>;
|
|
11131
11768
|
|
|
11769
|
+
/**
|
|
11770
|
+
* Exclusive tier starting value. The tier runs up to and including the next bound
|
|
11771
|
+
* configured for the same matrix cell.
|
|
11772
|
+
*/
|
|
11132
11773
|
tier_lower_bound: string;
|
|
11133
11774
|
|
|
11134
11775
|
/**
|
|
@@ -12497,6 +13138,7 @@ export namespace SubscriptionSchedulePlanChangeParams {
|
|
|
12497
13138
|
| SubscriptionsAPI.NewSubscriptionPackageWithAllocationPrice
|
|
12498
13139
|
| SubscriptionsAPI.NewSubscriptionUnitWithPercentPrice
|
|
12499
13140
|
| SubscriptionsAPI.NewSubscriptionMatrixWithAllocationPrice
|
|
13141
|
+
| ReplacePrice.NewSubscriptionTieredMatrixWithAllocationPrice
|
|
12500
13142
|
| ReplacePrice.NewSubscriptionMatrixWithThresholdDiscountsPrice
|
|
12501
13143
|
| ReplacePrice.NewSubscriptionTieredWithProrationPrice
|
|
12502
13144
|
| SubscriptionsAPI.NewSubscriptionUnitWithProrationPrice
|
|
@@ -12837,6 +13479,167 @@ export namespace SubscriptionSchedulePlanChangeParams {
|
|
|
12837
13479
|
}
|
|
12838
13480
|
}
|
|
12839
13481
|
|
|
13482
|
+
export interface NewSubscriptionTieredMatrixWithAllocationPrice {
|
|
13483
|
+
/**
|
|
13484
|
+
* The cadence to bill for this price on.
|
|
13485
|
+
*/
|
|
13486
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
13487
|
+
|
|
13488
|
+
/**
|
|
13489
|
+
* The id of the item the price will be associated with.
|
|
13490
|
+
*/
|
|
13491
|
+
item_id: string;
|
|
13492
|
+
|
|
13493
|
+
/**
|
|
13494
|
+
* The pricing model type
|
|
13495
|
+
*/
|
|
13496
|
+
model_type: 'tiered_matrix_with_allocation';
|
|
13497
|
+
|
|
13498
|
+
/**
|
|
13499
|
+
* The name of the price.
|
|
13500
|
+
*/
|
|
13501
|
+
name: string;
|
|
13502
|
+
|
|
13503
|
+
/**
|
|
13504
|
+
* Configuration for tiered_matrix_with_allocation pricing
|
|
13505
|
+
*/
|
|
13506
|
+
tiered_matrix_with_allocation_config: NewSubscriptionTieredMatrixWithAllocationPrice.TieredMatrixWithAllocationConfig;
|
|
13507
|
+
|
|
13508
|
+
/**
|
|
13509
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
13510
|
+
* usage-based.
|
|
13511
|
+
*/
|
|
13512
|
+
billable_metric_id?: string | null;
|
|
13513
|
+
|
|
13514
|
+
/**
|
|
13515
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
13516
|
+
* this is true, and in-arrears if this is false.
|
|
13517
|
+
*/
|
|
13518
|
+
billed_in_advance?: boolean | null;
|
|
13519
|
+
|
|
13520
|
+
/**
|
|
13521
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
13522
|
+
* months.
|
|
13523
|
+
*/
|
|
13524
|
+
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
13525
|
+
|
|
13526
|
+
/**
|
|
13527
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
13528
|
+
*/
|
|
13529
|
+
conversion_rate?: number | null;
|
|
13530
|
+
|
|
13531
|
+
/**
|
|
13532
|
+
* The configuration for the rate of the price currency to the invoicing currency.
|
|
13533
|
+
*/
|
|
13534
|
+
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
13535
|
+
|
|
13536
|
+
/**
|
|
13537
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
13538
|
+
* price is billed.
|
|
13539
|
+
*/
|
|
13540
|
+
currency?: string | null;
|
|
13541
|
+
|
|
13542
|
+
/**
|
|
13543
|
+
* For dimensional price: specifies a price group and dimension values
|
|
13544
|
+
*/
|
|
13545
|
+
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
|
|
13546
|
+
|
|
13547
|
+
/**
|
|
13548
|
+
* An alias for the price.
|
|
13549
|
+
*/
|
|
13550
|
+
external_price_id?: string | null;
|
|
13551
|
+
|
|
13552
|
+
/**
|
|
13553
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
13554
|
+
* applied.
|
|
13555
|
+
*/
|
|
13556
|
+
fixed_price_quantity?: number | null;
|
|
13557
|
+
|
|
13558
|
+
/**
|
|
13559
|
+
* The property used to group this price on an invoice
|
|
13560
|
+
*/
|
|
13561
|
+
invoice_grouping_key?: string | null;
|
|
13562
|
+
|
|
13563
|
+
/**
|
|
13564
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
13565
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
13566
|
+
*/
|
|
13567
|
+
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
13568
|
+
|
|
13569
|
+
/**
|
|
13570
|
+
* The ID of the license type to associate with this price. On a usage price this
|
|
13571
|
+
* also marks the price as eligible to draw down from that license type's
|
|
13572
|
+
* allocation; a usage price created without it is billed normally. Usage prices
|
|
13573
|
+
* with a license type must use the `unit` model, and only draw down when their
|
|
13574
|
+
* currency matches the allocation's.
|
|
13575
|
+
*/
|
|
13576
|
+
license_type_id?: string | null;
|
|
13577
|
+
|
|
13578
|
+
/**
|
|
13579
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
13580
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
13581
|
+
* by setting `metadata` to `null`.
|
|
13582
|
+
*/
|
|
13583
|
+
metadata?: { [key: string]: string | null } | null;
|
|
13584
|
+
|
|
13585
|
+
/**
|
|
13586
|
+
* A transient ID that can be used to reference this price when adding adjustments
|
|
13587
|
+
* in the same API call.
|
|
13588
|
+
*/
|
|
13589
|
+
reference_id?: string | null;
|
|
13590
|
+
}
|
|
13591
|
+
|
|
13592
|
+
export namespace NewSubscriptionTieredMatrixWithAllocationPrice {
|
|
13593
|
+
/**
|
|
13594
|
+
* Configuration for tiered_matrix_with_allocation pricing
|
|
13595
|
+
*/
|
|
13596
|
+
export interface TieredMatrixWithAllocationConfig {
|
|
13597
|
+
/**
|
|
13598
|
+
* Usage allocation, pooled across all matrix cells
|
|
13599
|
+
*/
|
|
13600
|
+
allocation: string;
|
|
13601
|
+
|
|
13602
|
+
/**
|
|
13603
|
+
* Per unit rate for usage whose matrix cell has no configured tiers
|
|
13604
|
+
*/
|
|
13605
|
+
default_unit_amount: string;
|
|
13606
|
+
|
|
13607
|
+
/**
|
|
13608
|
+
* One or two event property values to evaluate matrix cells by
|
|
13609
|
+
*/
|
|
13610
|
+
dimensions: Array<string>;
|
|
13611
|
+
|
|
13612
|
+
/**
|
|
13613
|
+
* Graduated tiers keyed by matrix cell; usage in a cell is tiered only against its
|
|
13614
|
+
* own rows
|
|
13615
|
+
*/
|
|
13616
|
+
tiers: Array<TieredMatrixWithAllocationConfig.Tier>;
|
|
13617
|
+
}
|
|
13618
|
+
|
|
13619
|
+
export namespace TieredMatrixWithAllocationConfig {
|
|
13620
|
+
/**
|
|
13621
|
+
* Configuration for a single tier scoped to one matrix cell
|
|
13622
|
+
*/
|
|
13623
|
+
export interface Tier {
|
|
13624
|
+
/**
|
|
13625
|
+
* The matrix cell this tier applies to, as one or two dimension values
|
|
13626
|
+
*/
|
|
13627
|
+
dimension_values: Array<string>;
|
|
13628
|
+
|
|
13629
|
+
/**
|
|
13630
|
+
* Exclusive tier starting value. The tier runs up to and including the next bound
|
|
13631
|
+
* configured for the same matrix cell.
|
|
13632
|
+
*/
|
|
13633
|
+
tier_lower_bound: string;
|
|
13634
|
+
|
|
13635
|
+
/**
|
|
13636
|
+
* Per unit amount
|
|
13637
|
+
*/
|
|
13638
|
+
unit_amount: string;
|
|
13639
|
+
}
|
|
13640
|
+
}
|
|
13641
|
+
}
|
|
13642
|
+
|
|
12840
13643
|
export interface NewSubscriptionMatrixWithThresholdDiscountsPrice {
|
|
12841
13644
|
/**
|
|
12842
13645
|
* The cadence to bill for this price on.
|