orb-billing 4.56.0 → 4.58.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 +27 -0
- package/package.json +29 -8
- package/resources/customers/costs.d.ts +10 -20
- package/resources/customers/costs.d.ts.map +1 -1
- package/resources/events/events.d.ts +2 -0
- package/resources/events/events.d.ts.map +1 -1
- package/resources/events/events.js +2 -0
- package/resources/events/events.js.map +1 -1
- package/resources/events/events.mjs +2 -0
- package/resources/events/events.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 +123 -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/costs.ts +12 -20
- package/src/resources/events/events.ts +2 -0
- package/src/resources/plans/plans.ts +114 -0
- package/src/resources/prices/prices.ts +234 -2
- package/src/resources/subscriptions.ts +147 -10
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prices.mjs","sourceRoot":"","sources":["../../src/resources/prices/prices.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,EAAE,gBAAgB,EAAE;OAGpB,KAAK,kBAAkB;OACvB,EAAE,eAAe,EAA+B;OAChD,EAAE,IAAI,EAAmB;AAEhC,MAAM,OAAO,MAAO,SAAQ,WAAW;IAAvC;;QACE,oBAAe,GAAuC,IAAI,kBAAkB,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IA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WAAW,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC;CACF;AAED,MAAM,OAAO,UAAW,SAAQ,IAAW;CAAG;AA41N9C,MAAM,CAAC,UAAU,GAAG,UAAU,CAAC;AAC/B,MAAM,CAAC,eAAe,GAAG,eAAe,CAAC"}
|
|
@@ -2436,18 +2436,13 @@ export declare namespace SubscriptionFetchCostsResponse {
|
|
|
2436
2436
|
namespace Data {
|
|
2437
2437
|
interface PerPriceCost {
|
|
2438
2438
|
/**
|
|
2439
|
-
* The
|
|
2440
|
-
* resulting in a charge on an invoice in the form of an invoice line item. Prices
|
|
2441
|
-
* take a quantity and determine an amount to bill.
|
|
2442
|
-
*
|
|
2443
|
-
* Orb supports a few different pricing models out of the box. Each of these models
|
|
2444
|
-
* is serialized differently in a given Price object. The model_type field
|
|
2445
|
-
* determines the key for the configuration object that is present.
|
|
2446
|
-
*
|
|
2447
|
-
* For more on the types of prices, see
|
|
2448
|
-
* [the core concepts documentation](/core-concepts#plan-and-price)
|
|
2439
|
+
* The price object
|
|
2449
2440
|
*/
|
|
2450
2441
|
price: PricesAPI.Price;
|
|
2442
|
+
/**
|
|
2443
|
+
* The price the cost is associated with
|
|
2444
|
+
*/
|
|
2445
|
+
price_id: string;
|
|
2451
2446
|
/**
|
|
2452
2447
|
* Price's contributions for the timeframe, excluding any minimums and discounts.
|
|
2453
2448
|
*/
|
|
@@ -10713,6 +10708,12 @@ export interface SubscriptionCancelParams {
|
|
|
10713
10708
|
* Determines the timing of subscription cancellation
|
|
10714
10709
|
*/
|
|
10715
10710
|
cancel_option: 'end_of_subscription_term' | 'immediate' | 'requested_date';
|
|
10711
|
+
/**
|
|
10712
|
+
* If false, this request will fail if it would void an issued invoice or create a
|
|
10713
|
+
* credit note. Consider using this as a safety mechanism if you do not expect
|
|
10714
|
+
* existing invoices to be changed.
|
|
10715
|
+
*/
|
|
10716
|
+
allow_invoice_credit_or_void?: boolean | null;
|
|
10716
10717
|
/**
|
|
10717
10718
|
* The date that the cancellation should take effect. This parameter can only be
|
|
10718
10719
|
* passed if the `cancel_option` is `requested_date`.
|
|
@@ -10790,6 +10791,12 @@ export interface SubscriptionPriceIntervalsParams {
|
|
|
10790
10791
|
* A list of adjustments to add to the subscription.
|
|
10791
10792
|
*/
|
|
10792
10793
|
add_adjustments?: Array<SubscriptionPriceIntervalsParams.AddAdjustment>;
|
|
10794
|
+
/**
|
|
10795
|
+
* If false, this request will fail if it would void an issued invoice or create a
|
|
10796
|
+
* credit note. Consider using this as a safety mechanism if you do not expect
|
|
10797
|
+
* existing invoices to be changed.
|
|
10798
|
+
*/
|
|
10799
|
+
allow_invoice_credit_or_void?: boolean | null;
|
|
10793
10800
|
/**
|
|
10794
10801
|
* A list of price intervals to edit on the subscription.
|
|
10795
10802
|
*/
|
|
@@ -10840,7 +10847,7 @@ export declare namespace SubscriptionPriceIntervalsParams {
|
|
|
10840
10847
|
/**
|
|
10841
10848
|
* The definition of a new price to create and add to the subscription.
|
|
10842
10849
|
*/
|
|
10843
|
-
price?: Add.NewFloatingUnitPrice | Add.NewFloatingPackagePrice | Add.NewFloatingMatrixPrice | Add.NewFloatingMatrixWithAllocationPrice | Add.NewFloatingTieredPrice | Add.NewFloatingTieredBpsPrice | Add.NewFloatingBpsPrice | Add.NewFloatingBulkBpsPrice | Add.NewFloatingBulkPrice | Add.NewFloatingThresholdTotalAmountPrice | Add.NewFloatingTieredPackagePrice | Add.NewFloatingGroupedTieredPrice | Add.NewFloatingMaxGroupTieredPackagePrice | Add.NewFloatingTieredWithMinimumPrice | Add.NewFloatingPackageWithAllocationPrice | Add.NewFloatingTieredPackageWithMinimumPrice | Add.NewFloatingUnitWithPercentPrice | Add.NewFloatingTieredWithProrationPrice | Add.NewFloatingUnitWithProrationPrice | Add.NewFloatingGroupedAllocationPrice | Add.NewFloatingGroupedWithProratedMinimumPrice | Add.NewFloatingGroupedWithMeteredMinimumPrice | Add.NewFloatingMatrixWithDisplayNamePrice | Add.NewFloatingBulkWithProrationPrice | Add.NewFloatingGroupedTieredPackagePrice | Add.NewFloatingScalableMatrixWithUnitPricingPrice | Add.NewFloatingScalableMatrixWithTieredPricingPrice | null;
|
|
10850
|
+
price?: Add.NewFloatingUnitPrice | Add.NewFloatingPackagePrice | Add.NewFloatingMatrixPrice | Add.NewFloatingMatrixWithAllocationPrice | Add.NewFloatingTieredPrice | Add.NewFloatingTieredBpsPrice | Add.NewFloatingBpsPrice | Add.NewFloatingBulkBpsPrice | Add.NewFloatingBulkPrice | Add.NewFloatingThresholdTotalAmountPrice | Add.NewFloatingTieredPackagePrice | Add.NewFloatingGroupedTieredPrice | Add.NewFloatingMaxGroupTieredPackagePrice | Add.NewFloatingTieredWithMinimumPrice | Add.NewFloatingPackageWithAllocationPrice | Add.NewFloatingTieredPackageWithMinimumPrice | Add.NewFloatingUnitWithPercentPrice | Add.NewFloatingTieredWithProrationPrice | Add.NewFloatingUnitWithProrationPrice | Add.NewFloatingGroupedAllocationPrice | Add.NewFloatingGroupedWithProratedMinimumPrice | Add.NewFloatingGroupedWithMeteredMinimumPrice | Add.NewFloatingMatrixWithDisplayNamePrice | Add.NewFloatingBulkWithProrationPrice | Add.NewFloatingGroupedTieredPackagePrice | Add.NewFloatingScalableMatrixWithUnitPricingPrice | Add.NewFloatingScalableMatrixWithTieredPricingPrice | Add.NewFloatingCumulativeGroupedBulkPrice | null;
|
|
10844
10851
|
/**
|
|
10845
10852
|
* The id of the price to add to the subscription.
|
|
10846
10853
|
*/
|
|
@@ -13591,6 +13598,99 @@ export declare namespace SubscriptionPriceIntervalsParams {
|
|
|
13591
13598
|
duration_unit: 'day' | 'month';
|
|
13592
13599
|
}
|
|
13593
13600
|
}
|
|
13601
|
+
interface NewFloatingCumulativeGroupedBulkPrice {
|
|
13602
|
+
/**
|
|
13603
|
+
* The cadence to bill for this price on.
|
|
13604
|
+
*/
|
|
13605
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
13606
|
+
cumulative_grouped_bulk_config: Record<string, unknown>;
|
|
13607
|
+
/**
|
|
13608
|
+
* An ISO 4217 currency string for which this price is billed in.
|
|
13609
|
+
*/
|
|
13610
|
+
currency: string;
|
|
13611
|
+
/**
|
|
13612
|
+
* The id of the item the plan will be associated with.
|
|
13613
|
+
*/
|
|
13614
|
+
item_id: string;
|
|
13615
|
+
model_type: 'cumulative_grouped_bulk';
|
|
13616
|
+
/**
|
|
13617
|
+
* The name of the price.
|
|
13618
|
+
*/
|
|
13619
|
+
name: string;
|
|
13620
|
+
/**
|
|
13621
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
13622
|
+
* usage-based.
|
|
13623
|
+
*/
|
|
13624
|
+
billable_metric_id?: string | null;
|
|
13625
|
+
/**
|
|
13626
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
13627
|
+
* this is true, and in-arrears if this is false.
|
|
13628
|
+
*/
|
|
13629
|
+
billed_in_advance?: boolean | null;
|
|
13630
|
+
/**
|
|
13631
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
13632
|
+
* months.
|
|
13633
|
+
*/
|
|
13634
|
+
billing_cycle_configuration?: NewFloatingCumulativeGroupedBulkPrice.BillingCycleConfiguration | null;
|
|
13635
|
+
/**
|
|
13636
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
13637
|
+
*/
|
|
13638
|
+
conversion_rate?: number | null;
|
|
13639
|
+
/**
|
|
13640
|
+
* An alias for the price.
|
|
13641
|
+
*/
|
|
13642
|
+
external_price_id?: string | null;
|
|
13643
|
+
/**
|
|
13644
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
13645
|
+
* applied.
|
|
13646
|
+
*/
|
|
13647
|
+
fixed_price_quantity?: number | null;
|
|
13648
|
+
/**
|
|
13649
|
+
* The property used to group this price on an invoice
|
|
13650
|
+
*/
|
|
13651
|
+
invoice_grouping_key?: string | null;
|
|
13652
|
+
/**
|
|
13653
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
13654
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
13655
|
+
*/
|
|
13656
|
+
invoicing_cycle_configuration?: NewFloatingCumulativeGroupedBulkPrice.InvoicingCycleConfiguration | null;
|
|
13657
|
+
/**
|
|
13658
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
13659
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
13660
|
+
* by setting `metadata` to `null`.
|
|
13661
|
+
*/
|
|
13662
|
+
metadata?: Record<string, string | null> | null;
|
|
13663
|
+
}
|
|
13664
|
+
namespace NewFloatingCumulativeGroupedBulkPrice {
|
|
13665
|
+
/**
|
|
13666
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
13667
|
+
* months.
|
|
13668
|
+
*/
|
|
13669
|
+
interface BillingCycleConfiguration {
|
|
13670
|
+
/**
|
|
13671
|
+
* The duration of the billing period.
|
|
13672
|
+
*/
|
|
13673
|
+
duration: number;
|
|
13674
|
+
/**
|
|
13675
|
+
* The unit of billing period duration.
|
|
13676
|
+
*/
|
|
13677
|
+
duration_unit: 'day' | 'month';
|
|
13678
|
+
}
|
|
13679
|
+
/**
|
|
13680
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
13681
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
13682
|
+
*/
|
|
13683
|
+
interface InvoicingCycleConfiguration {
|
|
13684
|
+
/**
|
|
13685
|
+
* The duration of the billing period.
|
|
13686
|
+
*/
|
|
13687
|
+
duration: number;
|
|
13688
|
+
/**
|
|
13689
|
+
* The unit of billing period duration.
|
|
13690
|
+
*/
|
|
13691
|
+
duration_unit: 'day' | 'month';
|
|
13692
|
+
}
|
|
13693
|
+
}
|
|
13594
13694
|
}
|
|
13595
13695
|
interface AddAdjustment {
|
|
13596
13696
|
/**
|
|
@@ -18095,6 +18195,12 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
|
|
|
18095
18195
|
}
|
|
18096
18196
|
}
|
|
18097
18197
|
export interface SubscriptionTriggerPhaseParams {
|
|
18198
|
+
/**
|
|
18199
|
+
* If false, this request will fail if it would void an issued invoice or create a
|
|
18200
|
+
* credit note. Consider using this as a safety mechanism if you do not expect
|
|
18201
|
+
* existing invoices to be changed.
|
|
18202
|
+
*/
|
|
18203
|
+
allow_invoice_credit_or_void?: boolean | null;
|
|
18098
18204
|
/**
|
|
18099
18205
|
* The date on which the phase change should take effect. If not provided, defaults
|
|
18100
18206
|
* to today in the customer's timezone.
|
|
@@ -18113,6 +18219,12 @@ export interface SubscriptionUpdateFixedFeeQuantityParams {
|
|
|
18113
18219
|
*/
|
|
18114
18220
|
price_id: string;
|
|
18115
18221
|
quantity: number;
|
|
18222
|
+
/**
|
|
18223
|
+
* If false, this request will fail if it would void an issued invoice or create a
|
|
18224
|
+
* credit note. Consider using this as a safety mechanism if you do not expect
|
|
18225
|
+
* existing invoices to be changed.
|
|
18226
|
+
*/
|
|
18227
|
+
allow_invoice_credit_or_void?: boolean | null;
|
|
18116
18228
|
/**
|
|
18117
18229
|
* Determines when the change takes effect. Note that if `effective_date` is
|
|
18118
18230
|
* specified, this defaults to `effective_date`. Otherwise, this defaults to
|