orb-billing 6.9.0 → 6.11.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.
Files changed (51) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/package.json +1 -1
  3. package/resources/beta/beta.d.mts +252 -2
  4. package/resources/beta/beta.d.mts.map +1 -1
  5. package/resources/beta/beta.d.ts +252 -2
  6. package/resources/beta/beta.d.ts.map +1 -1
  7. package/resources/beta/beta.js.map +1 -1
  8. package/resources/beta/beta.mjs.map +1 -1
  9. package/resources/beta/external-plan-id.d.mts +252 -2
  10. package/resources/beta/external-plan-id.d.mts.map +1 -1
  11. package/resources/beta/external-plan-id.d.ts +252 -2
  12. package/resources/beta/external-plan-id.d.ts.map +1 -1
  13. package/resources/plans/plans.d.mts +126 -1
  14. package/resources/plans/plans.d.mts.map +1 -1
  15. package/resources/plans/plans.d.ts +126 -1
  16. package/resources/plans/plans.d.ts.map +1 -1
  17. package/resources/plans/plans.js.map +1 -1
  18. package/resources/plans/plans.mjs.map +1 -1
  19. package/resources/prices/prices.d.mts +360 -3
  20. package/resources/prices/prices.d.mts.map +1 -1
  21. package/resources/prices/prices.d.ts +360 -3
  22. package/resources/prices/prices.d.ts.map +1 -1
  23. package/resources/prices/prices.js.map +1 -1
  24. package/resources/prices/prices.mjs.map +1 -1
  25. package/resources/shared.d.mts +145 -1
  26. package/resources/shared.d.mts.map +1 -1
  27. package/resources/shared.d.ts +145 -1
  28. package/resources/shared.d.ts.map +1 -1
  29. package/resources/subscriptions.d.mts +695 -43
  30. package/resources/subscriptions.d.mts.map +1 -1
  31. package/resources/subscriptions.d.ts +695 -43
  32. package/resources/subscriptions.d.ts.map +1 -1
  33. package/resources/subscriptions.js +39 -6
  34. package/resources/subscriptions.js.map +1 -1
  35. package/resources/subscriptions.mjs +39 -6
  36. package/resources/subscriptions.mjs.map +1 -1
  37. package/src/resources/beta/beta.ts +298 -0
  38. package/src/resources/beta/external-plan-id.ts +298 -0
  39. package/src/resources/plans/plans.ts +149 -0
  40. package/src/resources/prices/prices.ts +426 -0
  41. package/src/resources/shared.ts +185 -0
  42. package/src/resources/subscriptions.ts +890 -119
  43. package/src/version.ts +1 -1
  44. package/version.d.mts +1 -1
  45. package/version.d.mts.map +1 -1
  46. package/version.d.ts +1 -1
  47. package/version.d.ts.map +1 -1
  48. package/version.js +1 -1
  49. package/version.js.map +1 -1
  50. package/version.mjs +1 -1
  51. package/version.mjs.map +1 -1
@@ -846,6 +846,17 @@ export class Subscriptions extends APIResource {
846
846
  * Note that one of `plan_id` or `external_plan_id` is required in the request body
847
847
  * for this operation.
848
848
  *
849
+ * ## Interaction with scheduled cancellations
850
+ *
851
+ * Scheduling a plan change also unschedules a pending cancellation, as long as the
852
+ * cancellation date is on or after the plan change date: Orb honors the plan
853
+ * change over the scheduled cancellation, and the subscription continues on the
854
+ * new plan. Scheduling a plan change after the subscription's end date returns a
855
+ * validation error instead.
856
+ *
857
+ * Any plan changes already scheduled at or after the new plan change's date are
858
+ * unscheduled and replaced by it.
859
+ *
849
860
  * ## Customize your customer's subscriptions
850
861
  *
851
862
  * Prices and adjustments in a plan can be added, removed, or replaced on the
@@ -1040,11 +1051,19 @@ export class Subscriptions extends APIResource {
1040
1051
  * cancellation. This operation will turn on auto-renew, ensuring that the
1041
1052
  * subscription does not end at the currently scheduled cancellation time.
1042
1053
  *
1043
- * Note: uncancellation is a lossy operation. Price intervals that were cut short
1044
- * by the cancellation are extended to infinity (original end dates are lost), and
1045
- * future intervals or phases scheduled after the cancellation time are permanently
1046
- * deleted. For complex subscriptions with phases or scheduled plan changes,
1047
- * consider creating a new plan change instead of uncancelling.
1054
+ * A cancellation that has already taken effect cannot be unscheduled. This
1055
+ * includes backdated cancellations: once the subscription's end date is in the
1056
+ * past, this endpoint returns a validation error.
1057
+ *
1058
+ * Note: uncancellation is a lossy operation. Price and adjustment intervals that
1059
+ * were cut short by the cancellation are extended to infinity (original end dates
1060
+ * are lost), and future intervals or phases scheduled after the cancellation time
1061
+ * are permanently deleted. For complex subscriptions with phases or scheduled plan
1062
+ * changes, consider creating a new plan change instead of uncancelling.
1063
+ *
1064
+ * If the scheduled cancellation already produced invoices or credit notes (for
1065
+ * example, a proration refund credit note for an in-advance fee), uncancelling
1066
+ * voids and reissues them as needed to match the subscription's new state.
1048
1067
  *
1049
1068
  * @example
1050
1069
  * ```ts
@@ -1090,7 +1109,21 @@ export class Subscriptions extends APIResource {
1090
1109
 
1091
1110
  /**
1092
1111
  * This endpoint can be used to unschedule any pending plan changes on an existing
1093
- * subscription. When called, all upcoming plan changes will be unscheduled.
1112
+ * subscription. When called, all upcoming plan changes will be unscheduled; it is
1113
+ * not possible to unschedule a single plan change if multiple are scheduled.
1114
+ *
1115
+ * Note: unscheduling a plan change is a lossy operation, with the same semantics
1116
+ * as
1117
+ * [unscheduling a cancellation](/api-reference/subscription/unschedule-subscription-cancellation).
1118
+ * Prices and adjustments on the current plan that were scheduled to end at the
1119
+ * plan change time are extended to infinity (original end dates are lost), and
1120
+ * anything scheduled to start after the plan change time is permanently deleted.
1121
+ * Coupons redeemed as part of an unscheduled plan change are released and can be
1122
+ * redeemed again.
1123
+ *
1124
+ * A scheduled cancellation is not affected by this operation: if the subscription
1125
+ * has both a pending plan change and a scheduled cancellation, unscheduling the
1126
+ * plan change leaves the cancellation in place.
1094
1127
  *
1095
1128
  * @example
1096
1129
  * ```ts
@@ -5188,6 +5221,7 @@ export namespace SubscriptionCreateParams {
5188
5221
  | SubscriptionsAPI.NewSubscriptionTieredPackagePrice
5189
5222
  | SubscriptionsAPI.NewSubscriptionTieredWithMinimumPrice
5190
5223
  | SubscriptionsAPI.NewSubscriptionGroupedTieredPrice
5224
+ | AddPrice.NewSubscriptionGroupedTieredMatrixPrice
5191
5225
  | SubscriptionsAPI.NewSubscriptionTieredPackageWithMinimumPrice
5192
5226
  | SubscriptionsAPI.NewSubscriptionPackageWithAllocationPrice
5193
5227
  | SubscriptionsAPI.NewSubscriptionUnitWithPercentPrice
@@ -5383,6 +5417,154 @@ export namespace SubscriptionCreateParams {
5383
5417
  }
5384
5418
  }
5385
5419
 
5420
+ export interface NewSubscriptionGroupedTieredMatrixPrice {
5421
+ /**
5422
+ * The cadence to bill for this price on.
5423
+ */
5424
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
5425
+
5426
+ /**
5427
+ * Configuration for grouped_tiered_matrix pricing
5428
+ */
5429
+ grouped_tiered_matrix_config: NewSubscriptionGroupedTieredMatrixPrice.GroupedTieredMatrixConfig;
5430
+
5431
+ /**
5432
+ * The id of the item the price will be associated with.
5433
+ */
5434
+ item_id: string;
5435
+
5436
+ /**
5437
+ * The pricing model type
5438
+ */
5439
+ model_type: 'grouped_tiered_matrix';
5440
+
5441
+ /**
5442
+ * The name of the price.
5443
+ */
5444
+ name: string;
5445
+
5446
+ /**
5447
+ * The id of the billable metric for the price. Only needed if the price is
5448
+ * usage-based.
5449
+ */
5450
+ billable_metric_id?: string | null;
5451
+
5452
+ /**
5453
+ * If the Price represents a fixed cost, the price will be billed in-advance if
5454
+ * this is true, and in-arrears if this is false.
5455
+ */
5456
+ billed_in_advance?: boolean | null;
5457
+
5458
+ /**
5459
+ * For custom cadence: specifies the duration of the billing period in days or
5460
+ * months.
5461
+ */
5462
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
5463
+
5464
+ /**
5465
+ * The per unit conversion rate of the price currency to the invoicing currency.
5466
+ */
5467
+ conversion_rate?: number | null;
5468
+
5469
+ /**
5470
+ * The configuration for the rate of the price currency to the invoicing currency.
5471
+ */
5472
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
5473
+
5474
+ /**
5475
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
5476
+ * price is billed.
5477
+ */
5478
+ currency?: string | null;
5479
+
5480
+ /**
5481
+ * For dimensional price: specifies a price group and dimension values
5482
+ */
5483
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
5484
+
5485
+ /**
5486
+ * An alias for the price.
5487
+ */
5488
+ external_price_id?: string | null;
5489
+
5490
+ /**
5491
+ * If the Price represents a fixed cost, this represents the quantity of units
5492
+ * applied.
5493
+ */
5494
+ fixed_price_quantity?: number | null;
5495
+
5496
+ /**
5497
+ * The property used to group this price on an invoice
5498
+ */
5499
+ invoice_grouping_key?: string | null;
5500
+
5501
+ /**
5502
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
5503
+ * If unspecified, a single invoice is produced per billing cycle.
5504
+ */
5505
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
5506
+
5507
+ /**
5508
+ * The ID of the license type to associate with this price.
5509
+ */
5510
+ license_type_id?: string | null;
5511
+
5512
+ /**
5513
+ * User-specified key/value pairs for the resource. Individual keys can be removed
5514
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
5515
+ * by setting `metadata` to `null`.
5516
+ */
5517
+ metadata?: { [key: string]: string | null } | null;
5518
+
5519
+ /**
5520
+ * A transient ID that can be used to reference this price when adding adjustments
5521
+ * in the same API call.
5522
+ */
5523
+ reference_id?: string | null;
5524
+ }
5525
+
5526
+ export namespace NewSubscriptionGroupedTieredMatrixPrice {
5527
+ /**
5528
+ * Configuration for grouped_tiered_matrix pricing
5529
+ */
5530
+ export interface GroupedTieredMatrixConfig {
5531
+ /**
5532
+ * Per unit rate for usage whose dimension value has no configured tiers
5533
+ */
5534
+ default_unit_amount: string;
5535
+
5536
+ /**
5537
+ * The billable metric property used to group usage before tiering
5538
+ */
5539
+ dimension: string;
5540
+
5541
+ /**
5542
+ * Graduated tiers keyed by dimension value; usage for a value is tiered only
5543
+ * against its own rows
5544
+ */
5545
+ tiers: Array<GroupedTieredMatrixConfig.Tier>;
5546
+ }
5547
+
5548
+ export namespace GroupedTieredMatrixConfig {
5549
+ /**
5550
+ * Configuration for a single tier scoped to a dimension value
5551
+ */
5552
+ export interface Tier {
5553
+ /**
5554
+ * The dimension value this tier applies to
5555
+ */
5556
+ dimension_value: string;
5557
+
5558
+ tier_lower_bound: string;
5559
+
5560
+ /**
5561
+ * Per unit amount
5562
+ */
5563
+ unit_amount: string;
5564
+ }
5565
+ }
5566
+ }
5567
+
5386
5568
  export interface NewSubscriptionMatrixWithThresholdDiscountsPrice {
5387
5569
  /**
5388
5570
  * The cadence to bill for this price on.
@@ -6704,6 +6886,7 @@ export namespace SubscriptionCreateParams {
6704
6886
  | SubscriptionsAPI.NewSubscriptionTieredPackagePrice
6705
6887
  | SubscriptionsAPI.NewSubscriptionTieredWithMinimumPrice
6706
6888
  | SubscriptionsAPI.NewSubscriptionGroupedTieredPrice
6889
+ | ReplacePrice.NewSubscriptionGroupedTieredMatrixPrice
6707
6890
  | SubscriptionsAPI.NewSubscriptionTieredPackageWithMinimumPrice
6708
6891
  | SubscriptionsAPI.NewSubscriptionPackageWithAllocationPrice
6709
6892
  | SubscriptionsAPI.NewSubscriptionUnitWithPercentPrice
@@ -6892,26 +7075,26 @@ export namespace SubscriptionCreateParams {
6892
7075
  }
6893
7076
  }
6894
7077
 
6895
- export interface NewSubscriptionMatrixWithThresholdDiscountsPrice {
7078
+ export interface NewSubscriptionGroupedTieredMatrixPrice {
6896
7079
  /**
6897
7080
  * The cadence to bill for this price on.
6898
7081
  */
6899
7082
  cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
6900
7083
 
6901
7084
  /**
6902
- * The id of the item the price will be associated with.
7085
+ * Configuration for grouped_tiered_matrix pricing
6903
7086
  */
6904
- item_id: string;
7087
+ grouped_tiered_matrix_config: NewSubscriptionGroupedTieredMatrixPrice.GroupedTieredMatrixConfig;
6905
7088
 
6906
7089
  /**
6907
- * Configuration for matrix_with_threshold_discounts pricing
7090
+ * The id of the item the price will be associated with.
6908
7091
  */
6909
- matrix_with_threshold_discounts_config: NewSubscriptionMatrixWithThresholdDiscountsPrice.MatrixWithThresholdDiscountsConfig;
7092
+ item_id: string;
6910
7093
 
6911
7094
  /**
6912
7095
  * The pricing model type
6913
7096
  */
6914
- model_type: 'matrix_with_threshold_discounts';
7097
+ model_type: 'grouped_tiered_matrix';
6915
7098
 
6916
7099
  /**
6917
7100
  * The name of the price.
@@ -6998,70 +7181,49 @@ export namespace SubscriptionCreateParams {
6998
7181
  reference_id?: string | null;
6999
7182
  }
7000
7183
 
7001
- export namespace NewSubscriptionMatrixWithThresholdDiscountsPrice {
7184
+ export namespace NewSubscriptionGroupedTieredMatrixPrice {
7002
7185
  /**
7003
- * Configuration for matrix_with_threshold_discounts pricing
7186
+ * Configuration for grouped_tiered_matrix pricing
7004
7187
  */
7005
- export interface MatrixWithThresholdDiscountsConfig {
7188
+ export interface GroupedTieredMatrixConfig {
7006
7189
  /**
7007
- * Unit price used for usage that does not match any defined matrix cell.
7190
+ * Per unit rate for usage whose dimension value has no configured tiers
7008
7191
  */
7009
7192
  default_unit_amount: string;
7010
7193
 
7011
7194
  /**
7012
- * First matrix dimension key.
7195
+ * The billable metric property used to group usage before tiering
7013
7196
  */
7014
- first_dimension: string;
7197
+ dimension: string;
7015
7198
 
7016
7199
  /**
7017
- * Per-cell unit prices.
7200
+ * Graduated tiers keyed by dimension value; usage for a value is tiered only
7201
+ * against its own rows
7018
7202
  */
7019
- matrix_values: Array<MatrixWithThresholdDiscountsConfig.MatrixValue>;
7203
+ tiers: Array<GroupedTieredMatrixConfig.Tier>;
7204
+ }
7020
7205
 
7206
+ export namespace GroupedTieredMatrixConfig {
7021
7207
  /**
7022
- * Optional second matrix dimension key.
7208
+ * Configuration for a single tier scoped to a dimension value
7023
7209
  */
7024
- second_dimension?: string | null;
7025
-
7026
- threshold_discount_groups?: Array<MatrixWithThresholdDiscountsConfig.ThresholdDiscountGroup>;
7027
- }
7028
-
7029
- export namespace MatrixWithThresholdDiscountsConfig {
7030
- export interface MatrixValue {
7031
- first_dimension_value: string;
7032
-
7033
- unit_amount: string;
7034
-
7035
- second_dimension_value?: string | null;
7036
- }
7037
-
7038
- export interface ThresholdDiscountGroup {
7210
+ export interface Tier {
7039
7211
  /**
7040
- * Discount rate applied to spend above the threshold.
7212
+ * The dimension value this tier applies to
7041
7213
  */
7042
- above_threshold_discount_percentage: string;
7214
+ dimension_value: string;
7043
7215
 
7044
- /**
7045
- * Discount rate applied to spend at or below the threshold. Set to 0 for no
7046
- * baseline discount.
7047
- */
7048
- below_threshold_discount_percentage: string;
7216
+ tier_lower_bound: string;
7049
7217
 
7050
7218
  /**
7051
- * Semicolon-separated list of matrix cell coordinates targeted by this group. Each
7052
- * coordinate is `first,second` when the matrix has two dimensions, or just `first`
7053
- * for a single-dimension matrix. Example: `blue,circle;green,triangle`.
7219
+ * Per unit amount
7054
7220
  */
7055
- cell_coordinates: string;
7056
-
7057
- threshold_amount: string;
7058
-
7059
- description?: string | null;
7221
+ unit_amount: string;
7060
7222
  }
7061
7223
  }
7062
7224
  }
7063
7225
 
7064
- export interface NewSubscriptionTieredWithProrationPrice {
7226
+ export interface NewSubscriptionMatrixWithThresholdDiscountsPrice {
7065
7227
  /**
7066
7228
  * The cadence to bill for this price on.
7067
7229
  */
@@ -7073,19 +7235,19 @@ export namespace SubscriptionCreateParams {
7073
7235
  item_id: string;
7074
7236
 
7075
7237
  /**
7076
- * The pricing model type
7238
+ * Configuration for matrix_with_threshold_discounts pricing
7077
7239
  */
7078
- model_type: 'tiered_with_proration';
7240
+ matrix_with_threshold_discounts_config: NewSubscriptionMatrixWithThresholdDiscountsPrice.MatrixWithThresholdDiscountsConfig;
7079
7241
 
7080
7242
  /**
7081
- * The name of the price.
7243
+ * The pricing model type
7082
7244
  */
7083
- name: string;
7245
+ model_type: 'matrix_with_threshold_discounts';
7084
7246
 
7085
7247
  /**
7086
- * Configuration for tiered_with_proration pricing
7248
+ * The name of the price.
7087
7249
  */
7088
- tiered_with_proration_config: NewSubscriptionTieredWithProrationPrice.TieredWithProrationConfig;
7250
+ name: string;
7089
7251
 
7090
7252
  /**
7091
7253
  * The id of the billable metric for the price. Only needed if the price is
@@ -7167,39 +7329,208 @@ export namespace SubscriptionCreateParams {
7167
7329
  reference_id?: string | null;
7168
7330
  }
7169
7331
 
7170
- export namespace NewSubscriptionTieredWithProrationPrice {
7332
+ export namespace NewSubscriptionMatrixWithThresholdDiscountsPrice {
7171
7333
  /**
7172
- * Configuration for tiered_with_proration pricing
7334
+ * Configuration for matrix_with_threshold_discounts pricing
7173
7335
  */
7174
- export interface TieredWithProrationConfig {
7336
+ export interface MatrixWithThresholdDiscountsConfig {
7175
7337
  /**
7176
- * Tiers for rating based on total usage quantities into the specified tier with
7177
- * proration
7338
+ * Unit price used for usage that does not match any defined matrix cell.
7178
7339
  */
7179
- tiers: Array<TieredWithProrationConfig.Tier>;
7180
- }
7340
+ default_unit_amount: string;
7181
7341
 
7182
- export namespace TieredWithProrationConfig {
7183
7342
  /**
7184
- * Configuration for a single tiered with proration tier
7343
+ * First matrix dimension key.
7185
7344
  */
7186
- export interface Tier {
7345
+ first_dimension: string;
7346
+
7347
+ /**
7348
+ * Per-cell unit prices.
7349
+ */
7350
+ matrix_values: Array<MatrixWithThresholdDiscountsConfig.MatrixValue>;
7351
+
7352
+ /**
7353
+ * Optional second matrix dimension key.
7354
+ */
7355
+ second_dimension?: string | null;
7356
+
7357
+ threshold_discount_groups?: Array<MatrixWithThresholdDiscountsConfig.ThresholdDiscountGroup>;
7358
+ }
7359
+
7360
+ export namespace MatrixWithThresholdDiscountsConfig {
7361
+ export interface MatrixValue {
7362
+ first_dimension_value: string;
7363
+
7364
+ unit_amount: string;
7365
+
7366
+ second_dimension_value?: string | null;
7367
+ }
7368
+
7369
+ export interface ThresholdDiscountGroup {
7187
7370
  /**
7188
- * Inclusive tier starting value
7371
+ * Discount rate applied to spend above the threshold.
7189
7372
  */
7190
- tier_lower_bound: string;
7373
+ above_threshold_discount_percentage: string;
7191
7374
 
7192
7375
  /**
7193
- * Amount per unit
7376
+ * Discount rate applied to spend at or below the threshold. Set to 0 for no
7377
+ * baseline discount.
7194
7378
  */
7195
- unit_amount: string;
7196
- }
7197
- }
7198
- }
7379
+ below_threshold_discount_percentage: string;
7199
7380
 
7200
- export interface NewSubscriptionGroupedWithMinMaxThresholdsPrice {
7201
- /**
7202
- * The cadence to bill for this price on.
7381
+ /**
7382
+ * Semicolon-separated list of matrix cell coordinates targeted by this group. Each
7383
+ * coordinate is `first,second` when the matrix has two dimensions, or just `first`
7384
+ * for a single-dimension matrix. Example: `blue,circle;green,triangle`.
7385
+ */
7386
+ cell_coordinates: string;
7387
+
7388
+ threshold_amount: string;
7389
+
7390
+ description?: string | null;
7391
+ }
7392
+ }
7393
+ }
7394
+
7395
+ export interface NewSubscriptionTieredWithProrationPrice {
7396
+ /**
7397
+ * The cadence to bill for this price on.
7398
+ */
7399
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
7400
+
7401
+ /**
7402
+ * The id of the item the price will be associated with.
7403
+ */
7404
+ item_id: string;
7405
+
7406
+ /**
7407
+ * The pricing model type
7408
+ */
7409
+ model_type: 'tiered_with_proration';
7410
+
7411
+ /**
7412
+ * The name of the price.
7413
+ */
7414
+ name: string;
7415
+
7416
+ /**
7417
+ * Configuration for tiered_with_proration pricing
7418
+ */
7419
+ tiered_with_proration_config: NewSubscriptionTieredWithProrationPrice.TieredWithProrationConfig;
7420
+
7421
+ /**
7422
+ * The id of the billable metric for the price. Only needed if the price is
7423
+ * usage-based.
7424
+ */
7425
+ billable_metric_id?: string | null;
7426
+
7427
+ /**
7428
+ * If the Price represents a fixed cost, the price will be billed in-advance if
7429
+ * this is true, and in-arrears if this is false.
7430
+ */
7431
+ billed_in_advance?: boolean | null;
7432
+
7433
+ /**
7434
+ * For custom cadence: specifies the duration of the billing period in days or
7435
+ * months.
7436
+ */
7437
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
7438
+
7439
+ /**
7440
+ * The per unit conversion rate of the price currency to the invoicing currency.
7441
+ */
7442
+ conversion_rate?: number | null;
7443
+
7444
+ /**
7445
+ * The configuration for the rate of the price currency to the invoicing currency.
7446
+ */
7447
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
7448
+
7449
+ /**
7450
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
7451
+ * price is billed.
7452
+ */
7453
+ currency?: string | null;
7454
+
7455
+ /**
7456
+ * For dimensional price: specifies a price group and dimension values
7457
+ */
7458
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
7459
+
7460
+ /**
7461
+ * An alias for the price.
7462
+ */
7463
+ external_price_id?: string | null;
7464
+
7465
+ /**
7466
+ * If the Price represents a fixed cost, this represents the quantity of units
7467
+ * applied.
7468
+ */
7469
+ fixed_price_quantity?: number | null;
7470
+
7471
+ /**
7472
+ * The property used to group this price on an invoice
7473
+ */
7474
+ invoice_grouping_key?: string | null;
7475
+
7476
+ /**
7477
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
7478
+ * If unspecified, a single invoice is produced per billing cycle.
7479
+ */
7480
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
7481
+
7482
+ /**
7483
+ * The ID of the license type to associate with this price.
7484
+ */
7485
+ license_type_id?: string | null;
7486
+
7487
+ /**
7488
+ * User-specified key/value pairs for the resource. Individual keys can be removed
7489
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
7490
+ * by setting `metadata` to `null`.
7491
+ */
7492
+ metadata?: { [key: string]: string | null } | null;
7493
+
7494
+ /**
7495
+ * A transient ID that can be used to reference this price when adding adjustments
7496
+ * in the same API call.
7497
+ */
7498
+ reference_id?: string | null;
7499
+ }
7500
+
7501
+ export namespace NewSubscriptionTieredWithProrationPrice {
7502
+ /**
7503
+ * Configuration for tiered_with_proration pricing
7504
+ */
7505
+ export interface TieredWithProrationConfig {
7506
+ /**
7507
+ * Tiers for rating based on total usage quantities into the specified tier with
7508
+ * proration
7509
+ */
7510
+ tiers: Array<TieredWithProrationConfig.Tier>;
7511
+ }
7512
+
7513
+ export namespace TieredWithProrationConfig {
7514
+ /**
7515
+ * Configuration for a single tiered with proration tier
7516
+ */
7517
+ export interface Tier {
7518
+ /**
7519
+ * Inclusive tier starting value
7520
+ */
7521
+ tier_lower_bound: string;
7522
+
7523
+ /**
7524
+ * Amount per unit
7525
+ */
7526
+ unit_amount: string;
7527
+ }
7528
+ }
7529
+ }
7530
+
7531
+ export interface NewSubscriptionGroupedWithMinMaxThresholdsPrice {
7532
+ /**
7533
+ * The cadence to bill for this price on.
7203
7534
  */
7204
7535
  cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
7205
7536
 
@@ -8323,6 +8654,7 @@ export namespace SubscriptionPriceIntervalsParams {
8323
8654
  | Shared.NewFloatingTieredPackagePrice
8324
8655
  | Shared.NewFloatingTieredWithMinimumPrice
8325
8656
  | Shared.NewFloatingGroupedTieredPrice
8657
+ | Add.NewFloatingGroupedTieredMatrixPrice
8326
8658
  | Shared.NewFloatingTieredPackageWithMinimumPrice
8327
8659
  | Shared.NewFloatingPackageWithAllocationPrice
8328
8660
  | Shared.NewFloatingUnitWithPercentPrice
@@ -8555,6 +8887,147 @@ export namespace SubscriptionPriceIntervalsParams {
8555
8887
  }
8556
8888
  }
8557
8889
 
8890
+ export interface NewFloatingGroupedTieredMatrixPrice {
8891
+ /**
8892
+ * The cadence to bill for this price on.
8893
+ */
8894
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
8895
+
8896
+ /**
8897
+ * An ISO 4217 currency string for which this price is billed in.
8898
+ */
8899
+ currency: string;
8900
+
8901
+ /**
8902
+ * Configuration for grouped_tiered_matrix pricing
8903
+ */
8904
+ grouped_tiered_matrix_config: NewFloatingGroupedTieredMatrixPrice.GroupedTieredMatrixConfig;
8905
+
8906
+ /**
8907
+ * The id of the item the price will be associated with.
8908
+ */
8909
+ item_id: string;
8910
+
8911
+ /**
8912
+ * The pricing model type
8913
+ */
8914
+ model_type: 'grouped_tiered_matrix';
8915
+
8916
+ /**
8917
+ * The name of the price.
8918
+ */
8919
+ name: string;
8920
+
8921
+ /**
8922
+ * The id of the billable metric for the price. Only needed if the price is
8923
+ * usage-based.
8924
+ */
8925
+ billable_metric_id?: string | null;
8926
+
8927
+ /**
8928
+ * If the Price represents a fixed cost, the price will be billed in-advance if
8929
+ * this is true, and in-arrears if this is false.
8930
+ */
8931
+ billed_in_advance?: boolean | null;
8932
+
8933
+ /**
8934
+ * For custom cadence: specifies the duration of the billing period in days or
8935
+ * months.
8936
+ */
8937
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
8938
+
8939
+ /**
8940
+ * The per unit conversion rate of the price currency to the invoicing currency.
8941
+ */
8942
+ conversion_rate?: number | null;
8943
+
8944
+ /**
8945
+ * The configuration for the rate of the price currency to the invoicing currency.
8946
+ */
8947
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
8948
+
8949
+ /**
8950
+ * For dimensional price: specifies a price group and dimension values
8951
+ */
8952
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
8953
+
8954
+ /**
8955
+ * An alias for the price.
8956
+ */
8957
+ external_price_id?: string | null;
8958
+
8959
+ /**
8960
+ * If the Price represents a fixed cost, this represents the quantity of units
8961
+ * applied.
8962
+ */
8963
+ fixed_price_quantity?: number | null;
8964
+
8965
+ /**
8966
+ * The property used to group this price on an invoice
8967
+ */
8968
+ invoice_grouping_key?: string | null;
8969
+
8970
+ /**
8971
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
8972
+ * If unspecified, a single invoice is produced per billing cycle.
8973
+ */
8974
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
8975
+
8976
+ /**
8977
+ * The ID of the license type to associate with this price.
8978
+ */
8979
+ license_type_id?: string | null;
8980
+
8981
+ /**
8982
+ * User-specified key/value pairs for the resource. Individual keys can be removed
8983
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
8984
+ * by setting `metadata` to `null`.
8985
+ */
8986
+ metadata?: { [key: string]: string | null } | null;
8987
+ }
8988
+
8989
+ export namespace NewFloatingGroupedTieredMatrixPrice {
8990
+ /**
8991
+ * Configuration for grouped_tiered_matrix pricing
8992
+ */
8993
+ export interface GroupedTieredMatrixConfig {
8994
+ /**
8995
+ * Per unit rate for usage whose dimension value has no configured tiers
8996
+ */
8997
+ default_unit_amount: string;
8998
+
8999
+ /**
9000
+ * The billable metric property used to group usage before tiering
9001
+ */
9002
+ dimension: string;
9003
+
9004
+ /**
9005
+ * Graduated tiers keyed by dimension value; usage for a value is tiered only
9006
+ * against its own rows
9007
+ */
9008
+ tiers: Array<GroupedTieredMatrixConfig.Tier>;
9009
+ }
9010
+
9011
+ export namespace GroupedTieredMatrixConfig {
9012
+ /**
9013
+ * Configuration for a single tier scoped to a dimension value
9014
+ */
9015
+ export interface Tier {
9016
+ /**
9017
+ * The dimension value this tier applies to
9018
+ */
9019
+ dimension_value: string;
9020
+
9021
+ tier_lower_bound: string;
9022
+
9023
+ /**
9024
+ * Per unit amount
9025
+ */
9026
+ unit_amount: string;
9027
+ }
9028
+ }
9029
+ }
9030
+
8558
9031
  export interface NewFloatingMatrixWithThresholdDiscountsPrice {
8559
9032
  /**
8560
9033
  * The cadence to bill for this price on.
@@ -10098,6 +10571,7 @@ export namespace SubscriptionSchedulePlanChangeParams {
10098
10571
  | SubscriptionsAPI.NewSubscriptionTieredPackagePrice
10099
10572
  | SubscriptionsAPI.NewSubscriptionTieredWithMinimumPrice
10100
10573
  | SubscriptionsAPI.NewSubscriptionGroupedTieredPrice
10574
+ | AddPrice.NewSubscriptionGroupedTieredMatrixPrice
10101
10575
  | SubscriptionsAPI.NewSubscriptionTieredPackageWithMinimumPrice
10102
10576
  | SubscriptionsAPI.NewSubscriptionPackageWithAllocationPrice
10103
10577
  | SubscriptionsAPI.NewSubscriptionUnitWithPercentPrice
@@ -10124,31 +10598,186 @@ export namespace SubscriptionSchedulePlanChangeParams {
10124
10598
  | AddPrice.NewSubscriptionEventOutputPrice
10125
10599
  | null;
10126
10600
 
10127
- /**
10128
- * The id of the price to add to the subscription.
10129
- */
10130
- price_id?: string | null;
10601
+ /**
10602
+ * The id of the price to add to the subscription.
10603
+ */
10604
+ price_id?: string | null;
10605
+
10606
+ /**
10607
+ * The start date of the price interval. This is the date that the price will start
10608
+ * billing on the subscription. If null, billing will start when the phase or
10609
+ * subscription starts.
10610
+ */
10611
+ start_date?: string | null;
10612
+ }
10613
+
10614
+ export namespace AddPrice {
10615
+ export interface NewSubscriptionBulkWithFiltersPrice {
10616
+ /**
10617
+ * Configuration for bulk_with_filters pricing
10618
+ */
10619
+ bulk_with_filters_config: NewSubscriptionBulkWithFiltersPrice.BulkWithFiltersConfig;
10620
+
10621
+ /**
10622
+ * The cadence to bill for this price on.
10623
+ */
10624
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
10625
+
10626
+ /**
10627
+ * The id of the item the price will be associated with.
10628
+ */
10629
+ item_id: string;
10630
+
10631
+ /**
10632
+ * The pricing model type
10633
+ */
10634
+ model_type: 'bulk_with_filters';
10635
+
10636
+ /**
10637
+ * The name of the price.
10638
+ */
10639
+ name: string;
10640
+
10641
+ /**
10642
+ * The id of the billable metric for the price. Only needed if the price is
10643
+ * usage-based.
10644
+ */
10645
+ billable_metric_id?: string | null;
10646
+
10647
+ /**
10648
+ * If the Price represents a fixed cost, the price will be billed in-advance if
10649
+ * this is true, and in-arrears if this is false.
10650
+ */
10651
+ billed_in_advance?: boolean | null;
10652
+
10653
+ /**
10654
+ * For custom cadence: specifies the duration of the billing period in days or
10655
+ * months.
10656
+ */
10657
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
10658
+
10659
+ /**
10660
+ * The per unit conversion rate of the price currency to the invoicing currency.
10661
+ */
10662
+ conversion_rate?: number | null;
10663
+
10664
+ /**
10665
+ * The configuration for the rate of the price currency to the invoicing currency.
10666
+ */
10667
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
10668
+
10669
+ /**
10670
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
10671
+ * price is billed.
10672
+ */
10673
+ currency?: string | null;
10674
+
10675
+ /**
10676
+ * For dimensional price: specifies a price group and dimension values
10677
+ */
10678
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
10679
+
10680
+ /**
10681
+ * An alias for the price.
10682
+ */
10683
+ external_price_id?: string | null;
10684
+
10685
+ /**
10686
+ * If the Price represents a fixed cost, this represents the quantity of units
10687
+ * applied.
10688
+ */
10689
+ fixed_price_quantity?: number | null;
10690
+
10691
+ /**
10692
+ * The property used to group this price on an invoice
10693
+ */
10694
+ invoice_grouping_key?: string | null;
10131
10695
 
10132
- /**
10133
- * The start date of the price interval. This is the date that the price will start
10134
- * billing on the subscription. If null, billing will start when the phase or
10135
- * subscription starts.
10136
- */
10137
- start_date?: string | null;
10138
- }
10696
+ /**
10697
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
10698
+ * If unspecified, a single invoice is produced per billing cycle.
10699
+ */
10700
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
10139
10701
 
10140
- export namespace AddPrice {
10141
- export interface NewSubscriptionBulkWithFiltersPrice {
10702
+ /**
10703
+ * The ID of the license type to associate with this price.
10704
+ */
10705
+ license_type_id?: string | null;
10706
+
10707
+ /**
10708
+ * User-specified key/value pairs for the resource. Individual keys can be removed
10709
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
10710
+ * by setting `metadata` to `null`.
10711
+ */
10712
+ metadata?: { [key: string]: string | null } | null;
10713
+
10714
+ /**
10715
+ * A transient ID that can be used to reference this price when adding adjustments
10716
+ * in the same API call.
10717
+ */
10718
+ reference_id?: string | null;
10719
+ }
10720
+
10721
+ export namespace NewSubscriptionBulkWithFiltersPrice {
10142
10722
  /**
10143
10723
  * Configuration for bulk_with_filters pricing
10144
10724
  */
10145
- bulk_with_filters_config: NewSubscriptionBulkWithFiltersPrice.BulkWithFiltersConfig;
10725
+ export interface BulkWithFiltersConfig {
10726
+ /**
10727
+ * Property filters to apply (all must match)
10728
+ */
10729
+ filters: Array<BulkWithFiltersConfig.Filter>;
10730
+
10731
+ /**
10732
+ * Bulk tiers for rating based on total usage volume
10733
+ */
10734
+ tiers: Array<BulkWithFiltersConfig.Tier>;
10735
+ }
10736
+
10737
+ export namespace BulkWithFiltersConfig {
10738
+ /**
10739
+ * Configuration for a single property filter
10740
+ */
10741
+ export interface Filter {
10742
+ /**
10743
+ * Event property key to filter on
10744
+ */
10745
+ property_key: string;
10746
+
10747
+ /**
10748
+ * Event property value to match
10749
+ */
10750
+ property_value: string;
10751
+ }
10752
+
10753
+ /**
10754
+ * Configuration for a single bulk pricing tier
10755
+ */
10756
+ export interface Tier {
10757
+ /**
10758
+ * Amount per unit
10759
+ */
10760
+ unit_amount: string;
10761
+
10762
+ /**
10763
+ * The lower bound for this tier
10764
+ */
10765
+ tier_lower_bound?: string | null;
10766
+ }
10767
+ }
10768
+ }
10146
10769
 
10770
+ export interface NewSubscriptionGroupedTieredMatrixPrice {
10147
10771
  /**
10148
10772
  * The cadence to bill for this price on.
10149
10773
  */
10150
10774
  cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
10151
10775
 
10776
+ /**
10777
+ * Configuration for grouped_tiered_matrix pricing
10778
+ */
10779
+ grouped_tiered_matrix_config: NewSubscriptionGroupedTieredMatrixPrice.GroupedTieredMatrixConfig;
10780
+
10152
10781
  /**
10153
10782
  * The id of the item the price will be associated with.
10154
10783
  */
@@ -10157,7 +10786,7 @@ export namespace SubscriptionSchedulePlanChangeParams {
10157
10786
  /**
10158
10787
  * The pricing model type
10159
10788
  */
10160
- model_type: 'bulk_with_filters';
10789
+ model_type: 'grouped_tiered_matrix';
10161
10790
 
10162
10791
  /**
10163
10792
  * The name of the price.
@@ -10244,51 +10873,44 @@ export namespace SubscriptionSchedulePlanChangeParams {
10244
10873
  reference_id?: string | null;
10245
10874
  }
10246
10875
 
10247
- export namespace NewSubscriptionBulkWithFiltersPrice {
10876
+ export namespace NewSubscriptionGroupedTieredMatrixPrice {
10248
10877
  /**
10249
- * Configuration for bulk_with_filters pricing
10878
+ * Configuration for grouped_tiered_matrix pricing
10250
10879
  */
10251
- export interface BulkWithFiltersConfig {
10880
+ export interface GroupedTieredMatrixConfig {
10252
10881
  /**
10253
- * Property filters to apply (all must match)
10882
+ * Per unit rate for usage whose dimension value has no configured tiers
10254
10883
  */
10255
- filters: Array<BulkWithFiltersConfig.Filter>;
10884
+ default_unit_amount: string;
10256
10885
 
10257
10886
  /**
10258
- * Bulk tiers for rating based on total usage volume
10887
+ * The billable metric property used to group usage before tiering
10259
10888
  */
10260
- tiers: Array<BulkWithFiltersConfig.Tier>;
10261
- }
10889
+ dimension: string;
10262
10890
 
10263
- export namespace BulkWithFiltersConfig {
10264
10891
  /**
10265
- * Configuration for a single property filter
10892
+ * Graduated tiers keyed by dimension value; usage for a value is tiered only
10893
+ * against its own rows
10266
10894
  */
10267
- export interface Filter {
10268
- /**
10269
- * Event property key to filter on
10270
- */
10271
- property_key: string;
10272
-
10273
- /**
10274
- * Event property value to match
10275
- */
10276
- property_value: string;
10277
- }
10895
+ tiers: Array<GroupedTieredMatrixConfig.Tier>;
10896
+ }
10278
10897
 
10898
+ export namespace GroupedTieredMatrixConfig {
10279
10899
  /**
10280
- * Configuration for a single bulk pricing tier
10900
+ * Configuration for a single tier scoped to a dimension value
10281
10901
  */
10282
10902
  export interface Tier {
10283
10903
  /**
10284
- * Amount per unit
10904
+ * The dimension value this tier applies to
10285
10905
  */
10286
- unit_amount: string;
10906
+ dimension_value: string;
10907
+
10908
+ tier_lower_bound: string;
10287
10909
 
10288
10910
  /**
10289
- * The lower bound for this tier
10911
+ * Per unit amount
10290
10912
  */
10291
- tier_lower_bound?: string | null;
10913
+ unit_amount: string;
10292
10914
  }
10293
10915
  }
10294
10916
  }
@@ -11614,6 +12236,7 @@ export namespace SubscriptionSchedulePlanChangeParams {
11614
12236
  | SubscriptionsAPI.NewSubscriptionTieredPackagePrice
11615
12237
  | SubscriptionsAPI.NewSubscriptionTieredWithMinimumPrice
11616
12238
  | SubscriptionsAPI.NewSubscriptionGroupedTieredPrice
12239
+ | ReplacePrice.NewSubscriptionGroupedTieredMatrixPrice
11617
12240
  | SubscriptionsAPI.NewSubscriptionTieredPackageWithMinimumPrice
11618
12241
  | SubscriptionsAPI.NewSubscriptionPackageWithAllocationPrice
11619
12242
  | SubscriptionsAPI.NewSubscriptionUnitWithPercentPrice
@@ -11802,6 +12425,154 @@ export namespace SubscriptionSchedulePlanChangeParams {
11802
12425
  }
11803
12426
  }
11804
12427
 
12428
+ export interface NewSubscriptionGroupedTieredMatrixPrice {
12429
+ /**
12430
+ * The cadence to bill for this price on.
12431
+ */
12432
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
12433
+
12434
+ /**
12435
+ * Configuration for grouped_tiered_matrix pricing
12436
+ */
12437
+ grouped_tiered_matrix_config: NewSubscriptionGroupedTieredMatrixPrice.GroupedTieredMatrixConfig;
12438
+
12439
+ /**
12440
+ * The id of the item the price will be associated with.
12441
+ */
12442
+ item_id: string;
12443
+
12444
+ /**
12445
+ * The pricing model type
12446
+ */
12447
+ model_type: 'grouped_tiered_matrix';
12448
+
12449
+ /**
12450
+ * The name of the price.
12451
+ */
12452
+ name: string;
12453
+
12454
+ /**
12455
+ * The id of the billable metric for the price. Only needed if the price is
12456
+ * usage-based.
12457
+ */
12458
+ billable_metric_id?: string | null;
12459
+
12460
+ /**
12461
+ * If the Price represents a fixed cost, the price will be billed in-advance if
12462
+ * this is true, and in-arrears if this is false.
12463
+ */
12464
+ billed_in_advance?: boolean | null;
12465
+
12466
+ /**
12467
+ * For custom cadence: specifies the duration of the billing period in days or
12468
+ * months.
12469
+ */
12470
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
12471
+
12472
+ /**
12473
+ * The per unit conversion rate of the price currency to the invoicing currency.
12474
+ */
12475
+ conversion_rate?: number | null;
12476
+
12477
+ /**
12478
+ * The configuration for the rate of the price currency to the invoicing currency.
12479
+ */
12480
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
12481
+
12482
+ /**
12483
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
12484
+ * price is billed.
12485
+ */
12486
+ currency?: string | null;
12487
+
12488
+ /**
12489
+ * For dimensional price: specifies a price group and dimension values
12490
+ */
12491
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
12492
+
12493
+ /**
12494
+ * An alias for the price.
12495
+ */
12496
+ external_price_id?: string | null;
12497
+
12498
+ /**
12499
+ * If the Price represents a fixed cost, this represents the quantity of units
12500
+ * applied.
12501
+ */
12502
+ fixed_price_quantity?: number | null;
12503
+
12504
+ /**
12505
+ * The property used to group this price on an invoice
12506
+ */
12507
+ invoice_grouping_key?: string | null;
12508
+
12509
+ /**
12510
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
12511
+ * If unspecified, a single invoice is produced per billing cycle.
12512
+ */
12513
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
12514
+
12515
+ /**
12516
+ * The ID of the license type to associate with this price.
12517
+ */
12518
+ license_type_id?: string | null;
12519
+
12520
+ /**
12521
+ * User-specified key/value pairs for the resource. Individual keys can be removed
12522
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
12523
+ * by setting `metadata` to `null`.
12524
+ */
12525
+ metadata?: { [key: string]: string | null } | null;
12526
+
12527
+ /**
12528
+ * A transient ID that can be used to reference this price when adding adjustments
12529
+ * in the same API call.
12530
+ */
12531
+ reference_id?: string | null;
12532
+ }
12533
+
12534
+ export namespace NewSubscriptionGroupedTieredMatrixPrice {
12535
+ /**
12536
+ * Configuration for grouped_tiered_matrix pricing
12537
+ */
12538
+ export interface GroupedTieredMatrixConfig {
12539
+ /**
12540
+ * Per unit rate for usage whose dimension value has no configured tiers
12541
+ */
12542
+ default_unit_amount: string;
12543
+
12544
+ /**
12545
+ * The billable metric property used to group usage before tiering
12546
+ */
12547
+ dimension: string;
12548
+
12549
+ /**
12550
+ * Graduated tiers keyed by dimension value; usage for a value is tiered only
12551
+ * against its own rows
12552
+ */
12553
+ tiers: Array<GroupedTieredMatrixConfig.Tier>;
12554
+ }
12555
+
12556
+ export namespace GroupedTieredMatrixConfig {
12557
+ /**
12558
+ * Configuration for a single tier scoped to a dimension value
12559
+ */
12560
+ export interface Tier {
12561
+ /**
12562
+ * The dimension value this tier applies to
12563
+ */
12564
+ dimension_value: string;
12565
+
12566
+ tier_lower_bound: string;
12567
+
12568
+ /**
12569
+ * Per unit amount
12570
+ */
12571
+ unit_amount: string;
12572
+ }
12573
+ }
12574
+ }
12575
+
11805
12576
  export interface NewSubscriptionMatrixWithThresholdDiscountsPrice {
11806
12577
  /**
11807
12578
  * The cadence to bill for this price on.