orb-billing 5.15.0 → 5.17.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 (46) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/package.json +1 -1
  3. package/resources/beta/beta.d.ts +396 -2
  4. package/resources/beta/beta.d.ts.map +1 -1
  5. package/resources/beta/beta.js.map +1 -1
  6. package/resources/beta/beta.mjs.map +1 -1
  7. package/resources/beta/external-plan-id.d.ts +396 -2
  8. package/resources/beta/external-plan-id.d.ts.map +1 -1
  9. package/resources/invoice-line-items.d.ts +27 -5
  10. package/resources/invoice-line-items.d.ts.map +1 -1
  11. package/resources/invoice-line-items.js +11 -0
  12. package/resources/invoice-line-items.js.map +1 -1
  13. package/resources/invoice-line-items.mjs +11 -0
  14. package/resources/invoice-line-items.mjs.map +1 -1
  15. package/resources/items.d.ts +37 -0
  16. package/resources/items.d.ts.map +1 -1
  17. package/resources/items.js.map +1 -1
  18. package/resources/items.mjs.map +1 -1
  19. package/resources/plans/plans.d.ts +198 -1
  20. package/resources/plans/plans.d.ts.map +1 -1
  21. package/resources/plans/plans.js.map +1 -1
  22. package/resources/plans/plans.mjs.map +1 -1
  23. package/resources/prices/prices.d.ts +558 -3
  24. package/resources/prices/prices.d.ts.map +1 -1
  25. package/resources/prices/prices.js.map +1 -1
  26. package/resources/prices/prices.mjs.map +1 -1
  27. package/resources/shared.d.ts +280 -1
  28. package/resources/shared.d.ts.map +1 -1
  29. package/resources/shared.js.map +1 -1
  30. package/resources/shared.mjs.map +1 -1
  31. package/resources/subscriptions.d.ts +1104 -131
  32. package/resources/subscriptions.d.ts.map +1 -1
  33. package/resources/subscriptions.js.map +1 -1
  34. package/resources/subscriptions.mjs.map +1 -1
  35. package/src/resources/beta/beta.ts +468 -0
  36. package/src/resources/beta/external-plan-id.ts +468 -0
  37. package/src/resources/invoice-line-items.ts +29 -6
  38. package/src/resources/items.ts +38 -0
  39. package/src/resources/plans/plans.ts +234 -0
  40. package/src/resources/prices/prices.ts +688 -28
  41. package/src/resources/shared.ts +337 -1
  42. package/src/resources/subscriptions.ts +1250 -94
  43. package/src/version.ts +1 -1
  44. package/version.d.ts +1 -1
  45. package/version.js +1 -1
  46. package/version.mjs +1 -1
@@ -4079,7 +4079,7 @@ export declare namespace SubscriptionCreateParams {
4079
4079
  /**
4080
4080
  * New subscription price request body params.
4081
4081
  */
4082
- price?: SubscriptionsAPI.NewSubscriptionUnitPrice | SubscriptionsAPI.NewSubscriptionTieredPrice | SubscriptionsAPI.NewSubscriptionBulkPrice | SubscriptionsAPI.NewSubscriptionPackagePrice | SubscriptionsAPI.NewSubscriptionMatrixPrice | SubscriptionsAPI.NewSubscriptionThresholdTotalAmountPrice | SubscriptionsAPI.NewSubscriptionTieredPackagePrice | SubscriptionsAPI.NewSubscriptionTieredWithMinimumPrice | SubscriptionsAPI.NewSubscriptionGroupedTieredPrice | SubscriptionsAPI.NewSubscriptionTieredPackageWithMinimumPrice | SubscriptionsAPI.NewSubscriptionPackageWithAllocationPrice | SubscriptionsAPI.NewSubscriptionUnitWithPercentPrice | SubscriptionsAPI.NewSubscriptionMatrixWithAllocationPrice | AddPrice.NewSubscriptionTieredWithProrationPrice | SubscriptionsAPI.NewSubscriptionUnitWithProrationPrice | SubscriptionsAPI.NewSubscriptionGroupedAllocationPrice | SubscriptionsAPI.NewSubscriptionBulkWithProrationPrice | SubscriptionsAPI.NewSubscriptionGroupedWithProratedMinimumPrice | SubscriptionsAPI.NewSubscriptionGroupedWithMeteredMinimumPrice | AddPrice.NewSubscriptionGroupedWithMinMaxThresholdsPrice | SubscriptionsAPI.NewSubscriptionMatrixWithDisplayNamePrice | SubscriptionsAPI.NewSubscriptionGroupedTieredPackagePrice | SubscriptionsAPI.NewSubscriptionMaxGroupTieredPackagePrice | SubscriptionsAPI.NewSubscriptionScalableMatrixWithUnitPricingPrice | SubscriptionsAPI.NewSubscriptionScalableMatrixWithTieredPricingPrice | SubscriptionsAPI.NewSubscriptionCumulativeGroupedBulkPrice | SubscriptionsAPI.NewSubscriptionMinimumCompositePrice | null;
4082
+ price?: SubscriptionsAPI.NewSubscriptionUnitPrice | SubscriptionsAPI.NewSubscriptionTieredPrice | SubscriptionsAPI.NewSubscriptionBulkPrice | SubscriptionsAPI.NewSubscriptionPackagePrice | SubscriptionsAPI.NewSubscriptionMatrixPrice | SubscriptionsAPI.NewSubscriptionThresholdTotalAmountPrice | SubscriptionsAPI.NewSubscriptionTieredPackagePrice | SubscriptionsAPI.NewSubscriptionTieredWithMinimumPrice | SubscriptionsAPI.NewSubscriptionGroupedTieredPrice | SubscriptionsAPI.NewSubscriptionTieredPackageWithMinimumPrice | SubscriptionsAPI.NewSubscriptionPackageWithAllocationPrice | SubscriptionsAPI.NewSubscriptionUnitWithPercentPrice | SubscriptionsAPI.NewSubscriptionMatrixWithAllocationPrice | AddPrice.NewSubscriptionTieredWithProrationPrice | SubscriptionsAPI.NewSubscriptionUnitWithProrationPrice | SubscriptionsAPI.NewSubscriptionGroupedAllocationPrice | SubscriptionsAPI.NewSubscriptionBulkWithProrationPrice | SubscriptionsAPI.NewSubscriptionGroupedWithProratedMinimumPrice | SubscriptionsAPI.NewSubscriptionGroupedWithMeteredMinimumPrice | AddPrice.NewSubscriptionGroupedWithMinMaxThresholdsPrice | SubscriptionsAPI.NewSubscriptionMatrixWithDisplayNamePrice | SubscriptionsAPI.NewSubscriptionGroupedTieredPackagePrice | SubscriptionsAPI.NewSubscriptionMaxGroupTieredPackagePrice | SubscriptionsAPI.NewSubscriptionScalableMatrixWithUnitPricingPrice | SubscriptionsAPI.NewSubscriptionScalableMatrixWithTieredPricingPrice | SubscriptionsAPI.NewSubscriptionCumulativeGroupedBulkPrice | SubscriptionsAPI.NewSubscriptionMinimumCompositePrice | AddPrice.NewSubscriptionPercentCompositePrice | AddPrice.NewSubscriptionEventOutputPrice | null;
4083
4083
  /**
4084
4084
  * The id of the price to add to the subscription.
4085
4085
  */
@@ -4312,6 +4312,203 @@ export declare namespace SubscriptionCreateParams {
4312
4312
  per_unit_rate: string;
4313
4313
  }
4314
4314
  }
4315
+ interface NewSubscriptionPercentCompositePrice {
4316
+ /**
4317
+ * The cadence to bill for this price on.
4318
+ */
4319
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
4320
+ /**
4321
+ * The id of the item the price will be associated with.
4322
+ */
4323
+ item_id: string;
4324
+ /**
4325
+ * The pricing model type
4326
+ */
4327
+ model_type: 'percent';
4328
+ /**
4329
+ * The name of the price.
4330
+ */
4331
+ name: string;
4332
+ /**
4333
+ * Configuration for percent pricing
4334
+ */
4335
+ percent_config: NewSubscriptionPercentCompositePrice.PercentConfig;
4336
+ /**
4337
+ * The id of the billable metric for the price. Only needed if the price is
4338
+ * usage-based.
4339
+ */
4340
+ billable_metric_id?: string | null;
4341
+ /**
4342
+ * If the Price represents a fixed cost, the price will be billed in-advance if
4343
+ * this is true, and in-arrears if this is false.
4344
+ */
4345
+ billed_in_advance?: boolean | null;
4346
+ /**
4347
+ * For custom cadence: specifies the duration of the billing period in days or
4348
+ * months.
4349
+ */
4350
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
4351
+ /**
4352
+ * The per unit conversion rate of the price currency to the invoicing currency.
4353
+ */
4354
+ conversion_rate?: number | null;
4355
+ /**
4356
+ * The configuration for the rate of the price currency to the invoicing currency.
4357
+ */
4358
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
4359
+ /**
4360
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
4361
+ * price is billed.
4362
+ */
4363
+ currency?: string | null;
4364
+ /**
4365
+ * For dimensional price: specifies a price group and dimension values
4366
+ */
4367
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
4368
+ /**
4369
+ * An alias for the price.
4370
+ */
4371
+ external_price_id?: string | null;
4372
+ /**
4373
+ * If the Price represents a fixed cost, this represents the quantity of units
4374
+ * applied.
4375
+ */
4376
+ fixed_price_quantity?: number | null;
4377
+ /**
4378
+ * The property used to group this price on an invoice
4379
+ */
4380
+ invoice_grouping_key?: string | null;
4381
+ /**
4382
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
4383
+ * If unspecified, a single invoice is produced per billing cycle.
4384
+ */
4385
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
4386
+ /**
4387
+ * User-specified key/value pairs for the resource. Individual keys can be removed
4388
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
4389
+ * by setting `metadata` to `null`.
4390
+ */
4391
+ metadata?: {
4392
+ [key: string]: string | null;
4393
+ } | null;
4394
+ /**
4395
+ * A transient ID that can be used to reference this price when adding adjustments
4396
+ * in the same API call.
4397
+ */
4398
+ reference_id?: string | null;
4399
+ }
4400
+ namespace NewSubscriptionPercentCompositePrice {
4401
+ /**
4402
+ * Configuration for percent pricing
4403
+ */
4404
+ interface PercentConfig {
4405
+ /**
4406
+ * What percent of the component subtotals to charge
4407
+ */
4408
+ percent: number;
4409
+ }
4410
+ }
4411
+ interface NewSubscriptionEventOutputPrice {
4412
+ /**
4413
+ * The cadence to bill for this price on.
4414
+ */
4415
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
4416
+ /**
4417
+ * Configuration for event_output pricing
4418
+ */
4419
+ event_output_config: NewSubscriptionEventOutputPrice.EventOutputConfig;
4420
+ /**
4421
+ * The id of the item the price will be associated with.
4422
+ */
4423
+ item_id: string;
4424
+ /**
4425
+ * The pricing model type
4426
+ */
4427
+ model_type: 'event_output';
4428
+ /**
4429
+ * The name of the price.
4430
+ */
4431
+ name: string;
4432
+ /**
4433
+ * The id of the billable metric for the price. Only needed if the price is
4434
+ * usage-based.
4435
+ */
4436
+ billable_metric_id?: string | null;
4437
+ /**
4438
+ * If the Price represents a fixed cost, the price will be billed in-advance if
4439
+ * this is true, and in-arrears if this is false.
4440
+ */
4441
+ billed_in_advance?: boolean | null;
4442
+ /**
4443
+ * For custom cadence: specifies the duration of the billing period in days or
4444
+ * months.
4445
+ */
4446
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
4447
+ /**
4448
+ * The per unit conversion rate of the price currency to the invoicing currency.
4449
+ */
4450
+ conversion_rate?: number | null;
4451
+ /**
4452
+ * The configuration for the rate of the price currency to the invoicing currency.
4453
+ */
4454
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
4455
+ /**
4456
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
4457
+ * price is billed.
4458
+ */
4459
+ currency?: string | null;
4460
+ /**
4461
+ * For dimensional price: specifies a price group and dimension values
4462
+ */
4463
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
4464
+ /**
4465
+ * An alias for the price.
4466
+ */
4467
+ external_price_id?: string | null;
4468
+ /**
4469
+ * If the Price represents a fixed cost, this represents the quantity of units
4470
+ * applied.
4471
+ */
4472
+ fixed_price_quantity?: number | null;
4473
+ /**
4474
+ * The property used to group this price on an invoice
4475
+ */
4476
+ invoice_grouping_key?: string | null;
4477
+ /**
4478
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
4479
+ * If unspecified, a single invoice is produced per billing cycle.
4480
+ */
4481
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
4482
+ /**
4483
+ * User-specified key/value pairs for the resource. Individual keys can be removed
4484
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
4485
+ * by setting `metadata` to `null`.
4486
+ */
4487
+ metadata?: {
4488
+ [key: string]: string | null;
4489
+ } | null;
4490
+ /**
4491
+ * A transient ID that can be used to reference this price when adding adjustments
4492
+ * in the same API call.
4493
+ */
4494
+ reference_id?: string | null;
4495
+ }
4496
+ namespace NewSubscriptionEventOutputPrice {
4497
+ /**
4498
+ * Configuration for event_output pricing
4499
+ */
4500
+ interface EventOutputConfig {
4501
+ /**
4502
+ * The key in the event data to extract the unit rate from.
4503
+ */
4504
+ unit_rating_key: string;
4505
+ /**
4506
+ * An optional key in the event data to group by (e.g., event ID). All events will
4507
+ * also be grouped by their unit rate.
4508
+ */
4509
+ grouping_key?: string | null;
4510
+ }
4511
+ }
4315
4512
  }
4316
4513
  interface RemoveAdjustment {
4317
4514
  /**
@@ -4374,7 +4571,7 @@ export declare namespace SubscriptionCreateParams {
4374
4571
  /**
4375
4572
  * New subscription price request body params.
4376
4573
  */
4377
- price?: SubscriptionsAPI.NewSubscriptionUnitPrice | SubscriptionsAPI.NewSubscriptionTieredPrice | SubscriptionsAPI.NewSubscriptionBulkPrice | SubscriptionsAPI.NewSubscriptionPackagePrice | SubscriptionsAPI.NewSubscriptionMatrixPrice | SubscriptionsAPI.NewSubscriptionThresholdTotalAmountPrice | SubscriptionsAPI.NewSubscriptionTieredPackagePrice | SubscriptionsAPI.NewSubscriptionTieredWithMinimumPrice | SubscriptionsAPI.NewSubscriptionGroupedTieredPrice | SubscriptionsAPI.NewSubscriptionTieredPackageWithMinimumPrice | SubscriptionsAPI.NewSubscriptionPackageWithAllocationPrice | SubscriptionsAPI.NewSubscriptionUnitWithPercentPrice | SubscriptionsAPI.NewSubscriptionMatrixWithAllocationPrice | ReplacePrice.NewSubscriptionTieredWithProrationPrice | SubscriptionsAPI.NewSubscriptionUnitWithProrationPrice | SubscriptionsAPI.NewSubscriptionGroupedAllocationPrice | SubscriptionsAPI.NewSubscriptionBulkWithProrationPrice | SubscriptionsAPI.NewSubscriptionGroupedWithProratedMinimumPrice | SubscriptionsAPI.NewSubscriptionGroupedWithMeteredMinimumPrice | ReplacePrice.NewSubscriptionGroupedWithMinMaxThresholdsPrice | SubscriptionsAPI.NewSubscriptionMatrixWithDisplayNamePrice | SubscriptionsAPI.NewSubscriptionGroupedTieredPackagePrice | SubscriptionsAPI.NewSubscriptionMaxGroupTieredPackagePrice | SubscriptionsAPI.NewSubscriptionScalableMatrixWithUnitPricingPrice | SubscriptionsAPI.NewSubscriptionScalableMatrixWithTieredPricingPrice | SubscriptionsAPI.NewSubscriptionCumulativeGroupedBulkPrice | SubscriptionsAPI.NewSubscriptionMinimumCompositePrice | null;
4574
+ price?: SubscriptionsAPI.NewSubscriptionUnitPrice | SubscriptionsAPI.NewSubscriptionTieredPrice | SubscriptionsAPI.NewSubscriptionBulkPrice | SubscriptionsAPI.NewSubscriptionPackagePrice | SubscriptionsAPI.NewSubscriptionMatrixPrice | SubscriptionsAPI.NewSubscriptionThresholdTotalAmountPrice | SubscriptionsAPI.NewSubscriptionTieredPackagePrice | SubscriptionsAPI.NewSubscriptionTieredWithMinimumPrice | SubscriptionsAPI.NewSubscriptionGroupedTieredPrice | SubscriptionsAPI.NewSubscriptionTieredPackageWithMinimumPrice | SubscriptionsAPI.NewSubscriptionPackageWithAllocationPrice | SubscriptionsAPI.NewSubscriptionUnitWithPercentPrice | SubscriptionsAPI.NewSubscriptionMatrixWithAllocationPrice | ReplacePrice.NewSubscriptionTieredWithProrationPrice | SubscriptionsAPI.NewSubscriptionUnitWithProrationPrice | SubscriptionsAPI.NewSubscriptionGroupedAllocationPrice | SubscriptionsAPI.NewSubscriptionBulkWithProrationPrice | SubscriptionsAPI.NewSubscriptionGroupedWithProratedMinimumPrice | SubscriptionsAPI.NewSubscriptionGroupedWithMeteredMinimumPrice | ReplacePrice.NewSubscriptionGroupedWithMinMaxThresholdsPrice | SubscriptionsAPI.NewSubscriptionMatrixWithDisplayNamePrice | SubscriptionsAPI.NewSubscriptionGroupedTieredPackagePrice | SubscriptionsAPI.NewSubscriptionMaxGroupTieredPackagePrice | SubscriptionsAPI.NewSubscriptionScalableMatrixWithUnitPricingPrice | SubscriptionsAPI.NewSubscriptionScalableMatrixWithTieredPricingPrice | SubscriptionsAPI.NewSubscriptionCumulativeGroupedBulkPrice | SubscriptionsAPI.NewSubscriptionMinimumCompositePrice | ReplacePrice.NewSubscriptionPercentCompositePrice | ReplacePrice.NewSubscriptionEventOutputPrice | null;
4378
4575
  /**
4379
4576
  * The id of the price to add to the subscription.
4380
4577
  */
@@ -4393,15 +4590,235 @@ export declare namespace SubscriptionCreateParams {
4393
4590
  /**
4394
4591
  * The pricing model type
4395
4592
  */
4396
- model_type: 'tiered_with_proration';
4593
+ model_type: 'tiered_with_proration';
4594
+ /**
4595
+ * The name of the price.
4596
+ */
4597
+ name: string;
4598
+ /**
4599
+ * Configuration for tiered_with_proration pricing
4600
+ */
4601
+ tiered_with_proration_config: NewSubscriptionTieredWithProrationPrice.TieredWithProrationConfig;
4602
+ /**
4603
+ * The id of the billable metric for the price. Only needed if the price is
4604
+ * usage-based.
4605
+ */
4606
+ billable_metric_id?: string | null;
4607
+ /**
4608
+ * If the Price represents a fixed cost, the price will be billed in-advance if
4609
+ * this is true, and in-arrears if this is false.
4610
+ */
4611
+ billed_in_advance?: boolean | null;
4612
+ /**
4613
+ * For custom cadence: specifies the duration of the billing period in days or
4614
+ * months.
4615
+ */
4616
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
4617
+ /**
4618
+ * The per unit conversion rate of the price currency to the invoicing currency.
4619
+ */
4620
+ conversion_rate?: number | null;
4621
+ /**
4622
+ * The configuration for the rate of the price currency to the invoicing currency.
4623
+ */
4624
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
4625
+ /**
4626
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
4627
+ * price is billed.
4628
+ */
4629
+ currency?: string | null;
4630
+ /**
4631
+ * For dimensional price: specifies a price group and dimension values
4632
+ */
4633
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
4634
+ /**
4635
+ * An alias for the price.
4636
+ */
4637
+ external_price_id?: string | null;
4638
+ /**
4639
+ * If the Price represents a fixed cost, this represents the quantity of units
4640
+ * applied.
4641
+ */
4642
+ fixed_price_quantity?: number | null;
4643
+ /**
4644
+ * The property used to group this price on an invoice
4645
+ */
4646
+ invoice_grouping_key?: string | null;
4647
+ /**
4648
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
4649
+ * If unspecified, a single invoice is produced per billing cycle.
4650
+ */
4651
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
4652
+ /**
4653
+ * User-specified key/value pairs for the resource. Individual keys can be removed
4654
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
4655
+ * by setting `metadata` to `null`.
4656
+ */
4657
+ metadata?: {
4658
+ [key: string]: string | null;
4659
+ } | null;
4660
+ /**
4661
+ * A transient ID that can be used to reference this price when adding adjustments
4662
+ * in the same API call.
4663
+ */
4664
+ reference_id?: string | null;
4665
+ }
4666
+ namespace NewSubscriptionTieredWithProrationPrice {
4667
+ /**
4668
+ * Configuration for tiered_with_proration pricing
4669
+ */
4670
+ interface TieredWithProrationConfig {
4671
+ /**
4672
+ * Tiers for rating based on total usage quantities into the specified tier with
4673
+ * proration
4674
+ */
4675
+ tiers: Array<TieredWithProrationConfig.Tier>;
4676
+ }
4677
+ namespace TieredWithProrationConfig {
4678
+ /**
4679
+ * Configuration for a single tiered with proration tier
4680
+ */
4681
+ interface Tier {
4682
+ /**
4683
+ * Inclusive tier starting value
4684
+ */
4685
+ tier_lower_bound: string;
4686
+ /**
4687
+ * Amount per unit
4688
+ */
4689
+ unit_amount: string;
4690
+ }
4691
+ }
4692
+ }
4693
+ interface NewSubscriptionGroupedWithMinMaxThresholdsPrice {
4694
+ /**
4695
+ * The cadence to bill for this price on.
4696
+ */
4697
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
4698
+ /**
4699
+ * Configuration for grouped_with_min_max_thresholds pricing
4700
+ */
4701
+ grouped_with_min_max_thresholds_config: NewSubscriptionGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
4702
+ /**
4703
+ * The id of the item the price will be associated with.
4704
+ */
4705
+ item_id: string;
4706
+ /**
4707
+ * The pricing model type
4708
+ */
4709
+ model_type: 'grouped_with_min_max_thresholds';
4710
+ /**
4711
+ * The name of the price.
4712
+ */
4713
+ name: string;
4714
+ /**
4715
+ * The id of the billable metric for the price. Only needed if the price is
4716
+ * usage-based.
4717
+ */
4718
+ billable_metric_id?: string | null;
4719
+ /**
4720
+ * If the Price represents a fixed cost, the price will be billed in-advance if
4721
+ * this is true, and in-arrears if this is false.
4722
+ */
4723
+ billed_in_advance?: boolean | null;
4724
+ /**
4725
+ * For custom cadence: specifies the duration of the billing period in days or
4726
+ * months.
4727
+ */
4728
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
4729
+ /**
4730
+ * The per unit conversion rate of the price currency to the invoicing currency.
4731
+ */
4732
+ conversion_rate?: number | null;
4733
+ /**
4734
+ * The configuration for the rate of the price currency to the invoicing currency.
4735
+ */
4736
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
4737
+ /**
4738
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
4739
+ * price is billed.
4740
+ */
4741
+ currency?: string | null;
4742
+ /**
4743
+ * For dimensional price: specifies a price group and dimension values
4744
+ */
4745
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
4746
+ /**
4747
+ * An alias for the price.
4748
+ */
4749
+ external_price_id?: string | null;
4750
+ /**
4751
+ * If the Price represents a fixed cost, this represents the quantity of units
4752
+ * applied.
4753
+ */
4754
+ fixed_price_quantity?: number | null;
4755
+ /**
4756
+ * The property used to group this price on an invoice
4757
+ */
4758
+ invoice_grouping_key?: string | null;
4759
+ /**
4760
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
4761
+ * If unspecified, a single invoice is produced per billing cycle.
4762
+ */
4763
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
4764
+ /**
4765
+ * User-specified key/value pairs for the resource. Individual keys can be removed
4766
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
4767
+ * by setting `metadata` to `null`.
4768
+ */
4769
+ metadata?: {
4770
+ [key: string]: string | null;
4771
+ } | null;
4772
+ /**
4773
+ * A transient ID that can be used to reference this price when adding adjustments
4774
+ * in the same API call.
4775
+ */
4776
+ reference_id?: string | null;
4777
+ }
4778
+ namespace NewSubscriptionGroupedWithMinMaxThresholdsPrice {
4779
+ /**
4780
+ * Configuration for grouped_with_min_max_thresholds pricing
4781
+ */
4782
+ interface GroupedWithMinMaxThresholdsConfig {
4783
+ /**
4784
+ * The event property used to group before applying thresholds
4785
+ */
4786
+ grouping_key: string;
4787
+ /**
4788
+ * The maximum amount to charge each group
4789
+ */
4790
+ maximum_charge: string;
4791
+ /**
4792
+ * The minimum amount to charge each group, regardless of usage
4793
+ */
4794
+ minimum_charge: string;
4795
+ /**
4796
+ * The base price charged per group
4797
+ */
4798
+ per_unit_rate: string;
4799
+ }
4800
+ }
4801
+ interface NewSubscriptionPercentCompositePrice {
4802
+ /**
4803
+ * The cadence to bill for this price on.
4804
+ */
4805
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
4806
+ /**
4807
+ * The id of the item the price will be associated with.
4808
+ */
4809
+ item_id: string;
4810
+ /**
4811
+ * The pricing model type
4812
+ */
4813
+ model_type: 'percent';
4397
4814
  /**
4398
4815
  * The name of the price.
4399
4816
  */
4400
4817
  name: string;
4401
4818
  /**
4402
- * Configuration for tiered_with_proration pricing
4819
+ * Configuration for percent pricing
4403
4820
  */
4404
- tiered_with_proration_config: NewSubscriptionTieredWithProrationPrice.TieredWithProrationConfig;
4821
+ percent_config: NewSubscriptionPercentCompositePrice.PercentConfig;
4405
4822
  /**
4406
4823
  * The id of the billable metric for the price. Only needed if the price is
4407
4824
  * usage-based.
@@ -4466,42 +4883,26 @@ export declare namespace SubscriptionCreateParams {
4466
4883
  */
4467
4884
  reference_id?: string | null;
4468
4885
  }
4469
- namespace NewSubscriptionTieredWithProrationPrice {
4886
+ namespace NewSubscriptionPercentCompositePrice {
4470
4887
  /**
4471
- * Configuration for tiered_with_proration pricing
4888
+ * Configuration for percent pricing
4472
4889
  */
4473
- interface TieredWithProrationConfig {
4474
- /**
4475
- * Tiers for rating based on total usage quantities into the specified tier with
4476
- * proration
4477
- */
4478
- tiers: Array<TieredWithProrationConfig.Tier>;
4479
- }
4480
- namespace TieredWithProrationConfig {
4890
+ interface PercentConfig {
4481
4891
  /**
4482
- * Configuration for a single tiered with proration tier
4892
+ * What percent of the component subtotals to charge
4483
4893
  */
4484
- interface Tier {
4485
- /**
4486
- * Inclusive tier starting value
4487
- */
4488
- tier_lower_bound: string;
4489
- /**
4490
- * Amount per unit
4491
- */
4492
- unit_amount: string;
4493
- }
4894
+ percent: number;
4494
4895
  }
4495
4896
  }
4496
- interface NewSubscriptionGroupedWithMinMaxThresholdsPrice {
4897
+ interface NewSubscriptionEventOutputPrice {
4497
4898
  /**
4498
4899
  * The cadence to bill for this price on.
4499
4900
  */
4500
4901
  cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
4501
4902
  /**
4502
- * Configuration for grouped_with_min_max_thresholds pricing
4903
+ * Configuration for event_output pricing
4503
4904
  */
4504
- grouped_with_min_max_thresholds_config: NewSubscriptionGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
4905
+ event_output_config: NewSubscriptionEventOutputPrice.EventOutputConfig;
4505
4906
  /**
4506
4907
  * The id of the item the price will be associated with.
4507
4908
  */
@@ -4509,7 +4910,7 @@ export declare namespace SubscriptionCreateParams {
4509
4910
  /**
4510
4911
  * The pricing model type
4511
4912
  */
4512
- model_type: 'grouped_with_min_max_thresholds';
4913
+ model_type: 'event_output';
4513
4914
  /**
4514
4915
  * The name of the price.
4515
4916
  */
@@ -4578,27 +4979,20 @@ export declare namespace SubscriptionCreateParams {
4578
4979
  */
4579
4980
  reference_id?: string | null;
4580
4981
  }
4581
- namespace NewSubscriptionGroupedWithMinMaxThresholdsPrice {
4982
+ namespace NewSubscriptionEventOutputPrice {
4582
4983
  /**
4583
- * Configuration for grouped_with_min_max_thresholds pricing
4984
+ * Configuration for event_output pricing
4584
4985
  */
4585
- interface GroupedWithMinMaxThresholdsConfig {
4586
- /**
4587
- * The event property used to group before applying thresholds
4588
- */
4589
- grouping_key: string;
4590
- /**
4591
- * The maximum amount to charge each group
4592
- */
4593
- maximum_charge: string;
4986
+ interface EventOutputConfig {
4594
4987
  /**
4595
- * The minimum amount to charge each group, regardless of usage
4988
+ * The key in the event data to extract the unit rate from.
4596
4989
  */
4597
- minimum_charge: string;
4990
+ unit_rating_key: string;
4598
4991
  /**
4599
- * The base price charged per group
4992
+ * An optional key in the event data to group by (e.g., event ID). All events will
4993
+ * also be grouped by their unit rate.
4600
4994
  */
4601
- per_unit_rate: string;
4995
+ grouping_key?: string | null;
4602
4996
  }
4603
4997
  }
4604
4998
  }
@@ -4799,7 +5193,7 @@ export declare namespace SubscriptionPriceIntervalsParams {
4799
5193
  /**
4800
5194
  * New floating price request body params.
4801
5195
  */
4802
- price?: Shared.NewFloatingUnitPrice | Shared.NewFloatingTieredPrice | Shared.NewFloatingBulkPrice | Shared.NewFloatingPackagePrice | Shared.NewFloatingMatrixPrice | Shared.NewFloatingThresholdTotalAmountPrice | Shared.NewFloatingTieredPackagePrice | Shared.NewFloatingTieredWithMinimumPrice | Shared.NewFloatingGroupedTieredPrice | Shared.NewFloatingTieredPackageWithMinimumPrice | Shared.NewFloatingPackageWithAllocationPrice | Shared.NewFloatingUnitWithPercentPrice | Shared.NewFloatingMatrixWithAllocationPrice | Shared.NewFloatingTieredWithProrationPrice | Shared.NewFloatingUnitWithProrationPrice | Shared.NewFloatingGroupedAllocationPrice | Shared.NewFloatingBulkWithProrationPrice | Shared.NewFloatingGroupedWithProratedMinimumPrice | Shared.NewFloatingGroupedWithMeteredMinimumPrice | Add.NewFloatingGroupedWithMinMaxThresholdsPrice | Shared.NewFloatingMatrixWithDisplayNamePrice | Shared.NewFloatingGroupedTieredPackagePrice | Shared.NewFloatingMaxGroupTieredPackagePrice | Shared.NewFloatingScalableMatrixWithUnitPricingPrice | Shared.NewFloatingScalableMatrixWithTieredPricingPrice | Shared.NewFloatingCumulativeGroupedBulkPrice | Shared.NewFloatingMinimumCompositePrice | null;
5196
+ price?: Shared.NewFloatingUnitPrice | Shared.NewFloatingTieredPrice | Shared.NewFloatingBulkPrice | Shared.NewFloatingPackagePrice | Shared.NewFloatingMatrixPrice | Shared.NewFloatingThresholdTotalAmountPrice | Shared.NewFloatingTieredPackagePrice | Shared.NewFloatingTieredWithMinimumPrice | Shared.NewFloatingGroupedTieredPrice | Shared.NewFloatingTieredPackageWithMinimumPrice | Shared.NewFloatingPackageWithAllocationPrice | Shared.NewFloatingUnitWithPercentPrice | Shared.NewFloatingMatrixWithAllocationPrice | Shared.NewFloatingTieredWithProrationPrice | Shared.NewFloatingUnitWithProrationPrice | Shared.NewFloatingGroupedAllocationPrice | Shared.NewFloatingBulkWithProrationPrice | Shared.NewFloatingGroupedWithProratedMinimumPrice | Shared.NewFloatingGroupedWithMeteredMinimumPrice | Add.NewFloatingGroupedWithMinMaxThresholdsPrice | Shared.NewFloatingMatrixWithDisplayNamePrice | Shared.NewFloatingGroupedTieredPackagePrice | Shared.NewFloatingMaxGroupTieredPackagePrice | Shared.NewFloatingScalableMatrixWithUnitPricingPrice | Shared.NewFloatingScalableMatrixWithTieredPricingPrice | Shared.NewFloatingCumulativeGroupedBulkPrice | Shared.NewFloatingMinimumCompositePrice | Add.NewFloatingPercentCompositePrice | Add.NewFloatingEventOutputPrice | null;
4803
5197
  /**
4804
5198
  * The id of the price to add to the subscription.
4805
5199
  */
@@ -4817,38 +5211,230 @@ export declare namespace SubscriptionPriceIntervalsParams {
4817
5211
  namespace Add {
4818
5212
  interface AmountDiscountCreationParams {
4819
5213
  /**
4820
- * Only available if discount_type is `amount`.
5214
+ * Only available if discount_type is `amount`.
5215
+ */
5216
+ amount_discount: number;
5217
+ discount_type: 'amount';
5218
+ }
5219
+ interface PercentageDiscountCreationParams {
5220
+ discount_type: 'percentage';
5221
+ /**
5222
+ * Only available if discount_type is `percentage`. This is a number between 0
5223
+ * and 1.
5224
+ */
5225
+ percentage_discount: number;
5226
+ }
5227
+ interface UsageDiscountCreationParams {
5228
+ discount_type: 'usage';
5229
+ /**
5230
+ * Only available if discount_type is `usage`. Number of usage units that this
5231
+ * discount is for.
5232
+ */
5233
+ usage_discount: number;
5234
+ }
5235
+ interface FixedFeeQuantityTransition {
5236
+ /**
5237
+ * The date that the fixed fee quantity transition should take effect.
5238
+ */
5239
+ effective_date: string;
5240
+ /**
5241
+ * The quantity of the fixed fee quantity transition.
5242
+ */
5243
+ quantity: number;
5244
+ }
5245
+ interface NewFloatingGroupedWithMinMaxThresholdsPrice {
5246
+ /**
5247
+ * The cadence to bill for this price on.
5248
+ */
5249
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
5250
+ /**
5251
+ * An ISO 4217 currency string for which this price is billed in.
5252
+ */
5253
+ currency: string;
5254
+ /**
5255
+ * Configuration for grouped_with_min_max_thresholds pricing
5256
+ */
5257
+ grouped_with_min_max_thresholds_config: NewFloatingGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
5258
+ /**
5259
+ * The id of the item the price will be associated with.
5260
+ */
5261
+ item_id: string;
5262
+ /**
5263
+ * The pricing model type
5264
+ */
5265
+ model_type: 'grouped_with_min_max_thresholds';
5266
+ /**
5267
+ * The name of the price.
5268
+ */
5269
+ name: string;
5270
+ /**
5271
+ * The id of the billable metric for the price. Only needed if the price is
5272
+ * usage-based.
5273
+ */
5274
+ billable_metric_id?: string | null;
5275
+ /**
5276
+ * If the Price represents a fixed cost, the price will be billed in-advance if
5277
+ * this is true, and in-arrears if this is false.
5278
+ */
5279
+ billed_in_advance?: boolean | null;
5280
+ /**
5281
+ * For custom cadence: specifies the duration of the billing period in days or
5282
+ * months.
5283
+ */
5284
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
5285
+ /**
5286
+ * The per unit conversion rate of the price currency to the invoicing currency.
5287
+ */
5288
+ conversion_rate?: number | null;
5289
+ /**
5290
+ * The configuration for the rate of the price currency to the invoicing currency.
5291
+ */
5292
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
5293
+ /**
5294
+ * For dimensional price: specifies a price group and dimension values
5295
+ */
5296
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
5297
+ /**
5298
+ * An alias for the price.
5299
+ */
5300
+ external_price_id?: string | null;
5301
+ /**
5302
+ * If the Price represents a fixed cost, this represents the quantity of units
5303
+ * applied.
5304
+ */
5305
+ fixed_price_quantity?: number | null;
5306
+ /**
5307
+ * The property used to group this price on an invoice
5308
+ */
5309
+ invoice_grouping_key?: string | null;
5310
+ /**
5311
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
5312
+ * If unspecified, a single invoice is produced per billing cycle.
5313
+ */
5314
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
5315
+ /**
5316
+ * User-specified key/value pairs for the resource. Individual keys can be removed
5317
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
5318
+ * by setting `metadata` to `null`.
5319
+ */
5320
+ metadata?: {
5321
+ [key: string]: string | null;
5322
+ } | null;
5323
+ }
5324
+ namespace NewFloatingGroupedWithMinMaxThresholdsPrice {
5325
+ /**
5326
+ * Configuration for grouped_with_min_max_thresholds pricing
5327
+ */
5328
+ interface GroupedWithMinMaxThresholdsConfig {
5329
+ /**
5330
+ * The event property used to group before applying thresholds
5331
+ */
5332
+ grouping_key: string;
5333
+ /**
5334
+ * The maximum amount to charge each group
5335
+ */
5336
+ maximum_charge: string;
5337
+ /**
5338
+ * The minimum amount to charge each group, regardless of usage
5339
+ */
5340
+ minimum_charge: string;
5341
+ /**
5342
+ * The base price charged per group
5343
+ */
5344
+ per_unit_rate: string;
5345
+ }
5346
+ }
5347
+ interface NewFloatingPercentCompositePrice {
5348
+ /**
5349
+ * The cadence to bill for this price on.
5350
+ */
5351
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
5352
+ /**
5353
+ * An ISO 4217 currency string for which this price is billed in.
5354
+ */
5355
+ currency: string;
5356
+ /**
5357
+ * The id of the item the price will be associated with.
5358
+ */
5359
+ item_id: string;
5360
+ /**
5361
+ * The pricing model type
5362
+ */
5363
+ model_type: 'percent';
5364
+ /**
5365
+ * The name of the price.
5366
+ */
5367
+ name: string;
5368
+ /**
5369
+ * Configuration for percent pricing
5370
+ */
5371
+ percent_config: NewFloatingPercentCompositePrice.PercentConfig;
5372
+ /**
5373
+ * The id of the billable metric for the price. Only needed if the price is
5374
+ * usage-based.
5375
+ */
5376
+ billable_metric_id?: string | null;
5377
+ /**
5378
+ * If the Price represents a fixed cost, the price will be billed in-advance if
5379
+ * this is true, and in-arrears if this is false.
5380
+ */
5381
+ billed_in_advance?: boolean | null;
5382
+ /**
5383
+ * For custom cadence: specifies the duration of the billing period in days or
5384
+ * months.
5385
+ */
5386
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
5387
+ /**
5388
+ * The per unit conversion rate of the price currency to the invoicing currency.
4821
5389
  */
4822
- amount_discount: number;
4823
- discount_type: 'amount';
4824
- }
4825
- interface PercentageDiscountCreationParams {
4826
- discount_type: 'percentage';
5390
+ conversion_rate?: number | null;
4827
5391
  /**
4828
- * Only available if discount_type is `percentage`. This is a number between 0
4829
- * and 1.
5392
+ * The configuration for the rate of the price currency to the invoicing currency.
4830
5393
  */
4831
- percentage_discount: number;
4832
- }
4833
- interface UsageDiscountCreationParams {
4834
- discount_type: 'usage';
5394
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
4835
5395
  /**
4836
- * Only available if discount_type is `usage`. Number of usage units that this
4837
- * discount is for.
5396
+ * For dimensional price: specifies a price group and dimension values
4838
5397
  */
4839
- usage_discount: number;
4840
- }
4841
- interface FixedFeeQuantityTransition {
5398
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
4842
5399
  /**
4843
- * The date that the fixed fee quantity transition should take effect.
5400
+ * An alias for the price.
4844
5401
  */
4845
- effective_date: string;
5402
+ external_price_id?: string | null;
4846
5403
  /**
4847
- * The quantity of the fixed fee quantity transition.
5404
+ * If the Price represents a fixed cost, this represents the quantity of units
5405
+ * applied.
4848
5406
  */
4849
- quantity: number;
5407
+ fixed_price_quantity?: number | null;
5408
+ /**
5409
+ * The property used to group this price on an invoice
5410
+ */
5411
+ invoice_grouping_key?: string | null;
5412
+ /**
5413
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
5414
+ * If unspecified, a single invoice is produced per billing cycle.
5415
+ */
5416
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
5417
+ /**
5418
+ * User-specified key/value pairs for the resource. Individual keys can be removed
5419
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
5420
+ * by setting `metadata` to `null`.
5421
+ */
5422
+ metadata?: {
5423
+ [key: string]: string | null;
5424
+ } | null;
4850
5425
  }
4851
- interface NewFloatingGroupedWithMinMaxThresholdsPrice {
5426
+ namespace NewFloatingPercentCompositePrice {
5427
+ /**
5428
+ * Configuration for percent pricing
5429
+ */
5430
+ interface PercentConfig {
5431
+ /**
5432
+ * What percent of the component subtotals to charge
5433
+ */
5434
+ percent: number;
5435
+ }
5436
+ }
5437
+ interface NewFloatingEventOutputPrice {
4852
5438
  /**
4853
5439
  * The cadence to bill for this price on.
4854
5440
  */
@@ -4858,9 +5444,9 @@ export declare namespace SubscriptionPriceIntervalsParams {
4858
5444
  */
4859
5445
  currency: string;
4860
5446
  /**
4861
- * Configuration for grouped_with_min_max_thresholds pricing
5447
+ * Configuration for event_output pricing
4862
5448
  */
4863
- grouped_with_min_max_thresholds_config: NewFloatingGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
5449
+ event_output_config: NewFloatingEventOutputPrice.EventOutputConfig;
4864
5450
  /**
4865
5451
  * The id of the item the price will be associated with.
4866
5452
  */
@@ -4868,7 +5454,7 @@ export declare namespace SubscriptionPriceIntervalsParams {
4868
5454
  /**
4869
5455
  * The pricing model type
4870
5456
  */
4871
- model_type: 'grouped_with_min_max_thresholds';
5457
+ model_type: 'event_output';
4872
5458
  /**
4873
5459
  * The name of the price.
4874
5460
  */
@@ -4927,27 +5513,20 @@ export declare namespace SubscriptionPriceIntervalsParams {
4927
5513
  [key: string]: string | null;
4928
5514
  } | null;
4929
5515
  }
4930
- namespace NewFloatingGroupedWithMinMaxThresholdsPrice {
5516
+ namespace NewFloatingEventOutputPrice {
4931
5517
  /**
4932
- * Configuration for grouped_with_min_max_thresholds pricing
5518
+ * Configuration for event_output pricing
4933
5519
  */
4934
- interface GroupedWithMinMaxThresholdsConfig {
4935
- /**
4936
- * The event property used to group before applying thresholds
4937
- */
4938
- grouping_key: string;
4939
- /**
4940
- * The maximum amount to charge each group
4941
- */
4942
- maximum_charge: string;
5520
+ interface EventOutputConfig {
4943
5521
  /**
4944
- * The minimum amount to charge each group, regardless of usage
5522
+ * The key in the event data to extract the unit rate from.
4945
5523
  */
4946
- minimum_charge: string;
5524
+ unit_rating_key: string;
4947
5525
  /**
4948
- * The base price charged per group
5526
+ * An optional key in the event data to group by (e.g., event ID). All events will
5527
+ * also be grouped by their unit rate.
4949
5528
  */
4950
- per_unit_rate: string;
5529
+ grouping_key?: string | null;
4951
5530
  }
4952
5531
  }
4953
5532
  }
@@ -5265,7 +5844,7 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
5265
5844
  /**
5266
5845
  * New subscription price request body params.
5267
5846
  */
5268
- price?: SubscriptionsAPI.NewSubscriptionUnitPrice | SubscriptionsAPI.NewSubscriptionTieredPrice | SubscriptionsAPI.NewSubscriptionBulkPrice | SubscriptionsAPI.NewSubscriptionPackagePrice | SubscriptionsAPI.NewSubscriptionMatrixPrice | SubscriptionsAPI.NewSubscriptionThresholdTotalAmountPrice | SubscriptionsAPI.NewSubscriptionTieredPackagePrice | SubscriptionsAPI.NewSubscriptionTieredWithMinimumPrice | SubscriptionsAPI.NewSubscriptionGroupedTieredPrice | SubscriptionsAPI.NewSubscriptionTieredPackageWithMinimumPrice | SubscriptionsAPI.NewSubscriptionPackageWithAllocationPrice | SubscriptionsAPI.NewSubscriptionUnitWithPercentPrice | SubscriptionsAPI.NewSubscriptionMatrixWithAllocationPrice | AddPrice.NewSubscriptionTieredWithProrationPrice | SubscriptionsAPI.NewSubscriptionUnitWithProrationPrice | SubscriptionsAPI.NewSubscriptionGroupedAllocationPrice | SubscriptionsAPI.NewSubscriptionBulkWithProrationPrice | SubscriptionsAPI.NewSubscriptionGroupedWithProratedMinimumPrice | SubscriptionsAPI.NewSubscriptionGroupedWithMeteredMinimumPrice | AddPrice.NewSubscriptionGroupedWithMinMaxThresholdsPrice | SubscriptionsAPI.NewSubscriptionMatrixWithDisplayNamePrice | SubscriptionsAPI.NewSubscriptionGroupedTieredPackagePrice | SubscriptionsAPI.NewSubscriptionMaxGroupTieredPackagePrice | SubscriptionsAPI.NewSubscriptionScalableMatrixWithUnitPricingPrice | SubscriptionsAPI.NewSubscriptionScalableMatrixWithTieredPricingPrice | SubscriptionsAPI.NewSubscriptionCumulativeGroupedBulkPrice | SubscriptionsAPI.NewSubscriptionMinimumCompositePrice | null;
5847
+ price?: SubscriptionsAPI.NewSubscriptionUnitPrice | SubscriptionsAPI.NewSubscriptionTieredPrice | SubscriptionsAPI.NewSubscriptionBulkPrice | SubscriptionsAPI.NewSubscriptionPackagePrice | SubscriptionsAPI.NewSubscriptionMatrixPrice | SubscriptionsAPI.NewSubscriptionThresholdTotalAmountPrice | SubscriptionsAPI.NewSubscriptionTieredPackagePrice | SubscriptionsAPI.NewSubscriptionTieredWithMinimumPrice | SubscriptionsAPI.NewSubscriptionGroupedTieredPrice | SubscriptionsAPI.NewSubscriptionTieredPackageWithMinimumPrice | SubscriptionsAPI.NewSubscriptionPackageWithAllocationPrice | SubscriptionsAPI.NewSubscriptionUnitWithPercentPrice | SubscriptionsAPI.NewSubscriptionMatrixWithAllocationPrice | AddPrice.NewSubscriptionTieredWithProrationPrice | SubscriptionsAPI.NewSubscriptionUnitWithProrationPrice | SubscriptionsAPI.NewSubscriptionGroupedAllocationPrice | SubscriptionsAPI.NewSubscriptionBulkWithProrationPrice | SubscriptionsAPI.NewSubscriptionGroupedWithProratedMinimumPrice | SubscriptionsAPI.NewSubscriptionGroupedWithMeteredMinimumPrice | AddPrice.NewSubscriptionGroupedWithMinMaxThresholdsPrice | SubscriptionsAPI.NewSubscriptionMatrixWithDisplayNamePrice | SubscriptionsAPI.NewSubscriptionGroupedTieredPackagePrice | SubscriptionsAPI.NewSubscriptionMaxGroupTieredPackagePrice | SubscriptionsAPI.NewSubscriptionScalableMatrixWithUnitPricingPrice | SubscriptionsAPI.NewSubscriptionScalableMatrixWithTieredPricingPrice | SubscriptionsAPI.NewSubscriptionCumulativeGroupedBulkPrice | SubscriptionsAPI.NewSubscriptionMinimumCompositePrice | AddPrice.NewSubscriptionPercentCompositePrice | AddPrice.NewSubscriptionEventOutputPrice | null;
5269
5848
  /**
5270
5849
  * The id of the price to add to the subscription.
5271
5850
  */
@@ -5290,15 +5869,235 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
5290
5869
  /**
5291
5870
  * The pricing model type
5292
5871
  */
5293
- model_type: 'tiered_with_proration';
5872
+ model_type: 'tiered_with_proration';
5873
+ /**
5874
+ * The name of the price.
5875
+ */
5876
+ name: string;
5877
+ /**
5878
+ * Configuration for tiered_with_proration pricing
5879
+ */
5880
+ tiered_with_proration_config: NewSubscriptionTieredWithProrationPrice.TieredWithProrationConfig;
5881
+ /**
5882
+ * The id of the billable metric for the price. Only needed if the price is
5883
+ * usage-based.
5884
+ */
5885
+ billable_metric_id?: string | null;
5886
+ /**
5887
+ * If the Price represents a fixed cost, the price will be billed in-advance if
5888
+ * this is true, and in-arrears if this is false.
5889
+ */
5890
+ billed_in_advance?: boolean | null;
5891
+ /**
5892
+ * For custom cadence: specifies the duration of the billing period in days or
5893
+ * months.
5894
+ */
5895
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
5896
+ /**
5897
+ * The per unit conversion rate of the price currency to the invoicing currency.
5898
+ */
5899
+ conversion_rate?: number | null;
5900
+ /**
5901
+ * The configuration for the rate of the price currency to the invoicing currency.
5902
+ */
5903
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
5904
+ /**
5905
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
5906
+ * price is billed.
5907
+ */
5908
+ currency?: string | null;
5909
+ /**
5910
+ * For dimensional price: specifies a price group and dimension values
5911
+ */
5912
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
5913
+ /**
5914
+ * An alias for the price.
5915
+ */
5916
+ external_price_id?: string | null;
5917
+ /**
5918
+ * If the Price represents a fixed cost, this represents the quantity of units
5919
+ * applied.
5920
+ */
5921
+ fixed_price_quantity?: number | null;
5922
+ /**
5923
+ * The property used to group this price on an invoice
5924
+ */
5925
+ invoice_grouping_key?: string | null;
5926
+ /**
5927
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
5928
+ * If unspecified, a single invoice is produced per billing cycle.
5929
+ */
5930
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
5931
+ /**
5932
+ * User-specified key/value pairs for the resource. Individual keys can be removed
5933
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
5934
+ * by setting `metadata` to `null`.
5935
+ */
5936
+ metadata?: {
5937
+ [key: string]: string | null;
5938
+ } | null;
5939
+ /**
5940
+ * A transient ID that can be used to reference this price when adding adjustments
5941
+ * in the same API call.
5942
+ */
5943
+ reference_id?: string | null;
5944
+ }
5945
+ namespace NewSubscriptionTieredWithProrationPrice {
5946
+ /**
5947
+ * Configuration for tiered_with_proration pricing
5948
+ */
5949
+ interface TieredWithProrationConfig {
5950
+ /**
5951
+ * Tiers for rating based on total usage quantities into the specified tier with
5952
+ * proration
5953
+ */
5954
+ tiers: Array<TieredWithProrationConfig.Tier>;
5955
+ }
5956
+ namespace TieredWithProrationConfig {
5957
+ /**
5958
+ * Configuration for a single tiered with proration tier
5959
+ */
5960
+ interface Tier {
5961
+ /**
5962
+ * Inclusive tier starting value
5963
+ */
5964
+ tier_lower_bound: string;
5965
+ /**
5966
+ * Amount per unit
5967
+ */
5968
+ unit_amount: string;
5969
+ }
5970
+ }
5971
+ }
5972
+ interface NewSubscriptionGroupedWithMinMaxThresholdsPrice {
5973
+ /**
5974
+ * The cadence to bill for this price on.
5975
+ */
5976
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
5977
+ /**
5978
+ * Configuration for grouped_with_min_max_thresholds pricing
5979
+ */
5980
+ grouped_with_min_max_thresholds_config: NewSubscriptionGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
5981
+ /**
5982
+ * The id of the item the price will be associated with.
5983
+ */
5984
+ item_id: string;
5985
+ /**
5986
+ * The pricing model type
5987
+ */
5988
+ model_type: 'grouped_with_min_max_thresholds';
5989
+ /**
5990
+ * The name of the price.
5991
+ */
5992
+ name: string;
5993
+ /**
5994
+ * The id of the billable metric for the price. Only needed if the price is
5995
+ * usage-based.
5996
+ */
5997
+ billable_metric_id?: string | null;
5998
+ /**
5999
+ * If the Price represents a fixed cost, the price will be billed in-advance if
6000
+ * this is true, and in-arrears if this is false.
6001
+ */
6002
+ billed_in_advance?: boolean | null;
6003
+ /**
6004
+ * For custom cadence: specifies the duration of the billing period in days or
6005
+ * months.
6006
+ */
6007
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
6008
+ /**
6009
+ * The per unit conversion rate of the price currency to the invoicing currency.
6010
+ */
6011
+ conversion_rate?: number | null;
6012
+ /**
6013
+ * The configuration for the rate of the price currency to the invoicing currency.
6014
+ */
6015
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
6016
+ /**
6017
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
6018
+ * price is billed.
6019
+ */
6020
+ currency?: string | null;
6021
+ /**
6022
+ * For dimensional price: specifies a price group and dimension values
6023
+ */
6024
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
6025
+ /**
6026
+ * An alias for the price.
6027
+ */
6028
+ external_price_id?: string | null;
6029
+ /**
6030
+ * If the Price represents a fixed cost, this represents the quantity of units
6031
+ * applied.
6032
+ */
6033
+ fixed_price_quantity?: number | null;
6034
+ /**
6035
+ * The property used to group this price on an invoice
6036
+ */
6037
+ invoice_grouping_key?: string | null;
6038
+ /**
6039
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
6040
+ * If unspecified, a single invoice is produced per billing cycle.
6041
+ */
6042
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
6043
+ /**
6044
+ * User-specified key/value pairs for the resource. Individual keys can be removed
6045
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
6046
+ * by setting `metadata` to `null`.
6047
+ */
6048
+ metadata?: {
6049
+ [key: string]: string | null;
6050
+ } | null;
6051
+ /**
6052
+ * A transient ID that can be used to reference this price when adding adjustments
6053
+ * in the same API call.
6054
+ */
6055
+ reference_id?: string | null;
6056
+ }
6057
+ namespace NewSubscriptionGroupedWithMinMaxThresholdsPrice {
6058
+ /**
6059
+ * Configuration for grouped_with_min_max_thresholds pricing
6060
+ */
6061
+ interface GroupedWithMinMaxThresholdsConfig {
6062
+ /**
6063
+ * The event property used to group before applying thresholds
6064
+ */
6065
+ grouping_key: string;
6066
+ /**
6067
+ * The maximum amount to charge each group
6068
+ */
6069
+ maximum_charge: string;
6070
+ /**
6071
+ * The minimum amount to charge each group, regardless of usage
6072
+ */
6073
+ minimum_charge: string;
6074
+ /**
6075
+ * The base price charged per group
6076
+ */
6077
+ per_unit_rate: string;
6078
+ }
6079
+ }
6080
+ interface NewSubscriptionPercentCompositePrice {
6081
+ /**
6082
+ * The cadence to bill for this price on.
6083
+ */
6084
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
6085
+ /**
6086
+ * The id of the item the price will be associated with.
6087
+ */
6088
+ item_id: string;
6089
+ /**
6090
+ * The pricing model type
6091
+ */
6092
+ model_type: 'percent';
5294
6093
  /**
5295
6094
  * The name of the price.
5296
6095
  */
5297
6096
  name: string;
5298
6097
  /**
5299
- * Configuration for tiered_with_proration pricing
6098
+ * Configuration for percent pricing
5300
6099
  */
5301
- tiered_with_proration_config: NewSubscriptionTieredWithProrationPrice.TieredWithProrationConfig;
6100
+ percent_config: NewSubscriptionPercentCompositePrice.PercentConfig;
5302
6101
  /**
5303
6102
  * The id of the billable metric for the price. Only needed if the price is
5304
6103
  * usage-based.
@@ -5363,42 +6162,26 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
5363
6162
  */
5364
6163
  reference_id?: string | null;
5365
6164
  }
5366
- namespace NewSubscriptionTieredWithProrationPrice {
6165
+ namespace NewSubscriptionPercentCompositePrice {
5367
6166
  /**
5368
- * Configuration for tiered_with_proration pricing
6167
+ * Configuration for percent pricing
5369
6168
  */
5370
- interface TieredWithProrationConfig {
5371
- /**
5372
- * Tiers for rating based on total usage quantities into the specified tier with
5373
- * proration
5374
- */
5375
- tiers: Array<TieredWithProrationConfig.Tier>;
5376
- }
5377
- namespace TieredWithProrationConfig {
6169
+ interface PercentConfig {
5378
6170
  /**
5379
- * Configuration for a single tiered with proration tier
6171
+ * What percent of the component subtotals to charge
5380
6172
  */
5381
- interface Tier {
5382
- /**
5383
- * Inclusive tier starting value
5384
- */
5385
- tier_lower_bound: string;
5386
- /**
5387
- * Amount per unit
5388
- */
5389
- unit_amount: string;
5390
- }
6173
+ percent: number;
5391
6174
  }
5392
6175
  }
5393
- interface NewSubscriptionGroupedWithMinMaxThresholdsPrice {
6176
+ interface NewSubscriptionEventOutputPrice {
5394
6177
  /**
5395
6178
  * The cadence to bill for this price on.
5396
6179
  */
5397
6180
  cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
5398
6181
  /**
5399
- * Configuration for grouped_with_min_max_thresholds pricing
6182
+ * Configuration for event_output pricing
5400
6183
  */
5401
- grouped_with_min_max_thresholds_config: NewSubscriptionGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
6184
+ event_output_config: NewSubscriptionEventOutputPrice.EventOutputConfig;
5402
6185
  /**
5403
6186
  * The id of the item the price will be associated with.
5404
6187
  */
@@ -5406,7 +6189,7 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
5406
6189
  /**
5407
6190
  * The pricing model type
5408
6191
  */
5409
- model_type: 'grouped_with_min_max_thresholds';
6192
+ model_type: 'event_output';
5410
6193
  /**
5411
6194
  * The name of the price.
5412
6195
  */
@@ -5475,27 +6258,20 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
5475
6258
  */
5476
6259
  reference_id?: string | null;
5477
6260
  }
5478
- namespace NewSubscriptionGroupedWithMinMaxThresholdsPrice {
6261
+ namespace NewSubscriptionEventOutputPrice {
5479
6262
  /**
5480
- * Configuration for grouped_with_min_max_thresholds pricing
6263
+ * Configuration for event_output pricing
5481
6264
  */
5482
- interface GroupedWithMinMaxThresholdsConfig {
5483
- /**
5484
- * The event property used to group before applying thresholds
5485
- */
5486
- grouping_key: string;
6265
+ interface EventOutputConfig {
5487
6266
  /**
5488
- * The maximum amount to charge each group
5489
- */
5490
- maximum_charge: string;
5491
- /**
5492
- * The minimum amount to charge each group, regardless of usage
6267
+ * The key in the event data to extract the unit rate from.
5493
6268
  */
5494
- minimum_charge: string;
6269
+ unit_rating_key: string;
5495
6270
  /**
5496
- * The base price charged per group
6271
+ * An optional key in the event data to group by (e.g., event ID). All events will
6272
+ * also be grouped by their unit rate.
5497
6273
  */
5498
- per_unit_rate: string;
6274
+ grouping_key?: string | null;
5499
6275
  }
5500
6276
  }
5501
6277
  }
@@ -5560,7 +6336,7 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
5560
6336
  /**
5561
6337
  * New subscription price request body params.
5562
6338
  */
5563
- price?: SubscriptionsAPI.NewSubscriptionUnitPrice | SubscriptionsAPI.NewSubscriptionTieredPrice | SubscriptionsAPI.NewSubscriptionBulkPrice | SubscriptionsAPI.NewSubscriptionPackagePrice | SubscriptionsAPI.NewSubscriptionMatrixPrice | SubscriptionsAPI.NewSubscriptionThresholdTotalAmountPrice | SubscriptionsAPI.NewSubscriptionTieredPackagePrice | SubscriptionsAPI.NewSubscriptionTieredWithMinimumPrice | SubscriptionsAPI.NewSubscriptionGroupedTieredPrice | SubscriptionsAPI.NewSubscriptionTieredPackageWithMinimumPrice | SubscriptionsAPI.NewSubscriptionPackageWithAllocationPrice | SubscriptionsAPI.NewSubscriptionUnitWithPercentPrice | SubscriptionsAPI.NewSubscriptionMatrixWithAllocationPrice | ReplacePrice.NewSubscriptionTieredWithProrationPrice | SubscriptionsAPI.NewSubscriptionUnitWithProrationPrice | SubscriptionsAPI.NewSubscriptionGroupedAllocationPrice | SubscriptionsAPI.NewSubscriptionBulkWithProrationPrice | SubscriptionsAPI.NewSubscriptionGroupedWithProratedMinimumPrice | SubscriptionsAPI.NewSubscriptionGroupedWithMeteredMinimumPrice | ReplacePrice.NewSubscriptionGroupedWithMinMaxThresholdsPrice | SubscriptionsAPI.NewSubscriptionMatrixWithDisplayNamePrice | SubscriptionsAPI.NewSubscriptionGroupedTieredPackagePrice | SubscriptionsAPI.NewSubscriptionMaxGroupTieredPackagePrice | SubscriptionsAPI.NewSubscriptionScalableMatrixWithUnitPricingPrice | SubscriptionsAPI.NewSubscriptionScalableMatrixWithTieredPricingPrice | SubscriptionsAPI.NewSubscriptionCumulativeGroupedBulkPrice | SubscriptionsAPI.NewSubscriptionMinimumCompositePrice | null;
6339
+ price?: SubscriptionsAPI.NewSubscriptionUnitPrice | SubscriptionsAPI.NewSubscriptionTieredPrice | SubscriptionsAPI.NewSubscriptionBulkPrice | SubscriptionsAPI.NewSubscriptionPackagePrice | SubscriptionsAPI.NewSubscriptionMatrixPrice | SubscriptionsAPI.NewSubscriptionThresholdTotalAmountPrice | SubscriptionsAPI.NewSubscriptionTieredPackagePrice | SubscriptionsAPI.NewSubscriptionTieredWithMinimumPrice | SubscriptionsAPI.NewSubscriptionGroupedTieredPrice | SubscriptionsAPI.NewSubscriptionTieredPackageWithMinimumPrice | SubscriptionsAPI.NewSubscriptionPackageWithAllocationPrice | SubscriptionsAPI.NewSubscriptionUnitWithPercentPrice | SubscriptionsAPI.NewSubscriptionMatrixWithAllocationPrice | ReplacePrice.NewSubscriptionTieredWithProrationPrice | SubscriptionsAPI.NewSubscriptionUnitWithProrationPrice | SubscriptionsAPI.NewSubscriptionGroupedAllocationPrice | SubscriptionsAPI.NewSubscriptionBulkWithProrationPrice | SubscriptionsAPI.NewSubscriptionGroupedWithProratedMinimumPrice | SubscriptionsAPI.NewSubscriptionGroupedWithMeteredMinimumPrice | ReplacePrice.NewSubscriptionGroupedWithMinMaxThresholdsPrice | SubscriptionsAPI.NewSubscriptionMatrixWithDisplayNamePrice | SubscriptionsAPI.NewSubscriptionGroupedTieredPackagePrice | SubscriptionsAPI.NewSubscriptionMaxGroupTieredPackagePrice | SubscriptionsAPI.NewSubscriptionScalableMatrixWithUnitPricingPrice | SubscriptionsAPI.NewSubscriptionScalableMatrixWithTieredPricingPrice | SubscriptionsAPI.NewSubscriptionCumulativeGroupedBulkPrice | SubscriptionsAPI.NewSubscriptionMinimumCompositePrice | ReplacePrice.NewSubscriptionPercentCompositePrice | ReplacePrice.NewSubscriptionEventOutputPrice | null;
5564
6340
  /**
5565
6341
  * The id of the price to add to the subscription.
5566
6342
  */
@@ -5787,6 +6563,203 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
5787
6563
  per_unit_rate: string;
5788
6564
  }
5789
6565
  }
6566
+ interface NewSubscriptionPercentCompositePrice {
6567
+ /**
6568
+ * The cadence to bill for this price on.
6569
+ */
6570
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
6571
+ /**
6572
+ * The id of the item the price will be associated with.
6573
+ */
6574
+ item_id: string;
6575
+ /**
6576
+ * The pricing model type
6577
+ */
6578
+ model_type: 'percent';
6579
+ /**
6580
+ * The name of the price.
6581
+ */
6582
+ name: string;
6583
+ /**
6584
+ * Configuration for percent pricing
6585
+ */
6586
+ percent_config: NewSubscriptionPercentCompositePrice.PercentConfig;
6587
+ /**
6588
+ * The id of the billable metric for the price. Only needed if the price is
6589
+ * usage-based.
6590
+ */
6591
+ billable_metric_id?: string | null;
6592
+ /**
6593
+ * If the Price represents a fixed cost, the price will be billed in-advance if
6594
+ * this is true, and in-arrears if this is false.
6595
+ */
6596
+ billed_in_advance?: boolean | null;
6597
+ /**
6598
+ * For custom cadence: specifies the duration of the billing period in days or
6599
+ * months.
6600
+ */
6601
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
6602
+ /**
6603
+ * The per unit conversion rate of the price currency to the invoicing currency.
6604
+ */
6605
+ conversion_rate?: number | null;
6606
+ /**
6607
+ * The configuration for the rate of the price currency to the invoicing currency.
6608
+ */
6609
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
6610
+ /**
6611
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
6612
+ * price is billed.
6613
+ */
6614
+ currency?: string | null;
6615
+ /**
6616
+ * For dimensional price: specifies a price group and dimension values
6617
+ */
6618
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
6619
+ /**
6620
+ * An alias for the price.
6621
+ */
6622
+ external_price_id?: string | null;
6623
+ /**
6624
+ * If the Price represents a fixed cost, this represents the quantity of units
6625
+ * applied.
6626
+ */
6627
+ fixed_price_quantity?: number | null;
6628
+ /**
6629
+ * The property used to group this price on an invoice
6630
+ */
6631
+ invoice_grouping_key?: string | null;
6632
+ /**
6633
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
6634
+ * If unspecified, a single invoice is produced per billing cycle.
6635
+ */
6636
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
6637
+ /**
6638
+ * User-specified key/value pairs for the resource. Individual keys can be removed
6639
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
6640
+ * by setting `metadata` to `null`.
6641
+ */
6642
+ metadata?: {
6643
+ [key: string]: string | null;
6644
+ } | null;
6645
+ /**
6646
+ * A transient ID that can be used to reference this price when adding adjustments
6647
+ * in the same API call.
6648
+ */
6649
+ reference_id?: string | null;
6650
+ }
6651
+ namespace NewSubscriptionPercentCompositePrice {
6652
+ /**
6653
+ * Configuration for percent pricing
6654
+ */
6655
+ interface PercentConfig {
6656
+ /**
6657
+ * What percent of the component subtotals to charge
6658
+ */
6659
+ percent: number;
6660
+ }
6661
+ }
6662
+ interface NewSubscriptionEventOutputPrice {
6663
+ /**
6664
+ * The cadence to bill for this price on.
6665
+ */
6666
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
6667
+ /**
6668
+ * Configuration for event_output pricing
6669
+ */
6670
+ event_output_config: NewSubscriptionEventOutputPrice.EventOutputConfig;
6671
+ /**
6672
+ * The id of the item the price will be associated with.
6673
+ */
6674
+ item_id: string;
6675
+ /**
6676
+ * The pricing model type
6677
+ */
6678
+ model_type: 'event_output';
6679
+ /**
6680
+ * The name of the price.
6681
+ */
6682
+ name: string;
6683
+ /**
6684
+ * The id of the billable metric for the price. Only needed if the price is
6685
+ * usage-based.
6686
+ */
6687
+ billable_metric_id?: string | null;
6688
+ /**
6689
+ * If the Price represents a fixed cost, the price will be billed in-advance if
6690
+ * this is true, and in-arrears if this is false.
6691
+ */
6692
+ billed_in_advance?: boolean | null;
6693
+ /**
6694
+ * For custom cadence: specifies the duration of the billing period in days or
6695
+ * months.
6696
+ */
6697
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
6698
+ /**
6699
+ * The per unit conversion rate of the price currency to the invoicing currency.
6700
+ */
6701
+ conversion_rate?: number | null;
6702
+ /**
6703
+ * The configuration for the rate of the price currency to the invoicing currency.
6704
+ */
6705
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
6706
+ /**
6707
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
6708
+ * price is billed.
6709
+ */
6710
+ currency?: string | null;
6711
+ /**
6712
+ * For dimensional price: specifies a price group and dimension values
6713
+ */
6714
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
6715
+ /**
6716
+ * An alias for the price.
6717
+ */
6718
+ external_price_id?: string | null;
6719
+ /**
6720
+ * If the Price represents a fixed cost, this represents the quantity of units
6721
+ * applied.
6722
+ */
6723
+ fixed_price_quantity?: number | null;
6724
+ /**
6725
+ * The property used to group this price on an invoice
6726
+ */
6727
+ invoice_grouping_key?: string | null;
6728
+ /**
6729
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
6730
+ * If unspecified, a single invoice is produced per billing cycle.
6731
+ */
6732
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
6733
+ /**
6734
+ * User-specified key/value pairs for the resource. Individual keys can be removed
6735
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
6736
+ * by setting `metadata` to `null`.
6737
+ */
6738
+ metadata?: {
6739
+ [key: string]: string | null;
6740
+ } | null;
6741
+ /**
6742
+ * A transient ID that can be used to reference this price when adding adjustments
6743
+ * in the same API call.
6744
+ */
6745
+ reference_id?: string | null;
6746
+ }
6747
+ namespace NewSubscriptionEventOutputPrice {
6748
+ /**
6749
+ * Configuration for event_output pricing
6750
+ */
6751
+ interface EventOutputConfig {
6752
+ /**
6753
+ * The key in the event data to extract the unit rate from.
6754
+ */
6755
+ unit_rating_key: string;
6756
+ /**
6757
+ * An optional key in the event data to group by (e.g., event ID). All events will
6758
+ * also be grouped by their unit rate.
6759
+ */
6760
+ grouping_key?: string | null;
6761
+ }
6762
+ }
5790
6763
  }
5791
6764
  }
5792
6765
  export interface SubscriptionTriggerPhaseParams {