orb-billing 6.8.0 → 6.10.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 +21 -0
- package/package.json +1 -1
- package/resources/beta/beta.d.mts +252 -2
- package/resources/beta/beta.d.mts.map +1 -1
- package/resources/beta/beta.d.ts +252 -2
- package/resources/beta/beta.d.ts.map +1 -1
- package/resources/beta/beta.js.map +1 -1
- package/resources/beta/beta.mjs.map +1 -1
- package/resources/beta/external-plan-id.d.mts +252 -2
- package/resources/beta/external-plan-id.d.mts.map +1 -1
- package/resources/beta/external-plan-id.d.ts +252 -2
- package/resources/beta/external-plan-id.d.ts.map +1 -1
- package/resources/customers/costs.d.mts +20 -0
- package/resources/customers/costs.d.mts.map +1 -1
- package/resources/customers/costs.d.ts +20 -0
- package/resources/customers/costs.d.ts.map +1 -1
- package/resources/customers/costs.js +20 -0
- package/resources/customers/costs.js.map +1 -1
- package/resources/customers/costs.mjs +20 -0
- package/resources/customers/costs.mjs.map +1 -1
- package/resources/invoices.d.mts +9 -9
- package/resources/invoices.d.ts +9 -9
- package/resources/licenses/external-licenses.d.mts +7 -0
- package/resources/licenses/external-licenses.d.mts.map +1 -1
- package/resources/licenses/external-licenses.d.ts +7 -0
- package/resources/licenses/external-licenses.d.ts.map +1 -1
- package/resources/licenses/external-licenses.js +7 -0
- package/resources/licenses/external-licenses.js.map +1 -1
- package/resources/licenses/external-licenses.mjs +7 -0
- package/resources/licenses/external-licenses.mjs.map +1 -1
- package/resources/licenses/usage.d.mts +3 -0
- package/resources/licenses/usage.d.mts.map +1 -1
- package/resources/licenses/usage.d.ts +3 -0
- package/resources/licenses/usage.d.ts.map +1 -1
- package/resources/licenses/usage.js +3 -0
- package/resources/licenses/usage.js.map +1 -1
- package/resources/licenses/usage.mjs +3 -0
- package/resources/licenses/usage.mjs.map +1 -1
- package/resources/plans/plans.d.mts +126 -1
- package/resources/plans/plans.d.mts.map +1 -1
- package/resources/plans/plans.d.ts +126 -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.mts +360 -3
- package/resources/prices/prices.d.mts.map +1 -1
- package/resources/prices/prices.d.ts +360 -3
- 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/shared.d.mts +151 -7
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +151 -7
- package/resources/shared.d.ts.map +1 -1
- package/resources/subscriptions.d.mts +655 -36
- package/resources/subscriptions.d.mts.map +1 -1
- package/resources/subscriptions.d.ts +655 -36
- package/resources/subscriptions.d.ts.map +1 -1
- package/src/resources/beta/beta.ts +298 -0
- package/src/resources/beta/external-plan-id.ts +298 -0
- package/src/resources/customers/costs.ts +20 -0
- package/src/resources/invoices.ts +9 -9
- package/src/resources/licenses/external-licenses.ts +7 -0
- package/src/resources/licenses/usage.ts +3 -0
- package/src/resources/plans/plans.ts +149 -0
- package/src/resources/prices/prices.ts +426 -0
- package/src/resources/shared.ts +191 -6
- package/src/resources/subscriptions.ts +845 -107
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
package/src/resources/shared.ts
CHANGED
|
@@ -721,9 +721,9 @@ export namespace ChangedSubscriptionResources {
|
|
|
721
721
|
* If Orb has ever attempted payment auto-collection for this invoice, this field
|
|
722
722
|
* will reflect when that attempt occurred. In conjunction with `next_attempt_at`,
|
|
723
723
|
* this can be used to tell whether the invoice is currently in dunning (that is,
|
|
724
|
-
* `previously_attempted_at` is non-null, and `
|
|
725
|
-
*
|
|
726
|
-
* `
|
|
724
|
+
* `previously_attempted_at` is non-null, and `next_attempt_at` is non-null), or if
|
|
725
|
+
* dunning has been exhausted (`previously_attempted_at` is non-null, but
|
|
726
|
+
* `next_attempt_at` is null).
|
|
727
727
|
*/
|
|
728
728
|
previously_attempted_at: string | null;
|
|
729
729
|
}
|
|
@@ -2155,9 +2155,9 @@ export namespace Invoice {
|
|
|
2155
2155
|
* If Orb has ever attempted payment auto-collection for this invoice, this field
|
|
2156
2156
|
* will reflect when that attempt occurred. In conjunction with `next_attempt_at`,
|
|
2157
2157
|
* this can be used to tell whether the invoice is currently in dunning (that is,
|
|
2158
|
-
* `previously_attempted_at` is non-null, and `
|
|
2159
|
-
*
|
|
2160
|
-
* `
|
|
2158
|
+
* `previously_attempted_at` is non-null, and `next_attempt_at` is non-null), or if
|
|
2159
|
+
* dunning has been exhausted (`previously_attempted_at` is non-null, but
|
|
2160
|
+
* `next_attempt_at` is null).
|
|
2161
2161
|
*/
|
|
2162
2162
|
previously_attempted_at: string | null;
|
|
2163
2163
|
}
|
|
@@ -10528,6 +10528,7 @@ export type Price =
|
|
|
10528
10528
|
| Price.TieredPackagePrice
|
|
10529
10529
|
| Price.TieredWithMinimumPrice
|
|
10530
10530
|
| Price.GroupedTieredPrice
|
|
10531
|
+
| Price.GroupedTieredMatrixPrice
|
|
10531
10532
|
| Price.TieredPackageWithMinimumPrice
|
|
10532
10533
|
| Price.PackageWithAllocationPrice
|
|
10533
10534
|
| Price.UnitWithPercentPrice
|
|
@@ -12167,6 +12168,190 @@ export namespace Price {
|
|
|
12167
12168
|
}
|
|
12168
12169
|
}
|
|
12169
12170
|
|
|
12171
|
+
export interface GroupedTieredMatrixPrice {
|
|
12172
|
+
id: string;
|
|
12173
|
+
|
|
12174
|
+
billable_metric: Shared.BillableMetricTiny | null;
|
|
12175
|
+
|
|
12176
|
+
billing_cycle_configuration: Shared.BillingCycleConfiguration;
|
|
12177
|
+
|
|
12178
|
+
billing_mode: 'in_advance' | 'in_arrear';
|
|
12179
|
+
|
|
12180
|
+
cadence: 'one_time' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | 'custom';
|
|
12181
|
+
|
|
12182
|
+
composite_price_filters: Array<GroupedTieredMatrixPrice.CompositePriceFilter> | null;
|
|
12183
|
+
|
|
12184
|
+
conversion_rate: number | null;
|
|
12185
|
+
|
|
12186
|
+
conversion_rate_config: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
12187
|
+
|
|
12188
|
+
created_at: string;
|
|
12189
|
+
|
|
12190
|
+
credit_allocation: Shared.Allocation | null;
|
|
12191
|
+
|
|
12192
|
+
currency: string;
|
|
12193
|
+
|
|
12194
|
+
/**
|
|
12195
|
+
* @deprecated
|
|
12196
|
+
*/
|
|
12197
|
+
discount: Shared.Discount | null;
|
|
12198
|
+
|
|
12199
|
+
external_price_id: string | null;
|
|
12200
|
+
|
|
12201
|
+
fixed_price_quantity: number | null;
|
|
12202
|
+
|
|
12203
|
+
/**
|
|
12204
|
+
* Configuration for grouped_tiered_matrix pricing
|
|
12205
|
+
*/
|
|
12206
|
+
grouped_tiered_matrix_config: GroupedTieredMatrixPrice.GroupedTieredMatrixConfig;
|
|
12207
|
+
|
|
12208
|
+
invoice_grouping_key: string | null;
|
|
12209
|
+
|
|
12210
|
+
invoicing_cycle_configuration: Shared.BillingCycleConfiguration | null;
|
|
12211
|
+
|
|
12212
|
+
/**
|
|
12213
|
+
* A minimal representation of an Item containing only the essential identifying
|
|
12214
|
+
* information.
|
|
12215
|
+
*/
|
|
12216
|
+
item: Shared.ItemSlim;
|
|
12217
|
+
|
|
12218
|
+
/**
|
|
12219
|
+
* @deprecated
|
|
12220
|
+
*/
|
|
12221
|
+
maximum: Shared.Maximum | null;
|
|
12222
|
+
|
|
12223
|
+
/**
|
|
12224
|
+
* @deprecated
|
|
12225
|
+
*/
|
|
12226
|
+
maximum_amount: string | null;
|
|
12227
|
+
|
|
12228
|
+
/**
|
|
12229
|
+
* User specified key-value pairs for the resource. If not present, this defaults
|
|
12230
|
+
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
12231
|
+
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
12232
|
+
* `null`.
|
|
12233
|
+
*/
|
|
12234
|
+
metadata: { [key: string]: string };
|
|
12235
|
+
|
|
12236
|
+
/**
|
|
12237
|
+
* @deprecated
|
|
12238
|
+
*/
|
|
12239
|
+
minimum: Shared.Minimum | null;
|
|
12240
|
+
|
|
12241
|
+
/**
|
|
12242
|
+
* @deprecated
|
|
12243
|
+
*/
|
|
12244
|
+
minimum_amount: string | null;
|
|
12245
|
+
|
|
12246
|
+
/**
|
|
12247
|
+
* The pricing model type
|
|
12248
|
+
*/
|
|
12249
|
+
model_type: 'grouped_tiered_matrix';
|
|
12250
|
+
|
|
12251
|
+
name: string;
|
|
12252
|
+
|
|
12253
|
+
plan_phase_order: number | null;
|
|
12254
|
+
|
|
12255
|
+
price_type: 'usage_price' | 'fixed_price' | 'composite_price';
|
|
12256
|
+
|
|
12257
|
+
/**
|
|
12258
|
+
* The price id this price replaces. This price will take the place of the replaced
|
|
12259
|
+
* price in plan version migrations.
|
|
12260
|
+
*/
|
|
12261
|
+
replaces_price_id: string | null;
|
|
12262
|
+
|
|
12263
|
+
dimensional_price_configuration?: Shared.DimensionalPriceConfiguration | null;
|
|
12264
|
+
|
|
12265
|
+
/**
|
|
12266
|
+
* The LicenseType resource represents a type of license that can be assigned to
|
|
12267
|
+
* users. License types are used during billing by grouping metrics on the
|
|
12268
|
+
* configured grouping key.
|
|
12269
|
+
*/
|
|
12270
|
+
license_type?: GroupedTieredMatrixPrice.LicenseType | null;
|
|
12271
|
+
}
|
|
12272
|
+
|
|
12273
|
+
export namespace GroupedTieredMatrixPrice {
|
|
12274
|
+
export interface CompositePriceFilter {
|
|
12275
|
+
/**
|
|
12276
|
+
* The property of the price to filter on.
|
|
12277
|
+
*/
|
|
12278
|
+
field: 'price_id' | 'item_id' | 'price_type' | 'currency' | 'pricing_unit_id';
|
|
12279
|
+
|
|
12280
|
+
/**
|
|
12281
|
+
* Should prices that match the filter be included or excluded.
|
|
12282
|
+
*/
|
|
12283
|
+
operator: 'includes' | 'excludes';
|
|
12284
|
+
|
|
12285
|
+
/**
|
|
12286
|
+
* The IDs or values that match this filter.
|
|
12287
|
+
*/
|
|
12288
|
+
values: Array<string>;
|
|
12289
|
+
}
|
|
12290
|
+
|
|
12291
|
+
/**
|
|
12292
|
+
* Configuration for grouped_tiered_matrix pricing
|
|
12293
|
+
*/
|
|
12294
|
+
export interface GroupedTieredMatrixConfig {
|
|
12295
|
+
/**
|
|
12296
|
+
* Per unit rate for usage whose dimension value has no configured tiers
|
|
12297
|
+
*/
|
|
12298
|
+
default_unit_amount: string;
|
|
12299
|
+
|
|
12300
|
+
/**
|
|
12301
|
+
* The billable metric property used to group usage before tiering
|
|
12302
|
+
*/
|
|
12303
|
+
dimension: string;
|
|
12304
|
+
|
|
12305
|
+
/**
|
|
12306
|
+
* Graduated tiers keyed by dimension value; usage for a value is tiered only
|
|
12307
|
+
* against its own rows
|
|
12308
|
+
*/
|
|
12309
|
+
tiers: Array<GroupedTieredMatrixConfig.Tier>;
|
|
12310
|
+
}
|
|
12311
|
+
|
|
12312
|
+
export namespace GroupedTieredMatrixConfig {
|
|
12313
|
+
/**
|
|
12314
|
+
* Configuration for a single tier scoped to a dimension value
|
|
12315
|
+
*/
|
|
12316
|
+
export interface Tier {
|
|
12317
|
+
/**
|
|
12318
|
+
* The dimension value this tier applies to
|
|
12319
|
+
*/
|
|
12320
|
+
dimension_value: string;
|
|
12321
|
+
|
|
12322
|
+
tier_lower_bound: string;
|
|
12323
|
+
|
|
12324
|
+
/**
|
|
12325
|
+
* Per unit amount
|
|
12326
|
+
*/
|
|
12327
|
+
unit_amount: string;
|
|
12328
|
+
}
|
|
12329
|
+
}
|
|
12330
|
+
|
|
12331
|
+
/**
|
|
12332
|
+
* The LicenseType resource represents a type of license that can be assigned to
|
|
12333
|
+
* users. License types are used during billing by grouping metrics on the
|
|
12334
|
+
* configured grouping key.
|
|
12335
|
+
*/
|
|
12336
|
+
export interface LicenseType {
|
|
12337
|
+
/**
|
|
12338
|
+
* The Orb-assigned unique identifier for the license type.
|
|
12339
|
+
*/
|
|
12340
|
+
id: string;
|
|
12341
|
+
|
|
12342
|
+
/**
|
|
12343
|
+
* The key used for grouping licenses of this type. This is typically a user
|
|
12344
|
+
* identifier field.
|
|
12345
|
+
*/
|
|
12346
|
+
grouping_key: string;
|
|
12347
|
+
|
|
12348
|
+
/**
|
|
12349
|
+
* The name of the license type.
|
|
12350
|
+
*/
|
|
12351
|
+
name: string;
|
|
12352
|
+
}
|
|
12353
|
+
}
|
|
12354
|
+
|
|
12170
12355
|
export interface TieredPackageWithMinimumPrice {
|
|
12171
12356
|
id: string;
|
|
12172
12357
|
|