orb-billing 4.10.0 → 4.12.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.
@@ -1100,6 +1100,8 @@ export interface Subscription {
1100
1100
  */
1101
1101
  auto_collection: boolean | null;
1102
1102
 
1103
+ billing_cycle_anchor_configuration: Subscription.BillingCycleAnchorConfiguration;
1104
+
1103
1105
  /**
1104
1106
  * The day of the month on which the billing cycle is anchored. If the maximum
1105
1107
  * number of days in a month is greater than this value, the last day of the month
@@ -1356,6 +1358,29 @@ export namespace Subscription {
1356
1358
  }
1357
1359
  }
1358
1360
 
1361
+ export interface BillingCycleAnchorConfiguration {
1362
+ /**
1363
+ * The day of the month on which the billing cycle is anchored. If the maximum
1364
+ * number of days in a month is greater than this value, the last day of the month
1365
+ * is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing
1366
+ * period begins on the 30th.
1367
+ */
1368
+ day: number;
1369
+
1370
+ /**
1371
+ * The month on which the billing cycle is anchored (e.g. a quarterly price
1372
+ * anchored in February would have cycles starting February, May, August, and
1373
+ * November).
1374
+ */
1375
+ month?: number | null;
1376
+
1377
+ /**
1378
+ * The year on which the billing cycle is anchored (e.g. a 2 year billing cycle
1379
+ * anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.).
1380
+ */
1381
+ year?: number | null;
1382
+ }
1383
+
1359
1384
  export interface AmountDiscountInterval {
1360
1385
  /**
1361
1386
  * Only available if discount_type is `amount`.
@@ -2207,6 +2232,8 @@ export interface SubscriptionCreateParams {
2207
2232
 
2208
2233
  aws_region?: string | null;
2209
2234
 
2235
+ billing_cycle_anchor_configuration?: SubscriptionCreateParams.BillingCycleAnchorConfiguration | null;
2236
+
2210
2237
  coupon_redemption_code?: string | null;
2211
2238
 
2212
2239
  credits_overage_rate?: number | null;
@@ -2267,12 +2294,37 @@ export interface SubscriptionCreateParams {
2267
2294
  | SubscriptionCreateParams.OverrideTieredWithMinimumPrice
2268
2295
  | SubscriptionCreateParams.OverridePackageWithAllocationPrice
2269
2296
  | SubscriptionCreateParams.OverrideUnitWithPercentPrice
2297
+ | SubscriptionCreateParams.OverrideGroupedAllocationPrice
2298
+ | SubscriptionCreateParams.OverrideBulkWithProrationPrice
2270
2299
  > | null;
2271
2300
 
2272
2301
  start_date?: string | null;
2273
2302
  }
2274
2303
 
2275
2304
  export namespace SubscriptionCreateParams {
2305
+ export interface BillingCycleAnchorConfiguration {
2306
+ /**
2307
+ * The day of the month on which the billing cycle is anchored. If the maximum
2308
+ * number of days in a month is greater than this value, the last day of the month
2309
+ * is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing
2310
+ * period begins on the 30th.
2311
+ */
2312
+ day: number;
2313
+
2314
+ /**
2315
+ * The month on which the billing cycle is anchored (e.g. a quarterly price
2316
+ * anchored in February would have cycles starting February, May, August, and
2317
+ * November).
2318
+ */
2319
+ month?: number | null;
2320
+
2321
+ /**
2322
+ * The year on which the billing cycle is anchored (e.g. a 2 year billing cycle
2323
+ * anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.).
2324
+ */
2325
+ year?: number | null;
2326
+ }
2327
+
2276
2328
  export interface OverrideUnitPrice {
2277
2329
  id: string;
2278
2330
 
@@ -3431,6 +3483,158 @@ export namespace SubscriptionCreateParams {
3431
3483
  usage_discount?: number | null;
3432
3484
  }
3433
3485
  }
3486
+
3487
+ export interface OverrideGroupedAllocationPrice {
3488
+ id: string;
3489
+
3490
+ grouped_allocation_config: Record<string, unknown>;
3491
+
3492
+ model_type: 'grouped_allocation';
3493
+
3494
+ /**
3495
+ * The per unit conversion rate of the price currency to the invoicing currency.
3496
+ */
3497
+ conversion_rate?: number | null;
3498
+
3499
+ /**
3500
+ * The currency of the price. If not provided, the currency of the plan will be
3501
+ * used.
3502
+ */
3503
+ currency?: string | null;
3504
+
3505
+ /**
3506
+ * The subscription's override discount for the plan.
3507
+ */
3508
+ discount?: OverrideGroupedAllocationPrice.Discount | null;
3509
+
3510
+ /**
3511
+ * The starting quantity of the price, if the price is a fixed price.
3512
+ */
3513
+ fixed_price_quantity?: number | null;
3514
+
3515
+ /**
3516
+ * The subscription's override maximum amount for the plan.
3517
+ */
3518
+ maximum_amount?: string | null;
3519
+
3520
+ /**
3521
+ * The subscription's override minimum amount for the plan.
3522
+ */
3523
+ minimum_amount?: string | null;
3524
+ }
3525
+
3526
+ export namespace OverrideGroupedAllocationPrice {
3527
+ /**
3528
+ * The subscription's override discount for the plan.
3529
+ */
3530
+ export interface Discount {
3531
+ discount_type: 'percentage' | 'trial' | 'usage' | 'amount';
3532
+
3533
+ /**
3534
+ * Only available if discount_type is `amount`.
3535
+ */
3536
+ amount_discount?: string | null;
3537
+
3538
+ /**
3539
+ * List of price_ids that this discount applies to. For plan/plan phase discounts,
3540
+ * this can be a subset of prices.
3541
+ */
3542
+ applies_to_price_ids?: Array<string> | null;
3543
+
3544
+ /**
3545
+ * Only available if discount_type is `percentage`. This is a number between 0
3546
+ * and 1.
3547
+ */
3548
+ percentage_discount?: number | null;
3549
+
3550
+ /**
3551
+ * Only available if discount_type is `trial`
3552
+ */
3553
+ trial_amount_discount?: string | null;
3554
+
3555
+ /**
3556
+ * Only available if discount_type is `usage`. Number of usage units that this
3557
+ * discount is for
3558
+ */
3559
+ usage_discount?: number | null;
3560
+ }
3561
+ }
3562
+
3563
+ export interface OverrideBulkWithProrationPrice {
3564
+ id: string;
3565
+
3566
+ bulk_with_proration_config: Record<string, unknown>;
3567
+
3568
+ model_type: 'bulk_with_proration';
3569
+
3570
+ /**
3571
+ * The per unit conversion rate of the price currency to the invoicing currency.
3572
+ */
3573
+ conversion_rate?: number | null;
3574
+
3575
+ /**
3576
+ * The currency of the price. If not provided, the currency of the plan will be
3577
+ * used.
3578
+ */
3579
+ currency?: string | null;
3580
+
3581
+ /**
3582
+ * The subscription's override discount for the plan.
3583
+ */
3584
+ discount?: OverrideBulkWithProrationPrice.Discount | null;
3585
+
3586
+ /**
3587
+ * The starting quantity of the price, if the price is a fixed price.
3588
+ */
3589
+ fixed_price_quantity?: number | null;
3590
+
3591
+ /**
3592
+ * The subscription's override maximum amount for the plan.
3593
+ */
3594
+ maximum_amount?: string | null;
3595
+
3596
+ /**
3597
+ * The subscription's override minimum amount for the plan.
3598
+ */
3599
+ minimum_amount?: string | null;
3600
+ }
3601
+
3602
+ export namespace OverrideBulkWithProrationPrice {
3603
+ /**
3604
+ * The subscription's override discount for the plan.
3605
+ */
3606
+ export interface Discount {
3607
+ discount_type: 'percentage' | 'trial' | 'usage' | 'amount';
3608
+
3609
+ /**
3610
+ * Only available if discount_type is `amount`.
3611
+ */
3612
+ amount_discount?: string | null;
3613
+
3614
+ /**
3615
+ * List of price_ids that this discount applies to. For plan/plan phase discounts,
3616
+ * this can be a subset of prices.
3617
+ */
3618
+ applies_to_price_ids?: Array<string> | null;
3619
+
3620
+ /**
3621
+ * Only available if discount_type is `percentage`. This is a number between 0
3622
+ * and 1.
3623
+ */
3624
+ percentage_discount?: number | null;
3625
+
3626
+ /**
3627
+ * Only available if discount_type is `trial`
3628
+ */
3629
+ trial_amount_discount?: string | null;
3630
+
3631
+ /**
3632
+ * Only available if discount_type is `usage`. Number of usage units that this
3633
+ * discount is for
3634
+ */
3635
+ usage_discount?: number | null;
3636
+ }
3637
+ }
3434
3638
  }
3435
3639
 
3436
3640
  export interface SubscriptionUpdateParams {
@@ -3789,6 +3993,12 @@ export namespace SubscriptionPriceIntervalsParams {
3789
3993
  */
3790
3994
  billed_in_advance?: boolean | null;
3791
3995
 
3996
+ /**
3997
+ * For custom cadence: specifies the duration of the billing period in days or
3998
+ * months.
3999
+ */
4000
+ billing_cycle_configuration?: NewFloatingUnitPrice.BillingCycleConfiguration | null;
4001
+
3792
4002
  /**
3793
4003
  * The per unit conversion rate of the price currency to the invoicing currency.
3794
4004
  */
@@ -3810,6 +4020,12 @@ export namespace SubscriptionPriceIntervalsParams {
3810
4020
  */
3811
4021
  invoice_grouping_key?: string | null;
3812
4022
 
4023
+ /**
4024
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
4025
+ * If unspecified, a single invoice is produced per billing cycle.
4026
+ */
4027
+ invoicing_cycle_configuration?: NewFloatingUnitPrice.InvoicingCycleConfiguration | null;
4028
+
3813
4029
  /**
3814
4030
  * User-specified key/value pairs for the resource. Individual keys can be removed
3815
4031
  * by setting the value to `null`, and the entire metadata mapping can be cleared
@@ -3825,6 +4041,38 @@ export namespace SubscriptionPriceIntervalsParams {
3825
4041
  */
3826
4042
  unit_amount: string;
3827
4043
  }
4044
+
4045
+ /**
4046
+ * For custom cadence: specifies the duration of the billing period in days or
4047
+ * months.
4048
+ */
4049
+ export interface BillingCycleConfiguration {
4050
+ /**
4051
+ * The duration of the billing period.
4052
+ */
4053
+ duration: number;
4054
+
4055
+ /**
4056
+ * The unit of billing period duration.
4057
+ */
4058
+ duration_unit: 'day' | 'month';
4059
+ }
4060
+
4061
+ /**
4062
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
4063
+ * If unspecified, a single invoice is produced per billing cycle.
4064
+ */
4065
+ export interface InvoicingCycleConfiguration {
4066
+ /**
4067
+ * The duration of the billing period.
4068
+ */
4069
+ duration: number;
4070
+
4071
+ /**
4072
+ * The unit of billing period duration.
4073
+ */
4074
+ duration_unit: 'day' | 'month';
4075
+ }
3828
4076
  }
3829
4077
 
3830
4078
  export interface NewFloatingPackagePrice {
@@ -3864,6 +4112,12 @@ export namespace SubscriptionPriceIntervalsParams {
3864
4112
  */
3865
4113
  billed_in_advance?: boolean | null;
3866
4114
 
4115
+ /**
4116
+ * For custom cadence: specifies the duration of the billing period in days or
4117
+ * months.
4118
+ */
4119
+ billing_cycle_configuration?: NewFloatingPackagePrice.BillingCycleConfiguration | null;
4120
+
3867
4121
  /**
3868
4122
  * The per unit conversion rate of the price currency to the invoicing currency.
3869
4123
  */
@@ -3885,6 +4139,12 @@ export namespace SubscriptionPriceIntervalsParams {
3885
4139
  */
3886
4140
  invoice_grouping_key?: string | null;
3887
4141
 
4142
+ /**
4143
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
4144
+ * If unspecified, a single invoice is produced per billing cycle.
4145
+ */
4146
+ invoicing_cycle_configuration?: NewFloatingPackagePrice.InvoicingCycleConfiguration | null;
4147
+
3888
4148
  /**
3889
4149
  * User-specified key/value pairs for the resource. Individual keys can be removed
3890
4150
  * by setting the value to `null`, and the entire metadata mapping can be cleared
@@ -3906,6 +4166,38 @@ export namespace SubscriptionPriceIntervalsParams {
3906
4166
  */
3907
4167
  package_size: number;
3908
4168
  }
4169
+
4170
+ /**
4171
+ * For custom cadence: specifies the duration of the billing period in days or
4172
+ * months.
4173
+ */
4174
+ export interface BillingCycleConfiguration {
4175
+ /**
4176
+ * The duration of the billing period.
4177
+ */
4178
+ duration: number;
4179
+
4180
+ /**
4181
+ * The unit of billing period duration.
4182
+ */
4183
+ duration_unit: 'day' | 'month';
4184
+ }
4185
+
4186
+ /**
4187
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
4188
+ * If unspecified, a single invoice is produced per billing cycle.
4189
+ */
4190
+ export interface InvoicingCycleConfiguration {
4191
+ /**
4192
+ * The duration of the billing period.
4193
+ */
4194
+ duration: number;
4195
+
4196
+ /**
4197
+ * The unit of billing period duration.
4198
+ */
4199
+ duration_unit: 'day' | 'month';
4200
+ }
3909
4201
  }
3910
4202
 
3911
4203
  export interface NewFloatingMatrixPrice {
@@ -3945,6 +4237,12 @@ export namespace SubscriptionPriceIntervalsParams {
3945
4237
  */
3946
4238
  billed_in_advance?: boolean | null;
3947
4239
 
4240
+ /**
4241
+ * For custom cadence: specifies the duration of the billing period in days or
4242
+ * months.
4243
+ */
4244
+ billing_cycle_configuration?: NewFloatingMatrixPrice.BillingCycleConfiguration | null;
4245
+
3948
4246
  /**
3949
4247
  * The per unit conversion rate of the price currency to the invoicing currency.
3950
4248
  */
@@ -3966,6 +4264,12 @@ export namespace SubscriptionPriceIntervalsParams {
3966
4264
  */
3967
4265
  invoice_grouping_key?: string | null;
3968
4266
 
4267
+ /**
4268
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
4269
+ * If unspecified, a single invoice is produced per billing cycle.
4270
+ */
4271
+ invoicing_cycle_configuration?: NewFloatingMatrixPrice.InvoicingCycleConfiguration | null;
4272
+
3969
4273
  /**
3970
4274
  * User-specified key/value pairs for the resource. Individual keys can be removed
3971
4275
  * by setting the value to `null`, and the entire metadata mapping can be cleared
@@ -4007,6 +4311,38 @@ export namespace SubscriptionPriceIntervalsParams {
4007
4311
  unit_amount: string;
4008
4312
  }
4009
4313
  }
4314
+
4315
+ /**
4316
+ * For custom cadence: specifies the duration of the billing period in days or
4317
+ * months.
4318
+ */
4319
+ export interface BillingCycleConfiguration {
4320
+ /**
4321
+ * The duration of the billing period.
4322
+ */
4323
+ duration: number;
4324
+
4325
+ /**
4326
+ * The unit of billing period duration.
4327
+ */
4328
+ duration_unit: 'day' | 'month';
4329
+ }
4330
+
4331
+ /**
4332
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
4333
+ * If unspecified, a single invoice is produced per billing cycle.
4334
+ */
4335
+ export interface InvoicingCycleConfiguration {
4336
+ /**
4337
+ * The duration of the billing period.
4338
+ */
4339
+ duration: number;
4340
+
4341
+ /**
4342
+ * The unit of billing period duration.
4343
+ */
4344
+ duration_unit: 'day' | 'month';
4345
+ }
4010
4346
  }
4011
4347
 
4012
4348
  export interface NewFloatingMatrixWithAllocationPrice {
@@ -4046,6 +4382,12 @@ export namespace SubscriptionPriceIntervalsParams {
4046
4382
  */
4047
4383
  billed_in_advance?: boolean | null;
4048
4384
 
4385
+ /**
4386
+ * For custom cadence: specifies the duration of the billing period in days or
4387
+ * months.
4388
+ */
4389
+ billing_cycle_configuration?: NewFloatingMatrixWithAllocationPrice.BillingCycleConfiguration | null;
4390
+
4049
4391
  /**
4050
4392
  * The per unit conversion rate of the price currency to the invoicing currency.
4051
4393
  */
@@ -4067,6 +4409,12 @@ export namespace SubscriptionPriceIntervalsParams {
4067
4409
  */
4068
4410
  invoice_grouping_key?: string | null;
4069
4411
 
4412
+ /**
4413
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
4414
+ * If unspecified, a single invoice is produced per billing cycle.
4415
+ */
4416
+ invoicing_cycle_configuration?: NewFloatingMatrixWithAllocationPrice.InvoicingCycleConfiguration | null;
4417
+
4070
4418
  /**
4071
4419
  * User-specified key/value pairs for the resource. Individual keys can be removed
4072
4420
  * by setting the value to `null`, and the entire metadata mapping can be cleared
@@ -4113,21 +4461,53 @@ export namespace SubscriptionPriceIntervalsParams {
4113
4461
  unit_amount: string;
4114
4462
  }
4115
4463
  }
4116
- }
4117
4464
 
4118
- export interface NewFloatingTieredPrice {
4119
4465
  /**
4120
- * The cadence to bill for this price on.
4466
+ * For custom cadence: specifies the duration of the billing period in days or
4467
+ * months.
4121
4468
  */
4122
- cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
4469
+ export interface BillingCycleConfiguration {
4470
+ /**
4471
+ * The duration of the billing period.
4472
+ */
4473
+ duration: number;
4123
4474
 
4124
- /**
4125
- * An ISO 4217 currency string for which this price is billed in.
4126
- */
4127
- currency: string;
4475
+ /**
4476
+ * The unit of billing period duration.
4477
+ */
4478
+ duration_unit: 'day' | 'month';
4479
+ }
4128
4480
 
4129
4481
  /**
4130
- * The id of the item the plan will be associated with.
4482
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
4483
+ * If unspecified, a single invoice is produced per billing cycle.
4484
+ */
4485
+ export interface InvoicingCycleConfiguration {
4486
+ /**
4487
+ * The duration of the billing period.
4488
+ */
4489
+ duration: number;
4490
+
4491
+ /**
4492
+ * The unit of billing period duration.
4493
+ */
4494
+ duration_unit: 'day' | 'month';
4495
+ }
4496
+ }
4497
+
4498
+ export interface NewFloatingTieredPrice {
4499
+ /**
4500
+ * The cadence to bill for this price on.
4501
+ */
4502
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
4503
+
4504
+ /**
4505
+ * An ISO 4217 currency string for which this price is billed in.
4506
+ */
4507
+ currency: string;
4508
+
4509
+ /**
4510
+ * The id of the item the plan will be associated with.
4131
4511
  */
4132
4512
  item_id: string;
4133
4513
 
@@ -4152,6 +4532,12 @@ export namespace SubscriptionPriceIntervalsParams {
4152
4532
  */
4153
4533
  billed_in_advance?: boolean | null;
4154
4534
 
4535
+ /**
4536
+ * For custom cadence: specifies the duration of the billing period in days or
4537
+ * months.
4538
+ */
4539
+ billing_cycle_configuration?: NewFloatingTieredPrice.BillingCycleConfiguration | null;
4540
+
4155
4541
  /**
4156
4542
  * The per unit conversion rate of the price currency to the invoicing currency.
4157
4543
  */
@@ -4173,6 +4559,12 @@ export namespace SubscriptionPriceIntervalsParams {
4173
4559
  */
4174
4560
  invoice_grouping_key?: string | null;
4175
4561
 
4562
+ /**
4563
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
4564
+ * If unspecified, a single invoice is produced per billing cycle.
4565
+ */
4566
+ invoicing_cycle_configuration?: NewFloatingTieredPrice.InvoicingCycleConfiguration | null;
4567
+
4176
4568
  /**
4177
4569
  * User-specified key/value pairs for the resource. Individual keys can be removed
4178
4570
  * by setting the value to `null`, and the entire metadata mapping can be cleared
@@ -4207,6 +4599,38 @@ export namespace SubscriptionPriceIntervalsParams {
4207
4599
  last_unit?: number | null;
4208
4600
  }
4209
4601
  }
4602
+
4603
+ /**
4604
+ * For custom cadence: specifies the duration of the billing period in days or
4605
+ * months.
4606
+ */
4607
+ export interface BillingCycleConfiguration {
4608
+ /**
4609
+ * The duration of the billing period.
4610
+ */
4611
+ duration: number;
4612
+
4613
+ /**
4614
+ * The unit of billing period duration.
4615
+ */
4616
+ duration_unit: 'day' | 'month';
4617
+ }
4618
+
4619
+ /**
4620
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
4621
+ * If unspecified, a single invoice is produced per billing cycle.
4622
+ */
4623
+ export interface InvoicingCycleConfiguration {
4624
+ /**
4625
+ * The duration of the billing period.
4626
+ */
4627
+ duration: number;
4628
+
4629
+ /**
4630
+ * The unit of billing period duration.
4631
+ */
4632
+ duration_unit: 'day' | 'month';
4633
+ }
4210
4634
  }
4211
4635
 
4212
4636
  export interface NewFloatingTieredBpsPrice {
@@ -4246,6 +4670,12 @@ export namespace SubscriptionPriceIntervalsParams {
4246
4670
  */
4247
4671
  billed_in_advance?: boolean | null;
4248
4672
 
4673
+ /**
4674
+ * For custom cadence: specifies the duration of the billing period in days or
4675
+ * months.
4676
+ */
4677
+ billing_cycle_configuration?: NewFloatingTieredBpsPrice.BillingCycleConfiguration | null;
4678
+
4249
4679
  /**
4250
4680
  * The per unit conversion rate of the price currency to the invoicing currency.
4251
4681
  */
@@ -4267,6 +4697,12 @@ export namespace SubscriptionPriceIntervalsParams {
4267
4697
  */
4268
4698
  invoice_grouping_key?: string | null;
4269
4699
 
4700
+ /**
4701
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
4702
+ * If unspecified, a single invoice is produced per billing cycle.
4703
+ */
4704
+ invoicing_cycle_configuration?: NewFloatingTieredBpsPrice.InvoicingCycleConfiguration | null;
4705
+
4270
4706
  /**
4271
4707
  * User-specified key/value pairs for the resource. Individual keys can be removed
4272
4708
  * by setting the value to `null`, and the entire metadata mapping can be cleared
@@ -4307,6 +4743,38 @@ export namespace SubscriptionPriceIntervalsParams {
4307
4743
  per_unit_maximum?: string | null;
4308
4744
  }
4309
4745
  }
4746
+
4747
+ /**
4748
+ * For custom cadence: specifies the duration of the billing period in days or
4749
+ * months.
4750
+ */
4751
+ export interface BillingCycleConfiguration {
4752
+ /**
4753
+ * The duration of the billing period.
4754
+ */
4755
+ duration: number;
4756
+
4757
+ /**
4758
+ * The unit of billing period duration.
4759
+ */
4760
+ duration_unit: 'day' | 'month';
4761
+ }
4762
+
4763
+ /**
4764
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
4765
+ * If unspecified, a single invoice is produced per billing cycle.
4766
+ */
4767
+ export interface InvoicingCycleConfiguration {
4768
+ /**
4769
+ * The duration of the billing period.
4770
+ */
4771
+ duration: number;
4772
+
4773
+ /**
4774
+ * The unit of billing period duration.
4775
+ */
4776
+ duration_unit: 'day' | 'month';
4777
+ }
4310
4778
  }
4311
4779
 
4312
4780
  export interface NewFloatingBpsPrice {
@@ -4346,6 +4814,12 @@ export namespace SubscriptionPriceIntervalsParams {
4346
4814
  */
4347
4815
  billed_in_advance?: boolean | null;
4348
4816
 
4817
+ /**
4818
+ * For custom cadence: specifies the duration of the billing period in days or
4819
+ * months.
4820
+ */
4821
+ billing_cycle_configuration?: NewFloatingBpsPrice.BillingCycleConfiguration | null;
4822
+
4349
4823
  /**
4350
4824
  * The per unit conversion rate of the price currency to the invoicing currency.
4351
4825
  */
@@ -4367,6 +4841,12 @@ export namespace SubscriptionPriceIntervalsParams {
4367
4841
  */
4368
4842
  invoice_grouping_key?: string | null;
4369
4843
 
4844
+ /**
4845
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
4846
+ * If unspecified, a single invoice is produced per billing cycle.
4847
+ */
4848
+ invoicing_cycle_configuration?: NewFloatingBpsPrice.InvoicingCycleConfiguration | null;
4849
+
4370
4850
  /**
4371
4851
  * User-specified key/value pairs for the resource. Individual keys can be removed
4372
4852
  * by setting the value to `null`, and the entire metadata mapping can be cleared
@@ -4387,6 +4867,38 @@ export namespace SubscriptionPriceIntervalsParams {
4387
4867
  */
4388
4868
  per_unit_maximum?: string | null;
4389
4869
  }
4870
+
4871
+ /**
4872
+ * For custom cadence: specifies the duration of the billing period in days or
4873
+ * months.
4874
+ */
4875
+ export interface BillingCycleConfiguration {
4876
+ /**
4877
+ * The duration of the billing period.
4878
+ */
4879
+ duration: number;
4880
+
4881
+ /**
4882
+ * The unit of billing period duration.
4883
+ */
4884
+ duration_unit: 'day' | 'month';
4885
+ }
4886
+
4887
+ /**
4888
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
4889
+ * If unspecified, a single invoice is produced per billing cycle.
4890
+ */
4891
+ export interface InvoicingCycleConfiguration {
4892
+ /**
4893
+ * The duration of the billing period.
4894
+ */
4895
+ duration: number;
4896
+
4897
+ /**
4898
+ * The unit of billing period duration.
4899
+ */
4900
+ duration_unit: 'day' | 'month';
4901
+ }
4390
4902
  }
4391
4903
 
4392
4904
  export interface NewFloatingBulkBpsPrice {
@@ -4426,6 +4938,12 @@ export namespace SubscriptionPriceIntervalsParams {
4426
4938
  */
4427
4939
  billed_in_advance?: boolean | null;
4428
4940
 
4941
+ /**
4942
+ * For custom cadence: specifies the duration of the billing period in days or
4943
+ * months.
4944
+ */
4945
+ billing_cycle_configuration?: NewFloatingBulkBpsPrice.BillingCycleConfiguration | null;
4946
+
4429
4947
  /**
4430
4948
  * The per unit conversion rate of the price currency to the invoicing currency.
4431
4949
  */
@@ -4447,6 +4965,12 @@ export namespace SubscriptionPriceIntervalsParams {
4447
4965
  */
4448
4966
  invoice_grouping_key?: string | null;
4449
4967
 
4968
+ /**
4969
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
4970
+ * If unspecified, a single invoice is produced per billing cycle.
4971
+ */
4972
+ invoicing_cycle_configuration?: NewFloatingBulkBpsPrice.InvoicingCycleConfiguration | null;
4973
+
4450
4974
  /**
4451
4975
  * User-specified key/value pairs for the resource. Individual keys can be removed
4452
4976
  * by setting the value to `null`, and the entire metadata mapping can be cleared
@@ -4482,6 +5006,38 @@ export namespace SubscriptionPriceIntervalsParams {
4482
5006
  per_unit_maximum?: string | null;
4483
5007
  }
4484
5008
  }
5009
+
5010
+ /**
5011
+ * For custom cadence: specifies the duration of the billing period in days or
5012
+ * months.
5013
+ */
5014
+ export interface BillingCycleConfiguration {
5015
+ /**
5016
+ * The duration of the billing period.
5017
+ */
5018
+ duration: number;
5019
+
5020
+ /**
5021
+ * The unit of billing period duration.
5022
+ */
5023
+ duration_unit: 'day' | 'month';
5024
+ }
5025
+
5026
+ /**
5027
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
5028
+ * If unspecified, a single invoice is produced per billing cycle.
5029
+ */
5030
+ export interface InvoicingCycleConfiguration {
5031
+ /**
5032
+ * The duration of the billing period.
5033
+ */
5034
+ duration: number;
5035
+
5036
+ /**
5037
+ * The unit of billing period duration.
5038
+ */
5039
+ duration_unit: 'day' | 'month';
5040
+ }
4485
5041
  }
4486
5042
 
4487
5043
  export interface NewFloatingBulkPrice {
@@ -4521,6 +5077,12 @@ export namespace SubscriptionPriceIntervalsParams {
4521
5077
  */
4522
5078
  billed_in_advance?: boolean | null;
4523
5079
 
5080
+ /**
5081
+ * For custom cadence: specifies the duration of the billing period in days or
5082
+ * months.
5083
+ */
5084
+ billing_cycle_configuration?: NewFloatingBulkPrice.BillingCycleConfiguration | null;
5085
+
4524
5086
  /**
4525
5087
  * The per unit conversion rate of the price currency to the invoicing currency.
4526
5088
  */
@@ -4542,6 +5104,12 @@ export namespace SubscriptionPriceIntervalsParams {
4542
5104
  */
4543
5105
  invoice_grouping_key?: string | null;
4544
5106
 
5107
+ /**
5108
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
5109
+ * If unspecified, a single invoice is produced per billing cycle.
5110
+ */
5111
+ invoicing_cycle_configuration?: NewFloatingBulkPrice.InvoicingCycleConfiguration | null;
5112
+
4545
5113
  /**
4546
5114
  * User-specified key/value pairs for the resource. Individual keys can be removed
4547
5115
  * by setting the value to `null`, and the entire metadata mapping can be cleared
@@ -4571,6 +5139,38 @@ export namespace SubscriptionPriceIntervalsParams {
4571
5139
  maximum_units?: number | null;
4572
5140
  }
4573
5141
  }
5142
+
5143
+ /**
5144
+ * For custom cadence: specifies the duration of the billing period in days or
5145
+ * months.
5146
+ */
5147
+ export interface BillingCycleConfiguration {
5148
+ /**
5149
+ * The duration of the billing period.
5150
+ */
5151
+ duration: number;
5152
+
5153
+ /**
5154
+ * The unit of billing period duration.
5155
+ */
5156
+ duration_unit: 'day' | 'month';
5157
+ }
5158
+
5159
+ /**
5160
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
5161
+ * If unspecified, a single invoice is produced per billing cycle.
5162
+ */
5163
+ export interface InvoicingCycleConfiguration {
5164
+ /**
5165
+ * The duration of the billing period.
5166
+ */
5167
+ duration: number;
5168
+
5169
+ /**
5170
+ * The unit of billing period duration.
5171
+ */
5172
+ duration_unit: 'day' | 'month';
5173
+ }
4574
5174
  }
4575
5175
 
4576
5176
  export interface NewFloatingThresholdTotalAmountPrice {
@@ -4610,6 +5210,12 @@ export namespace SubscriptionPriceIntervalsParams {
4610
5210
  */
4611
5211
  billed_in_advance?: boolean | null;
4612
5212
 
5213
+ /**
5214
+ * For custom cadence: specifies the duration of the billing period in days or
5215
+ * months.
5216
+ */
5217
+ billing_cycle_configuration?: NewFloatingThresholdTotalAmountPrice.BillingCycleConfiguration | null;
5218
+
4613
5219
  /**
4614
5220
  * The per unit conversion rate of the price currency to the invoicing currency.
4615
5221
  */
@@ -4631,6 +5237,12 @@ export namespace SubscriptionPriceIntervalsParams {
4631
5237
  */
4632
5238
  invoice_grouping_key?: string | null;
4633
5239
 
5240
+ /**
5241
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
5242
+ * If unspecified, a single invoice is produced per billing cycle.
5243
+ */
5244
+ invoicing_cycle_configuration?: NewFloatingThresholdTotalAmountPrice.InvoicingCycleConfiguration | null;
5245
+
4634
5246
  /**
4635
5247
  * User-specified key/value pairs for the resource. Individual keys can be removed
4636
5248
  * by setting the value to `null`, and the entire metadata mapping can be cleared
@@ -4639,6 +5251,40 @@ export namespace SubscriptionPriceIntervalsParams {
4639
5251
  metadata?: Record<string, string | null> | null;
4640
5252
  }
4641
5253
 
5254
+ export namespace NewFloatingThresholdTotalAmountPrice {
5255
+ /**
5256
+ * For custom cadence: specifies the duration of the billing period in days or
5257
+ * months.
5258
+ */
5259
+ export interface BillingCycleConfiguration {
5260
+ /**
5261
+ * The duration of the billing period.
5262
+ */
5263
+ duration: number;
5264
+
5265
+ /**
5266
+ * The unit of billing period duration.
5267
+ */
5268
+ duration_unit: 'day' | 'month';
5269
+ }
5270
+
5271
+ /**
5272
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
5273
+ * If unspecified, a single invoice is produced per billing cycle.
5274
+ */
5275
+ export interface InvoicingCycleConfiguration {
5276
+ /**
5277
+ * The duration of the billing period.
5278
+ */
5279
+ duration: number;
5280
+
5281
+ /**
5282
+ * The unit of billing period duration.
5283
+ */
5284
+ duration_unit: 'day' | 'month';
5285
+ }
5286
+ }
5287
+
4642
5288
  export interface NewFloatingTieredPackagePrice {
4643
5289
  /**
4644
5290
  * The cadence to bill for this price on.
@@ -4676,6 +5322,12 @@ export namespace SubscriptionPriceIntervalsParams {
4676
5322
  */
4677
5323
  billed_in_advance?: boolean | null;
4678
5324
 
5325
+ /**
5326
+ * For custom cadence: specifies the duration of the billing period in days or
5327
+ * months.
5328
+ */
5329
+ billing_cycle_configuration?: NewFloatingTieredPackagePrice.BillingCycleConfiguration | null;
5330
+
4679
5331
  /**
4680
5332
  * The per unit conversion rate of the price currency to the invoicing currency.
4681
5333
  */
@@ -4697,6 +5349,12 @@ export namespace SubscriptionPriceIntervalsParams {
4697
5349
  */
4698
5350
  invoice_grouping_key?: string | null;
4699
5351
 
5352
+ /**
5353
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
5354
+ * If unspecified, a single invoice is produced per billing cycle.
5355
+ */
5356
+ invoicing_cycle_configuration?: NewFloatingTieredPackagePrice.InvoicingCycleConfiguration | null;
5357
+
4700
5358
  /**
4701
5359
  * User-specified key/value pairs for the resource. Individual keys can be removed
4702
5360
  * by setting the value to `null`, and the entire metadata mapping can be cleared
@@ -4705,6 +5363,40 @@ export namespace SubscriptionPriceIntervalsParams {
4705
5363
  metadata?: Record<string, string | null> | null;
4706
5364
  }
4707
5365
 
5366
+ export namespace NewFloatingTieredPackagePrice {
5367
+ /**
5368
+ * For custom cadence: specifies the duration of the billing period in days or
5369
+ * months.
5370
+ */
5371
+ export interface BillingCycleConfiguration {
5372
+ /**
5373
+ * The duration of the billing period.
5374
+ */
5375
+ duration: number;
5376
+
5377
+ /**
5378
+ * The unit of billing period duration.
5379
+ */
5380
+ duration_unit: 'day' | 'month';
5381
+ }
5382
+
5383
+ /**
5384
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
5385
+ * If unspecified, a single invoice is produced per billing cycle.
5386
+ */
5387
+ export interface InvoicingCycleConfiguration {
5388
+ /**
5389
+ * The duration of the billing period.
5390
+ */
5391
+ duration: number;
5392
+
5393
+ /**
5394
+ * The unit of billing period duration.
5395
+ */
5396
+ duration_unit: 'day' | 'month';
5397
+ }
5398
+ }
5399
+
4708
5400
  export interface NewFloatingGroupedTieredPrice {
4709
5401
  /**
4710
5402
  * The cadence to bill for this price on.
@@ -4742,6 +5434,12 @@ export namespace SubscriptionPriceIntervalsParams {
4742
5434
  */
4743
5435
  billed_in_advance?: boolean | null;
4744
5436
 
5437
+ /**
5438
+ * For custom cadence: specifies the duration of the billing period in days or
5439
+ * months.
5440
+ */
5441
+ billing_cycle_configuration?: NewFloatingGroupedTieredPrice.BillingCycleConfiguration | null;
5442
+
4745
5443
  /**
4746
5444
  * The per unit conversion rate of the price currency to the invoicing currency.
4747
5445
  */
@@ -4763,6 +5461,12 @@ export namespace SubscriptionPriceIntervalsParams {
4763
5461
  */
4764
5462
  invoice_grouping_key?: string | null;
4765
5463
 
5464
+ /**
5465
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
5466
+ * If unspecified, a single invoice is produced per billing cycle.
5467
+ */
5468
+ invoicing_cycle_configuration?: NewFloatingGroupedTieredPrice.InvoicingCycleConfiguration | null;
5469
+
4766
5470
  /**
4767
5471
  * User-specified key/value pairs for the resource. Individual keys can be removed
4768
5472
  * by setting the value to `null`, and the entire metadata mapping can be cleared
@@ -4771,6 +5475,40 @@ export namespace SubscriptionPriceIntervalsParams {
4771
5475
  metadata?: Record<string, string | null> | null;
4772
5476
  }
4773
5477
 
5478
+ export namespace NewFloatingGroupedTieredPrice {
5479
+ /**
5480
+ * For custom cadence: specifies the duration of the billing period in days or
5481
+ * months.
5482
+ */
5483
+ export interface BillingCycleConfiguration {
5484
+ /**
5485
+ * The duration of the billing period.
5486
+ */
5487
+ duration: number;
5488
+
5489
+ /**
5490
+ * The unit of billing period duration.
5491
+ */
5492
+ duration_unit: 'day' | 'month';
5493
+ }
5494
+
5495
+ /**
5496
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
5497
+ * If unspecified, a single invoice is produced per billing cycle.
5498
+ */
5499
+ export interface InvoicingCycleConfiguration {
5500
+ /**
5501
+ * The duration of the billing period.
5502
+ */
5503
+ duration: number;
5504
+
5505
+ /**
5506
+ * The unit of billing period duration.
5507
+ */
5508
+ duration_unit: 'day' | 'month';
5509
+ }
5510
+ }
5511
+
4774
5512
  export interface NewFloatingTieredWithMinimumPrice {
4775
5513
  /**
4776
5514
  * The cadence to bill for this price on.
@@ -4808,6 +5546,12 @@ export namespace SubscriptionPriceIntervalsParams {
4808
5546
  */
4809
5547
  billed_in_advance?: boolean | null;
4810
5548
 
5549
+ /**
5550
+ * For custom cadence: specifies the duration of the billing period in days or
5551
+ * months.
5552
+ */
5553
+ billing_cycle_configuration?: NewFloatingTieredWithMinimumPrice.BillingCycleConfiguration | null;
5554
+
4811
5555
  /**
4812
5556
  * The per unit conversion rate of the price currency to the invoicing currency.
4813
5557
  */
@@ -4829,6 +5573,12 @@ export namespace SubscriptionPriceIntervalsParams {
4829
5573
  */
4830
5574
  invoice_grouping_key?: string | null;
4831
5575
 
5576
+ /**
5577
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
5578
+ * If unspecified, a single invoice is produced per billing cycle.
5579
+ */
5580
+ invoicing_cycle_configuration?: NewFloatingTieredWithMinimumPrice.InvoicingCycleConfiguration | null;
5581
+
4832
5582
  /**
4833
5583
  * User-specified key/value pairs for the resource. Individual keys can be removed
4834
5584
  * by setting the value to `null`, and the entire metadata mapping can be cleared
@@ -4837,6 +5587,40 @@ export namespace SubscriptionPriceIntervalsParams {
4837
5587
  metadata?: Record<string, string | null> | null;
4838
5588
  }
4839
5589
 
5590
+ export namespace NewFloatingTieredWithMinimumPrice {
5591
+ /**
5592
+ * For custom cadence: specifies the duration of the billing period in days or
5593
+ * months.
5594
+ */
5595
+ export interface BillingCycleConfiguration {
5596
+ /**
5597
+ * The duration of the billing period.
5598
+ */
5599
+ duration: number;
5600
+
5601
+ /**
5602
+ * The unit of billing period duration.
5603
+ */
5604
+ duration_unit: 'day' | 'month';
5605
+ }
5606
+
5607
+ /**
5608
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
5609
+ * If unspecified, a single invoice is produced per billing cycle.
5610
+ */
5611
+ export interface InvoicingCycleConfiguration {
5612
+ /**
5613
+ * The duration of the billing period.
5614
+ */
5615
+ duration: number;
5616
+
5617
+ /**
5618
+ * The unit of billing period duration.
5619
+ */
5620
+ duration_unit: 'day' | 'month';
5621
+ }
5622
+ }
5623
+
4840
5624
  export interface NewFloatingPackageWithAllocationPrice {
4841
5625
  /**
4842
5626
  * The cadence to bill for this price on.
@@ -4874,6 +5658,12 @@ export namespace SubscriptionPriceIntervalsParams {
4874
5658
  */
4875
5659
  billed_in_advance?: boolean | null;
4876
5660
 
5661
+ /**
5662
+ * For custom cadence: specifies the duration of the billing period in days or
5663
+ * months.
5664
+ */
5665
+ billing_cycle_configuration?: NewFloatingPackageWithAllocationPrice.BillingCycleConfiguration | null;
5666
+
4877
5667
  /**
4878
5668
  * The per unit conversion rate of the price currency to the invoicing currency.
4879
5669
  */
@@ -4895,6 +5685,12 @@ export namespace SubscriptionPriceIntervalsParams {
4895
5685
  */
4896
5686
  invoice_grouping_key?: string | null;
4897
5687
 
5688
+ /**
5689
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
5690
+ * If unspecified, a single invoice is produced per billing cycle.
5691
+ */
5692
+ invoicing_cycle_configuration?: NewFloatingPackageWithAllocationPrice.InvoicingCycleConfiguration | null;
5693
+
4898
5694
  /**
4899
5695
  * User-specified key/value pairs for the resource. Individual keys can be removed
4900
5696
  * by setting the value to `null`, and the entire metadata mapping can be cleared
@@ -4903,6 +5699,40 @@ export namespace SubscriptionPriceIntervalsParams {
4903
5699
  metadata?: Record<string, string | null> | null;
4904
5700
  }
4905
5701
 
5702
+ export namespace NewFloatingPackageWithAllocationPrice {
5703
+ /**
5704
+ * For custom cadence: specifies the duration of the billing period in days or
5705
+ * months.
5706
+ */
5707
+ export interface BillingCycleConfiguration {
5708
+ /**
5709
+ * The duration of the billing period.
5710
+ */
5711
+ duration: number;
5712
+
5713
+ /**
5714
+ * The unit of billing period duration.
5715
+ */
5716
+ duration_unit: 'day' | 'month';
5717
+ }
5718
+
5719
+ /**
5720
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
5721
+ * If unspecified, a single invoice is produced per billing cycle.
5722
+ */
5723
+ export interface InvoicingCycleConfiguration {
5724
+ /**
5725
+ * The duration of the billing period.
5726
+ */
5727
+ duration: number;
5728
+
5729
+ /**
5730
+ * The unit of billing period duration.
5731
+ */
5732
+ duration_unit: 'day' | 'month';
5733
+ }
5734
+ }
5735
+
4906
5736
  export interface NewFloatingTieredPackageWithMinimumPrice {
4907
5737
  /**
4908
5738
  * The cadence to bill for this price on.
@@ -4940,6 +5770,12 @@ export namespace SubscriptionPriceIntervalsParams {
4940
5770
  */
4941
5771
  billed_in_advance?: boolean | null;
4942
5772
 
5773
+ /**
5774
+ * For custom cadence: specifies the duration of the billing period in days or
5775
+ * months.
5776
+ */
5777
+ billing_cycle_configuration?: NewFloatingTieredPackageWithMinimumPrice.BillingCycleConfiguration | null;
5778
+
4943
5779
  /**
4944
5780
  * The per unit conversion rate of the price currency to the invoicing currency.
4945
5781
  */
@@ -4961,6 +5797,12 @@ export namespace SubscriptionPriceIntervalsParams {
4961
5797
  */
4962
5798
  invoice_grouping_key?: string | null;
4963
5799
 
5800
+ /**
5801
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
5802
+ * If unspecified, a single invoice is produced per billing cycle.
5803
+ */
5804
+ invoicing_cycle_configuration?: NewFloatingTieredPackageWithMinimumPrice.InvoicingCycleConfiguration | null;
5805
+
4964
5806
  /**
4965
5807
  * User-specified key/value pairs for the resource. Individual keys can be removed
4966
5808
  * by setting the value to `null`, and the entire metadata mapping can be cleared
@@ -4969,6 +5811,40 @@ export namespace SubscriptionPriceIntervalsParams {
4969
5811
  metadata?: Record<string, string | null> | null;
4970
5812
  }
4971
5813
 
5814
+ export namespace NewFloatingTieredPackageWithMinimumPrice {
5815
+ /**
5816
+ * For custom cadence: specifies the duration of the billing period in days or
5817
+ * months.
5818
+ */
5819
+ export interface BillingCycleConfiguration {
5820
+ /**
5821
+ * The duration of the billing period.
5822
+ */
5823
+ duration: number;
5824
+
5825
+ /**
5826
+ * The unit of billing period duration.
5827
+ */
5828
+ duration_unit: 'day' | 'month';
5829
+ }
5830
+
5831
+ /**
5832
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
5833
+ * If unspecified, a single invoice is produced per billing cycle.
5834
+ */
5835
+ export interface InvoicingCycleConfiguration {
5836
+ /**
5837
+ * The duration of the billing period.
5838
+ */
5839
+ duration: number;
5840
+
5841
+ /**
5842
+ * The unit of billing period duration.
5843
+ */
5844
+ duration_unit: 'day' | 'month';
5845
+ }
5846
+ }
5847
+
4972
5848
  export interface NewFloatingUnitWithPercentPrice {
4973
5849
  /**
4974
5850
  * The cadence to bill for this price on.
@@ -5006,6 +5882,12 @@ export namespace SubscriptionPriceIntervalsParams {
5006
5882
  */
5007
5883
  billed_in_advance?: boolean | null;
5008
5884
 
5885
+ /**
5886
+ * For custom cadence: specifies the duration of the billing period in days or
5887
+ * months.
5888
+ */
5889
+ billing_cycle_configuration?: NewFloatingUnitWithPercentPrice.BillingCycleConfiguration | null;
5890
+
5009
5891
  /**
5010
5892
  * The per unit conversion rate of the price currency to the invoicing currency.
5011
5893
  */
@@ -5023,16 +5905,56 @@ export namespace SubscriptionPriceIntervalsParams {
5023
5905
  fixed_price_quantity?: number | null;
5024
5906
 
5025
5907
  /**
5026
- * The property used to group this price on an invoice
5908
+ * The property used to group this price on an invoice
5909
+ */
5910
+ invoice_grouping_key?: string | null;
5911
+
5912
+ /**
5913
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
5914
+ * If unspecified, a single invoice is produced per billing cycle.
5915
+ */
5916
+ invoicing_cycle_configuration?: NewFloatingUnitWithPercentPrice.InvoicingCycleConfiguration | null;
5917
+
5918
+ /**
5919
+ * User-specified key/value pairs for the resource. Individual keys can be removed
5920
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
5921
+ * by setting `metadata` to `null`.
5922
+ */
5923
+ metadata?: Record<string, string | null> | null;
5924
+ }
5925
+
5926
+ export namespace NewFloatingUnitWithPercentPrice {
5927
+ /**
5928
+ * For custom cadence: specifies the duration of the billing period in days or
5929
+ * months.
5930
+ */
5931
+ export interface BillingCycleConfiguration {
5932
+ /**
5933
+ * The duration of the billing period.
5934
+ */
5935
+ duration: number;
5936
+
5937
+ /**
5938
+ * The unit of billing period duration.
5939
+ */
5940
+ duration_unit: 'day' | 'month';
5941
+ }
5942
+
5943
+ /**
5944
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
5945
+ * If unspecified, a single invoice is produced per billing cycle.
5027
5946
  */
5028
- invoice_grouping_key?: string | null;
5947
+ export interface InvoicingCycleConfiguration {
5948
+ /**
5949
+ * The duration of the billing period.
5950
+ */
5951
+ duration: number;
5029
5952
 
5030
- /**
5031
- * User-specified key/value pairs for the resource. Individual keys can be removed
5032
- * by setting the value to `null`, and the entire metadata mapping can be cleared
5033
- * by setting `metadata` to `null`.
5034
- */
5035
- metadata?: Record<string, string | null> | null;
5953
+ /**
5954
+ * The unit of billing period duration.
5955
+ */
5956
+ duration_unit: 'day' | 'month';
5957
+ }
5036
5958
  }
5037
5959
 
5038
5960
  export interface NewFloatingTieredWithProrationPrice {
@@ -5072,6 +5994,12 @@ export namespace SubscriptionPriceIntervalsParams {
5072
5994
  */
5073
5995
  billed_in_advance?: boolean | null;
5074
5996
 
5997
+ /**
5998
+ * For custom cadence: specifies the duration of the billing period in days or
5999
+ * months.
6000
+ */
6001
+ billing_cycle_configuration?: NewFloatingTieredWithProrationPrice.BillingCycleConfiguration | null;
6002
+
5075
6003
  /**
5076
6004
  * The per unit conversion rate of the price currency to the invoicing currency.
5077
6005
  */
@@ -5093,6 +6021,12 @@ export namespace SubscriptionPriceIntervalsParams {
5093
6021
  */
5094
6022
  invoice_grouping_key?: string | null;
5095
6023
 
6024
+ /**
6025
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
6026
+ * If unspecified, a single invoice is produced per billing cycle.
6027
+ */
6028
+ invoicing_cycle_configuration?: NewFloatingTieredWithProrationPrice.InvoicingCycleConfiguration | null;
6029
+
5096
6030
  /**
5097
6031
  * User-specified key/value pairs for the resource. Individual keys can be removed
5098
6032
  * by setting the value to `null`, and the entire metadata mapping can be cleared
@@ -5101,6 +6035,40 @@ export namespace SubscriptionPriceIntervalsParams {
5101
6035
  metadata?: Record<string, string | null> | null;
5102
6036
  }
5103
6037
 
6038
+ export namespace NewFloatingTieredWithProrationPrice {
6039
+ /**
6040
+ * For custom cadence: specifies the duration of the billing period in days or
6041
+ * months.
6042
+ */
6043
+ export interface BillingCycleConfiguration {
6044
+ /**
6045
+ * The duration of the billing period.
6046
+ */
6047
+ duration: number;
6048
+
6049
+ /**
6050
+ * The unit of billing period duration.
6051
+ */
6052
+ duration_unit: 'day' | 'month';
6053
+ }
6054
+
6055
+ /**
6056
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
6057
+ * If unspecified, a single invoice is produced per billing cycle.
6058
+ */
6059
+ export interface InvoicingCycleConfiguration {
6060
+ /**
6061
+ * The duration of the billing period.
6062
+ */
6063
+ duration: number;
6064
+
6065
+ /**
6066
+ * The unit of billing period duration.
6067
+ */
6068
+ duration_unit: 'day' | 'month';
6069
+ }
6070
+ }
6071
+
5104
6072
  export interface NewFloatingUnitWithProrationPrice {
5105
6073
  /**
5106
6074
  * The cadence to bill for this price on.
@@ -5138,6 +6106,12 @@ export namespace SubscriptionPriceIntervalsParams {
5138
6106
  */
5139
6107
  billed_in_advance?: boolean | null;
5140
6108
 
6109
+ /**
6110
+ * For custom cadence: specifies the duration of the billing period in days or
6111
+ * months.
6112
+ */
6113
+ billing_cycle_configuration?: NewFloatingUnitWithProrationPrice.BillingCycleConfiguration | null;
6114
+
5141
6115
  /**
5142
6116
  * The per unit conversion rate of the price currency to the invoicing currency.
5143
6117
  */
@@ -5159,6 +6133,12 @@ export namespace SubscriptionPriceIntervalsParams {
5159
6133
  */
5160
6134
  invoice_grouping_key?: string | null;
5161
6135
 
6136
+ /**
6137
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
6138
+ * If unspecified, a single invoice is produced per billing cycle.
6139
+ */
6140
+ invoicing_cycle_configuration?: NewFloatingUnitWithProrationPrice.InvoicingCycleConfiguration | null;
6141
+
5162
6142
  /**
5163
6143
  * User-specified key/value pairs for the resource. Individual keys can be removed
5164
6144
  * by setting the value to `null`, and the entire metadata mapping can be cleared
@@ -5167,6 +6147,40 @@ export namespace SubscriptionPriceIntervalsParams {
5167
6147
  metadata?: Record<string, string | null> | null;
5168
6148
  }
5169
6149
 
6150
+ export namespace NewFloatingUnitWithProrationPrice {
6151
+ /**
6152
+ * For custom cadence: specifies the duration of the billing period in days or
6153
+ * months.
6154
+ */
6155
+ export interface BillingCycleConfiguration {
6156
+ /**
6157
+ * The duration of the billing period.
6158
+ */
6159
+ duration: number;
6160
+
6161
+ /**
6162
+ * The unit of billing period duration.
6163
+ */
6164
+ duration_unit: 'day' | 'month';
6165
+ }
6166
+
6167
+ /**
6168
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
6169
+ * If unspecified, a single invoice is produced per billing cycle.
6170
+ */
6171
+ export interface InvoicingCycleConfiguration {
6172
+ /**
6173
+ * The duration of the billing period.
6174
+ */
6175
+ duration: number;
6176
+
6177
+ /**
6178
+ * The unit of billing period duration.
6179
+ */
6180
+ duration_unit: 'day' | 'month';
6181
+ }
6182
+ }
6183
+
5170
6184
  export interface NewFloatingGroupedAllocationPrice {
5171
6185
  /**
5172
6186
  * The cadence to bill for this price on.
@@ -5204,6 +6218,12 @@ export namespace SubscriptionPriceIntervalsParams {
5204
6218
  */
5205
6219
  billed_in_advance?: boolean | null;
5206
6220
 
6221
+ /**
6222
+ * For custom cadence: specifies the duration of the billing period in days or
6223
+ * months.
6224
+ */
6225
+ billing_cycle_configuration?: NewFloatingGroupedAllocationPrice.BillingCycleConfiguration | null;
6226
+
5207
6227
  /**
5208
6228
  * The per unit conversion rate of the price currency to the invoicing currency.
5209
6229
  */
@@ -5225,6 +6245,12 @@ export namespace SubscriptionPriceIntervalsParams {
5225
6245
  */
5226
6246
  invoice_grouping_key?: string | null;
5227
6247
 
6248
+ /**
6249
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
6250
+ * If unspecified, a single invoice is produced per billing cycle.
6251
+ */
6252
+ invoicing_cycle_configuration?: NewFloatingGroupedAllocationPrice.InvoicingCycleConfiguration | null;
6253
+
5228
6254
  /**
5229
6255
  * User-specified key/value pairs for the resource. Individual keys can be removed
5230
6256
  * by setting the value to `null`, and the entire metadata mapping can be cleared
@@ -5233,6 +6259,40 @@ export namespace SubscriptionPriceIntervalsParams {
5233
6259
  metadata?: Record<string, string | null> | null;
5234
6260
  }
5235
6261
 
6262
+ export namespace NewFloatingGroupedAllocationPrice {
6263
+ /**
6264
+ * For custom cadence: specifies the duration of the billing period in days or
6265
+ * months.
6266
+ */
6267
+ export interface BillingCycleConfiguration {
6268
+ /**
6269
+ * The duration of the billing period.
6270
+ */
6271
+ duration: number;
6272
+
6273
+ /**
6274
+ * The unit of billing period duration.
6275
+ */
6276
+ duration_unit: 'day' | 'month';
6277
+ }
6278
+
6279
+ /**
6280
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
6281
+ * If unspecified, a single invoice is produced per billing cycle.
6282
+ */
6283
+ export interface InvoicingCycleConfiguration {
6284
+ /**
6285
+ * The duration of the billing period.
6286
+ */
6287
+ duration: number;
6288
+
6289
+ /**
6290
+ * The unit of billing period duration.
6291
+ */
6292
+ duration_unit: 'day' | 'month';
6293
+ }
6294
+ }
6295
+
5236
6296
  export interface NewFloatingBulkWithProrationPrice {
5237
6297
  bulk_with_proration_config: Record<string, unknown>;
5238
6298
 
@@ -5270,6 +6330,12 @@ export namespace SubscriptionPriceIntervalsParams {
5270
6330
  */
5271
6331
  billed_in_advance?: boolean | null;
5272
6332
 
6333
+ /**
6334
+ * For custom cadence: specifies the duration of the billing period in days or
6335
+ * months.
6336
+ */
6337
+ billing_cycle_configuration?: NewFloatingBulkWithProrationPrice.BillingCycleConfiguration | null;
6338
+
5273
6339
  /**
5274
6340
  * The per unit conversion rate of the price currency to the invoicing currency.
5275
6341
  */
@@ -5291,6 +6357,12 @@ export namespace SubscriptionPriceIntervalsParams {
5291
6357
  */
5292
6358
  invoice_grouping_key?: string | null;
5293
6359
 
6360
+ /**
6361
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
6362
+ * If unspecified, a single invoice is produced per billing cycle.
6363
+ */
6364
+ invoicing_cycle_configuration?: NewFloatingBulkWithProrationPrice.InvoicingCycleConfiguration | null;
6365
+
5294
6366
  /**
5295
6367
  * User-specified key/value pairs for the resource. Individual keys can be removed
5296
6368
  * by setting the value to `null`, and the entire metadata mapping can be cleared
@@ -5298,6 +6370,40 @@ export namespace SubscriptionPriceIntervalsParams {
5298
6370
  */
5299
6371
  metadata?: Record<string, string | null> | null;
5300
6372
  }
6373
+
6374
+ export namespace NewFloatingBulkWithProrationPrice {
6375
+ /**
6376
+ * For custom cadence: specifies the duration of the billing period in days or
6377
+ * months.
6378
+ */
6379
+ export interface BillingCycleConfiguration {
6380
+ /**
6381
+ * The duration of the billing period.
6382
+ */
6383
+ duration: number;
6384
+
6385
+ /**
6386
+ * The unit of billing period duration.
6387
+ */
6388
+ duration_unit: 'day' | 'month';
6389
+ }
6390
+
6391
+ /**
6392
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
6393
+ * If unspecified, a single invoice is produced per billing cycle.
6394
+ */
6395
+ export interface InvoicingCycleConfiguration {
6396
+ /**
6397
+ * The duration of the billing period.
6398
+ */
6399
+ duration: number;
6400
+
6401
+ /**
6402
+ * The unit of billing period duration.
6403
+ */
6404
+ duration_unit: 'day' | 'month';
6405
+ }
6406
+ }
5301
6407
  }
5302
6408
 
5303
6409
  export interface AddAdjustment {
@@ -5515,6 +6621,8 @@ export interface SubscriptionSchedulePlanChangeParams {
5515
6621
  | SubscriptionSchedulePlanChangeParams.OverrideTieredWithMinimumPrice
5516
6622
  | SubscriptionSchedulePlanChangeParams.OverridePackageWithAllocationPrice
5517
6623
  | SubscriptionSchedulePlanChangeParams.OverrideUnitWithPercentPrice
6624
+ | SubscriptionSchedulePlanChangeParams.OverrideGroupedAllocationPrice
6625
+ | SubscriptionSchedulePlanChangeParams.OverrideBulkWithProrationPrice
5518
6626
  > | null;
5519
6627
  }
5520
6628
 
@@ -6677,6 +7785,158 @@ export namespace SubscriptionSchedulePlanChangeParams {
6677
7785
  usage_discount?: number | null;
6678
7786
  }
6679
7787
  }
7788
+
7789
+ export interface OverrideGroupedAllocationPrice {
7790
+ id: string;
7791
+
7792
+ grouped_allocation_config: Record<string, unknown>;
7793
+
7794
+ model_type: 'grouped_allocation';
7795
+
7796
+ /**
7797
+ * The per unit conversion rate of the price currency to the invoicing currency.
7798
+ */
7799
+ conversion_rate?: number | null;
7800
+
7801
+ /**
7802
+ * The currency of the price. If not provided, the currency of the plan will be
7803
+ * used.
7804
+ */
7805
+ currency?: string | null;
7806
+
7807
+ /**
7808
+ * The subscription's override discount for the plan.
7809
+ */
7810
+ discount?: OverrideGroupedAllocationPrice.Discount | null;
7811
+
7812
+ /**
7813
+ * The starting quantity of the price, if the price is a fixed price.
7814
+ */
7815
+ fixed_price_quantity?: number | null;
7816
+
7817
+ /**
7818
+ * The subscription's override maximum amount for the plan.
7819
+ */
7820
+ maximum_amount?: string | null;
7821
+
7822
+ /**
7823
+ * The subscription's override minimum amount for the plan.
7824
+ */
7825
+ minimum_amount?: string | null;
7826
+ }
7827
+
7828
+ export namespace OverrideGroupedAllocationPrice {
7829
+ /**
7830
+ * The subscription's override discount for the plan.
7831
+ */
7832
+ export interface Discount {
7833
+ discount_type: 'percentage' | 'trial' | 'usage' | 'amount';
7834
+
7835
+ /**
7836
+ * Only available if discount_type is `amount`.
7837
+ */
7838
+ amount_discount?: string | null;
7839
+
7840
+ /**
7841
+ * List of price_ids that this discount applies to. For plan/plan phase discounts,
7842
+ * this can be a subset of prices.
7843
+ */
7844
+ applies_to_price_ids?: Array<string> | null;
7845
+
7846
+ /**
7847
+ * Only available if discount_type is `percentage`. This is a number between 0
7848
+ * and 1.
7849
+ */
7850
+ percentage_discount?: number | null;
7851
+
7852
+ /**
7853
+ * Only available if discount_type is `trial`
7854
+ */
7855
+ trial_amount_discount?: string | null;
7856
+
7857
+ /**
7858
+ * Only available if discount_type is `usage`. Number of usage units that this
7859
+ * discount is for
7860
+ */
7861
+ usage_discount?: number | null;
7862
+ }
7863
+ }
7864
+
7865
+ export interface OverrideBulkWithProrationPrice {
7866
+ id: string;
7867
+
7868
+ bulk_with_proration_config: Record<string, unknown>;
7869
+
7870
+ model_type: 'bulk_with_proration';
7871
+
7872
+ /**
7873
+ * The per unit conversion rate of the price currency to the invoicing currency.
7874
+ */
7875
+ conversion_rate?: number | null;
7876
+
7877
+ /**
7878
+ * The currency of the price. If not provided, the currency of the plan will be
7879
+ * used.
7880
+ */
7881
+ currency?: string | null;
7882
+
7883
+ /**
7884
+ * The subscription's override discount for the plan.
7885
+ */
7886
+ discount?: OverrideBulkWithProrationPrice.Discount | null;
7887
+
7888
+ /**
7889
+ * The starting quantity of the price, if the price is a fixed price.
7890
+ */
7891
+ fixed_price_quantity?: number | null;
7892
+
7893
+ /**
7894
+ * The subscription's override maximum amount for the plan.
7895
+ */
7896
+ maximum_amount?: string | null;
7897
+
7898
+ /**
7899
+ * The subscription's override minimum amount for the plan.
7900
+ */
7901
+ minimum_amount?: string | null;
7902
+ }
7903
+
7904
+ export namespace OverrideBulkWithProrationPrice {
7905
+ /**
7906
+ * The subscription's override discount for the plan.
7907
+ */
7908
+ export interface Discount {
7909
+ discount_type: 'percentage' | 'trial' | 'usage' | 'amount';
7910
+
7911
+ /**
7912
+ * Only available if discount_type is `amount`.
7913
+ */
7914
+ amount_discount?: string | null;
7915
+
7916
+ /**
7917
+ * List of price_ids that this discount applies to. For plan/plan phase discounts,
7918
+ * this can be a subset of prices.
7919
+ */
7920
+ applies_to_price_ids?: Array<string> | null;
7921
+
7922
+ /**
7923
+ * Only available if discount_type is `percentage`. This is a number between 0
7924
+ * and 1.
7925
+ */
7926
+ percentage_discount?: number | null;
7927
+
7928
+ /**
7929
+ * Only available if discount_type is `trial`
7930
+ */
7931
+ trial_amount_discount?: string | null;
7932
+
7933
+ /**
7934
+ * Only available if discount_type is `usage`. Number of usage units that this
7935
+ * discount is for
7936
+ */
7937
+ usage_discount?: number | null;
7938
+ }
7939
+ }
6680
7940
  }
6681
7941
 
6682
7942
  export interface SubscriptionTriggerPhaseParams {