orb-billing 4.2.0 → 4.3.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.
@@ -370,7 +370,8 @@ export type Price =
370
370
  | Price.UnitWithPercentPrice
371
371
  | Price.MatrixWithAllocationPrice
372
372
  | Price.TieredWithProrationPrice
373
- | Price.UnitWithProrationPrice;
373
+ | Price.UnitWithProrationPrice
374
+ | Price.GroupedAllocationPrice;
374
375
 
375
376
  export namespace Price {
376
377
  export interface UnitPrice {
@@ -2417,6 +2418,108 @@ export namespace Price {
2417
2418
  minimum_amount: string;
2418
2419
  }
2419
2420
  }
2421
+
2422
+ export interface GroupedAllocationPrice {
2423
+ id: string;
2424
+
2425
+ billable_metric: GroupedAllocationPrice.BillableMetric | null;
2426
+
2427
+ billing_cycle_configuration: GroupedAllocationPrice.BillingCycleConfiguration | null;
2428
+
2429
+ cadence: 'one_time' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | 'custom';
2430
+
2431
+ conversion_rate: number | null;
2432
+
2433
+ created_at: string;
2434
+
2435
+ credit_allocation: GroupedAllocationPrice.CreditAllocation | null;
2436
+
2437
+ currency: string;
2438
+
2439
+ discount: Shared.Discount | null;
2440
+
2441
+ external_price_id: string | null;
2442
+
2443
+ fixed_price_quantity: number | null;
2444
+
2445
+ grouped_allocation_config: Record<string, unknown>;
2446
+
2447
+ item: GroupedAllocationPrice.Item;
2448
+
2449
+ maximum: GroupedAllocationPrice.Maximum | null;
2450
+
2451
+ maximum_amount: string | null;
2452
+
2453
+ /**
2454
+ * User specified key-value pairs for the resource. If not present, this defaults
2455
+ * to an empty dictionary. Individual keys can be removed by setting the value to
2456
+ * `null`, and the entire metadata mapping can be cleared by setting `metadata` to
2457
+ * `null`.
2458
+ */
2459
+ metadata: Record<string, string>;
2460
+
2461
+ minimum: GroupedAllocationPrice.Minimum | null;
2462
+
2463
+ minimum_amount: string | null;
2464
+
2465
+ model_type: 'grouped_allocation';
2466
+
2467
+ name: string;
2468
+
2469
+ plan_phase_order: number | null;
2470
+
2471
+ price_type: 'usage_price' | 'fixed_price';
2472
+ }
2473
+
2474
+ export namespace GroupedAllocationPrice {
2475
+ export interface BillableMetric {
2476
+ id: string;
2477
+ }
2478
+
2479
+ export interface BillingCycleConfiguration {
2480
+ duration: number;
2481
+
2482
+ duration_unit: 'day' | 'month';
2483
+ }
2484
+
2485
+ export interface CreditAllocation {
2486
+ allows_rollover: boolean;
2487
+
2488
+ currency: string;
2489
+ }
2490
+
2491
+ export interface Item {
2492
+ id: string;
2493
+
2494
+ name: string;
2495
+ }
2496
+
2497
+ export interface Maximum {
2498
+ /**
2499
+ * List of price_ids that this maximum amount applies to. For plan/plan phase
2500
+ * maximums, this can be a subset of prices.
2501
+ */
2502
+ applies_to_price_ids: Array<string>;
2503
+
2504
+ /**
2505
+ * Maximum amount applied
2506
+ */
2507
+ maximum_amount: string;
2508
+ }
2509
+
2510
+ export interface Minimum {
2511
+ /**
2512
+ * List of price_ids that this minimum amount applies to. For plan/plan phase
2513
+ * minimums, this can be a subset of prices.
2514
+ */
2515
+ applies_to_price_ids: Array<string>;
2516
+
2517
+ /**
2518
+ * Minimum amount applied
2519
+ */
2520
+ minimum_amount: string;
2521
+ }
2522
+ }
2420
2523
  }
2421
2524
 
2422
2525
  export interface PriceEvaluateResponse {
@@ -2441,7 +2544,8 @@ export type PriceCreateParams =
2441
2544
  | PriceCreateParams.NewFloatingTieredPackageWithMinimumPrice
2442
2545
  | PriceCreateParams.NewFloatingUnitWithPercentPrice
2443
2546
  | PriceCreateParams.NewFloatingTieredWithProrationPrice
2444
- | PriceCreateParams.NewFloatingUnitWithProrationPrice;
2547
+ | PriceCreateParams.NewFloatingUnitWithProrationPrice
2548
+ | PriceCreateParams.NewFloatingGroupedAllocationPrice;
2445
2549
 
2446
2550
  export namespace PriceCreateParams {
2447
2551
  export interface NewFloatingUnitPrice {
@@ -3858,6 +3962,72 @@ export namespace PriceCreateParams {
3858
3962
  */
3859
3963
  metadata?: Record<string, string | null> | null;
3860
3964
  }
3965
+
3966
+ export interface NewFloatingGroupedAllocationPrice {
3967
+ /**
3968
+ * The cadence to bill for this price on.
3969
+ */
3970
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
3971
+
3972
+ /**
3973
+ * An ISO 4217 currency string for which this price is billed in.
3974
+ */
3975
+ currency: string;
3976
+
3977
+ grouped_allocation_config: Record<string, unknown>;
3978
+
3979
+ /**
3980
+ * The id of the item the plan will be associated with.
3981
+ */
3982
+ item_id: string;
3983
+
3984
+ model_type: 'grouped_allocation';
3985
+
3986
+ /**
3987
+ * The name of the price.
3988
+ */
3989
+ name: string;
3990
+
3991
+ /**
3992
+ * The id of the billable metric for the price. Only needed if the price is
3993
+ * usage-based.
3994
+ */
3995
+ billable_metric_id?: string | null;
3996
+
3997
+ /**
3998
+ * If the Price represents a fixed cost, the price will be billed in-advance if
3999
+ * this is true, and in-arrears if this is false.
4000
+ */
4001
+ billed_in_advance?: boolean | null;
4002
+
4003
+ /**
4004
+ * The per unit conversion rate of the price currency to the invoicing currency.
4005
+ */
4006
+ conversion_rate?: number | null;
4007
+
4008
+ /**
4009
+ * An alias for the price.
4010
+ */
4011
+ external_price_id?: string | null;
4012
+
4013
+ /**
4014
+ * If the Price represents a fixed cost, this represents the quantity of units
4015
+ * applied.
4016
+ */
4017
+ fixed_price_quantity?: number | null;
4018
+
4019
+ /**
4020
+ * The property used to group this price on an invoice
4021
+ */
4022
+ invoice_grouping_key?: string | null;
4023
+
4024
+ /**
4025
+ * User-specified key/value pairs for the resource. Individual keys can be removed
4026
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
4027
+ * by setting `metadata` to `null`.
4028
+ */
4029
+ metadata?: Record<string, string | null> | null;
4030
+ }
3861
4031
  }
3862
4032
 
3863
4033
  export interface PriceUpdateParams {
@@ -3671,6 +3671,7 @@ export namespace SubscriptionPriceIntervalsParams {
3671
3671
  | Add.NewFloatingUnitWithPercentPrice
3672
3672
  | Add.NewFloatingTieredWithProrationPrice
3673
3673
  | Add.NewFloatingUnitWithProrationPrice
3674
+ | Add.NewFloatingGroupedAllocationPrice
3674
3675
  | null;
3675
3676
 
3676
3677
  /**
@@ -5162,6 +5163,72 @@ export namespace SubscriptionPriceIntervalsParams {
5162
5163
  */
5163
5164
  metadata?: Record<string, string | null> | null;
5164
5165
  }
5166
+
5167
+ export interface NewFloatingGroupedAllocationPrice {
5168
+ /**
5169
+ * The cadence to bill for this price on.
5170
+ */
5171
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
5172
+
5173
+ /**
5174
+ * An ISO 4217 currency string for which this price is billed in.
5175
+ */
5176
+ currency: string;
5177
+
5178
+ grouped_allocation_config: Record<string, unknown>;
5179
+
5180
+ /**
5181
+ * The id of the item the plan will be associated with.
5182
+ */
5183
+ item_id: string;
5184
+
5185
+ model_type: 'grouped_allocation';
5186
+
5187
+ /**
5188
+ * The name of the price.
5189
+ */
5190
+ name: string;
5191
+
5192
+ /**
5193
+ * The id of the billable metric for the price. Only needed if the price is
5194
+ * usage-based.
5195
+ */
5196
+ billable_metric_id?: string | null;
5197
+
5198
+ /**
5199
+ * If the Price represents a fixed cost, the price will be billed in-advance if
5200
+ * this is true, and in-arrears if this is false.
5201
+ */
5202
+ billed_in_advance?: boolean | null;
5203
+
5204
+ /**
5205
+ * The per unit conversion rate of the price currency to the invoicing currency.
5206
+ */
5207
+ conversion_rate?: number | null;
5208
+
5209
+ /**
5210
+ * An alias for the price.
5211
+ */
5212
+ external_price_id?: string | null;
5213
+
5214
+ /**
5215
+ * If the Price represents a fixed cost, this represents the quantity of units
5216
+ * applied.
5217
+ */
5218
+ fixed_price_quantity?: number | null;
5219
+
5220
+ /**
5221
+ * The property used to group this price on an invoice
5222
+ */
5223
+ invoice_grouping_key?: string | null;
5224
+
5225
+ /**
5226
+ * User-specified key/value pairs for the resource. Individual keys can be removed
5227
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
5228
+ * by setting `metadata` to `null`.
5229
+ */
5230
+ metadata?: Record<string, string | null> | null;
5231
+ }
5165
5232
  }
5166
5233
 
5167
5234
  export interface AddAdjustment {
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '4.2.0'; // x-release-please-version
1
+ export const VERSION = '4.3.0'; // x-release-please-version
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "4.2.0";
1
+ export declare const VERSION = "4.3.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.2.0'; // x-release-please-version
4
+ exports.VERSION = '4.3.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '4.2.0'; // x-release-please-version
1
+ export const VERSION = '4.3.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map