orb-billing 2.10.0 → 2.11.1
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 +22 -0
- package/README.md +1 -1
- package/index.d.mts +1 -0
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js.map +1 -1
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/items.d.ts +20 -0
- package/resources/items.d.ts.map +1 -1
- package/resources/items.js +6 -0
- package/resources/items.js.map +1 -1
- package/resources/items.mjs +6 -0
- package/resources/items.mjs.map +1 -1
- package/resources/plans/plans.d.ts +97 -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 +210 -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 +95 -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/index.ts +1 -0
- package/src/resources/index.ts +1 -1
- package/src/resources/items.ts +34 -0
- package/src/resources/plans/plans.ts +122 -0
- package/src/resources/prices/prices.ts +296 -2
- package/src/resources/subscriptions.ts +120 -0
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -350,7 +350,9 @@ export type Price =
|
|
|
350
350
|
| Price.TieredPackageWithMinimumPrice
|
|
351
351
|
| Price.PackageWithAllocationPrice
|
|
352
352
|
| Price.UnitWithPercentPrice
|
|
353
|
-
| Price.MatrixWithAllocationPrice
|
|
353
|
+
| Price.MatrixWithAllocationPrice
|
|
354
|
+
| Price.TieredWithProrationPrice
|
|
355
|
+
| Price.UnitWithProrationPrice;
|
|
354
356
|
|
|
355
357
|
export namespace Price {
|
|
356
358
|
export interface UnitPrice {
|
|
@@ -1937,6 +1939,178 @@ export namespace Price {
|
|
|
1937
1939
|
minimum_amount: string;
|
|
1938
1940
|
}
|
|
1939
1941
|
}
|
|
1942
|
+
|
|
1943
|
+
export interface TieredWithProrationPrice {
|
|
1944
|
+
id: string;
|
|
1945
|
+
|
|
1946
|
+
billable_metric: TieredWithProrationPrice.BillableMetric | null;
|
|
1947
|
+
|
|
1948
|
+
cadence: 'one_time' | 'monthly' | 'quarterly' | 'annual';
|
|
1949
|
+
|
|
1950
|
+
conversion_rate: number | null;
|
|
1951
|
+
|
|
1952
|
+
created_at: string;
|
|
1953
|
+
|
|
1954
|
+
credit_allocation: TieredWithProrationPrice.CreditAllocation | null;
|
|
1955
|
+
|
|
1956
|
+
currency: string;
|
|
1957
|
+
|
|
1958
|
+
discount: Shared.Discount | null;
|
|
1959
|
+
|
|
1960
|
+
external_price_id: string | null;
|
|
1961
|
+
|
|
1962
|
+
fixed_price_quantity: number | null;
|
|
1963
|
+
|
|
1964
|
+
item: TieredWithProrationPrice.Item;
|
|
1965
|
+
|
|
1966
|
+
maximum: TieredWithProrationPrice.Maximum | null;
|
|
1967
|
+
|
|
1968
|
+
maximum_amount: string | null;
|
|
1969
|
+
|
|
1970
|
+
minimum: TieredWithProrationPrice.Minimum | null;
|
|
1971
|
+
|
|
1972
|
+
minimum_amount: string | null;
|
|
1973
|
+
|
|
1974
|
+
model_type: 'tiered_with_proration';
|
|
1975
|
+
|
|
1976
|
+
name: string;
|
|
1977
|
+
|
|
1978
|
+
plan_phase_order: number | null;
|
|
1979
|
+
|
|
1980
|
+
price_type: 'usage_price' | 'fixed_price';
|
|
1981
|
+
|
|
1982
|
+
tiered_with_proration_config: Record<string, unknown>;
|
|
1983
|
+
}
|
|
1984
|
+
|
|
1985
|
+
export namespace TieredWithProrationPrice {
|
|
1986
|
+
export interface BillableMetric {
|
|
1987
|
+
id: string;
|
|
1988
|
+
}
|
|
1989
|
+
|
|
1990
|
+
export interface CreditAllocation {
|
|
1991
|
+
allows_rollover: boolean;
|
|
1992
|
+
|
|
1993
|
+
currency: string;
|
|
1994
|
+
}
|
|
1995
|
+
|
|
1996
|
+
export interface Item {
|
|
1997
|
+
id: string;
|
|
1998
|
+
|
|
1999
|
+
name: string;
|
|
2000
|
+
}
|
|
2001
|
+
|
|
2002
|
+
export interface Maximum {
|
|
2003
|
+
/**
|
|
2004
|
+
* List of price_ids that this maximum amount applies to. For plan/plan phase
|
|
2005
|
+
* maximums, this can be a subset of prices.
|
|
2006
|
+
*/
|
|
2007
|
+
applies_to_price_ids: Array<string>;
|
|
2008
|
+
|
|
2009
|
+
/**
|
|
2010
|
+
* Maximum amount applied
|
|
2011
|
+
*/
|
|
2012
|
+
maximum_amount: string;
|
|
2013
|
+
}
|
|
2014
|
+
|
|
2015
|
+
export interface Minimum {
|
|
2016
|
+
/**
|
|
2017
|
+
* List of price_ids that this minimum amount applies to. For plan/plan phase
|
|
2018
|
+
* minimums, this can be a subset of prices.
|
|
2019
|
+
*/
|
|
2020
|
+
applies_to_price_ids: Array<string>;
|
|
2021
|
+
|
|
2022
|
+
/**
|
|
2023
|
+
* Minimum amount applied
|
|
2024
|
+
*/
|
|
2025
|
+
minimum_amount: string;
|
|
2026
|
+
}
|
|
2027
|
+
}
|
|
2028
|
+
|
|
2029
|
+
export interface UnitWithProrationPrice {
|
|
2030
|
+
id: string;
|
|
2031
|
+
|
|
2032
|
+
billable_metric: UnitWithProrationPrice.BillableMetric | null;
|
|
2033
|
+
|
|
2034
|
+
cadence: 'one_time' | 'monthly' | 'quarterly' | 'annual';
|
|
2035
|
+
|
|
2036
|
+
conversion_rate: number | null;
|
|
2037
|
+
|
|
2038
|
+
created_at: string;
|
|
2039
|
+
|
|
2040
|
+
credit_allocation: UnitWithProrationPrice.CreditAllocation | null;
|
|
2041
|
+
|
|
2042
|
+
currency: string;
|
|
2043
|
+
|
|
2044
|
+
discount: Shared.Discount | null;
|
|
2045
|
+
|
|
2046
|
+
external_price_id: string | null;
|
|
2047
|
+
|
|
2048
|
+
fixed_price_quantity: number | null;
|
|
2049
|
+
|
|
2050
|
+
item: UnitWithProrationPrice.Item;
|
|
2051
|
+
|
|
2052
|
+
maximum: UnitWithProrationPrice.Maximum | null;
|
|
2053
|
+
|
|
2054
|
+
maximum_amount: string | null;
|
|
2055
|
+
|
|
2056
|
+
minimum: UnitWithProrationPrice.Minimum | null;
|
|
2057
|
+
|
|
2058
|
+
minimum_amount: string | null;
|
|
2059
|
+
|
|
2060
|
+
model_type: 'unit_with_proration';
|
|
2061
|
+
|
|
2062
|
+
name: string;
|
|
2063
|
+
|
|
2064
|
+
plan_phase_order: number | null;
|
|
2065
|
+
|
|
2066
|
+
price_type: 'usage_price' | 'fixed_price';
|
|
2067
|
+
|
|
2068
|
+
unit_with_proration_config: Record<string, unknown>;
|
|
2069
|
+
}
|
|
2070
|
+
|
|
2071
|
+
export namespace UnitWithProrationPrice {
|
|
2072
|
+
export interface BillableMetric {
|
|
2073
|
+
id: string;
|
|
2074
|
+
}
|
|
2075
|
+
|
|
2076
|
+
export interface CreditAllocation {
|
|
2077
|
+
allows_rollover: boolean;
|
|
2078
|
+
|
|
2079
|
+
currency: string;
|
|
2080
|
+
}
|
|
2081
|
+
|
|
2082
|
+
export interface Item {
|
|
2083
|
+
id: string;
|
|
2084
|
+
|
|
2085
|
+
name: string;
|
|
2086
|
+
}
|
|
2087
|
+
|
|
2088
|
+
export interface Maximum {
|
|
2089
|
+
/**
|
|
2090
|
+
* List of price_ids that this maximum amount applies to. For plan/plan phase
|
|
2091
|
+
* maximums, this can be a subset of prices.
|
|
2092
|
+
*/
|
|
2093
|
+
applies_to_price_ids: Array<string>;
|
|
2094
|
+
|
|
2095
|
+
/**
|
|
2096
|
+
* Maximum amount applied
|
|
2097
|
+
*/
|
|
2098
|
+
maximum_amount: string;
|
|
2099
|
+
}
|
|
2100
|
+
|
|
2101
|
+
export interface Minimum {
|
|
2102
|
+
/**
|
|
2103
|
+
* List of price_ids that this minimum amount applies to. For plan/plan phase
|
|
2104
|
+
* minimums, this can be a subset of prices.
|
|
2105
|
+
*/
|
|
2106
|
+
applies_to_price_ids: Array<string>;
|
|
2107
|
+
|
|
2108
|
+
/**
|
|
2109
|
+
* Minimum amount applied
|
|
2110
|
+
*/
|
|
2111
|
+
minimum_amount: string;
|
|
2112
|
+
}
|
|
2113
|
+
}
|
|
1940
2114
|
}
|
|
1941
2115
|
|
|
1942
2116
|
export interface PriceEvaluateResponse {
|
|
@@ -1959,7 +2133,9 @@ export type PriceCreateParams =
|
|
|
1959
2133
|
| PriceCreateParams.NewFloatingTieredWithMinimumPrice
|
|
1960
2134
|
| PriceCreateParams.NewFloatingPackageWithAllocationPrice
|
|
1961
2135
|
| PriceCreateParams.NewFloatingTieredPackageWithMinimumPrice
|
|
1962
|
-
| PriceCreateParams.NewFloatingUnitWithPercentPrice
|
|
2136
|
+
| PriceCreateParams.NewFloatingUnitWithPercentPrice
|
|
2137
|
+
| PriceCreateParams.NewFloatingTieredWithProrationPrice
|
|
2138
|
+
| PriceCreateParams.NewFloatingUnitWithProrationPrice;
|
|
1963
2139
|
|
|
1964
2140
|
export namespace PriceCreateParams {
|
|
1965
2141
|
export interface NewFloatingUnitPrice {
|
|
@@ -3132,6 +3308,124 @@ export namespace PriceCreateParams {
|
|
|
3132
3308
|
*/
|
|
3133
3309
|
invoice_grouping_key?: string | null;
|
|
3134
3310
|
}
|
|
3311
|
+
|
|
3312
|
+
export interface NewFloatingTieredWithProrationPrice {
|
|
3313
|
+
/**
|
|
3314
|
+
* The cadence to bill for this price on.
|
|
3315
|
+
*/
|
|
3316
|
+
cadence: 'annual' | 'monthly' | 'quarterly' | 'one_time';
|
|
3317
|
+
|
|
3318
|
+
/**
|
|
3319
|
+
* An ISO 4217 currency string for which this price is billed in.
|
|
3320
|
+
*/
|
|
3321
|
+
currency: string;
|
|
3322
|
+
|
|
3323
|
+
/**
|
|
3324
|
+
* The id of the item the plan will be associated with.
|
|
3325
|
+
*/
|
|
3326
|
+
item_id: string;
|
|
3327
|
+
|
|
3328
|
+
model_type: 'tiered_with_proration';
|
|
3329
|
+
|
|
3330
|
+
/**
|
|
3331
|
+
* The name of the price.
|
|
3332
|
+
*/
|
|
3333
|
+
name: string;
|
|
3334
|
+
|
|
3335
|
+
tiered_with_proration_config: Record<string, unknown>;
|
|
3336
|
+
|
|
3337
|
+
/**
|
|
3338
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
3339
|
+
* usage-based.
|
|
3340
|
+
*/
|
|
3341
|
+
billable_metric_id?: string | null;
|
|
3342
|
+
|
|
3343
|
+
/**
|
|
3344
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
3345
|
+
* this is true, and in-arrears if this is false.
|
|
3346
|
+
*/
|
|
3347
|
+
billed_in_advance?: boolean | null;
|
|
3348
|
+
|
|
3349
|
+
/**
|
|
3350
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
3351
|
+
*/
|
|
3352
|
+
conversion_rate?: number | null;
|
|
3353
|
+
|
|
3354
|
+
/**
|
|
3355
|
+
* An alias for the price.
|
|
3356
|
+
*/
|
|
3357
|
+
external_price_id?: string | null;
|
|
3358
|
+
|
|
3359
|
+
/**
|
|
3360
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
3361
|
+
* applied.
|
|
3362
|
+
*/
|
|
3363
|
+
fixed_price_quantity?: number | null;
|
|
3364
|
+
|
|
3365
|
+
/**
|
|
3366
|
+
* The property used to group this price on an invoice
|
|
3367
|
+
*/
|
|
3368
|
+
invoice_grouping_key?: string | null;
|
|
3369
|
+
}
|
|
3370
|
+
|
|
3371
|
+
export interface NewFloatingUnitWithProrationPrice {
|
|
3372
|
+
/**
|
|
3373
|
+
* The cadence to bill for this price on.
|
|
3374
|
+
*/
|
|
3375
|
+
cadence: 'annual' | 'monthly' | 'quarterly' | 'one_time';
|
|
3376
|
+
|
|
3377
|
+
/**
|
|
3378
|
+
* An ISO 4217 currency string for which this price is billed in.
|
|
3379
|
+
*/
|
|
3380
|
+
currency: string;
|
|
3381
|
+
|
|
3382
|
+
/**
|
|
3383
|
+
* The id of the item the plan will be associated with.
|
|
3384
|
+
*/
|
|
3385
|
+
item_id: string;
|
|
3386
|
+
|
|
3387
|
+
model_type: 'unit_with_proration';
|
|
3388
|
+
|
|
3389
|
+
/**
|
|
3390
|
+
* The name of the price.
|
|
3391
|
+
*/
|
|
3392
|
+
name: string;
|
|
3393
|
+
|
|
3394
|
+
unit_with_proration_config: Record<string, unknown>;
|
|
3395
|
+
|
|
3396
|
+
/**
|
|
3397
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
3398
|
+
* usage-based.
|
|
3399
|
+
*/
|
|
3400
|
+
billable_metric_id?: string | null;
|
|
3401
|
+
|
|
3402
|
+
/**
|
|
3403
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
3404
|
+
* this is true, and in-arrears if this is false.
|
|
3405
|
+
*/
|
|
3406
|
+
billed_in_advance?: boolean | null;
|
|
3407
|
+
|
|
3408
|
+
/**
|
|
3409
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
3410
|
+
*/
|
|
3411
|
+
conversion_rate?: number | null;
|
|
3412
|
+
|
|
3413
|
+
/**
|
|
3414
|
+
* An alias for the price.
|
|
3415
|
+
*/
|
|
3416
|
+
external_price_id?: string | null;
|
|
3417
|
+
|
|
3418
|
+
/**
|
|
3419
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
3420
|
+
* applied.
|
|
3421
|
+
*/
|
|
3422
|
+
fixed_price_quantity?: number | null;
|
|
3423
|
+
|
|
3424
|
+
/**
|
|
3425
|
+
* The property used to group this price on an invoice
|
|
3426
|
+
*/
|
|
3427
|
+
invoice_grouping_key?: string | null;
|
|
3428
|
+
}
|
|
3135
3429
|
}
|
|
3136
3430
|
|
|
3137
3431
|
export interface PriceListParams extends PageParams {}
|
|
@@ -3646,6 +3646,8 @@ export namespace SubscriptionPriceIntervalsParams {
|
|
|
3646
3646
|
| Add.NewFloatingPackageWithAllocationPrice
|
|
3647
3647
|
| Add.NewFloatingTieredPackageWithMinimumPrice
|
|
3648
3648
|
| Add.NewFloatingUnitWithPercentPrice
|
|
3649
|
+
| Add.NewFloatingTieredWithProrationPrice
|
|
3650
|
+
| Add.NewFloatingUnitWithProrationPrice
|
|
3649
3651
|
| null;
|
|
3650
3652
|
|
|
3651
3653
|
/**
|
|
@@ -4866,6 +4868,124 @@ export namespace SubscriptionPriceIntervalsParams {
|
|
|
4866
4868
|
*/
|
|
4867
4869
|
invoice_grouping_key?: string | null;
|
|
4868
4870
|
}
|
|
4871
|
+
|
|
4872
|
+
export interface NewFloatingTieredWithProrationPrice {
|
|
4873
|
+
/**
|
|
4874
|
+
* The cadence to bill for this price on.
|
|
4875
|
+
*/
|
|
4876
|
+
cadence: 'annual' | 'monthly' | 'quarterly' | 'one_time';
|
|
4877
|
+
|
|
4878
|
+
/**
|
|
4879
|
+
* An ISO 4217 currency string for which this price is billed in.
|
|
4880
|
+
*/
|
|
4881
|
+
currency: string;
|
|
4882
|
+
|
|
4883
|
+
/**
|
|
4884
|
+
* The id of the item the plan will be associated with.
|
|
4885
|
+
*/
|
|
4886
|
+
item_id: string;
|
|
4887
|
+
|
|
4888
|
+
model_type: 'tiered_with_proration';
|
|
4889
|
+
|
|
4890
|
+
/**
|
|
4891
|
+
* The name of the price.
|
|
4892
|
+
*/
|
|
4893
|
+
name: string;
|
|
4894
|
+
|
|
4895
|
+
tiered_with_proration_config: Record<string, unknown>;
|
|
4896
|
+
|
|
4897
|
+
/**
|
|
4898
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
4899
|
+
* usage-based.
|
|
4900
|
+
*/
|
|
4901
|
+
billable_metric_id?: string | null;
|
|
4902
|
+
|
|
4903
|
+
/**
|
|
4904
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
4905
|
+
* this is true, and in-arrears if this is false.
|
|
4906
|
+
*/
|
|
4907
|
+
billed_in_advance?: boolean | null;
|
|
4908
|
+
|
|
4909
|
+
/**
|
|
4910
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
4911
|
+
*/
|
|
4912
|
+
conversion_rate?: number | null;
|
|
4913
|
+
|
|
4914
|
+
/**
|
|
4915
|
+
* An alias for the price.
|
|
4916
|
+
*/
|
|
4917
|
+
external_price_id?: string | null;
|
|
4918
|
+
|
|
4919
|
+
/**
|
|
4920
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
4921
|
+
* applied.
|
|
4922
|
+
*/
|
|
4923
|
+
fixed_price_quantity?: number | null;
|
|
4924
|
+
|
|
4925
|
+
/**
|
|
4926
|
+
* The property used to group this price on an invoice
|
|
4927
|
+
*/
|
|
4928
|
+
invoice_grouping_key?: string | null;
|
|
4929
|
+
}
|
|
4930
|
+
|
|
4931
|
+
export interface NewFloatingUnitWithProrationPrice {
|
|
4932
|
+
/**
|
|
4933
|
+
* The cadence to bill for this price on.
|
|
4934
|
+
*/
|
|
4935
|
+
cadence: 'annual' | 'monthly' | 'quarterly' | 'one_time';
|
|
4936
|
+
|
|
4937
|
+
/**
|
|
4938
|
+
* An ISO 4217 currency string for which this price is billed in.
|
|
4939
|
+
*/
|
|
4940
|
+
currency: string;
|
|
4941
|
+
|
|
4942
|
+
/**
|
|
4943
|
+
* The id of the item the plan will be associated with.
|
|
4944
|
+
*/
|
|
4945
|
+
item_id: string;
|
|
4946
|
+
|
|
4947
|
+
model_type: 'unit_with_proration';
|
|
4948
|
+
|
|
4949
|
+
/**
|
|
4950
|
+
* The name of the price.
|
|
4951
|
+
*/
|
|
4952
|
+
name: string;
|
|
4953
|
+
|
|
4954
|
+
unit_with_proration_config: Record<string, unknown>;
|
|
4955
|
+
|
|
4956
|
+
/**
|
|
4957
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
4958
|
+
* usage-based.
|
|
4959
|
+
*/
|
|
4960
|
+
billable_metric_id?: string | null;
|
|
4961
|
+
|
|
4962
|
+
/**
|
|
4963
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
4964
|
+
* this is true, and in-arrears if this is false.
|
|
4965
|
+
*/
|
|
4966
|
+
billed_in_advance?: boolean | null;
|
|
4967
|
+
|
|
4968
|
+
/**
|
|
4969
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
4970
|
+
*/
|
|
4971
|
+
conversion_rate?: number | null;
|
|
4972
|
+
|
|
4973
|
+
/**
|
|
4974
|
+
* An alias for the price.
|
|
4975
|
+
*/
|
|
4976
|
+
external_price_id?: string | null;
|
|
4977
|
+
|
|
4978
|
+
/**
|
|
4979
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
4980
|
+
* applied.
|
|
4981
|
+
*/
|
|
4982
|
+
fixed_price_quantity?: number | null;
|
|
4983
|
+
|
|
4984
|
+
/**
|
|
4985
|
+
* The property used to group this price on an invoice
|
|
4986
|
+
*/
|
|
4987
|
+
invoice_grouping_key?: string | null;
|
|
4988
|
+
}
|
|
4869
4989
|
}
|
|
4870
4990
|
|
|
4871
4991
|
export interface Edit {
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '2.
|
|
1
|
+
export const VERSION = '2.11.1'; // x-release-please-version
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "2.
|
|
1
|
+
export declare const VERSION = "2.11.1";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '2.
|
|
1
|
+
export const VERSION = '2.11.1'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|