orb-billing 4.49.0 → 4.50.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/alerts.d.ts +5 -8
- package/resources/alerts.d.ts.map +1 -1
- package/resources/alerts.js +2 -4
- package/resources/alerts.js.map +1 -1
- package/resources/alerts.mjs +2 -4
- package/resources/alerts.mjs.map +1 -1
- package/resources/coupons/coupons.d.ts +0 -34
- package/resources/coupons/coupons.d.ts.map +1 -1
- package/resources/coupons/coupons.js.map +1 -1
- package/resources/coupons/coupons.mjs.map +1 -1
- package/resources/coupons/subscriptions.d.ts +3 -3
- package/resources/credit-notes.d.ts +5 -5
- package/resources/credit-notes.js +3 -3
- package/resources/credit-notes.mjs +3 -3
- package/resources/customers/costs.d.ts +12 -454
- package/resources/customers/costs.d.ts.map +1 -1
- package/resources/customers/credits/ledger.d.ts +14 -14
- package/resources/customers/customers.d.ts +16 -18
- package/resources/customers/customers.d.ts.map +1 -1
- package/resources/customers/customers.js +11 -11
- package/resources/customers/customers.js.map +1 -1
- package/resources/customers/customers.mjs +11 -11
- package/resources/customers/customers.mjs.map +1 -1
- package/resources/events/backfills.d.ts +19 -19
- package/resources/events/backfills.js +4 -4
- package/resources/events/backfills.mjs +4 -4
- package/resources/events/events.d.ts +6 -7
- package/resources/events/events.d.ts.map +1 -1
- package/resources/events/events.js +3 -3
- package/resources/events/events.js.map +1 -1
- package/resources/events/events.mjs +3 -3
- package/resources/events/events.mjs.map +1 -1
- package/resources/events/volume.d.ts +5 -5
- package/resources/events/volume.js +5 -5
- package/resources/events/volume.mjs +5 -5
- package/resources/invoice-line-items.d.ts +2 -223
- package/resources/invoice-line-items.d.ts.map +1 -1
- package/resources/invoices.d.ts +12 -454
- package/resources/invoices.d.ts.map +1 -1
- package/resources/invoices.js +3 -3
- package/resources/invoices.js.map +1 -1
- package/resources/invoices.mjs +3 -3
- package/resources/invoices.mjs.map +1 -1
- package/resources/items.d.ts +1 -1
- package/resources/items.js +1 -1
- package/resources/items.mjs +1 -1
- package/resources/metrics.d.ts +6 -7
- package/resources/metrics.d.ts.map +1 -1
- package/resources/metrics.js +3 -4
- package/resources/metrics.js.map +1 -1
- package/resources/metrics.mjs +3 -4
- package/resources/metrics.mjs.map +1 -1
- package/resources/plans/external-plan-id.d.ts +6 -6
- package/resources/plans/external-plan-id.js +6 -6
- package/resources/plans/external-plan-id.mjs +6 -6
- package/resources/plans/plans.d.ts +15 -109
- package/resources/plans/plans.d.ts.map +1 -1
- package/resources/plans/plans.js +6 -6
- package/resources/plans/plans.js.map +1 -1
- package/resources/plans/plans.mjs +6 -6
- package/resources/plans/plans.mjs.map +1 -1
- package/resources/prices/external-price-id.d.ts +2 -2
- package/resources/prices/external-price-id.js +2 -2
- package/resources/prices/external-price-id.mjs +2 -2
- package/resources/prices/prices.d.ts +16 -404
- package/resources/prices/prices.d.ts.map +1 -1
- package/resources/prices/prices.js +7 -7
- package/resources/prices/prices.js.map +1 -1
- package/resources/prices/prices.mjs +7 -7
- package/resources/prices/prices.mjs.map +1 -1
- package/resources/subscriptions.d.ts +154 -2907
- package/resources/subscriptions.d.ts.map +1 -1
- package/resources/subscriptions.js +53 -49
- package/resources/subscriptions.js.map +1 -1
- package/resources/subscriptions.mjs +53 -49
- package/resources/subscriptions.mjs.map +1 -1
- package/src/resources/alerts.ts +5 -8
- package/src/resources/coupons/coupons.ts +0 -34
- package/src/resources/coupons/subscriptions.ts +3 -3
- package/src/resources/credit-notes.ts +5 -5
- package/src/resources/customers/costs.ts +12 -454
- package/src/resources/customers/credits/ledger.ts +14 -14
- package/src/resources/customers/customers.ts +16 -18
- package/src/resources/events/backfills.ts +19 -19
- package/src/resources/events/events.ts +6 -7
- package/src/resources/events/volume.ts +5 -5
- package/src/resources/invoice-line-items.ts +2 -223
- package/src/resources/invoices.ts +12 -454
- package/src/resources/items.ts +1 -1
- package/src/resources/metrics.ts +6 -7
- package/src/resources/plans/external-plan-id.ts +6 -6
- package/src/resources/plans/plans.ts +14 -128
- package/src/resources/prices/external-price-id.ts +2 -2
- package/src/resources/prices/prices.ts +15 -460
- package/src/resources/subscriptions.ts +153 -2926
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -30,11 +30,11 @@ export class Plans extends APIResource {
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
|
-
* This endpoint returns a list of all [plans](
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
* [`pagination_metadata`](
|
|
37
|
-
* the next page of results if they exist.
|
|
33
|
+
* This endpoint returns a list of all [plans](/core-concepts#plan-and-price) for
|
|
34
|
+
* an account in a list format. The list of plans is ordered starting from the most
|
|
35
|
+
* recently created plan. The response also includes
|
|
36
|
+
* [`pagination_metadata`](/api-reference/pagination), which lets the caller
|
|
37
|
+
* retrieve the next page of results if they exist.
|
|
38
38
|
*/
|
|
39
39
|
list(query?: PlanListParams, options?: Core.RequestOptions): Core.PagePromise<PlansPage, Plan>;
|
|
40
40
|
list(options?: Core.RequestOptions): Core.PagePromise<PlansPage, Plan>;
|
|
@@ -49,18 +49,18 @@ export class Plans extends APIResource {
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
/**
|
|
52
|
-
* This endpoint is used to fetch [plan](
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
52
|
+
* This endpoint is used to fetch [plan](/core-concepts#plan-and-price) details
|
|
53
|
+
* given a plan identifier. It returns information about the prices included in the
|
|
54
|
+
* plan and their configuration, as well as the product that the plan is attached
|
|
55
|
+
* to.
|
|
56
56
|
*
|
|
57
57
|
* ## Serialized prices
|
|
58
58
|
*
|
|
59
59
|
* Orb supports a few different pricing models out of the box. Each of these models
|
|
60
|
-
* is serialized differently in a given [Price](
|
|
60
|
+
* is serialized differently in a given [Price](/core-concepts#plan-and-price)
|
|
61
61
|
* object. The `model_type` field determines the key for the configuration object
|
|
62
62
|
* that is present. A detailed explanation of price types can be found in the
|
|
63
|
-
* [Price schema](
|
|
63
|
+
* [Price schema](/core-concepts#plan-and-price).
|
|
64
64
|
*
|
|
65
65
|
* ## Phases
|
|
66
66
|
*
|
|
@@ -75,9 +75,9 @@ export class Plans extends APIResource {
|
|
|
75
75
|
export class PlansPage extends Page<Plan> {}
|
|
76
76
|
|
|
77
77
|
/**
|
|
78
|
-
* The [Plan](
|
|
79
|
-
*
|
|
80
|
-
*
|
|
78
|
+
* The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
|
|
79
|
+
* subscribed to by a customer. Plans define the billing behavior of the
|
|
80
|
+
* subscription. You can see more about how to configure prices in the
|
|
81
81
|
* [Price resource](/reference/price).
|
|
82
82
|
*/
|
|
83
83
|
export interface Plan {
|
|
@@ -497,7 +497,6 @@ export interface PlanCreateParams {
|
|
|
497
497
|
| PlanCreateParams.NewPlanMatrixWithDisplayNamePrice
|
|
498
498
|
| PlanCreateParams.NewPlanBulkWithProrationPrice
|
|
499
499
|
| PlanCreateParams.NewPlanGroupedTieredPackagePrice
|
|
500
|
-
| PlanCreateParams.NewPlanMaxGroupTieredPrice
|
|
501
500
|
>;
|
|
502
501
|
|
|
503
502
|
/**
|
|
@@ -3072,119 +3071,6 @@ export namespace PlanCreateParams {
|
|
|
3072
3071
|
duration_unit: 'day' | 'month';
|
|
3073
3072
|
}
|
|
3074
3073
|
}
|
|
3075
|
-
|
|
3076
|
-
export interface NewPlanMaxGroupTieredPrice {
|
|
3077
|
-
/**
|
|
3078
|
-
* The cadence to bill for this price on.
|
|
3079
|
-
*/
|
|
3080
|
-
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
3081
|
-
|
|
3082
|
-
/**
|
|
3083
|
-
* The id of the item the plan will be associated with.
|
|
3084
|
-
*/
|
|
3085
|
-
item_id: string;
|
|
3086
|
-
|
|
3087
|
-
max_group_tiered_config: Record<string, unknown>;
|
|
3088
|
-
|
|
3089
|
-
model_type: 'max_group_tiered';
|
|
3090
|
-
|
|
3091
|
-
/**
|
|
3092
|
-
* The name of the price.
|
|
3093
|
-
*/
|
|
3094
|
-
name: string;
|
|
3095
|
-
|
|
3096
|
-
/**
|
|
3097
|
-
* The id of the billable metric for the price. Only needed if the price is
|
|
3098
|
-
* usage-based.
|
|
3099
|
-
*/
|
|
3100
|
-
billable_metric_id?: string | null;
|
|
3101
|
-
|
|
3102
|
-
/**
|
|
3103
|
-
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
3104
|
-
* this is true, and in-arrears if this is false.
|
|
3105
|
-
*/
|
|
3106
|
-
billed_in_advance?: boolean | null;
|
|
3107
|
-
|
|
3108
|
-
/**
|
|
3109
|
-
* For custom cadence: specifies the duration of the billing period in days or
|
|
3110
|
-
* months.
|
|
3111
|
-
*/
|
|
3112
|
-
billing_cycle_configuration?: NewPlanMaxGroupTieredPrice.BillingCycleConfiguration | null;
|
|
3113
|
-
|
|
3114
|
-
/**
|
|
3115
|
-
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
3116
|
-
*/
|
|
3117
|
-
conversion_rate?: number | null;
|
|
3118
|
-
|
|
3119
|
-
/**
|
|
3120
|
-
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
3121
|
-
* price is billed.
|
|
3122
|
-
*/
|
|
3123
|
-
currency?: string | null;
|
|
3124
|
-
|
|
3125
|
-
/**
|
|
3126
|
-
* An alias for the price.
|
|
3127
|
-
*/
|
|
3128
|
-
external_price_id?: string | null;
|
|
3129
|
-
|
|
3130
|
-
/**
|
|
3131
|
-
* If the Price represents a fixed cost, this represents the quantity of units
|
|
3132
|
-
* applied.
|
|
3133
|
-
*/
|
|
3134
|
-
fixed_price_quantity?: number | null;
|
|
3135
|
-
|
|
3136
|
-
/**
|
|
3137
|
-
* The property used to group this price on an invoice
|
|
3138
|
-
*/
|
|
3139
|
-
invoice_grouping_key?: string | null;
|
|
3140
|
-
|
|
3141
|
-
/**
|
|
3142
|
-
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
3143
|
-
* If unspecified, a single invoice is produced per billing cycle.
|
|
3144
|
-
*/
|
|
3145
|
-
invoicing_cycle_configuration?: NewPlanMaxGroupTieredPrice.InvoicingCycleConfiguration | null;
|
|
3146
|
-
|
|
3147
|
-
/**
|
|
3148
|
-
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
3149
|
-
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
3150
|
-
* by setting `metadata` to `null`.
|
|
3151
|
-
*/
|
|
3152
|
-
metadata?: Record<string, string | null> | null;
|
|
3153
|
-
}
|
|
3154
|
-
|
|
3155
|
-
export namespace NewPlanMaxGroupTieredPrice {
|
|
3156
|
-
/**
|
|
3157
|
-
* For custom cadence: specifies the duration of the billing period in days or
|
|
3158
|
-
* months.
|
|
3159
|
-
*/
|
|
3160
|
-
export interface BillingCycleConfiguration {
|
|
3161
|
-
/**
|
|
3162
|
-
* The duration of the billing period.
|
|
3163
|
-
*/
|
|
3164
|
-
duration: number;
|
|
3165
|
-
|
|
3166
|
-
/**
|
|
3167
|
-
* The unit of billing period duration.
|
|
3168
|
-
*/
|
|
3169
|
-
duration_unit: 'day' | 'month';
|
|
3170
|
-
}
|
|
3171
|
-
|
|
3172
|
-
/**
|
|
3173
|
-
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
3174
|
-
* If unspecified, a single invoice is produced per billing cycle.
|
|
3175
|
-
*/
|
|
3176
|
-
export interface InvoicingCycleConfiguration {
|
|
3177
|
-
/**
|
|
3178
|
-
* The duration of the billing period.
|
|
3179
|
-
*/
|
|
3180
|
-
duration: number;
|
|
3181
|
-
|
|
3182
|
-
/**
|
|
3183
|
-
* The unit of billing period duration.
|
|
3184
|
-
*/
|
|
3185
|
-
duration_unit: 'day' | 'month';
|
|
3186
|
-
}
|
|
3187
|
-
}
|
|
3188
3074
|
}
|
|
3189
3075
|
|
|
3190
3076
|
export interface PlanUpdateParams {
|
|
@@ -20,8 +20,8 @@ export class ExternalPriceID extends APIResource {
|
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* This endpoint returns a price given an external price id. See the
|
|
23
|
-
* [price creation API](
|
|
24
|
-
* external price aliases.
|
|
23
|
+
* [price creation API](/api-reference/price/create-price) for more information
|
|
24
|
+
* about external price aliases.
|
|
25
25
|
*/
|
|
26
26
|
fetch(externalPriceId: string, options?: Core.RequestOptions): Core.APIPromise<PricesAPI.Price> {
|
|
27
27
|
return this._client.get(`/prices/external_price_id/${externalPriceId}`, options);
|