orb-billing 5.14.0 → 5.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) 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/items.d.ts +37 -0
  10. package/resources/items.d.ts.map +1 -1
  11. package/resources/items.js.map +1 -1
  12. package/resources/items.mjs.map +1 -1
  13. package/resources/plans/plans.d.ts +198 -1
  14. package/resources/plans/plans.d.ts.map +1 -1
  15. package/resources/plans/plans.js.map +1 -1
  16. package/resources/plans/plans.mjs.map +1 -1
  17. package/resources/prices/prices.d.ts +558 -3
  18. package/resources/prices/prices.d.ts.map +1 -1
  19. package/resources/prices/prices.js.map +1 -1
  20. package/resources/prices/prices.mjs.map +1 -1
  21. package/resources/shared.d.ts +284 -1
  22. package/resources/shared.d.ts.map +1 -1
  23. package/resources/shared.js.map +1 -1
  24. package/resources/shared.mjs.map +1 -1
  25. package/resources/subscriptions.d.ts +1104 -131
  26. package/resources/subscriptions.d.ts.map +1 -1
  27. package/resources/subscriptions.js.map +1 -1
  28. package/resources/subscriptions.mjs.map +1 -1
  29. package/src/resources/beta/beta.ts +468 -0
  30. package/src/resources/beta/external-plan-id.ts +468 -0
  31. package/src/resources/items.ts +38 -0
  32. package/src/resources/plans/plans.ts +234 -0
  33. package/src/resources/prices/prices.ts +688 -28
  34. package/src/resources/shared.ts +342 -1
  35. package/src/resources/subscriptions.ts +1250 -94
  36. package/src/version.ts +1 -1
  37. package/version.d.ts +1 -1
  38. package/version.js +1 -1
  39. package/version.mjs +1 -1
@@ -280,7 +280,9 @@ export type PriceCreateParams =
280
280
  | PriceCreateParams.NewFloatingScalableMatrixWithUnitPricingPrice
281
281
  | PriceCreateParams.NewFloatingScalableMatrixWithTieredPricingPrice
282
282
  | PriceCreateParams.NewFloatingCumulativeGroupedBulkPrice
283
- | PriceCreateParams.NewFloatingMinimumCompositePrice;
283
+ | PriceCreateParams.NewFloatingMinimumCompositePrice
284
+ | PriceCreateParams.NewFloatingPercentCompositePrice
285
+ | PriceCreateParams.NewFloatingEventOutputPrice;
284
286
 
285
287
  export declare namespace PriceCreateParams {
286
288
  export interface NewFloatingUnitPrice {
@@ -3556,6 +3558,224 @@ export declare namespace PriceCreateParams {
3556
3558
  prorated?: boolean;
3557
3559
  }
3558
3560
  }
3561
+
3562
+ export interface NewFloatingPercentCompositePrice {
3563
+ /**
3564
+ * The cadence to bill for this price on.
3565
+ */
3566
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
3567
+
3568
+ /**
3569
+ * An ISO 4217 currency string for which this price is billed in.
3570
+ */
3571
+ currency: string;
3572
+
3573
+ /**
3574
+ * The id of the item the price will be associated with.
3575
+ */
3576
+ item_id: string;
3577
+
3578
+ /**
3579
+ * The pricing model type
3580
+ */
3581
+ model_type: 'percent';
3582
+
3583
+ /**
3584
+ * The name of the price.
3585
+ */
3586
+ name: string;
3587
+
3588
+ /**
3589
+ * Configuration for percent pricing
3590
+ */
3591
+ percent_config: NewFloatingPercentCompositePrice.PercentConfig;
3592
+
3593
+ /**
3594
+ * The id of the billable metric for the price. Only needed if the price is
3595
+ * usage-based.
3596
+ */
3597
+ billable_metric_id?: string | null;
3598
+
3599
+ /**
3600
+ * If the Price represents a fixed cost, the price will be billed in-advance if
3601
+ * this is true, and in-arrears if this is false.
3602
+ */
3603
+ billed_in_advance?: boolean | null;
3604
+
3605
+ /**
3606
+ * For custom cadence: specifies the duration of the billing period in days or
3607
+ * months.
3608
+ */
3609
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
3610
+
3611
+ /**
3612
+ * The per unit conversion rate of the price currency to the invoicing currency.
3613
+ */
3614
+ conversion_rate?: number | null;
3615
+
3616
+ /**
3617
+ * The configuration for the rate of the price currency to the invoicing currency.
3618
+ */
3619
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
3620
+
3621
+ /**
3622
+ * For dimensional price: specifies a price group and dimension values
3623
+ */
3624
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
3625
+
3626
+ /**
3627
+ * An alias for the price.
3628
+ */
3629
+ external_price_id?: string | null;
3630
+
3631
+ /**
3632
+ * If the Price represents a fixed cost, this represents the quantity of units
3633
+ * applied.
3634
+ */
3635
+ fixed_price_quantity?: number | null;
3636
+
3637
+ /**
3638
+ * The property used to group this price on an invoice
3639
+ */
3640
+ invoice_grouping_key?: string | null;
3641
+
3642
+ /**
3643
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
3644
+ * If unspecified, a single invoice is produced per billing cycle.
3645
+ */
3646
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
3647
+
3648
+ /**
3649
+ * User-specified key/value pairs for the resource. Individual keys can be removed
3650
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
3651
+ * by setting `metadata` to `null`.
3652
+ */
3653
+ metadata?: { [key: string]: string | null } | null;
3654
+ }
3655
+
3656
+ export namespace NewFloatingPercentCompositePrice {
3657
+ /**
3658
+ * Configuration for percent pricing
3659
+ */
3660
+ export interface PercentConfig {
3661
+ /**
3662
+ * What percent of the component subtotals to charge
3663
+ */
3664
+ percent: number;
3665
+ }
3666
+ }
3667
+
3668
+ export interface NewFloatingEventOutputPrice {
3669
+ /**
3670
+ * The cadence to bill for this price on.
3671
+ */
3672
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
3673
+
3674
+ /**
3675
+ * An ISO 4217 currency string for which this price is billed in.
3676
+ */
3677
+ currency: string;
3678
+
3679
+ /**
3680
+ * Configuration for event_output pricing
3681
+ */
3682
+ event_output_config: NewFloatingEventOutputPrice.EventOutputConfig;
3683
+
3684
+ /**
3685
+ * The id of the item the price will be associated with.
3686
+ */
3687
+ item_id: string;
3688
+
3689
+ /**
3690
+ * The pricing model type
3691
+ */
3692
+ model_type: 'event_output';
3693
+
3694
+ /**
3695
+ * The name of the price.
3696
+ */
3697
+ name: string;
3698
+
3699
+ /**
3700
+ * The id of the billable metric for the price. Only needed if the price is
3701
+ * usage-based.
3702
+ */
3703
+ billable_metric_id?: string | null;
3704
+
3705
+ /**
3706
+ * If the Price represents a fixed cost, the price will be billed in-advance if
3707
+ * this is true, and in-arrears if this is false.
3708
+ */
3709
+ billed_in_advance?: boolean | null;
3710
+
3711
+ /**
3712
+ * For custom cadence: specifies the duration of the billing period in days or
3713
+ * months.
3714
+ */
3715
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
3716
+
3717
+ /**
3718
+ * The per unit conversion rate of the price currency to the invoicing currency.
3719
+ */
3720
+ conversion_rate?: number | null;
3721
+
3722
+ /**
3723
+ * The configuration for the rate of the price currency to the invoicing currency.
3724
+ */
3725
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
3726
+
3727
+ /**
3728
+ * For dimensional price: specifies a price group and dimension values
3729
+ */
3730
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
3731
+
3732
+ /**
3733
+ * An alias for the price.
3734
+ */
3735
+ external_price_id?: string | null;
3736
+
3737
+ /**
3738
+ * If the Price represents a fixed cost, this represents the quantity of units
3739
+ * applied.
3740
+ */
3741
+ fixed_price_quantity?: number | null;
3742
+
3743
+ /**
3744
+ * The property used to group this price on an invoice
3745
+ */
3746
+ invoice_grouping_key?: string | null;
3747
+
3748
+ /**
3749
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
3750
+ * If unspecified, a single invoice is produced per billing cycle.
3751
+ */
3752
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
3753
+
3754
+ /**
3755
+ * User-specified key/value pairs for the resource. Individual keys can be removed
3756
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
3757
+ * by setting `metadata` to `null`.
3758
+ */
3759
+ metadata?: { [key: string]: string | null } | null;
3760
+ }
3761
+
3762
+ export namespace NewFloatingEventOutputPrice {
3763
+ /**
3764
+ * Configuration for event_output pricing
3765
+ */
3766
+ export interface EventOutputConfig {
3767
+ /**
3768
+ * The key in the event data to extract the unit rate from.
3769
+ */
3770
+ unit_rating_key: string;
3771
+
3772
+ /**
3773
+ * An optional key in the event data to group by (e.g., event ID). All events will
3774
+ * also be grouped by their unit rate.
3775
+ */
3776
+ grouping_key?: string | null;
3777
+ }
3778
+ }
3559
3779
  }
3560
3780
 
3561
3781
  export interface PriceUpdateParams {
@@ -3684,16 +3904,245 @@ export namespace PriceEvaluateMultipleParams {
3684
3904
  | Shared.NewFloatingScalableMatrixWithTieredPricingPrice
3685
3905
  | Shared.NewFloatingCumulativeGroupedBulkPrice
3686
3906
  | Shared.NewFloatingMinimumCompositePrice
3907
+ | PriceEvaluation.NewFloatingPercentCompositePrice
3908
+ | PriceEvaluation.NewFloatingEventOutputPrice
3687
3909
  | null;
3688
3910
 
3689
- /**
3690
- * The ID of a price to evaluate that exists in your Orb account.
3691
- */
3692
- price_id?: string | null;
3693
- }
3911
+ /**
3912
+ * The ID of a price to evaluate that exists in your Orb account.
3913
+ */
3914
+ price_id?: string | null;
3915
+ }
3916
+
3917
+ export namespace PriceEvaluation {
3918
+ export interface NewFloatingGroupedWithMinMaxThresholdsPrice {
3919
+ /**
3920
+ * The cadence to bill for this price on.
3921
+ */
3922
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
3923
+
3924
+ /**
3925
+ * An ISO 4217 currency string for which this price is billed in.
3926
+ */
3927
+ currency: string;
3928
+
3929
+ /**
3930
+ * Configuration for grouped_with_min_max_thresholds pricing
3931
+ */
3932
+ grouped_with_min_max_thresholds_config: NewFloatingGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
3933
+
3934
+ /**
3935
+ * The id of the item the price will be associated with.
3936
+ */
3937
+ item_id: string;
3938
+
3939
+ /**
3940
+ * The pricing model type
3941
+ */
3942
+ model_type: 'grouped_with_min_max_thresholds';
3943
+
3944
+ /**
3945
+ * The name of the price.
3946
+ */
3947
+ name: string;
3948
+
3949
+ /**
3950
+ * The id of the billable metric for the price. Only needed if the price is
3951
+ * usage-based.
3952
+ */
3953
+ billable_metric_id?: string | null;
3954
+
3955
+ /**
3956
+ * If the Price represents a fixed cost, the price will be billed in-advance if
3957
+ * this is true, and in-arrears if this is false.
3958
+ */
3959
+ billed_in_advance?: boolean | null;
3960
+
3961
+ /**
3962
+ * For custom cadence: specifies the duration of the billing period in days or
3963
+ * months.
3964
+ */
3965
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
3966
+
3967
+ /**
3968
+ * The per unit conversion rate of the price currency to the invoicing currency.
3969
+ */
3970
+ conversion_rate?: number | null;
3971
+
3972
+ /**
3973
+ * The configuration for the rate of the price currency to the invoicing currency.
3974
+ */
3975
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
3976
+
3977
+ /**
3978
+ * For dimensional price: specifies a price group and dimension values
3979
+ */
3980
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
3981
+
3982
+ /**
3983
+ * An alias for the price.
3984
+ */
3985
+ external_price_id?: string | null;
3986
+
3987
+ /**
3988
+ * If the Price represents a fixed cost, this represents the quantity of units
3989
+ * applied.
3990
+ */
3991
+ fixed_price_quantity?: number | null;
3992
+
3993
+ /**
3994
+ * The property used to group this price on an invoice
3995
+ */
3996
+ invoice_grouping_key?: string | null;
3997
+
3998
+ /**
3999
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
4000
+ * If unspecified, a single invoice is produced per billing cycle.
4001
+ */
4002
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
4003
+
4004
+ /**
4005
+ * User-specified key/value pairs for the resource. Individual keys can be removed
4006
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
4007
+ * by setting `metadata` to `null`.
4008
+ */
4009
+ metadata?: { [key: string]: string | null } | null;
4010
+ }
4011
+
4012
+ export namespace NewFloatingGroupedWithMinMaxThresholdsPrice {
4013
+ /**
4014
+ * Configuration for grouped_with_min_max_thresholds pricing
4015
+ */
4016
+ export interface GroupedWithMinMaxThresholdsConfig {
4017
+ /**
4018
+ * The event property used to group before applying thresholds
4019
+ */
4020
+ grouping_key: string;
4021
+
4022
+ /**
4023
+ * The maximum amount to charge each group
4024
+ */
4025
+ maximum_charge: string;
4026
+
4027
+ /**
4028
+ * The minimum amount to charge each group, regardless of usage
4029
+ */
4030
+ minimum_charge: string;
4031
+
4032
+ /**
4033
+ * The base price charged per group
4034
+ */
4035
+ per_unit_rate: string;
4036
+ }
4037
+ }
4038
+
4039
+ export interface NewFloatingPercentCompositePrice {
4040
+ /**
4041
+ * The cadence to bill for this price on.
4042
+ */
4043
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
4044
+
4045
+ /**
4046
+ * An ISO 4217 currency string for which this price is billed in.
4047
+ */
4048
+ currency: string;
4049
+
4050
+ /**
4051
+ * The id of the item the price will be associated with.
4052
+ */
4053
+ item_id: string;
4054
+
4055
+ /**
4056
+ * The pricing model type
4057
+ */
4058
+ model_type: 'percent';
4059
+
4060
+ /**
4061
+ * The name of the price.
4062
+ */
4063
+ name: string;
4064
+
4065
+ /**
4066
+ * Configuration for percent pricing
4067
+ */
4068
+ percent_config: NewFloatingPercentCompositePrice.PercentConfig;
4069
+
4070
+ /**
4071
+ * The id of the billable metric for the price. Only needed if the price is
4072
+ * usage-based.
4073
+ */
4074
+ billable_metric_id?: string | null;
4075
+
4076
+ /**
4077
+ * If the Price represents a fixed cost, the price will be billed in-advance if
4078
+ * this is true, and in-arrears if this is false.
4079
+ */
4080
+ billed_in_advance?: boolean | null;
4081
+
4082
+ /**
4083
+ * For custom cadence: specifies the duration of the billing period in days or
4084
+ * months.
4085
+ */
4086
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
4087
+
4088
+ /**
4089
+ * The per unit conversion rate of the price currency to the invoicing currency.
4090
+ */
4091
+ conversion_rate?: number | null;
4092
+
4093
+ /**
4094
+ * The configuration for the rate of the price currency to the invoicing currency.
4095
+ */
4096
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
4097
+
4098
+ /**
4099
+ * For dimensional price: specifies a price group and dimension values
4100
+ */
4101
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
4102
+
4103
+ /**
4104
+ * An alias for the price.
4105
+ */
4106
+ external_price_id?: string | null;
4107
+
4108
+ /**
4109
+ * If the Price represents a fixed cost, this represents the quantity of units
4110
+ * applied.
4111
+ */
4112
+ fixed_price_quantity?: number | null;
3694
4113
 
3695
- export namespace PriceEvaluation {
3696
- export interface NewFloatingGroupedWithMinMaxThresholdsPrice {
4114
+ /**
4115
+ * The property used to group this price on an invoice
4116
+ */
4117
+ invoice_grouping_key?: string | null;
4118
+
4119
+ /**
4120
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
4121
+ * If unspecified, a single invoice is produced per billing cycle.
4122
+ */
4123
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
4124
+
4125
+ /**
4126
+ * User-specified key/value pairs for the resource. Individual keys can be removed
4127
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
4128
+ * by setting `metadata` to `null`.
4129
+ */
4130
+ metadata?: { [key: string]: string | null } | null;
4131
+ }
4132
+
4133
+ export namespace NewFloatingPercentCompositePrice {
4134
+ /**
4135
+ * Configuration for percent pricing
4136
+ */
4137
+ export interface PercentConfig {
4138
+ /**
4139
+ * What percent of the component subtotals to charge
4140
+ */
4141
+ percent: number;
4142
+ }
4143
+ }
4144
+
4145
+ export interface NewFloatingEventOutputPrice {
3697
4146
  /**
3698
4147
  * The cadence to bill for this price on.
3699
4148
  */
@@ -3705,9 +4154,9 @@ export namespace PriceEvaluateMultipleParams {
3705
4154
  currency: string;
3706
4155
 
3707
4156
  /**
3708
- * Configuration for grouped_with_min_max_thresholds pricing
4157
+ * Configuration for event_output pricing
3709
4158
  */
3710
- grouped_with_min_max_thresholds_config: NewFloatingGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
4159
+ event_output_config: NewFloatingEventOutputPrice.EventOutputConfig;
3711
4160
 
3712
4161
  /**
3713
4162
  * The id of the item the price will be associated with.
@@ -3717,7 +4166,7 @@ export namespace PriceEvaluateMultipleParams {
3717
4166
  /**
3718
4167
  * The pricing model type
3719
4168
  */
3720
- model_type: 'grouped_with_min_max_thresholds';
4169
+ model_type: 'event_output';
3721
4170
 
3722
4171
  /**
3723
4172
  * The name of the price.
@@ -3787,30 +4236,21 @@ export namespace PriceEvaluateMultipleParams {
3787
4236
  metadata?: { [key: string]: string | null } | null;
3788
4237
  }
3789
4238
 
3790
- export namespace NewFloatingGroupedWithMinMaxThresholdsPrice {
4239
+ export namespace NewFloatingEventOutputPrice {
3791
4240
  /**
3792
- * Configuration for grouped_with_min_max_thresholds pricing
4241
+ * Configuration for event_output pricing
3793
4242
  */
3794
- export interface GroupedWithMinMaxThresholdsConfig {
3795
- /**
3796
- * The event property used to group before applying thresholds
3797
- */
3798
- grouping_key: string;
3799
-
3800
- /**
3801
- * The maximum amount to charge each group
3802
- */
3803
- maximum_charge: string;
3804
-
4243
+ export interface EventOutputConfig {
3805
4244
  /**
3806
- * The minimum amount to charge each group, regardless of usage
4245
+ * The key in the event data to extract the unit rate from.
3807
4246
  */
3808
- minimum_charge: string;
4247
+ unit_rating_key: string;
3809
4248
 
3810
4249
  /**
3811
- * The base price charged per group
4250
+ * An optional key in the event data to group by (e.g., event ID). All events will
4251
+ * also be grouped by their unit rate.
3812
4252
  */
3813
- per_unit_rate: string;
4253
+ grouping_key?: string | null;
3814
4254
  }
3815
4255
  }
3816
4256
  }
@@ -3931,6 +4371,8 @@ export namespace PriceEvaluatePreviewEventsParams {
3931
4371
  | Shared.NewFloatingScalableMatrixWithTieredPricingPrice
3932
4372
  | Shared.NewFloatingCumulativeGroupedBulkPrice
3933
4373
  | Shared.NewFloatingMinimumCompositePrice
4374
+ | PriceEvaluation.NewFloatingPercentCompositePrice
4375
+ | PriceEvaluation.NewFloatingEventOutputPrice
3934
4376
  | null;
3935
4377
 
3936
4378
  /**
@@ -4060,6 +4502,224 @@ export namespace PriceEvaluatePreviewEventsParams {
4060
4502
  per_unit_rate: string;
4061
4503
  }
4062
4504
  }
4505
+
4506
+ export interface NewFloatingPercentCompositePrice {
4507
+ /**
4508
+ * The cadence to bill for this price on.
4509
+ */
4510
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
4511
+
4512
+ /**
4513
+ * An ISO 4217 currency string for which this price is billed in.
4514
+ */
4515
+ currency: string;
4516
+
4517
+ /**
4518
+ * The id of the item the price will be associated with.
4519
+ */
4520
+ item_id: string;
4521
+
4522
+ /**
4523
+ * The pricing model type
4524
+ */
4525
+ model_type: 'percent';
4526
+
4527
+ /**
4528
+ * The name of the price.
4529
+ */
4530
+ name: string;
4531
+
4532
+ /**
4533
+ * Configuration for percent pricing
4534
+ */
4535
+ percent_config: NewFloatingPercentCompositePrice.PercentConfig;
4536
+
4537
+ /**
4538
+ * The id of the billable metric for the price. Only needed if the price is
4539
+ * usage-based.
4540
+ */
4541
+ billable_metric_id?: string | null;
4542
+
4543
+ /**
4544
+ * If the Price represents a fixed cost, the price will be billed in-advance if
4545
+ * this is true, and in-arrears if this is false.
4546
+ */
4547
+ billed_in_advance?: boolean | null;
4548
+
4549
+ /**
4550
+ * For custom cadence: specifies the duration of the billing period in days or
4551
+ * months.
4552
+ */
4553
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
4554
+
4555
+ /**
4556
+ * The per unit conversion rate of the price currency to the invoicing currency.
4557
+ */
4558
+ conversion_rate?: number | null;
4559
+
4560
+ /**
4561
+ * The configuration for the rate of the price currency to the invoicing currency.
4562
+ */
4563
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
4564
+
4565
+ /**
4566
+ * For dimensional price: specifies a price group and dimension values
4567
+ */
4568
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
4569
+
4570
+ /**
4571
+ * An alias for the price.
4572
+ */
4573
+ external_price_id?: string | null;
4574
+
4575
+ /**
4576
+ * If the Price represents a fixed cost, this represents the quantity of units
4577
+ * applied.
4578
+ */
4579
+ fixed_price_quantity?: number | null;
4580
+
4581
+ /**
4582
+ * The property used to group this price on an invoice
4583
+ */
4584
+ invoice_grouping_key?: string | null;
4585
+
4586
+ /**
4587
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
4588
+ * If unspecified, a single invoice is produced per billing cycle.
4589
+ */
4590
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
4591
+
4592
+ /**
4593
+ * User-specified key/value pairs for the resource. Individual keys can be removed
4594
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
4595
+ * by setting `metadata` to `null`.
4596
+ */
4597
+ metadata?: { [key: string]: string | null } | null;
4598
+ }
4599
+
4600
+ export namespace NewFloatingPercentCompositePrice {
4601
+ /**
4602
+ * Configuration for percent pricing
4603
+ */
4604
+ export interface PercentConfig {
4605
+ /**
4606
+ * What percent of the component subtotals to charge
4607
+ */
4608
+ percent: number;
4609
+ }
4610
+ }
4611
+
4612
+ export interface NewFloatingEventOutputPrice {
4613
+ /**
4614
+ * The cadence to bill for this price on.
4615
+ */
4616
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
4617
+
4618
+ /**
4619
+ * An ISO 4217 currency string for which this price is billed in.
4620
+ */
4621
+ currency: string;
4622
+
4623
+ /**
4624
+ * Configuration for event_output pricing
4625
+ */
4626
+ event_output_config: NewFloatingEventOutputPrice.EventOutputConfig;
4627
+
4628
+ /**
4629
+ * The id of the item the price will be associated with.
4630
+ */
4631
+ item_id: string;
4632
+
4633
+ /**
4634
+ * The pricing model type
4635
+ */
4636
+ model_type: 'event_output';
4637
+
4638
+ /**
4639
+ * The name of the price.
4640
+ */
4641
+ name: string;
4642
+
4643
+ /**
4644
+ * The id of the billable metric for the price. Only needed if the price is
4645
+ * usage-based.
4646
+ */
4647
+ billable_metric_id?: string | null;
4648
+
4649
+ /**
4650
+ * If the Price represents a fixed cost, the price will be billed in-advance if
4651
+ * this is true, and in-arrears if this is false.
4652
+ */
4653
+ billed_in_advance?: boolean | null;
4654
+
4655
+ /**
4656
+ * For custom cadence: specifies the duration of the billing period in days or
4657
+ * months.
4658
+ */
4659
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
4660
+
4661
+ /**
4662
+ * The per unit conversion rate of the price currency to the invoicing currency.
4663
+ */
4664
+ conversion_rate?: number | null;
4665
+
4666
+ /**
4667
+ * The configuration for the rate of the price currency to the invoicing currency.
4668
+ */
4669
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
4670
+
4671
+ /**
4672
+ * For dimensional price: specifies a price group and dimension values
4673
+ */
4674
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
4675
+
4676
+ /**
4677
+ * An alias for the price.
4678
+ */
4679
+ external_price_id?: string | null;
4680
+
4681
+ /**
4682
+ * If the Price represents a fixed cost, this represents the quantity of units
4683
+ * applied.
4684
+ */
4685
+ fixed_price_quantity?: number | null;
4686
+
4687
+ /**
4688
+ * The property used to group this price on an invoice
4689
+ */
4690
+ invoice_grouping_key?: string | null;
4691
+
4692
+ /**
4693
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
4694
+ * If unspecified, a single invoice is produced per billing cycle.
4695
+ */
4696
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
4697
+
4698
+ /**
4699
+ * User-specified key/value pairs for the resource. Individual keys can be removed
4700
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
4701
+ * by setting `metadata` to `null`.
4702
+ */
4703
+ metadata?: { [key: string]: string | null } | null;
4704
+ }
4705
+
4706
+ export namespace NewFloatingEventOutputPrice {
4707
+ /**
4708
+ * Configuration for event_output pricing
4709
+ */
4710
+ export interface EventOutputConfig {
4711
+ /**
4712
+ * The key in the event data to extract the unit rate from.
4713
+ */
4714
+ unit_rating_key: string;
4715
+
4716
+ /**
4717
+ * An optional key in the event data to group by (e.g., event ID). All events will
4718
+ * also be grouped by their unit rate.
4719
+ */
4720
+ grouping_key?: string | null;
4721
+ }
4722
+ }
4063
4723
  }
4064
4724
  }
4065
4725