orb-billing 4.12.0 → 4.14.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.
@@ -372,6 +372,7 @@ export type Price =
372
372
  | Price.TieredWithProrationPrice
373
373
  | Price.UnitWithProrationPrice
374
374
  | Price.GroupedAllocationPrice
375
+ | Price.GroupedWithProratedMinimumPrice
375
376
  | Price.BulkWithProrationPrice;
376
377
 
377
378
  export namespace Price {
@@ -2674,6 +2675,116 @@ export namespace Price {
2674
2675
  }
2675
2676
  }
2676
2677
 
2678
+ export interface GroupedWithProratedMinimumPrice {
2679
+ id: string;
2680
+
2681
+ billable_metric: GroupedWithProratedMinimumPrice.BillableMetric | null;
2682
+
2683
+ billing_cycle_configuration: GroupedWithProratedMinimumPrice.BillingCycleConfiguration;
2684
+
2685
+ cadence: 'one_time' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | 'custom';
2686
+
2687
+ conversion_rate: number | null;
2688
+
2689
+ created_at: string;
2690
+
2691
+ credit_allocation: GroupedWithProratedMinimumPrice.CreditAllocation | null;
2692
+
2693
+ currency: string;
2694
+
2695
+ discount: Shared.Discount | null;
2696
+
2697
+ external_price_id: string | null;
2698
+
2699
+ fixed_price_quantity: number | null;
2700
+
2701
+ grouped_with_prorated_minimum_config: Record<string, unknown>;
2702
+
2703
+ invoicing_cycle_configuration: GroupedWithProratedMinimumPrice.InvoicingCycleConfiguration | null;
2704
+
2705
+ item: GroupedWithProratedMinimumPrice.Item;
2706
+
2707
+ maximum: GroupedWithProratedMinimumPrice.Maximum | null;
2708
+
2709
+ maximum_amount: string | null;
2710
+
2711
+ /**
2712
+ * User specified key-value pairs for the resource. If not present, this defaults
2713
+ * to an empty dictionary. Individual keys can be removed by setting the value to
2714
+ * `null`, and the entire metadata mapping can be cleared by setting `metadata` to
2715
+ * `null`.
2716
+ */
2717
+ metadata: Record<string, string>;
2718
+
2719
+ minimum: GroupedWithProratedMinimumPrice.Minimum | null;
2720
+
2721
+ minimum_amount: string | null;
2722
+
2723
+ model_type: 'grouped_with_prorated_minimum';
2724
+
2725
+ name: string;
2726
+
2727
+ plan_phase_order: number | null;
2728
+
2729
+ price_type: 'usage_price' | 'fixed_price';
2730
+ }
2731
+
2732
+ export namespace GroupedWithProratedMinimumPrice {
2733
+ export interface BillableMetric {
2734
+ id: string;
2735
+ }
2736
+
2737
+ export interface BillingCycleConfiguration {
2738
+ duration: number;
2739
+
2740
+ duration_unit: 'day' | 'month';
2741
+ }
2742
+
2743
+ export interface CreditAllocation {
2744
+ allows_rollover: boolean;
2745
+
2746
+ currency: string;
2747
+ }
2748
+
2749
+ export interface InvoicingCycleConfiguration {
2750
+ duration: number;
2751
+
2752
+ duration_unit: 'day' | 'month';
2753
+ }
2754
+
2755
+ export interface Item {
2756
+ id: string;
2757
+
2758
+ name: string;
2759
+ }
2760
+
2761
+ export interface Maximum {
2762
+ /**
2763
+ * List of price_ids that this maximum amount applies to. For plan/plan phase
2764
+ * maximums, this can be a subset of prices.
2765
+ */
2766
+ applies_to_price_ids: Array<string>;
2767
+
2768
+ /**
2769
+ * Maximum amount applied
2770
+ */
2771
+ maximum_amount: string;
2772
+ }
2773
+
2774
+ export interface Minimum {
2775
+ /**
2776
+ * List of price_ids that this minimum amount applies to. For plan/plan phase
2777
+ * minimums, this can be a subset of prices.
2778
+ */
2779
+ applies_to_price_ids: Array<string>;
2780
+
2781
+ /**
2782
+ * Minimum amount applied
2783
+ */
2784
+ minimum_amount: string;
2785
+ }
2786
+ }
2787
+
2677
2788
  export interface BulkWithProrationPrice {
2678
2789
  id: string;
2679
2790
 
@@ -2809,6 +2920,7 @@ export type PriceCreateParams =
2809
2920
  | PriceCreateParams.NewFloatingTieredWithProrationPrice
2810
2921
  | PriceCreateParams.NewFloatingUnitWithProrationPrice
2811
2922
  | PriceCreateParams.NewFloatingGroupedAllocationPrice
2923
+ | PriceCreateParams.NewFloatingGroupedWithProratedMinimumPrice
2812
2924
  | PriceCreateParams.NewFloatingBulkWithProrationPrice;
2813
2925
 
2814
2926
  export namespace PriceCreateParams {
@@ -5149,6 +5261,118 @@ export namespace PriceCreateParams {
5149
5261
  }
5150
5262
  }
5151
5263
 
5264
+ export interface NewFloatingGroupedWithProratedMinimumPrice {
5265
+ /**
5266
+ * The cadence to bill for this price on.
5267
+ */
5268
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
5269
+
5270
+ /**
5271
+ * An ISO 4217 currency string for which this price is billed in.
5272
+ */
5273
+ currency: string;
5274
+
5275
+ grouped_with_prorated_minimum_config: Record<string, unknown>;
5276
+
5277
+ /**
5278
+ * The id of the item the plan will be associated with.
5279
+ */
5280
+ item_id: string;
5281
+
5282
+ model_type: 'grouped_with_prorated_minimum';
5283
+
5284
+ /**
5285
+ * The name of the price.
5286
+ */
5287
+ name: string;
5288
+
5289
+ /**
5290
+ * The id of the billable metric for the price. Only needed if the price is
5291
+ * usage-based.
5292
+ */
5293
+ billable_metric_id?: string | null;
5294
+
5295
+ /**
5296
+ * If the Price represents a fixed cost, the price will be billed in-advance if
5297
+ * this is true, and in-arrears if this is false.
5298
+ */
5299
+ billed_in_advance?: boolean | null;
5300
+
5301
+ /**
5302
+ * For custom cadence: specifies the duration of the billing period in days or
5303
+ * months.
5304
+ */
5305
+ billing_cycle_configuration?: PriceCreateParams.NewFloatingGroupedWithProratedMinimumPrice.BillingCycleConfiguration | null;
5306
+
5307
+ /**
5308
+ * The per unit conversion rate of the price currency to the invoicing currency.
5309
+ */
5310
+ conversion_rate?: number | null;
5311
+
5312
+ /**
5313
+ * An alias for the price.
5314
+ */
5315
+ external_price_id?: string | null;
5316
+
5317
+ /**
5318
+ * If the Price represents a fixed cost, this represents the quantity of units
5319
+ * applied.
5320
+ */
5321
+ fixed_price_quantity?: number | null;
5322
+
5323
+ /**
5324
+ * The property used to group this price on an invoice
5325
+ */
5326
+ invoice_grouping_key?: string | null;
5327
+
5328
+ /**
5329
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
5330
+ * If unspecified, a single invoice is produced per billing cycle.
5331
+ */
5332
+ invoicing_cycle_configuration?: PriceCreateParams.NewFloatingGroupedWithProratedMinimumPrice.InvoicingCycleConfiguration | null;
5333
+
5334
+ /**
5335
+ * User-specified key/value pairs for the resource. Individual keys can be removed
5336
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
5337
+ * by setting `metadata` to `null`.
5338
+ */
5339
+ metadata?: Record<string, string | null> | null;
5340
+ }
5341
+
5342
+ export namespace NewFloatingGroupedWithProratedMinimumPrice {
5343
+ /**
5344
+ * For custom cadence: specifies the duration of the billing period in days or
5345
+ * months.
5346
+ */
5347
+ export interface BillingCycleConfiguration {
5348
+ /**
5349
+ * The duration of the billing period.
5350
+ */
5351
+ duration: number;
5352
+
5353
+ /**
5354
+ * The unit of billing period duration.
5355
+ */
5356
+ duration_unit: 'day' | 'month';
5357
+ }
5358
+
5359
+ /**
5360
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
5361
+ * If unspecified, a single invoice is produced per billing cycle.
5362
+ */
5363
+ export interface InvoicingCycleConfiguration {
5364
+ /**
5365
+ * The duration of the billing period.
5366
+ */
5367
+ duration: number;
5368
+
5369
+ /**
5370
+ * The unit of billing period duration.
5371
+ */
5372
+ duration_unit: 'day' | 'month';
5373
+ }
5374
+ }
5375
+
5152
5376
  export interface NewFloatingBulkWithProrationPrice {
5153
5377
  bulk_with_proration_config: Record<string, unknown>;
5154
5378
 
@@ -1002,7 +1002,8 @@ export class Subscriptions extends APIResource {
1002
1002
  * This endpoint can be used to clear scheduled updates to the quantity for a fixed
1003
1003
  * fee.
1004
1004
  *
1005
- * If there are no updates scheduled, this endpoint is a no-op.
1005
+ * If there are no updates scheduled, a request validation error will be returned
1006
+ * with a 400 status code.
1006
1007
  */
1007
1008
  unscheduleFixedFeeQuantityUpdates(
1008
1009
  subscriptionId: string,
@@ -2295,6 +2296,7 @@ export interface SubscriptionCreateParams {
2295
2296
  | SubscriptionCreateParams.OverridePackageWithAllocationPrice
2296
2297
  | SubscriptionCreateParams.OverrideUnitWithPercentPrice
2297
2298
  | SubscriptionCreateParams.OverrideGroupedAllocationPrice
2299
+ | SubscriptionCreateParams.OverrideGroupedWithProratedMinimumPrice
2298
2300
  | SubscriptionCreateParams.OverrideBulkWithProrationPrice
2299
2301
  > | null;
2300
2302
 
@@ -3560,6 +3562,82 @@ export namespace SubscriptionCreateParams {
3560
3562
  }
3561
3563
  }
3562
3564
 
3565
+ export interface OverrideGroupedWithProratedMinimumPrice {
3566
+ id: string;
3567
+
3568
+ grouped_with_prorated_minimum_config: Record<string, unknown>;
3569
+
3570
+ model_type: 'grouped_with_prorated_minimum';
3571
+
3572
+ /**
3573
+ * The per unit conversion rate of the price currency to the invoicing currency.
3574
+ */
3575
+ conversion_rate?: number | null;
3576
+
3577
+ /**
3578
+ * The currency of the price. If not provided, the currency of the plan will be
3579
+ * used.
3580
+ */
3581
+ currency?: string | null;
3582
+
3583
+ /**
3584
+ * The subscription's override discount for the plan.
3585
+ */
3586
+ discount?: OverrideGroupedWithProratedMinimumPrice.Discount | null;
3587
+
3588
+ /**
3589
+ * The starting quantity of the price, if the price is a fixed price.
3590
+ */
3591
+ fixed_price_quantity?: number | null;
3592
+
3593
+ /**
3594
+ * The subscription's override maximum amount for the plan.
3595
+ */
3596
+ maximum_amount?: string | null;
3597
+
3598
+ /**
3599
+ * The subscription's override minimum amount for the plan.
3600
+ */
3601
+ minimum_amount?: string | null;
3602
+ }
3603
+
3604
+ export namespace OverrideGroupedWithProratedMinimumPrice {
3605
+ /**
3606
+ * The subscription's override discount for the plan.
3607
+ */
3608
+ export interface Discount {
3609
+ discount_type: 'percentage' | 'trial' | 'usage' | 'amount';
3610
+
3611
+ /**
3612
+ * Only available if discount_type is `amount`.
3613
+ */
3614
+ amount_discount?: string | null;
3615
+
3616
+ /**
3617
+ * List of price_ids that this discount applies to. For plan/plan phase discounts,
3618
+ * this can be a subset of prices.
3619
+ */
3620
+ applies_to_price_ids?: Array<string> | null;
3621
+
3622
+ /**
3623
+ * Only available if discount_type is `percentage`. This is a number between 0
3624
+ * and 1.
3625
+ */
3626
+ percentage_discount?: number | null;
3627
+
3628
+ /**
3629
+ * Only available if discount_type is `trial`
3630
+ */
3631
+ trial_amount_discount?: string | null;
3632
+
3633
+ /**
3634
+ * Only available if discount_type is `usage`. Number of usage units that this
3635
+ * discount is for
3636
+ */
3637
+ usage_discount?: number | null;
3638
+ }
3639
+ }
3640
+
3563
3641
  export interface OverrideBulkWithProrationPrice {
3564
3642
  id: string;
3565
3643
 
@@ -3878,6 +3956,7 @@ export namespace SubscriptionPriceIntervalsParams {
3878
3956
  | Add.NewFloatingTieredWithProrationPrice
3879
3957
  | Add.NewFloatingUnitWithProrationPrice
3880
3958
  | Add.NewFloatingGroupedAllocationPrice
3959
+ | Add.NewFloatingGroupedWithProratedMinimumPrice
3881
3960
  | Add.NewFloatingBulkWithProrationPrice
3882
3961
  | null;
3883
3962
 
@@ -6293,6 +6372,118 @@ export namespace SubscriptionPriceIntervalsParams {
6293
6372
  }
6294
6373
  }
6295
6374
 
6375
+ export interface NewFloatingGroupedWithProratedMinimumPrice {
6376
+ /**
6377
+ * The cadence to bill for this price on.
6378
+ */
6379
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
6380
+
6381
+ /**
6382
+ * An ISO 4217 currency string for which this price is billed in.
6383
+ */
6384
+ currency: string;
6385
+
6386
+ grouped_with_prorated_minimum_config: Record<string, unknown>;
6387
+
6388
+ /**
6389
+ * The id of the item the plan will be associated with.
6390
+ */
6391
+ item_id: string;
6392
+
6393
+ model_type: 'grouped_with_prorated_minimum';
6394
+
6395
+ /**
6396
+ * The name of the price.
6397
+ */
6398
+ name: string;
6399
+
6400
+ /**
6401
+ * The id of the billable metric for the price. Only needed if the price is
6402
+ * usage-based.
6403
+ */
6404
+ billable_metric_id?: string | null;
6405
+
6406
+ /**
6407
+ * If the Price represents a fixed cost, the price will be billed in-advance if
6408
+ * this is true, and in-arrears if this is false.
6409
+ */
6410
+ billed_in_advance?: boolean | null;
6411
+
6412
+ /**
6413
+ * For custom cadence: specifies the duration of the billing period in days or
6414
+ * months.
6415
+ */
6416
+ billing_cycle_configuration?: NewFloatingGroupedWithProratedMinimumPrice.BillingCycleConfiguration | null;
6417
+
6418
+ /**
6419
+ * The per unit conversion rate of the price currency to the invoicing currency.
6420
+ */
6421
+ conversion_rate?: number | null;
6422
+
6423
+ /**
6424
+ * An alias for the price.
6425
+ */
6426
+ external_price_id?: string | null;
6427
+
6428
+ /**
6429
+ * If the Price represents a fixed cost, this represents the quantity of units
6430
+ * applied.
6431
+ */
6432
+ fixed_price_quantity?: number | null;
6433
+
6434
+ /**
6435
+ * The property used to group this price on an invoice
6436
+ */
6437
+ invoice_grouping_key?: string | null;
6438
+
6439
+ /**
6440
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
6441
+ * If unspecified, a single invoice is produced per billing cycle.
6442
+ */
6443
+ invoicing_cycle_configuration?: NewFloatingGroupedWithProratedMinimumPrice.InvoicingCycleConfiguration | null;
6444
+
6445
+ /**
6446
+ * User-specified key/value pairs for the resource. Individual keys can be removed
6447
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
6448
+ * by setting `metadata` to `null`.
6449
+ */
6450
+ metadata?: Record<string, string | null> | null;
6451
+ }
6452
+
6453
+ export namespace NewFloatingGroupedWithProratedMinimumPrice {
6454
+ /**
6455
+ * For custom cadence: specifies the duration of the billing period in days or
6456
+ * months.
6457
+ */
6458
+ export interface BillingCycleConfiguration {
6459
+ /**
6460
+ * The duration of the billing period.
6461
+ */
6462
+ duration: number;
6463
+
6464
+ /**
6465
+ * The unit of billing period duration.
6466
+ */
6467
+ duration_unit: 'day' | 'month';
6468
+ }
6469
+
6470
+ /**
6471
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
6472
+ * If unspecified, a single invoice is produced per billing cycle.
6473
+ */
6474
+ export interface InvoicingCycleConfiguration {
6475
+ /**
6476
+ * The duration of the billing period.
6477
+ */
6478
+ duration: number;
6479
+
6480
+ /**
6481
+ * The unit of billing period duration.
6482
+ */
6483
+ duration_unit: 'day' | 'month';
6484
+ }
6485
+ }
6486
+
6296
6487
  export interface NewFloatingBulkWithProrationPrice {
6297
6488
  bulk_with_proration_config: Record<string, unknown>;
6298
6489
 
@@ -6622,6 +6813,7 @@ export interface SubscriptionSchedulePlanChangeParams {
6622
6813
  | SubscriptionSchedulePlanChangeParams.OverridePackageWithAllocationPrice
6623
6814
  | SubscriptionSchedulePlanChangeParams.OverrideUnitWithPercentPrice
6624
6815
  | SubscriptionSchedulePlanChangeParams.OverrideGroupedAllocationPrice
6816
+ | SubscriptionSchedulePlanChangeParams.OverrideGroupedWithProratedMinimumPrice
6625
6817
  | SubscriptionSchedulePlanChangeParams.OverrideBulkWithProrationPrice
6626
6818
  > | null;
6627
6819
  }
@@ -7862,6 +8054,82 @@ export namespace SubscriptionSchedulePlanChangeParams {
7862
8054
  }
7863
8055
  }
7864
8056
 
8057
+ export interface OverrideGroupedWithProratedMinimumPrice {
8058
+ id: string;
8059
+
8060
+ grouped_with_prorated_minimum_config: Record<string, unknown>;
8061
+
8062
+ model_type: 'grouped_with_prorated_minimum';
8063
+
8064
+ /**
8065
+ * The per unit conversion rate of the price currency to the invoicing currency.
8066
+ */
8067
+ conversion_rate?: number | null;
8068
+
8069
+ /**
8070
+ * The currency of the price. If not provided, the currency of the plan will be
8071
+ * used.
8072
+ */
8073
+ currency?: string | null;
8074
+
8075
+ /**
8076
+ * The subscription's override discount for the plan.
8077
+ */
8078
+ discount?: OverrideGroupedWithProratedMinimumPrice.Discount | null;
8079
+
8080
+ /**
8081
+ * The starting quantity of the price, if the price is a fixed price.
8082
+ */
8083
+ fixed_price_quantity?: number | null;
8084
+
8085
+ /**
8086
+ * The subscription's override maximum amount for the plan.
8087
+ */
8088
+ maximum_amount?: string | null;
8089
+
8090
+ /**
8091
+ * The subscription's override minimum amount for the plan.
8092
+ */
8093
+ minimum_amount?: string | null;
8094
+ }
8095
+
8096
+ export namespace OverrideGroupedWithProratedMinimumPrice {
8097
+ /**
8098
+ * The subscription's override discount for the plan.
8099
+ */
8100
+ export interface Discount {
8101
+ discount_type: 'percentage' | 'trial' | 'usage' | 'amount';
8102
+
8103
+ /**
8104
+ * Only available if discount_type is `amount`.
8105
+ */
8106
+ amount_discount?: string | null;
8107
+
8108
+ /**
8109
+ * List of price_ids that this discount applies to. For plan/plan phase discounts,
8110
+ * this can be a subset of prices.
8111
+ */
8112
+ applies_to_price_ids?: Array<string> | null;
8113
+
8114
+ /**
8115
+ * Only available if discount_type is `percentage`. This is a number between 0
8116
+ * and 1.
8117
+ */
8118
+ percentage_discount?: number | null;
8119
+
8120
+ /**
8121
+ * Only available if discount_type is `trial`
8122
+ */
8123
+ trial_amount_discount?: string | null;
8124
+
8125
+ /**
8126
+ * Only available if discount_type is `usage`. Number of usage units that this
8127
+ * discount is for
8128
+ */
8129
+ usage_discount?: number | null;
8130
+ }
8131
+ }
8132
+
7865
8133
  export interface OverrideBulkWithProrationPrice {
7866
8134
  id: string;
7867
8135
 
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '4.12.0'; // x-release-please-version
1
+ export const VERSION = '4.14.0'; // x-release-please-version
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "4.12.0";
1
+ export declare const VERSION = "4.14.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '4.12.0'; // x-release-please-version
4
+ exports.VERSION = '4.14.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '4.12.0'; // x-release-please-version
1
+ export const VERSION = '4.14.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map