orb-billing 4.55.0 → 4.57.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 +22 -0
- package/package.json +29 -8
- package/resources/customers/balance-transactions.d.ts +2 -2
- package/resources/customers/balance-transactions.d.ts.map +1 -1
- package/resources/customers/balance-transactions.js.map +1 -1
- package/resources/customers/balance-transactions.mjs.map +1 -1
- package/resources/customers/costs.d.ts +10 -20
- package/resources/customers/costs.d.ts.map +1 -1
- package/resources/invoices.d.ts +2 -2
- package/resources/invoices.d.ts.map +1 -1
- package/resources/invoices.js.map +1 -1
- package/resources/invoices.mjs.map +1 -1
- package/resources/plans/plans.d.ts +95 -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 +174 -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 +231 -11
- 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/customers/balance-transactions.ts +4 -2
- package/src/resources/customers/costs.ts +12 -20
- package/src/resources/invoices.ts +4 -2
- package/src/resources/plans/plans.ts +114 -0
- package/src/resources/prices/prices.ts +234 -2
- package/src/resources/subscriptions.ts +275 -10
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -2999,19 +2999,15 @@ export namespace SubscriptionFetchCostsResponse {
|
|
|
2999
2999
|
export namespace Data {
|
|
3000
3000
|
export interface PerPriceCost {
|
|
3001
3001
|
/**
|
|
3002
|
-
* The
|
|
3003
|
-
* resulting in a charge on an invoice in the form of an invoice line item. Prices
|
|
3004
|
-
* take a quantity and determine an amount to bill.
|
|
3005
|
-
*
|
|
3006
|
-
* Orb supports a few different pricing models out of the box. Each of these models
|
|
3007
|
-
* is serialized differently in a given Price object. The model_type field
|
|
3008
|
-
* determines the key for the configuration object that is present.
|
|
3009
|
-
*
|
|
3010
|
-
* For more on the types of prices, see
|
|
3011
|
-
* [the core concepts documentation](/core-concepts#plan-and-price)
|
|
3002
|
+
* The price object
|
|
3012
3003
|
*/
|
|
3013
3004
|
price: PricesAPI.Price;
|
|
3014
3005
|
|
|
3006
|
+
/**
|
|
3007
|
+
* The price the cost is associated with
|
|
3008
|
+
*/
|
|
3009
|
+
price_id: string;
|
|
3010
|
+
|
|
3015
3011
|
/**
|
|
3016
3012
|
* Price's contributions for the timeframe, excluding any minimums and discounts.
|
|
3017
3013
|
*/
|
|
@@ -8156,6 +8152,11 @@ export namespace SubscriptionCreateParams {
|
|
|
8156
8152
|
}
|
|
8157
8153
|
|
|
8158
8154
|
export interface AddPrice {
|
|
8155
|
+
/**
|
|
8156
|
+
* The definition of a new allocation price to create and add to the subscription.
|
|
8157
|
+
*/
|
|
8158
|
+
allocation_price?: AddPrice.AllocationPrice | null;
|
|
8159
|
+
|
|
8159
8160
|
/**
|
|
8160
8161
|
* @deprecated [DEPRECATED] Use add_adjustments instead. The subscription's
|
|
8161
8162
|
* discounts for this price.
|
|
@@ -8229,6 +8230,33 @@ export namespace SubscriptionCreateParams {
|
|
|
8229
8230
|
}
|
|
8230
8231
|
|
|
8231
8232
|
export namespace AddPrice {
|
|
8233
|
+
/**
|
|
8234
|
+
* The definition of a new allocation price to create and add to the subscription.
|
|
8235
|
+
*/
|
|
8236
|
+
export interface AllocationPrice {
|
|
8237
|
+
/**
|
|
8238
|
+
* An amount of the currency to allocate to the customer at the specified cadence.
|
|
8239
|
+
*/
|
|
8240
|
+
amount: string;
|
|
8241
|
+
|
|
8242
|
+
/**
|
|
8243
|
+
* The cadence at which to allocate the amount to the customer.
|
|
8244
|
+
*/
|
|
8245
|
+
cadence: 'one_time' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | 'custom';
|
|
8246
|
+
|
|
8247
|
+
/**
|
|
8248
|
+
* An ISO 4217 currency string or a custom pricing unit identifier in which to bill
|
|
8249
|
+
* this price.
|
|
8250
|
+
*/
|
|
8251
|
+
currency: string;
|
|
8252
|
+
|
|
8253
|
+
/**
|
|
8254
|
+
* Whether the allocated amount should expire at the end of the cadence or roll
|
|
8255
|
+
* over to the next period.
|
|
8256
|
+
*/
|
|
8257
|
+
expires_at_end_of_cadence: boolean;
|
|
8258
|
+
}
|
|
8259
|
+
|
|
8232
8260
|
export interface Discount {
|
|
8233
8261
|
discount_type: 'percentage' | 'usage' | 'amount';
|
|
8234
8262
|
|
|
@@ -10721,6 +10749,11 @@ export namespace SubscriptionCreateParams {
|
|
|
10721
10749
|
*/
|
|
10722
10750
|
replaces_price_id: string;
|
|
10723
10751
|
|
|
10752
|
+
/**
|
|
10753
|
+
* The definition of a new allocation price to create and add to the subscription.
|
|
10754
|
+
*/
|
|
10755
|
+
allocation_price?: ReplacePrice.AllocationPrice | null;
|
|
10756
|
+
|
|
10724
10757
|
/**
|
|
10725
10758
|
* @deprecated [DEPRECATED] Use add_adjustments instead. The subscription's
|
|
10726
10759
|
* discounts for the replacement price.
|
|
@@ -10780,6 +10813,33 @@ export namespace SubscriptionCreateParams {
|
|
|
10780
10813
|
}
|
|
10781
10814
|
|
|
10782
10815
|
export namespace ReplacePrice {
|
|
10816
|
+
/**
|
|
10817
|
+
* The definition of a new allocation price to create and add to the subscription.
|
|
10818
|
+
*/
|
|
10819
|
+
export interface AllocationPrice {
|
|
10820
|
+
/**
|
|
10821
|
+
* An amount of the currency to allocate to the customer at the specified cadence.
|
|
10822
|
+
*/
|
|
10823
|
+
amount: string;
|
|
10824
|
+
|
|
10825
|
+
/**
|
|
10826
|
+
* The cadence at which to allocate the amount to the customer.
|
|
10827
|
+
*/
|
|
10828
|
+
cadence: 'one_time' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | 'custom';
|
|
10829
|
+
|
|
10830
|
+
/**
|
|
10831
|
+
* An ISO 4217 currency string or a custom pricing unit identifier in which to bill
|
|
10832
|
+
* this price.
|
|
10833
|
+
*/
|
|
10834
|
+
currency: string;
|
|
10835
|
+
|
|
10836
|
+
/**
|
|
10837
|
+
* Whether the allocated amount should expire at the end of the cadence or roll
|
|
10838
|
+
* over to the next period.
|
|
10839
|
+
*/
|
|
10840
|
+
expires_at_end_of_cadence: boolean;
|
|
10841
|
+
}
|
|
10842
|
+
|
|
10783
10843
|
export interface Discount {
|
|
10784
10844
|
discount_type: 'percentage' | 'usage' | 'amount';
|
|
10785
10845
|
|
|
@@ -13175,6 +13235,13 @@ export interface SubscriptionCancelParams {
|
|
|
13175
13235
|
*/
|
|
13176
13236
|
cancel_option: 'end_of_subscription_term' | 'immediate' | 'requested_date';
|
|
13177
13237
|
|
|
13238
|
+
/**
|
|
13239
|
+
* If false, this request will fail if it would void an issued invoice or create a
|
|
13240
|
+
* credit note. Consider using this as a safety mechanism if you do not expect
|
|
13241
|
+
* existing invoices to be changed.
|
|
13242
|
+
*/
|
|
13243
|
+
allow_invoice_credit_or_void?: boolean | null;
|
|
13244
|
+
|
|
13178
13245
|
/**
|
|
13179
13246
|
* The date that the cancellation should take effect. This parameter can only be
|
|
13180
13247
|
* passed if the `cancel_option` is `requested_date`.
|
|
@@ -13273,6 +13340,13 @@ export interface SubscriptionPriceIntervalsParams {
|
|
|
13273
13340
|
*/
|
|
13274
13341
|
add_adjustments?: Array<SubscriptionPriceIntervalsParams.AddAdjustment>;
|
|
13275
13342
|
|
|
13343
|
+
/**
|
|
13344
|
+
* If false, this request will fail if it would void an issued invoice or create a
|
|
13345
|
+
* credit note. Consider using this as a safety mechanism if you do not expect
|
|
13346
|
+
* existing invoices to be changed.
|
|
13347
|
+
*/
|
|
13348
|
+
allow_invoice_credit_or_void?: boolean | null;
|
|
13349
|
+
|
|
13276
13350
|
/**
|
|
13277
13351
|
* A list of price intervals to edit on the subscription.
|
|
13278
13352
|
*/
|
|
@@ -13365,6 +13439,7 @@ export namespace SubscriptionPriceIntervalsParams {
|
|
|
13365
13439
|
| Add.NewFloatingGroupedTieredPackagePrice
|
|
13366
13440
|
| Add.NewFloatingScalableMatrixWithUnitPricingPrice
|
|
13367
13441
|
| Add.NewFloatingScalableMatrixWithTieredPricingPrice
|
|
13442
|
+
| Add.NewFloatingCumulativeGroupedBulkPrice
|
|
13368
13443
|
| null;
|
|
13369
13444
|
|
|
13370
13445
|
/**
|
|
@@ -16674,6 +16749,118 @@ export namespace SubscriptionPriceIntervalsParams {
|
|
|
16674
16749
|
duration_unit: 'day' | 'month';
|
|
16675
16750
|
}
|
|
16676
16751
|
}
|
|
16752
|
+
|
|
16753
|
+
export interface NewFloatingCumulativeGroupedBulkPrice {
|
|
16754
|
+
/**
|
|
16755
|
+
* The cadence to bill for this price on.
|
|
16756
|
+
*/
|
|
16757
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
16758
|
+
|
|
16759
|
+
cumulative_grouped_bulk_config: Record<string, unknown>;
|
|
16760
|
+
|
|
16761
|
+
/**
|
|
16762
|
+
* An ISO 4217 currency string for which this price is billed in.
|
|
16763
|
+
*/
|
|
16764
|
+
currency: string;
|
|
16765
|
+
|
|
16766
|
+
/**
|
|
16767
|
+
* The id of the item the plan will be associated with.
|
|
16768
|
+
*/
|
|
16769
|
+
item_id: string;
|
|
16770
|
+
|
|
16771
|
+
model_type: 'cumulative_grouped_bulk';
|
|
16772
|
+
|
|
16773
|
+
/**
|
|
16774
|
+
* The name of the price.
|
|
16775
|
+
*/
|
|
16776
|
+
name: string;
|
|
16777
|
+
|
|
16778
|
+
/**
|
|
16779
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
16780
|
+
* usage-based.
|
|
16781
|
+
*/
|
|
16782
|
+
billable_metric_id?: string | null;
|
|
16783
|
+
|
|
16784
|
+
/**
|
|
16785
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
16786
|
+
* this is true, and in-arrears if this is false.
|
|
16787
|
+
*/
|
|
16788
|
+
billed_in_advance?: boolean | null;
|
|
16789
|
+
|
|
16790
|
+
/**
|
|
16791
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
16792
|
+
* months.
|
|
16793
|
+
*/
|
|
16794
|
+
billing_cycle_configuration?: NewFloatingCumulativeGroupedBulkPrice.BillingCycleConfiguration | null;
|
|
16795
|
+
|
|
16796
|
+
/**
|
|
16797
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
16798
|
+
*/
|
|
16799
|
+
conversion_rate?: number | null;
|
|
16800
|
+
|
|
16801
|
+
/**
|
|
16802
|
+
* An alias for the price.
|
|
16803
|
+
*/
|
|
16804
|
+
external_price_id?: string | null;
|
|
16805
|
+
|
|
16806
|
+
/**
|
|
16807
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
16808
|
+
* applied.
|
|
16809
|
+
*/
|
|
16810
|
+
fixed_price_quantity?: number | null;
|
|
16811
|
+
|
|
16812
|
+
/**
|
|
16813
|
+
* The property used to group this price on an invoice
|
|
16814
|
+
*/
|
|
16815
|
+
invoice_grouping_key?: string | null;
|
|
16816
|
+
|
|
16817
|
+
/**
|
|
16818
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
16819
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
16820
|
+
*/
|
|
16821
|
+
invoicing_cycle_configuration?: NewFloatingCumulativeGroupedBulkPrice.InvoicingCycleConfiguration | null;
|
|
16822
|
+
|
|
16823
|
+
/**
|
|
16824
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
16825
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
16826
|
+
* by setting `metadata` to `null`.
|
|
16827
|
+
*/
|
|
16828
|
+
metadata?: Record<string, string | null> | null;
|
|
16829
|
+
}
|
|
16830
|
+
|
|
16831
|
+
export namespace NewFloatingCumulativeGroupedBulkPrice {
|
|
16832
|
+
/**
|
|
16833
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
16834
|
+
* months.
|
|
16835
|
+
*/
|
|
16836
|
+
export interface BillingCycleConfiguration {
|
|
16837
|
+
/**
|
|
16838
|
+
* The duration of the billing period.
|
|
16839
|
+
*/
|
|
16840
|
+
duration: number;
|
|
16841
|
+
|
|
16842
|
+
/**
|
|
16843
|
+
* The unit of billing period duration.
|
|
16844
|
+
*/
|
|
16845
|
+
duration_unit: 'day' | 'month';
|
|
16846
|
+
}
|
|
16847
|
+
|
|
16848
|
+
/**
|
|
16849
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
16850
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
16851
|
+
*/
|
|
16852
|
+
export interface InvoicingCycleConfiguration {
|
|
16853
|
+
/**
|
|
16854
|
+
* The duration of the billing period.
|
|
16855
|
+
*/
|
|
16856
|
+
duration: number;
|
|
16857
|
+
|
|
16858
|
+
/**
|
|
16859
|
+
* The unit of billing period duration.
|
|
16860
|
+
*/
|
|
16861
|
+
duration_unit: 'day' | 'month';
|
|
16862
|
+
}
|
|
16863
|
+
}
|
|
16677
16864
|
}
|
|
16678
16865
|
|
|
16679
16866
|
export interface AddAdjustment {
|
|
@@ -17127,6 +17314,11 @@ export namespace SubscriptionSchedulePlanChangeParams {
|
|
|
17127
17314
|
}
|
|
17128
17315
|
|
|
17129
17316
|
export interface AddPrice {
|
|
17317
|
+
/**
|
|
17318
|
+
* The definition of a new allocation price to create and add to the subscription.
|
|
17319
|
+
*/
|
|
17320
|
+
allocation_price?: AddPrice.AllocationPrice | null;
|
|
17321
|
+
|
|
17130
17322
|
/**
|
|
17131
17323
|
* @deprecated [DEPRECATED] Use add_adjustments instead. The subscription's
|
|
17132
17324
|
* discounts for this price.
|
|
@@ -17200,6 +17392,33 @@ export namespace SubscriptionSchedulePlanChangeParams {
|
|
|
17200
17392
|
}
|
|
17201
17393
|
|
|
17202
17394
|
export namespace AddPrice {
|
|
17395
|
+
/**
|
|
17396
|
+
* The definition of a new allocation price to create and add to the subscription.
|
|
17397
|
+
*/
|
|
17398
|
+
export interface AllocationPrice {
|
|
17399
|
+
/**
|
|
17400
|
+
* An amount of the currency to allocate to the customer at the specified cadence.
|
|
17401
|
+
*/
|
|
17402
|
+
amount: string;
|
|
17403
|
+
|
|
17404
|
+
/**
|
|
17405
|
+
* The cadence at which to allocate the amount to the customer.
|
|
17406
|
+
*/
|
|
17407
|
+
cadence: 'one_time' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | 'custom';
|
|
17408
|
+
|
|
17409
|
+
/**
|
|
17410
|
+
* An ISO 4217 currency string or a custom pricing unit identifier in which to bill
|
|
17411
|
+
* this price.
|
|
17412
|
+
*/
|
|
17413
|
+
currency: string;
|
|
17414
|
+
|
|
17415
|
+
/**
|
|
17416
|
+
* Whether the allocated amount should expire at the end of the cadence or roll
|
|
17417
|
+
* over to the next period.
|
|
17418
|
+
*/
|
|
17419
|
+
expires_at_end_of_cadence: boolean;
|
|
17420
|
+
}
|
|
17421
|
+
|
|
17203
17422
|
export interface Discount {
|
|
17204
17423
|
discount_type: 'percentage' | 'usage' | 'amount';
|
|
17205
17424
|
|
|
@@ -19692,6 +19911,11 @@ export namespace SubscriptionSchedulePlanChangeParams {
|
|
|
19692
19911
|
*/
|
|
19693
19912
|
replaces_price_id: string;
|
|
19694
19913
|
|
|
19914
|
+
/**
|
|
19915
|
+
* The definition of a new allocation price to create and add to the subscription.
|
|
19916
|
+
*/
|
|
19917
|
+
allocation_price?: ReplacePrice.AllocationPrice | null;
|
|
19918
|
+
|
|
19695
19919
|
/**
|
|
19696
19920
|
* @deprecated [DEPRECATED] Use add_adjustments instead. The subscription's
|
|
19697
19921
|
* discounts for the replacement price.
|
|
@@ -19751,6 +19975,33 @@ export namespace SubscriptionSchedulePlanChangeParams {
|
|
|
19751
19975
|
}
|
|
19752
19976
|
|
|
19753
19977
|
export namespace ReplacePrice {
|
|
19978
|
+
/**
|
|
19979
|
+
* The definition of a new allocation price to create and add to the subscription.
|
|
19980
|
+
*/
|
|
19981
|
+
export interface AllocationPrice {
|
|
19982
|
+
/**
|
|
19983
|
+
* An amount of the currency to allocate to the customer at the specified cadence.
|
|
19984
|
+
*/
|
|
19985
|
+
amount: string;
|
|
19986
|
+
|
|
19987
|
+
/**
|
|
19988
|
+
* The cadence at which to allocate the amount to the customer.
|
|
19989
|
+
*/
|
|
19990
|
+
cadence: 'one_time' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | 'custom';
|
|
19991
|
+
|
|
19992
|
+
/**
|
|
19993
|
+
* An ISO 4217 currency string or a custom pricing unit identifier in which to bill
|
|
19994
|
+
* this price.
|
|
19995
|
+
*/
|
|
19996
|
+
currency: string;
|
|
19997
|
+
|
|
19998
|
+
/**
|
|
19999
|
+
* Whether the allocated amount should expire at the end of the cadence or roll
|
|
20000
|
+
* over to the next period.
|
|
20001
|
+
*/
|
|
20002
|
+
expires_at_end_of_cadence: boolean;
|
|
20003
|
+
}
|
|
20004
|
+
|
|
19754
20005
|
export interface Discount {
|
|
19755
20006
|
discount_type: 'percentage' | 'usage' | 'amount';
|
|
19756
20007
|
|
|
@@ -22088,6 +22339,13 @@ export namespace SubscriptionSchedulePlanChangeParams {
|
|
|
22088
22339
|
}
|
|
22089
22340
|
|
|
22090
22341
|
export interface SubscriptionTriggerPhaseParams {
|
|
22342
|
+
/**
|
|
22343
|
+
* If false, this request will fail if it would void an issued invoice or create a
|
|
22344
|
+
* credit note. Consider using this as a safety mechanism if you do not expect
|
|
22345
|
+
* existing invoices to be changed.
|
|
22346
|
+
*/
|
|
22347
|
+
allow_invoice_credit_or_void?: boolean | null;
|
|
22348
|
+
|
|
22091
22349
|
/**
|
|
22092
22350
|
* The date on which the phase change should take effect. If not provided, defaults
|
|
22093
22351
|
* to today in the customer's timezone.
|
|
@@ -22110,6 +22368,13 @@ export interface SubscriptionUpdateFixedFeeQuantityParams {
|
|
|
22110
22368
|
|
|
22111
22369
|
quantity: number;
|
|
22112
22370
|
|
|
22371
|
+
/**
|
|
22372
|
+
* If false, this request will fail if it would void an issued invoice or create a
|
|
22373
|
+
* credit note. Consider using this as a safety mechanism if you do not expect
|
|
22374
|
+
* existing invoices to be changed.
|
|
22375
|
+
*/
|
|
22376
|
+
allow_invoice_credit_or_void?: boolean | null;
|
|
22377
|
+
|
|
22113
22378
|
/**
|
|
22114
22379
|
* Determines when the change takes effect. Note that if `effective_date` is
|
|
22115
22380
|
* specified, this defaults to `effective_date`. Otherwise, this defaults to
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '4.
|
|
1
|
+
export const VERSION = '4.57.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.57.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.57.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|