orb-billing 4.3.0 → 4.4.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.
- package/CHANGELOG.md +8 -0
- package/package.json +1 -1
- package/resources/plans/plans.d.ts +55 -1
- package/resources/plans/plans.d.ts.map +1 -1
- package/resources/plans/plans.js.map +1 -1
- package/resources/plans/plans.mjs.map +1 -1
- package/resources/prices/prices.d.ts +124 -2
- package/resources/prices/prices.d.ts.map +1 -1
- package/resources/prices/prices.js.map +1 -1
- package/resources/prices/prices.mjs.map +1 -1
- package/resources/subscriptions.d.ts +54 -1
- package/resources/subscriptions.d.ts.map +1 -1
- package/resources/subscriptions.js.map +1 -1
- package/resources/subscriptions.mjs.map +1 -1
- package/src/resources/plans/plans.ts +68 -0
- package/src/resources/prices/prices.ts +172 -2
- package/src/resources/subscriptions.ts +67 -0
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -371,7 +371,8 @@ export type Price =
|
|
|
371
371
|
| Price.MatrixWithAllocationPrice
|
|
372
372
|
| Price.TieredWithProrationPrice
|
|
373
373
|
| Price.UnitWithProrationPrice
|
|
374
|
-
| Price.GroupedAllocationPrice
|
|
374
|
+
| Price.GroupedAllocationPrice
|
|
375
|
+
| Price.BulkWithProrationPrice;
|
|
375
376
|
|
|
376
377
|
export namespace Price {
|
|
377
378
|
export interface UnitPrice {
|
|
@@ -2520,6 +2521,108 @@ export namespace Price {
|
|
|
2520
2521
|
minimum_amount: string;
|
|
2521
2522
|
}
|
|
2522
2523
|
}
|
|
2524
|
+
|
|
2525
|
+
export interface BulkWithProrationPrice {
|
|
2526
|
+
id: string;
|
|
2527
|
+
|
|
2528
|
+
billable_metric: BulkWithProrationPrice.BillableMetric | null;
|
|
2529
|
+
|
|
2530
|
+
billing_cycle_configuration: BulkWithProrationPrice.BillingCycleConfiguration | null;
|
|
2531
|
+
|
|
2532
|
+
bulk_with_proration_config: Record<string, unknown>;
|
|
2533
|
+
|
|
2534
|
+
cadence: 'one_time' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | 'custom';
|
|
2535
|
+
|
|
2536
|
+
conversion_rate: number | null;
|
|
2537
|
+
|
|
2538
|
+
created_at: string;
|
|
2539
|
+
|
|
2540
|
+
credit_allocation: BulkWithProrationPrice.CreditAllocation | null;
|
|
2541
|
+
|
|
2542
|
+
currency: string;
|
|
2543
|
+
|
|
2544
|
+
discount: Shared.Discount | null;
|
|
2545
|
+
|
|
2546
|
+
external_price_id: string | null;
|
|
2547
|
+
|
|
2548
|
+
fixed_price_quantity: number | null;
|
|
2549
|
+
|
|
2550
|
+
item: BulkWithProrationPrice.Item;
|
|
2551
|
+
|
|
2552
|
+
maximum: BulkWithProrationPrice.Maximum | null;
|
|
2553
|
+
|
|
2554
|
+
maximum_amount: string | null;
|
|
2555
|
+
|
|
2556
|
+
/**
|
|
2557
|
+
* User specified key-value pairs for the resource. If not present, this defaults
|
|
2558
|
+
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
2559
|
+
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
2560
|
+
* `null`.
|
|
2561
|
+
*/
|
|
2562
|
+
metadata: Record<string, string>;
|
|
2563
|
+
|
|
2564
|
+
minimum: BulkWithProrationPrice.Minimum | null;
|
|
2565
|
+
|
|
2566
|
+
minimum_amount: string | null;
|
|
2567
|
+
|
|
2568
|
+
model_type: 'bulk_with_proration';
|
|
2569
|
+
|
|
2570
|
+
name: string;
|
|
2571
|
+
|
|
2572
|
+
plan_phase_order: number | null;
|
|
2573
|
+
|
|
2574
|
+
price_type: 'usage_price' | 'fixed_price';
|
|
2575
|
+
}
|
|
2576
|
+
|
|
2577
|
+
export namespace BulkWithProrationPrice {
|
|
2578
|
+
export interface BillableMetric {
|
|
2579
|
+
id: string;
|
|
2580
|
+
}
|
|
2581
|
+
|
|
2582
|
+
export interface BillingCycleConfiguration {
|
|
2583
|
+
duration: number;
|
|
2584
|
+
|
|
2585
|
+
duration_unit: 'day' | 'month';
|
|
2586
|
+
}
|
|
2587
|
+
|
|
2588
|
+
export interface CreditAllocation {
|
|
2589
|
+
allows_rollover: boolean;
|
|
2590
|
+
|
|
2591
|
+
currency: string;
|
|
2592
|
+
}
|
|
2593
|
+
|
|
2594
|
+
export interface Item {
|
|
2595
|
+
id: string;
|
|
2596
|
+
|
|
2597
|
+
name: string;
|
|
2598
|
+
}
|
|
2599
|
+
|
|
2600
|
+
export interface Maximum {
|
|
2601
|
+
/**
|
|
2602
|
+
* List of price_ids that this maximum amount applies to. For plan/plan phase
|
|
2603
|
+
* maximums, this can be a subset of prices.
|
|
2604
|
+
*/
|
|
2605
|
+
applies_to_price_ids: Array<string>;
|
|
2606
|
+
|
|
2607
|
+
/**
|
|
2608
|
+
* Maximum amount applied
|
|
2609
|
+
*/
|
|
2610
|
+
maximum_amount: string;
|
|
2611
|
+
}
|
|
2612
|
+
|
|
2613
|
+
export interface Minimum {
|
|
2614
|
+
/**
|
|
2615
|
+
* List of price_ids that this minimum amount applies to. For plan/plan phase
|
|
2616
|
+
* minimums, this can be a subset of prices.
|
|
2617
|
+
*/
|
|
2618
|
+
applies_to_price_ids: Array<string>;
|
|
2619
|
+
|
|
2620
|
+
/**
|
|
2621
|
+
* Minimum amount applied
|
|
2622
|
+
*/
|
|
2623
|
+
minimum_amount: string;
|
|
2624
|
+
}
|
|
2625
|
+
}
|
|
2523
2626
|
}
|
|
2524
2627
|
|
|
2525
2628
|
export interface PriceEvaluateResponse {
|
|
@@ -2545,7 +2648,8 @@ export type PriceCreateParams =
|
|
|
2545
2648
|
| PriceCreateParams.NewFloatingUnitWithPercentPrice
|
|
2546
2649
|
| PriceCreateParams.NewFloatingTieredWithProrationPrice
|
|
2547
2650
|
| PriceCreateParams.NewFloatingUnitWithProrationPrice
|
|
2548
|
-
| PriceCreateParams.NewFloatingGroupedAllocationPrice
|
|
2651
|
+
| PriceCreateParams.NewFloatingGroupedAllocationPrice
|
|
2652
|
+
| PriceCreateParams.NewFloatingBulkWithProrationPrice;
|
|
2549
2653
|
|
|
2550
2654
|
export namespace PriceCreateParams {
|
|
2551
2655
|
export interface NewFloatingUnitPrice {
|
|
@@ -4028,6 +4132,72 @@ export namespace PriceCreateParams {
|
|
|
4028
4132
|
*/
|
|
4029
4133
|
metadata?: Record<string, string | null> | null;
|
|
4030
4134
|
}
|
|
4135
|
+
|
|
4136
|
+
export interface NewFloatingBulkWithProrationPrice {
|
|
4137
|
+
bulk_with_proration_config: Record<string, unknown>;
|
|
4138
|
+
|
|
4139
|
+
/**
|
|
4140
|
+
* The cadence to bill for this price on.
|
|
4141
|
+
*/
|
|
4142
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
4143
|
+
|
|
4144
|
+
/**
|
|
4145
|
+
* An ISO 4217 currency string for which this price is billed in.
|
|
4146
|
+
*/
|
|
4147
|
+
currency: string;
|
|
4148
|
+
|
|
4149
|
+
/**
|
|
4150
|
+
* The id of the item the plan will be associated with.
|
|
4151
|
+
*/
|
|
4152
|
+
item_id: string;
|
|
4153
|
+
|
|
4154
|
+
model_type: 'bulk_with_proration';
|
|
4155
|
+
|
|
4156
|
+
/**
|
|
4157
|
+
* The name of the price.
|
|
4158
|
+
*/
|
|
4159
|
+
name: string;
|
|
4160
|
+
|
|
4161
|
+
/**
|
|
4162
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
4163
|
+
* usage-based.
|
|
4164
|
+
*/
|
|
4165
|
+
billable_metric_id?: string | null;
|
|
4166
|
+
|
|
4167
|
+
/**
|
|
4168
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
4169
|
+
* this is true, and in-arrears if this is false.
|
|
4170
|
+
*/
|
|
4171
|
+
billed_in_advance?: boolean | null;
|
|
4172
|
+
|
|
4173
|
+
/**
|
|
4174
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
4175
|
+
*/
|
|
4176
|
+
conversion_rate?: number | null;
|
|
4177
|
+
|
|
4178
|
+
/**
|
|
4179
|
+
* An alias for the price.
|
|
4180
|
+
*/
|
|
4181
|
+
external_price_id?: string | null;
|
|
4182
|
+
|
|
4183
|
+
/**
|
|
4184
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
4185
|
+
* applied.
|
|
4186
|
+
*/
|
|
4187
|
+
fixed_price_quantity?: number | null;
|
|
4188
|
+
|
|
4189
|
+
/**
|
|
4190
|
+
* The property used to group this price on an invoice
|
|
4191
|
+
*/
|
|
4192
|
+
invoice_grouping_key?: string | null;
|
|
4193
|
+
|
|
4194
|
+
/**
|
|
4195
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
4196
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
4197
|
+
* by setting `metadata` to `null`.
|
|
4198
|
+
*/
|
|
4199
|
+
metadata?: Record<string, string | null> | null;
|
|
4200
|
+
}
|
|
4031
4201
|
}
|
|
4032
4202
|
|
|
4033
4203
|
export interface PriceUpdateParams {
|
|
@@ -3672,6 +3672,7 @@ export namespace SubscriptionPriceIntervalsParams {
|
|
|
3672
3672
|
| Add.NewFloatingTieredWithProrationPrice
|
|
3673
3673
|
| Add.NewFloatingUnitWithProrationPrice
|
|
3674
3674
|
| Add.NewFloatingGroupedAllocationPrice
|
|
3675
|
+
| Add.NewFloatingBulkWithProrationPrice
|
|
3675
3676
|
| null;
|
|
3676
3677
|
|
|
3677
3678
|
/**
|
|
@@ -5229,6 +5230,72 @@ export namespace SubscriptionPriceIntervalsParams {
|
|
|
5229
5230
|
*/
|
|
5230
5231
|
metadata?: Record<string, string | null> | null;
|
|
5231
5232
|
}
|
|
5233
|
+
|
|
5234
|
+
export interface NewFloatingBulkWithProrationPrice {
|
|
5235
|
+
bulk_with_proration_config: Record<string, unknown>;
|
|
5236
|
+
|
|
5237
|
+
/**
|
|
5238
|
+
* The cadence to bill for this price on.
|
|
5239
|
+
*/
|
|
5240
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
5241
|
+
|
|
5242
|
+
/**
|
|
5243
|
+
* An ISO 4217 currency string for which this price is billed in.
|
|
5244
|
+
*/
|
|
5245
|
+
currency: string;
|
|
5246
|
+
|
|
5247
|
+
/**
|
|
5248
|
+
* The id of the item the plan will be associated with.
|
|
5249
|
+
*/
|
|
5250
|
+
item_id: string;
|
|
5251
|
+
|
|
5252
|
+
model_type: 'bulk_with_proration';
|
|
5253
|
+
|
|
5254
|
+
/**
|
|
5255
|
+
* The name of the price.
|
|
5256
|
+
*/
|
|
5257
|
+
name: string;
|
|
5258
|
+
|
|
5259
|
+
/**
|
|
5260
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
5261
|
+
* usage-based.
|
|
5262
|
+
*/
|
|
5263
|
+
billable_metric_id?: string | null;
|
|
5264
|
+
|
|
5265
|
+
/**
|
|
5266
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
5267
|
+
* this is true, and in-arrears if this is false.
|
|
5268
|
+
*/
|
|
5269
|
+
billed_in_advance?: boolean | null;
|
|
5270
|
+
|
|
5271
|
+
/**
|
|
5272
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
5273
|
+
*/
|
|
5274
|
+
conversion_rate?: number | null;
|
|
5275
|
+
|
|
5276
|
+
/**
|
|
5277
|
+
* An alias for the price.
|
|
5278
|
+
*/
|
|
5279
|
+
external_price_id?: string | null;
|
|
5280
|
+
|
|
5281
|
+
/**
|
|
5282
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
5283
|
+
* applied.
|
|
5284
|
+
*/
|
|
5285
|
+
fixed_price_quantity?: number | null;
|
|
5286
|
+
|
|
5287
|
+
/**
|
|
5288
|
+
* The property used to group this price on an invoice
|
|
5289
|
+
*/
|
|
5290
|
+
invoice_grouping_key?: string | null;
|
|
5291
|
+
|
|
5292
|
+
/**
|
|
5293
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
5294
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
5295
|
+
* by setting `metadata` to `null`.
|
|
5296
|
+
*/
|
|
5297
|
+
metadata?: Record<string, string | null> | null;
|
|
5298
|
+
}
|
|
5232
5299
|
}
|
|
5233
5300
|
|
|
5234
5301
|
export interface AddAdjustment {
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '4.
|
|
1
|
+
export const VERSION = '4.4.0'; // x-release-please-version
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "4.
|
|
1
|
+
export declare const VERSION = "4.4.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '4.
|
|
1
|
+
export const VERSION = '4.4.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|