orb-billing 5.31.0 → 5.33.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.
@@ -281,6 +281,7 @@ export type PriceCreateParams =
281
281
  | PriceCreateParams.NewFloatingScalableMatrixWithUnitPricingPrice
282
282
  | PriceCreateParams.NewFloatingScalableMatrixWithTieredPricingPrice
283
283
  | PriceCreateParams.NewFloatingCumulativeGroupedBulkPrice
284
+ | PriceCreateParams.NewFloatingCumulativeGroupedAllocationPrice
284
285
  | PriceCreateParams.NewFloatingMinimumCompositePrice
285
286
  | PriceCreateParams.NewFloatingPercentCompositePrice
286
287
  | PriceCreateParams.NewFloatingEventOutputPrice;
@@ -3592,6 +3593,127 @@ export declare namespace PriceCreateParams {
3592
3593
  }
3593
3594
  }
3594
3595
 
3596
+ export interface NewFloatingCumulativeGroupedAllocationPrice {
3597
+ /**
3598
+ * The cadence to bill for this price on.
3599
+ */
3600
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
3601
+
3602
+ /**
3603
+ * Configuration for cumulative_grouped_allocation pricing
3604
+ */
3605
+ cumulative_grouped_allocation_config: NewFloatingCumulativeGroupedAllocationPrice.CumulativeGroupedAllocationConfig;
3606
+
3607
+ /**
3608
+ * An ISO 4217 currency string for which this price is billed in.
3609
+ */
3610
+ currency: string;
3611
+
3612
+ /**
3613
+ * The id of the item the price will be associated with.
3614
+ */
3615
+ item_id: string;
3616
+
3617
+ /**
3618
+ * The pricing model type
3619
+ */
3620
+ model_type: 'cumulative_grouped_allocation';
3621
+
3622
+ /**
3623
+ * The name of the price.
3624
+ */
3625
+ name: string;
3626
+
3627
+ /**
3628
+ * The id of the billable metric for the price. Only needed if the price is
3629
+ * usage-based.
3630
+ */
3631
+ billable_metric_id?: string | null;
3632
+
3633
+ /**
3634
+ * If the Price represents a fixed cost, the price will be billed in-advance if
3635
+ * this is true, and in-arrears if this is false.
3636
+ */
3637
+ billed_in_advance?: boolean | null;
3638
+
3639
+ /**
3640
+ * For custom cadence: specifies the duration of the billing period in days or
3641
+ * months.
3642
+ */
3643
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
3644
+
3645
+ /**
3646
+ * The per unit conversion rate of the price currency to the invoicing currency.
3647
+ */
3648
+ conversion_rate?: number | null;
3649
+
3650
+ /**
3651
+ * The configuration for the rate of the price currency to the invoicing currency.
3652
+ */
3653
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
3654
+
3655
+ /**
3656
+ * For dimensional price: specifies a price group and dimension values
3657
+ */
3658
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
3659
+
3660
+ /**
3661
+ * An alias for the price.
3662
+ */
3663
+ external_price_id?: string | null;
3664
+
3665
+ /**
3666
+ * If the Price represents a fixed cost, this represents the quantity of units
3667
+ * applied.
3668
+ */
3669
+ fixed_price_quantity?: number | null;
3670
+
3671
+ /**
3672
+ * The property used to group this price on an invoice
3673
+ */
3674
+ invoice_grouping_key?: string | null;
3675
+
3676
+ /**
3677
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
3678
+ * If unspecified, a single invoice is produced per billing cycle.
3679
+ */
3680
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
3681
+
3682
+ /**
3683
+ * User-specified key/value pairs for the resource. Individual keys can be removed
3684
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
3685
+ * by setting `metadata` to `null`.
3686
+ */
3687
+ metadata?: { [key: string]: string | null } | null;
3688
+ }
3689
+
3690
+ export namespace NewFloatingCumulativeGroupedAllocationPrice {
3691
+ /**
3692
+ * Configuration for cumulative_grouped_allocation pricing
3693
+ */
3694
+ export interface CumulativeGroupedAllocationConfig {
3695
+ /**
3696
+ * The overall allocation across all groups
3697
+ */
3698
+ cumulative_allocation: string;
3699
+
3700
+ /**
3701
+ * The allocation per individual group
3702
+ */
3703
+ group_allocation: string;
3704
+
3705
+ /**
3706
+ * The event property used to group usage before applying allocations
3707
+ */
3708
+ grouping_key: string;
3709
+
3710
+ /**
3711
+ * The amount to charge for each unit outside of the allocation
3712
+ */
3713
+ unit_amount: string;
3714
+ }
3715
+ }
3716
+
3595
3717
  export interface NewFloatingMinimumCompositePrice {
3596
3718
  /**
3597
3719
  * The cadence to bill for this price on.
@@ -4055,6 +4177,7 @@ export namespace PriceEvaluateMultipleParams {
4055
4177
  | Shared.NewFloatingScalableMatrixWithUnitPricingPrice
4056
4178
  | Shared.NewFloatingScalableMatrixWithTieredPricingPrice
4057
4179
  | Shared.NewFloatingCumulativeGroupedBulkPrice
4180
+ | PriceEvaluation.NewFloatingCumulativeGroupedAllocationPrice
4058
4181
  | Shared.NewFloatingMinimumCompositePrice
4059
4182
  | PriceEvaluation.NewFloatingPercentCompositePrice
4060
4183
  | PriceEvaluation.NewFloatingEventOutputPrice
@@ -4331,6 +4454,127 @@ export namespace PriceEvaluateMultipleParams {
4331
4454
  }
4332
4455
  }
4333
4456
 
4457
+ export interface NewFloatingCumulativeGroupedAllocationPrice {
4458
+ /**
4459
+ * The cadence to bill for this price on.
4460
+ */
4461
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
4462
+
4463
+ /**
4464
+ * Configuration for cumulative_grouped_allocation pricing
4465
+ */
4466
+ cumulative_grouped_allocation_config: NewFloatingCumulativeGroupedAllocationPrice.CumulativeGroupedAllocationConfig;
4467
+
4468
+ /**
4469
+ * An ISO 4217 currency string for which this price is billed in.
4470
+ */
4471
+ currency: string;
4472
+
4473
+ /**
4474
+ * The id of the item the price will be associated with.
4475
+ */
4476
+ item_id: string;
4477
+
4478
+ /**
4479
+ * The pricing model type
4480
+ */
4481
+ model_type: 'cumulative_grouped_allocation';
4482
+
4483
+ /**
4484
+ * The name of the price.
4485
+ */
4486
+ name: string;
4487
+
4488
+ /**
4489
+ * The id of the billable metric for the price. Only needed if the price is
4490
+ * usage-based.
4491
+ */
4492
+ billable_metric_id?: string | null;
4493
+
4494
+ /**
4495
+ * If the Price represents a fixed cost, the price will be billed in-advance if
4496
+ * this is true, and in-arrears if this is false.
4497
+ */
4498
+ billed_in_advance?: boolean | null;
4499
+
4500
+ /**
4501
+ * For custom cadence: specifies the duration of the billing period in days or
4502
+ * months.
4503
+ */
4504
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
4505
+
4506
+ /**
4507
+ * The per unit conversion rate of the price currency to the invoicing currency.
4508
+ */
4509
+ conversion_rate?: number | null;
4510
+
4511
+ /**
4512
+ * The configuration for the rate of the price currency to the invoicing currency.
4513
+ */
4514
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
4515
+
4516
+ /**
4517
+ * For dimensional price: specifies a price group and dimension values
4518
+ */
4519
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
4520
+
4521
+ /**
4522
+ * An alias for the price.
4523
+ */
4524
+ external_price_id?: string | null;
4525
+
4526
+ /**
4527
+ * If the Price represents a fixed cost, this represents the quantity of units
4528
+ * applied.
4529
+ */
4530
+ fixed_price_quantity?: number | null;
4531
+
4532
+ /**
4533
+ * The property used to group this price on an invoice
4534
+ */
4535
+ invoice_grouping_key?: string | null;
4536
+
4537
+ /**
4538
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
4539
+ * If unspecified, a single invoice is produced per billing cycle.
4540
+ */
4541
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
4542
+
4543
+ /**
4544
+ * User-specified key/value pairs for the resource. Individual keys can be removed
4545
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
4546
+ * by setting `metadata` to `null`.
4547
+ */
4548
+ metadata?: { [key: string]: string | null } | null;
4549
+ }
4550
+
4551
+ export namespace NewFloatingCumulativeGroupedAllocationPrice {
4552
+ /**
4553
+ * Configuration for cumulative_grouped_allocation pricing
4554
+ */
4555
+ export interface CumulativeGroupedAllocationConfig {
4556
+ /**
4557
+ * The overall allocation across all groups
4558
+ */
4559
+ cumulative_allocation: string;
4560
+
4561
+ /**
4562
+ * The allocation per individual group
4563
+ */
4564
+ group_allocation: string;
4565
+
4566
+ /**
4567
+ * The event property used to group usage before applying allocations
4568
+ */
4569
+ grouping_key: string;
4570
+
4571
+ /**
4572
+ * The amount to charge for each unit outside of the allocation
4573
+ */
4574
+ unit_amount: string;
4575
+ }
4576
+ }
4577
+
4334
4578
  export interface NewFloatingPercentCompositePrice {
4335
4579
  /**
4336
4580
  * The cadence to bill for this price on.
@@ -4673,6 +4917,7 @@ export namespace PriceEvaluatePreviewEventsParams {
4673
4917
  | Shared.NewFloatingScalableMatrixWithUnitPricingPrice
4674
4918
  | Shared.NewFloatingScalableMatrixWithTieredPricingPrice
4675
4919
  | Shared.NewFloatingCumulativeGroupedBulkPrice
4920
+ | PriceEvaluation.NewFloatingCumulativeGroupedAllocationPrice
4676
4921
  | Shared.NewFloatingMinimumCompositePrice
4677
4922
  | PriceEvaluation.NewFloatingPercentCompositePrice
4678
4923
  | PriceEvaluation.NewFloatingEventOutputPrice
@@ -4949,6 +5194,127 @@ export namespace PriceEvaluatePreviewEventsParams {
4949
5194
  }
4950
5195
  }
4951
5196
 
5197
+ export interface NewFloatingCumulativeGroupedAllocationPrice {
5198
+ /**
5199
+ * The cadence to bill for this price on.
5200
+ */
5201
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
5202
+
5203
+ /**
5204
+ * Configuration for cumulative_grouped_allocation pricing
5205
+ */
5206
+ cumulative_grouped_allocation_config: NewFloatingCumulativeGroupedAllocationPrice.CumulativeGroupedAllocationConfig;
5207
+
5208
+ /**
5209
+ * An ISO 4217 currency string for which this price is billed in.
5210
+ */
5211
+ currency: string;
5212
+
5213
+ /**
5214
+ * The id of the item the price will be associated with.
5215
+ */
5216
+ item_id: string;
5217
+
5218
+ /**
5219
+ * The pricing model type
5220
+ */
5221
+ model_type: 'cumulative_grouped_allocation';
5222
+
5223
+ /**
5224
+ * The name of the price.
5225
+ */
5226
+ name: string;
5227
+
5228
+ /**
5229
+ * The id of the billable metric for the price. Only needed if the price is
5230
+ * usage-based.
5231
+ */
5232
+ billable_metric_id?: string | null;
5233
+
5234
+ /**
5235
+ * If the Price represents a fixed cost, the price will be billed in-advance if
5236
+ * this is true, and in-arrears if this is false.
5237
+ */
5238
+ billed_in_advance?: boolean | null;
5239
+
5240
+ /**
5241
+ * For custom cadence: specifies the duration of the billing period in days or
5242
+ * months.
5243
+ */
5244
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
5245
+
5246
+ /**
5247
+ * The per unit conversion rate of the price currency to the invoicing currency.
5248
+ */
5249
+ conversion_rate?: number | null;
5250
+
5251
+ /**
5252
+ * The configuration for the rate of the price currency to the invoicing currency.
5253
+ */
5254
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
5255
+
5256
+ /**
5257
+ * For dimensional price: specifies a price group and dimension values
5258
+ */
5259
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
5260
+
5261
+ /**
5262
+ * An alias for the price.
5263
+ */
5264
+ external_price_id?: string | null;
5265
+
5266
+ /**
5267
+ * If the Price represents a fixed cost, this represents the quantity of units
5268
+ * applied.
5269
+ */
5270
+ fixed_price_quantity?: number | null;
5271
+
5272
+ /**
5273
+ * The property used to group this price on an invoice
5274
+ */
5275
+ invoice_grouping_key?: string | null;
5276
+
5277
+ /**
5278
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
5279
+ * If unspecified, a single invoice is produced per billing cycle.
5280
+ */
5281
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
5282
+
5283
+ /**
5284
+ * User-specified key/value pairs for the resource. Individual keys can be removed
5285
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
5286
+ * by setting `metadata` to `null`.
5287
+ */
5288
+ metadata?: { [key: string]: string | null } | null;
5289
+ }
5290
+
5291
+ export namespace NewFloatingCumulativeGroupedAllocationPrice {
5292
+ /**
5293
+ * Configuration for cumulative_grouped_allocation pricing
5294
+ */
5295
+ export interface CumulativeGroupedAllocationConfig {
5296
+ /**
5297
+ * The overall allocation across all groups
5298
+ */
5299
+ cumulative_allocation: string;
5300
+
5301
+ /**
5302
+ * The allocation per individual group
5303
+ */
5304
+ group_allocation: string;
5305
+
5306
+ /**
5307
+ * The event property used to group usage before applying allocations
5308
+ */
5309
+ grouping_key: string;
5310
+
5311
+ /**
5312
+ * The amount to charge for each unit outside of the allocation
5313
+ */
5314
+ unit_amount: string;
5315
+ }
5316
+ }
5317
+
4952
5318
  export interface NewFloatingPercentCompositePrice {
4953
5319
  /**
4954
5320
  * The cadence to bill for this price on.
@@ -9979,6 +9979,7 @@ export type Price =
9979
9979
  | Price.ScalableMatrixWithUnitPricingPrice
9980
9980
  | Price.ScalableMatrixWithTieredPricingPrice
9981
9981
  | Price.CumulativeGroupedBulkPrice
9982
+ | Price.CumulativeGroupedAllocationPrice
9982
9983
  | Price.MinimumCompositePrice
9983
9984
  | Price.PercentCompositePrice
9984
9985
  | Price.EventOutputPrice;
@@ -13734,6 +13735,143 @@ export namespace Price {
13734
13735
  }
13735
13736
  }
13736
13737
 
13738
+ export interface CumulativeGroupedAllocationPrice {
13739
+ id: string;
13740
+
13741
+ billable_metric: Shared.BillableMetricTiny | null;
13742
+
13743
+ billing_cycle_configuration: Shared.BillingCycleConfiguration;
13744
+
13745
+ billing_mode: 'in_advance' | 'in_arrear';
13746
+
13747
+ cadence: 'one_time' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | 'custom';
13748
+
13749
+ composite_price_filters: Array<CumulativeGroupedAllocationPrice.CompositePriceFilter> | null;
13750
+
13751
+ conversion_rate: number | null;
13752
+
13753
+ conversion_rate_config: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
13754
+
13755
+ created_at: string;
13756
+
13757
+ credit_allocation: Shared.Allocation | null;
13758
+
13759
+ /**
13760
+ * Configuration for cumulative_grouped_allocation pricing
13761
+ */
13762
+ cumulative_grouped_allocation_config: CumulativeGroupedAllocationPrice.CumulativeGroupedAllocationConfig;
13763
+
13764
+ currency: string;
13765
+
13766
+ /**
13767
+ * @deprecated
13768
+ */
13769
+ discount: Shared.Discount | null;
13770
+
13771
+ external_price_id: string | null;
13772
+
13773
+ fixed_price_quantity: number | null;
13774
+
13775
+ invoicing_cycle_configuration: Shared.BillingCycleConfiguration | null;
13776
+
13777
+ /**
13778
+ * A minimal representation of an Item containing only the essential identifying
13779
+ * information.
13780
+ */
13781
+ item: Shared.ItemSlim;
13782
+
13783
+ /**
13784
+ * @deprecated
13785
+ */
13786
+ maximum: Shared.Maximum | null;
13787
+
13788
+ /**
13789
+ * @deprecated
13790
+ */
13791
+ maximum_amount: string | null;
13792
+
13793
+ /**
13794
+ * User specified key-value pairs for the resource. If not present, this defaults
13795
+ * to an empty dictionary. Individual keys can be removed by setting the value to
13796
+ * `null`, and the entire metadata mapping can be cleared by setting `metadata` to
13797
+ * `null`.
13798
+ */
13799
+ metadata: { [key: string]: string };
13800
+
13801
+ /**
13802
+ * @deprecated
13803
+ */
13804
+ minimum: Shared.Minimum | null;
13805
+
13806
+ /**
13807
+ * @deprecated
13808
+ */
13809
+ minimum_amount: string | null;
13810
+
13811
+ /**
13812
+ * The pricing model type
13813
+ */
13814
+ model_type: 'cumulative_grouped_allocation';
13815
+
13816
+ name: string;
13817
+
13818
+ plan_phase_order: number | null;
13819
+
13820
+ price_type: 'usage_price' | 'fixed_price' | 'composite_price';
13821
+
13822
+ /**
13823
+ * The price id this price replaces. This price will take the place of the replaced
13824
+ * price in plan version migrations.
13825
+ */
13826
+ replaces_price_id: string | null;
13827
+
13828
+ dimensional_price_configuration?: Shared.DimensionalPriceConfiguration | null;
13829
+ }
13830
+
13831
+ export namespace CumulativeGroupedAllocationPrice {
13832
+ export interface CompositePriceFilter {
13833
+ /**
13834
+ * The property of the price to filter on.
13835
+ */
13836
+ field: 'price_id' | 'item_id' | 'price_type' | 'currency' | 'pricing_unit_id';
13837
+
13838
+ /**
13839
+ * Should prices that match the filter be included or excluded.
13840
+ */
13841
+ operator: 'includes' | 'excludes';
13842
+
13843
+ /**
13844
+ * The IDs or values that match this filter.
13845
+ */
13846
+ values: Array<string>;
13847
+ }
13848
+
13849
+ /**
13850
+ * Configuration for cumulative_grouped_allocation pricing
13851
+ */
13852
+ export interface CumulativeGroupedAllocationConfig {
13853
+ /**
13854
+ * The overall allocation across all groups
13855
+ */
13856
+ cumulative_allocation: string;
13857
+
13858
+ /**
13859
+ * The allocation per individual group
13860
+ */
13861
+ group_allocation: string;
13862
+
13863
+ /**
13864
+ * The event property used to group usage before applying allocations
13865
+ */
13866
+ grouping_key: string;
13867
+
13868
+ /**
13869
+ * The amount to charge for each unit outside of the allocation
13870
+ */
13871
+ unit_amount: string;
13872
+ }
13873
+ }
13874
+
13737
13875
  export interface MinimumCompositePrice {
13738
13876
  id: string;
13739
13877