orb-billing 6.15.0 → 6.17.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.
Files changed (53) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/package.json +1 -1
  3. package/resources/beta/beta.d.mts +276 -2
  4. package/resources/beta/beta.d.mts.map +1 -1
  5. package/resources/beta/beta.d.ts +276 -2
  6. package/resources/beta/beta.d.ts.map +1 -1
  7. package/resources/beta/beta.js.map +1 -1
  8. package/resources/beta/beta.mjs.map +1 -1
  9. package/resources/beta/external-plan-id.d.mts +276 -2
  10. package/resources/beta/external-plan-id.d.mts.map +1 -1
  11. package/resources/beta/external-plan-id.d.ts +276 -2
  12. package/resources/beta/external-plan-id.d.ts.map +1 -1
  13. package/resources/customers/balance-transactions.d.mts +2 -2
  14. package/resources/customers/balance-transactions.d.mts.map +1 -1
  15. package/resources/customers/balance-transactions.d.ts +2 -2
  16. package/resources/customers/balance-transactions.d.ts.map +1 -1
  17. package/resources/invoices.d.mts +3 -3
  18. package/resources/invoices.d.mts.map +1 -1
  19. package/resources/invoices.d.ts +3 -3
  20. package/resources/invoices.d.ts.map +1 -1
  21. package/resources/plans/plans.d.mts +138 -1
  22. package/resources/plans/plans.d.mts.map +1 -1
  23. package/resources/plans/plans.d.ts +138 -1
  24. package/resources/plans/plans.d.ts.map +1 -1
  25. package/resources/plans/plans.js.map +1 -1
  26. package/resources/plans/plans.mjs.map +1 -1
  27. package/resources/prices/prices.d.mts +396 -3
  28. package/resources/prices/prices.d.mts.map +1 -1
  29. package/resources/prices/prices.d.ts +396 -3
  30. package/resources/prices/prices.d.ts.map +1 -1
  31. package/resources/prices/prices.js.map +1 -1
  32. package/resources/prices/prices.mjs.map +1 -1
  33. package/resources/shared.d.mts +155 -3
  34. package/resources/shared.d.mts.map +1 -1
  35. package/resources/shared.d.ts +155 -3
  36. package/resources/shared.d.ts.map +1 -1
  37. package/resources/subscriptions.d.mts +702 -23
  38. package/resources/subscriptions.d.mts.map +1 -1
  39. package/resources/subscriptions.d.ts +702 -23
  40. package/resources/subscriptions.d.ts.map +1 -1
  41. package/src/resources/beta/beta.ts +324 -0
  42. package/src/resources/beta/external-plan-id.ts +324 -0
  43. package/src/resources/customers/balance-transactions.ts +4 -2
  44. package/src/resources/invoices.ts +6 -3
  45. package/src/resources/plans/plans.ts +162 -0
  46. package/src/resources/prices/prices.ts +465 -0
  47. package/src/resources/shared.ts +198 -2
  48. package/src/resources/subscriptions.ts +931 -128
  49. package/src/version.ts +1 -1
  50. package/version.d.mts +1 -1
  51. package/version.d.ts +1 -1
  52. package/version.js +1 -1
  53. package/version.mjs +1 -1
@@ -767,7 +767,8 @@ export namespace ChangedSubscriptionResources {
767
767
  | 'credit_note_voided'
768
768
  | 'overpayment_refund'
769
769
  | 'external_payment'
770
- | 'small_invoice_carryover';
770
+ | 'small_invoice_carryover'
771
+ | 'prepaid_commit_cancel';
771
772
 
772
773
  /**
773
774
  * The value of the amount changed in the transaction.
@@ -2201,7 +2202,8 @@ export namespace Invoice {
2201
2202
  | 'credit_note_voided'
2202
2203
  | 'overpayment_refund'
2203
2204
  | 'external_payment'
2204
- | 'small_invoice_carryover';
2205
+ | 'small_invoice_carryover'
2206
+ | 'prepaid_commit_cancel';
2205
2207
 
2206
2208
  /**
2207
2209
  * The value of the amount changed in the transaction.
@@ -10759,6 +10761,7 @@ export type Price =
10759
10761
  | Price.PackageWithAllocationPrice
10760
10762
  | Price.UnitWithPercentPrice
10761
10763
  | Price.MatrixWithAllocationPrice
10764
+ | Price.TieredMatrixWithAllocationPrice
10762
10765
  | Price.MatrixWithThresholdDiscountsPrice
10763
10766
  | Price.TieredWithProrationPrice
10764
10767
  | Price.UnitWithProrationPrice
@@ -13206,6 +13209,199 @@ export namespace Price {
13206
13209
  }
13207
13210
  }
13208
13211
 
13212
+ export interface TieredMatrixWithAllocationPrice {
13213
+ id: string;
13214
+
13215
+ billable_metric: Shared.BillableMetricTiny | null;
13216
+
13217
+ billing_cycle_configuration: Shared.BillingCycleConfiguration;
13218
+
13219
+ billing_mode: 'in_advance' | 'in_arrear';
13220
+
13221
+ cadence: 'one_time' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | 'custom';
13222
+
13223
+ composite_price_filters: Array<TieredMatrixWithAllocationPrice.CompositePriceFilter> | null;
13224
+
13225
+ conversion_rate: number | null;
13226
+
13227
+ conversion_rate_config: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
13228
+
13229
+ created_at: string;
13230
+
13231
+ credit_allocation: Shared.Allocation | null;
13232
+
13233
+ currency: string;
13234
+
13235
+ /**
13236
+ * @deprecated
13237
+ */
13238
+ discount: Shared.Discount | null;
13239
+
13240
+ external_price_id: string | null;
13241
+
13242
+ fixed_price_quantity: number | null;
13243
+
13244
+ invoice_grouping_key: string | null;
13245
+
13246
+ invoicing_cycle_configuration: Shared.BillingCycleConfiguration | null;
13247
+
13248
+ /**
13249
+ * A minimal representation of an Item containing only the essential identifying
13250
+ * information.
13251
+ */
13252
+ item: Shared.ItemSlim;
13253
+
13254
+ /**
13255
+ * @deprecated
13256
+ */
13257
+ maximum: Shared.Maximum | null;
13258
+
13259
+ /**
13260
+ * @deprecated
13261
+ */
13262
+ maximum_amount: string | null;
13263
+
13264
+ /**
13265
+ * User specified key-value pairs for the resource. If not present, this defaults
13266
+ * to an empty dictionary. Individual keys can be removed by setting the value to
13267
+ * `null`, and the entire metadata mapping can be cleared by setting `metadata` to
13268
+ * `null`.
13269
+ */
13270
+ metadata: { [key: string]: string };
13271
+
13272
+ /**
13273
+ * @deprecated
13274
+ */
13275
+ minimum: Shared.Minimum | null;
13276
+
13277
+ /**
13278
+ * @deprecated
13279
+ */
13280
+ minimum_amount: string | null;
13281
+
13282
+ /**
13283
+ * The pricing model type
13284
+ */
13285
+ model_type: 'tiered_matrix_with_allocation';
13286
+
13287
+ name: string;
13288
+
13289
+ plan_phase_order: number | null;
13290
+
13291
+ price_type: 'usage_price' | 'fixed_price' | 'composite_price';
13292
+
13293
+ /**
13294
+ * The price id this price replaces. This price will take the place of the replaced
13295
+ * price in plan version migrations.
13296
+ */
13297
+ replaces_price_id: string | null;
13298
+
13299
+ /**
13300
+ * Configuration for tiered_matrix_with_allocation pricing
13301
+ */
13302
+ tiered_matrix_with_allocation_config: TieredMatrixWithAllocationPrice.TieredMatrixWithAllocationConfig;
13303
+
13304
+ dimensional_price_configuration?: Shared.DimensionalPriceConfiguration | null;
13305
+
13306
+ /**
13307
+ * The LicenseType resource represents a type of license that can be assigned to
13308
+ * users. License types are used during billing by grouping metrics on the
13309
+ * configured grouping key.
13310
+ */
13311
+ license_type?: TieredMatrixWithAllocationPrice.LicenseType | null;
13312
+ }
13313
+
13314
+ export namespace TieredMatrixWithAllocationPrice {
13315
+ export interface CompositePriceFilter {
13316
+ /**
13317
+ * The property of the price to filter on.
13318
+ */
13319
+ field: 'price_id' | 'item_id' | 'price_type' | 'currency' | 'pricing_unit_id';
13320
+
13321
+ /**
13322
+ * Should prices that match the filter be included or excluded.
13323
+ */
13324
+ operator: 'includes' | 'excludes';
13325
+
13326
+ /**
13327
+ * The IDs or values that match this filter.
13328
+ */
13329
+ values: Array<string>;
13330
+ }
13331
+
13332
+ /**
13333
+ * Configuration for tiered_matrix_with_allocation pricing
13334
+ */
13335
+ export interface TieredMatrixWithAllocationConfig {
13336
+ /**
13337
+ * Usage allocation, pooled across all matrix cells
13338
+ */
13339
+ allocation: string;
13340
+
13341
+ /**
13342
+ * Per unit rate for usage whose matrix cell has no configured tiers
13343
+ */
13344
+ default_unit_amount: string;
13345
+
13346
+ /**
13347
+ * One or two event property values to evaluate matrix cells by
13348
+ */
13349
+ dimensions: Array<string>;
13350
+
13351
+ /**
13352
+ * Graduated tiers keyed by matrix cell; usage in a cell is tiered only against its
13353
+ * own rows
13354
+ */
13355
+ tiers: Array<TieredMatrixWithAllocationConfig.Tier>;
13356
+ }
13357
+
13358
+ export namespace TieredMatrixWithAllocationConfig {
13359
+ /**
13360
+ * Configuration for a single tier scoped to one matrix cell
13361
+ */
13362
+ export interface Tier {
13363
+ /**
13364
+ * The matrix cell this tier applies to, as one or two dimension values
13365
+ */
13366
+ dimension_values: Array<string>;
13367
+
13368
+ /**
13369
+ * Exclusive tier starting value. The tier runs up to and including the next bound
13370
+ * configured for the same matrix cell.
13371
+ */
13372
+ tier_lower_bound: string;
13373
+
13374
+ /**
13375
+ * Per unit amount
13376
+ */
13377
+ unit_amount: string;
13378
+ }
13379
+ }
13380
+
13381
+ /**
13382
+ * The LicenseType resource represents a type of license that can be assigned to
13383
+ * users. License types are used during billing by grouping metrics on the
13384
+ * configured grouping key.
13385
+ */
13386
+ export interface LicenseType {
13387
+ /**
13388
+ * The Orb-assigned unique identifier for the license type.
13389
+ */
13390
+ id: string;
13391
+
13392
+ /**
13393
+ * The key used for grouping licenses of this type. This is typically a user
13394
+ * identifier field.
13395
+ */
13396
+ grouping_key: string;
13397
+
13398
+ /**
13399
+ * The name of the license type.
13400
+ */
13401
+ name: string;
13402
+ }
13403
+ }
13404
+
13209
13405
  export interface MatrixWithThresholdDiscountsPrice {
13210
13406
  id: string;
13211
13407