orb-billing 4.74.0 → 5.1.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 (166) hide show
  1. package/CHANGELOG.md +62 -0
  2. package/core.d.ts +7 -4
  3. package/core.d.ts.map +1 -1
  4. package/core.js +16 -9
  5. package/core.js.map +1 -1
  6. package/core.mjs +16 -9
  7. package/core.mjs.map +1 -1
  8. package/index.d.mts +151 -14
  9. package/index.d.ts +151 -14
  10. package/index.d.ts.map +1 -1
  11. package/index.js +6 -5
  12. package/index.js.map +1 -1
  13. package/index.mjs +9 -8
  14. package/index.mjs.map +1 -1
  15. package/package.json +1 -1
  16. package/resource.d.ts +1 -1
  17. package/resource.d.ts.map +1 -1
  18. package/resource.js.map +1 -1
  19. package/resource.mjs.map +1 -1
  20. package/resources/alerts.d.ts +20 -88
  21. package/resources/alerts.d.ts.map +1 -1
  22. package/resources/alerts.js.map +1 -1
  23. package/resources/alerts.mjs.map +1 -1
  24. package/resources/beta/beta.d.ts +9 -7313
  25. package/resources/beta/beta.d.ts.map +1 -1
  26. package/resources/beta/beta.js.map +1 -1
  27. package/resources/beta/beta.mjs.map +1 -1
  28. package/resources/beta/external-plan-id.d.ts +7 -7074
  29. package/resources/beta/external-plan-id.d.ts.map +1 -1
  30. package/resources/beta/external-plan-id.js.map +1 -1
  31. package/resources/beta/external-plan-id.mjs.map +1 -1
  32. package/resources/credit-notes.d.ts +64 -164
  33. package/resources/credit-notes.d.ts.map +1 -1
  34. package/resources/credit-notes.js +28 -6
  35. package/resources/credit-notes.js.map +1 -1
  36. package/resources/credit-notes.mjs +27 -4
  37. package/resources/credit-notes.mjs.map +1 -1
  38. package/resources/customers/balance-transactions.d.ts +5 -32
  39. package/resources/customers/balance-transactions.d.ts.map +1 -1
  40. package/resources/customers/balance-transactions.js.map +1 -1
  41. package/resources/customers/balance-transactions.mjs.map +1 -1
  42. package/resources/customers/costs.d.ts +19 -97
  43. package/resources/customers/costs.d.ts.map +1 -1
  44. package/resources/customers/credits/credits.d.ts +4 -4
  45. package/resources/customers/credits/credits.d.ts.map +1 -1
  46. package/resources/customers/credits/credits.js.map +1 -1
  47. package/resources/customers/credits/credits.mjs.map +1 -1
  48. package/resources/customers/credits/index.d.ts +2 -2
  49. package/resources/customers/credits/index.d.ts.map +1 -1
  50. package/resources/customers/credits/index.js.map +1 -1
  51. package/resources/customers/credits/index.mjs.map +1 -1
  52. package/resources/customers/credits/ledger.d.ts +239 -984
  53. package/resources/customers/credits/ledger.d.ts.map +1 -1
  54. package/resources/customers/credits/ledger.js.map +1 -1
  55. package/resources/customers/credits/ledger.mjs.map +1 -1
  56. package/resources/customers/credits/top-ups.d.ts +29 -121
  57. package/resources/customers/credits/top-ups.d.ts.map +1 -1
  58. package/resources/customers/credits/top-ups.js.map +1 -1
  59. package/resources/customers/credits/top-ups.mjs.map +1 -1
  60. package/resources/customers/customers.d.ts +84 -682
  61. package/resources/customers/customers.d.ts.map +1 -1
  62. package/resources/customers/customers.js.map +1 -1
  63. package/resources/customers/customers.mjs.map +1 -1
  64. package/resources/customers/index.d.ts +1 -1
  65. package/resources/customers/index.d.ts.map +1 -1
  66. package/resources/customers/index.js.map +1 -1
  67. package/resources/customers/index.mjs.map +1 -1
  68. package/resources/dimensional-price-groups/dimensional-price-groups.d.ts +6 -2
  69. package/resources/dimensional-price-groups/dimensional-price-groups.d.ts.map +1 -1
  70. package/resources/events/backfills.d.ts +2 -2
  71. package/resources/events/events.d.ts +9 -3
  72. package/resources/events/events.d.ts.map +1 -1
  73. package/resources/index.d.ts +7 -7
  74. package/resources/index.d.ts.map +1 -1
  75. package/resources/index.js +1 -4
  76. package/resources/index.js.map +1 -1
  77. package/resources/index.mjs +3 -3
  78. package/resources/index.mjs.map +1 -1
  79. package/resources/invoice-line-items.d.ts +9 -395
  80. package/resources/invoice-line-items.d.ts.map +1 -1
  81. package/resources/invoice-line-items.js.map +1 -1
  82. package/resources/invoice-line-items.mjs.map +1 -1
  83. package/resources/invoices.d.ts +43 -1704
  84. package/resources/invoices.d.ts.map +1 -1
  85. package/resources/invoices.js +4 -7
  86. package/resources/invoices.js.map +1 -1
  87. package/resources/invoices.mjs +3 -5
  88. package/resources/invoices.mjs.map +1 -1
  89. package/resources/items.d.ts +9 -3
  90. package/resources/items.d.ts.map +1 -1
  91. package/resources/metrics.d.ts +9 -3
  92. package/resources/metrics.d.ts.map +1 -1
  93. package/resources/plans/external-plan-id.d.ts +3 -1
  94. package/resources/plans/external-plan-id.d.ts.map +1 -1
  95. package/resources/plans/plans.d.ts +47 -3783
  96. package/resources/plans/plans.d.ts.map +1 -1
  97. package/resources/plans/plans.js.map +1 -1
  98. package/resources/plans/plans.mjs.map +1 -1
  99. package/resources/prices/external-price-id.d.ts +6 -4
  100. package/resources/prices/external-price-id.d.ts.map +1 -1
  101. package/resources/prices/index.d.ts +1 -1
  102. package/resources/prices/index.d.ts.map +1 -1
  103. package/resources/prices/index.js +1 -2
  104. package/resources/prices/index.js.map +1 -1
  105. package/resources/prices/index.mjs +1 -1
  106. package/resources/prices/index.mjs.map +1 -1
  107. package/resources/prices/prices.d.ts +505 -9417
  108. package/resources/prices/prices.d.ts.map +1 -1
  109. package/resources/prices/prices.js +39 -20
  110. package/resources/prices/prices.js.map +1 -1
  111. package/resources/prices/prices.mjs +38 -18
  112. package/resources/prices/prices.mjs.map +1 -1
  113. package/resources/shared.d.ts +7894 -9
  114. package/resources/shared.d.ts.map +1 -1
  115. package/resources/shared.js +11 -0
  116. package/resources/shared.js.map +1 -1
  117. package/resources/shared.mjs +7 -1
  118. package/resources/shared.mjs.map +1 -1
  119. package/resources/subscription-changes.d.ts +140 -2158
  120. package/resources/subscription-changes.d.ts.map +1 -1
  121. package/resources/subscription-changes.js.map +1 -1
  122. package/resources/subscription-changes.mjs.map +1 -1
  123. package/resources/subscriptions.d.ts +2646 -27141
  124. package/resources/subscriptions.d.ts.map +1 -1
  125. package/resources/subscriptions.js +2 -2
  126. package/resources/subscriptions.js.map +1 -1
  127. package/resources/subscriptions.mjs +2 -2
  128. package/resources/subscriptions.mjs.map +1 -1
  129. package/src/core.ts +17 -8
  130. package/src/index.ts +229 -42
  131. package/src/resource.ts +1 -1
  132. package/src/resources/alerts.ts +20 -94
  133. package/src/resources/beta/beta.ts +124 -8892
  134. package/src/resources/beta/external-plan-id.ts +118 -8593
  135. package/src/resources/credit-notes.ts +67 -216
  136. package/src/resources/customers/balance-transactions.ts +5 -36
  137. package/src/resources/customers/costs.ts +19 -117
  138. package/src/resources/customers/credits/credits.ts +18 -0
  139. package/src/resources/customers/credits/index.ts +9 -0
  140. package/src/resources/customers/credits/ledger.ts +259 -1468
  141. package/src/resources/customers/credits/top-ups.ts +33 -136
  142. package/src/resources/customers/customers.ts +165 -1457
  143. package/src/resources/customers/index.ts +8 -0
  144. package/src/resources/dimensional-price-groups/dimensional-price-groups.ts +2 -2
  145. package/src/resources/events/backfills.ts +2 -2
  146. package/src/resources/events/events.ts +3 -3
  147. package/src/resources/index.ts +42 -22
  148. package/src/resources/invoice-line-items.ts +13 -501
  149. package/src/resources/invoices.ts +65 -2396
  150. package/src/resources/items.ts +3 -3
  151. package/src/resources/metrics.ts +3 -3
  152. package/src/resources/plans/external-plan-id.ts +1 -1
  153. package/src/resources/plans/plans.ts +81 -4563
  154. package/src/resources/prices/external-price-id.ts +4 -4
  155. package/src/resources/prices/index.ts +2 -2
  156. package/src/resources/prices/prices.ts +561 -11851
  157. package/src/resources/shared.ts +9991 -22
  158. package/src/resources/subscription-changes.ts +171 -2670
  159. package/src/resources/subscriptions.ts +3246 -32984
  160. package/src/version.ts +1 -1
  161. package/version.d.ts +1 -1
  162. package/version.d.ts.map +1 -1
  163. package/version.js +1 -1
  164. package/version.js.map +1 -1
  165. package/version.mjs +1 -1
  166. package/version.mjs.map +1 -1
@@ -262,7 +262,7 @@ class Subscriptions extends resource_1.APIResource {
262
262
  * is hit. To enable threshold billing, pass in an `invoicing_threshold`, which is
263
263
  * specified in the subscription's invoicing currency, when creating a
264
264
  * subscription. E.g. pass in `10.00` to issue an invoice when usage amounts hit
265
- * $10.00 for a subscription that invoices in USD.
265
+ * \$10.00 for a subscription that invoices in USD.
266
266
  */
267
267
  create(body, options) {
268
268
  return this._client.post('/subscriptions', { body, ...options });
@@ -676,7 +676,7 @@ class Subscriptions extends resource_1.APIResource {
676
676
  }
677
677
  /**
678
678
  * This endpoint can be used to unschedule any pending plan changes on an existing
679
- * subscription.
679
+ * subscription. When called, all upcoming plan changes will be unscheduled.
680
680
  */
681
681
  unschedulePendingPlanChanges(subscriptionId, options) {
682
682
  return this._client.post(`/subscriptions/${subscriptionId}/unschedule_pending_plan_changes`, options);
@@ -1 +1 @@
1
- {"version":3,"file":"subscriptions.js","sourceRoot":"","sources":["../src/resources/subscriptions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6CAA0C;AAC1C,qCAA2C;AAQ3C,iDAAsD;AAEtD,MAAa,aAAc,SAAQ,sBAAW;IAC5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiQG;IACH,MAAM,CACJ,IAA8B,EAC9B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnE,CAAC;IAED;;;;OAIG;IACH,MAAM,CACJ,cAAsB,EACtB,IAA8B,EAC9B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,cAAc,EAAE,EAAE,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;;;;;;;OAmBG;IACH,WAAW,CACT,cAAsB,EACtB,IAAmC,EACnC,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,cAAc,eAAe,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClG,CAAC;CACF;AA/hCD,sCA+hCC;AAED,MAAa,iBAAkB,SAAQ,iBAAkB;CAAG;AAA5D,8CAA4D;AAE5D,MAAa,sCAAuC,SAAQ,iBAAuC;CAAG;AAAtG,wFAAsG;AAkuItG,aAAa,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;AACpD,aAAa,CAAC,sCAAsC,GAAG,sCAAsC,CAAC"}
@@ -259,7 +259,7 @@ export class Subscriptions extends APIResource {
259
259
  * is hit. To enable threshold billing, pass in an `invoicing_threshold`, which is
260
260
  * specified in the subscription's invoicing currency, when creating a
261
261
  * subscription. E.g. pass in `10.00` to issue an invoice when usage amounts hit
262
- * $10.00 for a subscription that invoices in USD.
262
+ * \$10.00 for a subscription that invoices in USD.
263
263
  */
264
264
  create(body, options) {
265
265
  return this._client.post('/subscriptions', { body, ...options });
@@ -673,7 +673,7 @@ export class Subscriptions extends APIResource {
673
673
  }
674
674
  /**
675
675
  * This endpoint can be used to unschedule any pending plan changes on an existing
676
- * subscription.
676
+ * subscription. When called, all upcoming plan changes will be unscheduled.
677
677
  */
678
678
  unschedulePendingPlanChanges(subscriptionId, options) {
679
679
  return this._client.post(`/subscriptions/${subscriptionId}/unschedule_pending_plan_changes`, options);
@@ -1 +1 @@
1
- {"version":3,"file":"subscriptions.mjs","sourceRoot":"","sources":["../src/resources/subscriptions.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,EAAE,gBAAgB,EAAE;OAQpB,EAAE,IAAI,EAAmB;AAEhC,MAAM,OAAO,aAAc,SAAQ,WAAW;IAC5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,cAAc,wCAAwC,EAAE;YACjG,IAAI;YACJ,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,4BAA4B,CAC1B,cAAsB,EACtB,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,cAAc,kCAAkC,EAAE,OAAO,CAAC,CAAC;IACxG,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,sBAAsB,CACpB,cAAsB,EACtB,IAA8C,EAC9C,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,cAAc,4BAA4B,EAAE;YACrF,IAAI;YACJ,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,WAAW,CACT,cAAsB,EACtB,IAAmC,EACnC,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,cAAc,eAAe,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClG,CAAC;CACF;AAED,MAAM,OAAO,iBAAkB,SAAQ,IAAkB;CAAG;AAE5D,MAAM,OAAO,sCAAuC,SAAQ,IAAuC;CAAG;AAkuItG,aAAa,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;AACpD,aAAa,CAAC,sCAAsC,GAAG,sCAAsC,CAAC"}
package/src/core.ts CHANGED
@@ -170,6 +170,7 @@ export class APIPromise<T> extends Promise<T> {
170
170
 
171
171
  export abstract class APIClient {
172
172
  baseURL: string;
173
+ #baseURLOverridden: boolean;
173
174
  maxRetries: number;
174
175
  timeout: number;
175
176
  httpAgent: Agent | undefined;
@@ -179,18 +180,21 @@ export abstract class APIClient {
179
180
 
180
181
  constructor({
181
182
  baseURL,
183
+ baseURLOverridden,
182
184
  maxRetries = 2,
183
185
  timeout = 60000, // 1 minute
184
186
  httpAgent,
185
187
  fetch: overriddenFetch,
186
188
  }: {
187
189
  baseURL: string;
190
+ baseURLOverridden: boolean;
188
191
  maxRetries?: number | undefined;
189
192
  timeout: number | undefined;
190
193
  httpAgent: Agent | undefined;
191
194
  fetch: Fetch | undefined;
192
195
  }) {
193
196
  this.baseURL = baseURL;
197
+ this.#baseURLOverridden = baseURLOverridden;
194
198
  this.maxRetries = validatePositiveInteger('maxRetries', maxRetries);
195
199
  this.timeout = validatePositiveInteger('timeout', timeout);
196
200
  this.httpAgent = httpAgent;
@@ -213,7 +217,7 @@ export abstract class APIClient {
213
217
  protected defaultHeaders(opts: FinalRequestOptions): Headers {
214
218
  return {
215
219
  Accept: 'application/json',
216
- 'Content-Type': 'application/json',
220
+ ...(['head', 'get'].includes(opts.method) ? {} : { 'Content-Type': 'application/json' }),
217
221
  'User-Agent': this.getUserAgent(),
218
222
  ...getPlatformHeaders(),
219
223
  ...this.authHeaders(opts),
@@ -295,12 +299,12 @@ export abstract class APIClient {
295
299
  return null;
296
300
  }
297
301
 
298
- buildRequest<Req>(
302
+ async buildRequest<Req>(
299
303
  inputOptions: FinalRequestOptions<Req>,
300
304
  { retryCount = 0 }: { retryCount?: number } = {},
301
- ): { req: RequestInit; url: string; timeout: number } {
305
+ ): Promise<{ req: RequestInit; url: string; timeout: number }> {
302
306
  const options = { ...inputOptions };
303
- const { method, path, query, headers: headers = {} } = options;
307
+ const { method, path, query, defaultBaseURL, headers: headers = {} } = options;
304
308
 
305
309
  const body =
306
310
  ArrayBuffer.isView(options.body) || (options.__binaryRequest && typeof options.body === 'string') ?
@@ -310,7 +314,7 @@ export abstract class APIClient {
310
314
  : null;
311
315
  const contentLength = this.calculateContentLength(body);
312
316
 
313
- const url = this.buildURL(path!, query);
317
+ const url = this.buildURL(path!, query, defaultBaseURL);
314
318
  if ('timeout' in options) validatePositiveInteger('timeout', options.timeout);
315
319
  options.timeout = options.timeout ?? this.timeout;
316
320
  const httpAgent = options.httpAgent ?? this.httpAgent ?? getDefaultAgent(url);
@@ -446,7 +450,9 @@ export abstract class APIClient {
446
450
 
447
451
  await this.prepareOptions(options);
448
452
 
449
- const { req, url, timeout } = this.buildRequest(options, { retryCount: maxRetries - retriesRemaining });
453
+ const { req, url, timeout } = await this.buildRequest(options, {
454
+ retryCount: maxRetries - retriesRemaining,
455
+ });
450
456
 
451
457
  await this.prepareRequest(req, { url, options });
452
458
 
@@ -503,11 +509,12 @@ export abstract class APIClient {
503
509
  return new PagePromise<PageClass, Item>(this, request, Page);
504
510
  }
505
511
 
506
- buildURL<Req>(path: string, query: Req | null | undefined): string {
512
+ buildURL<Req>(path: string, query: Req | null | undefined, defaultBaseURL?: string | undefined): string {
513
+ const baseURL = (!this.#baseURLOverridden && defaultBaseURL) || this.baseURL;
507
514
  const url =
508
515
  isAbsoluteURL(path) ?
509
516
  new URL(path)
510
- : new URL(this.baseURL + (this.baseURL.endsWith('/') && path.startsWith('/') ? path.slice(1) : path));
517
+ : new URL(baseURL + (baseURL.endsWith('/') && path.startsWith('/') ? path.slice(1) : path));
511
518
 
512
519
  const defaultQuery = this.defaultQuery();
513
520
  if (!isEmptyObj(defaultQuery)) {
@@ -792,6 +799,7 @@ export type RequestOptions<
792
799
  query?: Req | undefined;
793
800
  body?: Req | null | undefined;
794
801
  headers?: Headers | undefined;
802
+ defaultBaseURL?: string | undefined;
795
803
 
796
804
  maxRetries?: number;
797
805
  stream?: boolean | undefined;
@@ -813,6 +821,7 @@ const requestOptionsKeys: KeysEnum<RequestOptions> = {
813
821
  query: true,
814
822
  body: true,
815
823
  headers: true,
824
+ defaultBaseURL: true,
816
825
 
817
826
  maxRetries: true,
818
827
  stream: true,
package/src/index.ts CHANGED
@@ -19,21 +19,15 @@ import {
19
19
  AlertUpdateParams,
20
20
  Alerts,
21
21
  AlertsPage,
22
+ Threshold,
22
23
  } from './resources/alerts';
23
- import {
24
- CreditNote,
25
- CreditNoteCreateParams,
26
- CreditNoteListParams,
27
- CreditNotes,
28
- CreditNotesPage,
29
- } from './resources/credit-notes';
24
+ import { CreditNoteCreateParams, CreditNoteListParams, CreditNotes } from './resources/credit-notes';
30
25
  import {
31
26
  InvoiceLineItemCreateParams,
32
27
  InvoiceLineItemCreateResponse,
33
28
  InvoiceLineItems,
34
29
  } from './resources/invoice-line-items';
35
30
  import {
36
- Invoice,
37
31
  InvoiceCreateParams,
38
32
  InvoiceFetchUpcomingParams,
39
33
  InvoiceFetchUpcomingResponse,
@@ -42,7 +36,6 @@ import {
42
36
  InvoiceMarkPaidParams,
43
37
  InvoiceUpdateParams,
44
38
  Invoices,
45
- InvoicesPage,
46
39
  } from './resources/invoices';
47
40
  import {
48
41
  Item,
@@ -61,6 +54,7 @@ import {
61
54
  Metrics,
62
55
  } from './resources/metrics';
63
56
  import {
57
+ MutatedSubscription,
64
58
  SubscriptionChangeApplyParams,
65
59
  SubscriptionChangeApplyResponse,
66
60
  SubscriptionChangeCancelResponse,
@@ -68,11 +62,38 @@ import {
68
62
  SubscriptionChanges,
69
63
  } from './resources/subscription-changes';
70
64
  import {
65
+ DiscountOverride,
66
+ NewSubscriptionBPSPrice,
67
+ NewSubscriptionBulkBPSPrice,
68
+ NewSubscriptionBulkPrice,
69
+ NewSubscriptionBulkWithProrationPrice,
70
+ NewSubscriptionCumulativeGroupedBulkPrice,
71
+ NewSubscriptionGroupedAllocationPrice,
72
+ NewSubscriptionGroupedTieredPackagePrice,
73
+ NewSubscriptionGroupedTieredPrice,
74
+ NewSubscriptionGroupedWithMeteredMinimumPrice,
75
+ NewSubscriptionGroupedWithProratedMinimumPrice,
76
+ NewSubscriptionMatrixPrice,
77
+ NewSubscriptionMatrixWithAllocationPrice,
78
+ NewSubscriptionMatrixWithDisplayNamePrice,
79
+ NewSubscriptionMaxGroupTieredPackagePrice,
80
+ NewSubscriptionPackagePrice,
81
+ NewSubscriptionPackageWithAllocationPrice,
82
+ NewSubscriptionScalableMatrixWithTieredPricingPrice,
83
+ NewSubscriptionScalableMatrixWithUnitPricingPrice,
84
+ NewSubscriptionThresholdTotalAmountPrice,
85
+ NewSubscriptionTierWithProrationPrice,
86
+ NewSubscriptionTieredBPSPrice,
87
+ NewSubscriptionTieredPackagePrice,
88
+ NewSubscriptionTieredPackageWithMinimumPrice,
89
+ NewSubscriptionTieredPrice,
90
+ NewSubscriptionTieredWithMinimumPrice,
91
+ NewSubscriptionUnitPrice,
92
+ NewSubscriptionUnitWithPercentPrice,
93
+ NewSubscriptionUnitWithProrationPrice,
71
94
  Subscription,
72
95
  SubscriptionCancelParams,
73
- SubscriptionCancelResponse,
74
96
  SubscriptionCreateParams,
75
- SubscriptionCreateResponse,
76
97
  SubscriptionFetchCostsParams,
77
98
  SubscriptionFetchCostsResponse,
78
99
  SubscriptionFetchScheduleParams,
@@ -81,22 +102,13 @@ import {
81
102
  SubscriptionFetchUsageParams,
82
103
  SubscriptionListParams,
83
104
  SubscriptionPriceIntervalsParams,
84
- SubscriptionPriceIntervalsResponse,
85
105
  SubscriptionRedeemCouponParams,
86
- SubscriptionRedeemCouponResponse,
87
106
  SubscriptionSchedulePlanChangeParams,
88
- SubscriptionSchedulePlanChangeResponse,
89
107
  SubscriptionTriggerPhaseParams,
90
- SubscriptionTriggerPhaseResponse,
91
- SubscriptionUnscheduleCancellationResponse,
92
108
  SubscriptionUnscheduleFixedFeeQuantityUpdatesParams,
93
- SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse,
94
- SubscriptionUnschedulePendingPlanChangesResponse,
95
109
  SubscriptionUpdateFixedFeeQuantityParams,
96
- SubscriptionUpdateFixedFeeQuantityResponse,
97
110
  SubscriptionUpdateParams,
98
111
  SubscriptionUpdateTrialParams,
99
- SubscriptionUpdateTrialResponse,
100
112
  SubscriptionUsage,
101
113
  Subscriptions,
102
114
  SubscriptionsPage,
@@ -117,13 +129,21 @@ import {
117
129
  CouponsPage,
118
130
  } from './resources/coupons/coupons';
119
131
  import {
132
+ AccountingProviderConfig,
133
+ AddressInput,
120
134
  Customer,
121
135
  CustomerCreateParams,
136
+ CustomerHierarchyConfig,
122
137
  CustomerListParams,
123
138
  CustomerUpdateByExternalIDParams,
124
139
  CustomerUpdateParams,
125
140
  Customers,
126
141
  CustomersPage,
142
+ NewAccountingSyncConfiguration,
143
+ NewAvalaraTaxConfiguration,
144
+ NewReportingConfiguration,
145
+ NewSphereConfiguration,
146
+ NewTaxJarConfiguration,
127
147
  } from './resources/customers/customers';
128
148
  import {
129
149
  DimensionalPriceGroup,
@@ -152,16 +172,16 @@ import {
152
172
  } from './resources/plans/plans';
153
173
  import {
154
174
  EvaluatePriceGroup,
155
- Price,
156
175
  PriceCreateParams,
157
176
  PriceEvaluateMultipleParams,
158
177
  PriceEvaluateMultipleResponse,
159
178
  PriceEvaluateParams,
179
+ PriceEvaluatePreviewEventsParams,
180
+ PriceEvaluatePreviewEventsResponse,
160
181
  PriceEvaluateResponse,
161
182
  PriceListParams,
162
183
  PriceUpdateParams,
163
184
  Prices,
164
- PricesPage,
165
185
  } from './resources/prices/prices';
166
186
 
167
187
  export interface ClientOptions {
@@ -188,6 +208,8 @@ export interface ClientOptions {
188
208
  *
189
209
  * Note that request timeouts are retried by default, so in a worst-case scenario you may wait
190
210
  * much longer than this timeout before the promise succeeds or fails.
211
+ *
212
+ * @unit milliseconds
191
213
  */
192
214
  timeout?: number | undefined;
193
215
 
@@ -275,6 +297,7 @@ export class Orb extends Core.APIClient {
275
297
 
276
298
  super({
277
299
  baseURL: options.baseURL!,
300
+ baseURLOverridden: baseURL ? baseURL !== 'https://api.withorb.com/v1' : false,
278
301
  timeout: options.timeout ?? 60000 /* 1 minute */,
279
302
  httpAgent: options.httpAgent,
280
303
  maxRetries: options.maxRetries,
@@ -306,6 +329,13 @@ export class Orb extends Core.APIClient {
306
329
  dimensionalPriceGroups: API.DimensionalPriceGroups = new API.DimensionalPriceGroups(this);
307
330
  subscriptionChanges: API.SubscriptionChanges = new API.SubscriptionChanges(this);
308
331
 
332
+ /**
333
+ * Check whether the base URL is set to its default.
334
+ */
335
+ #baseURLOverridden(): boolean {
336
+ return this.baseURL !== 'https://api.withorb.com/v1';
337
+ }
338
+
309
339
  protected override defaultQuery(): Core.DefaultQuery | undefined {
310
340
  return this._options.defaultQuery;
311
341
  }
@@ -363,13 +393,11 @@ Orb.Beta = Beta;
363
393
  Orb.Coupons = Coupons;
364
394
  Orb.CouponsPage = CouponsPage;
365
395
  Orb.CreditNotes = CreditNotes;
366
- Orb.CreditNotesPage = CreditNotesPage;
367
396
  Orb.Customers = Customers;
368
397
  Orb.CustomersPage = CustomersPage;
369
398
  Orb.Events = Events;
370
399
  Orb.InvoiceLineItems = InvoiceLineItems;
371
400
  Orb.Invoices = Invoices;
372
- Orb.InvoicesPage = InvoicesPage;
373
401
  Orb.Items = Items;
374
402
  Orb.ItemsPage = ItemsPage;
375
403
  Orb.Metrics = Metrics;
@@ -377,7 +405,6 @@ Orb.BillableMetricsPage = BillableMetricsPage;
377
405
  Orb.Plans = Plans;
378
406
  Orb.PlansPage = PlansPage;
379
407
  Orb.Prices = Prices;
380
- Orb.PricesPage = PricesPage;
381
408
  Orb.SubscriptionsPage = SubscriptionsPage;
382
409
  Orb.SubscriptionFetchScheduleResponsesPage = SubscriptionFetchScheduleResponsesPage;
383
410
  Orb.Alerts = Alerts;
@@ -410,15 +437,21 @@ export declare namespace Orb {
410
437
 
411
438
  export {
412
439
  CreditNotes as CreditNotes,
413
- type CreditNote as CreditNote,
414
- CreditNotesPage as CreditNotesPage,
415
440
  type CreditNoteCreateParams as CreditNoteCreateParams,
416
441
  type CreditNoteListParams as CreditNoteListParams,
417
442
  };
418
443
 
419
444
  export {
420
445
  Customers as Customers,
446
+ type AccountingProviderConfig as AccountingProviderConfig,
447
+ type AddressInput as AddressInput,
421
448
  type Customer as Customer,
449
+ type CustomerHierarchyConfig as CustomerHierarchyConfig,
450
+ type NewAccountingSyncConfiguration as NewAccountingSyncConfiguration,
451
+ type NewAvalaraTaxConfiguration as NewAvalaraTaxConfiguration,
452
+ type NewReportingConfiguration as NewReportingConfiguration,
453
+ type NewSphereConfiguration as NewSphereConfiguration,
454
+ type NewTaxJarConfiguration as NewTaxJarConfiguration,
422
455
  CustomersPage as CustomersPage,
423
456
  type CustomerCreateParams as CustomerCreateParams,
424
457
  type CustomerUpdateParams as CustomerUpdateParams,
@@ -445,9 +478,7 @@ export declare namespace Orb {
445
478
 
446
479
  export {
447
480
  Invoices as Invoices,
448
- type Invoice as Invoice,
449
481
  type InvoiceFetchUpcomingResponse as InvoiceFetchUpcomingResponse,
450
- InvoicesPage as InvoicesPage,
451
482
  type InvoiceCreateParams as InvoiceCreateParams,
452
483
  type InvoiceUpdateParams as InvoiceUpdateParams,
453
484
  type InvoiceListParams as InvoiceListParams,
@@ -486,34 +517,52 @@ export declare namespace Orb {
486
517
  export {
487
518
  Prices as Prices,
488
519
  type EvaluatePriceGroup as EvaluatePriceGroup,
489
- type Price as Price,
490
520
  type PriceEvaluateResponse as PriceEvaluateResponse,
491
521
  type PriceEvaluateMultipleResponse as PriceEvaluateMultipleResponse,
492
- PricesPage as PricesPage,
522
+ type PriceEvaluatePreviewEventsResponse as PriceEvaluatePreviewEventsResponse,
493
523
  type PriceCreateParams as PriceCreateParams,
494
524
  type PriceUpdateParams as PriceUpdateParams,
495
525
  type PriceListParams as PriceListParams,
496
526
  type PriceEvaluateParams as PriceEvaluateParams,
497
527
  type PriceEvaluateMultipleParams as PriceEvaluateMultipleParams,
528
+ type PriceEvaluatePreviewEventsParams as PriceEvaluatePreviewEventsParams,
498
529
  };
499
530
 
500
531
  export {
501
532
  type Subscriptions as Subscriptions,
533
+ type DiscountOverride as DiscountOverride,
534
+ type NewSubscriptionBPSPrice as NewSubscriptionBPSPrice,
535
+ type NewSubscriptionBulkBPSPrice as NewSubscriptionBulkBPSPrice,
536
+ type NewSubscriptionBulkPrice as NewSubscriptionBulkPrice,
537
+ type NewSubscriptionBulkWithProrationPrice as NewSubscriptionBulkWithProrationPrice,
538
+ type NewSubscriptionCumulativeGroupedBulkPrice as NewSubscriptionCumulativeGroupedBulkPrice,
539
+ type NewSubscriptionGroupedAllocationPrice as NewSubscriptionGroupedAllocationPrice,
540
+ type NewSubscriptionGroupedTieredPackagePrice as NewSubscriptionGroupedTieredPackagePrice,
541
+ type NewSubscriptionGroupedTieredPrice as NewSubscriptionGroupedTieredPrice,
542
+ type NewSubscriptionGroupedWithMeteredMinimumPrice as NewSubscriptionGroupedWithMeteredMinimumPrice,
543
+ type NewSubscriptionGroupedWithProratedMinimumPrice as NewSubscriptionGroupedWithProratedMinimumPrice,
544
+ type NewSubscriptionMatrixPrice as NewSubscriptionMatrixPrice,
545
+ type NewSubscriptionMatrixWithAllocationPrice as NewSubscriptionMatrixWithAllocationPrice,
546
+ type NewSubscriptionMatrixWithDisplayNamePrice as NewSubscriptionMatrixWithDisplayNamePrice,
547
+ type NewSubscriptionMaxGroupTieredPackagePrice as NewSubscriptionMaxGroupTieredPackagePrice,
548
+ type NewSubscriptionPackagePrice as NewSubscriptionPackagePrice,
549
+ type NewSubscriptionPackageWithAllocationPrice as NewSubscriptionPackageWithAllocationPrice,
550
+ type NewSubscriptionScalableMatrixWithTieredPricingPrice as NewSubscriptionScalableMatrixWithTieredPricingPrice,
551
+ type NewSubscriptionScalableMatrixWithUnitPricingPrice as NewSubscriptionScalableMatrixWithUnitPricingPrice,
552
+ type NewSubscriptionThresholdTotalAmountPrice as NewSubscriptionThresholdTotalAmountPrice,
553
+ type NewSubscriptionTierWithProrationPrice as NewSubscriptionTierWithProrationPrice,
554
+ type NewSubscriptionTieredBPSPrice as NewSubscriptionTieredBPSPrice,
555
+ type NewSubscriptionTieredPackagePrice as NewSubscriptionTieredPackagePrice,
556
+ type NewSubscriptionTieredPackageWithMinimumPrice as NewSubscriptionTieredPackageWithMinimumPrice,
557
+ type NewSubscriptionTieredPrice as NewSubscriptionTieredPrice,
558
+ type NewSubscriptionTieredWithMinimumPrice as NewSubscriptionTieredWithMinimumPrice,
559
+ type NewSubscriptionUnitPrice as NewSubscriptionUnitPrice,
560
+ type NewSubscriptionUnitWithPercentPrice as NewSubscriptionUnitWithPercentPrice,
561
+ type NewSubscriptionUnitWithProrationPrice as NewSubscriptionUnitWithProrationPrice,
502
562
  type Subscription as Subscription,
503
563
  type SubscriptionUsage as SubscriptionUsage,
504
- type SubscriptionCreateResponse as SubscriptionCreateResponse,
505
- type SubscriptionCancelResponse as SubscriptionCancelResponse,
506
564
  type SubscriptionFetchCostsResponse as SubscriptionFetchCostsResponse,
507
565
  type SubscriptionFetchScheduleResponse as SubscriptionFetchScheduleResponse,
508
- type SubscriptionPriceIntervalsResponse as SubscriptionPriceIntervalsResponse,
509
- type SubscriptionRedeemCouponResponse as SubscriptionRedeemCouponResponse,
510
- type SubscriptionSchedulePlanChangeResponse as SubscriptionSchedulePlanChangeResponse,
511
- type SubscriptionTriggerPhaseResponse as SubscriptionTriggerPhaseResponse,
512
- type SubscriptionUnscheduleCancellationResponse as SubscriptionUnscheduleCancellationResponse,
513
- type SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse as SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse,
514
- type SubscriptionUnschedulePendingPlanChangesResponse as SubscriptionUnschedulePendingPlanChangesResponse,
515
- type SubscriptionUpdateFixedFeeQuantityResponse as SubscriptionUpdateFixedFeeQuantityResponse,
516
- type SubscriptionUpdateTrialResponse as SubscriptionUpdateTrialResponse,
517
566
  SubscriptionsPage as SubscriptionsPage,
518
567
  SubscriptionFetchScheduleResponsesPage as SubscriptionFetchScheduleResponsesPage,
519
568
  type SubscriptionCreateParams as SubscriptionCreateParams,
@@ -535,6 +584,7 @@ export declare namespace Orb {
535
584
  export {
536
585
  Alerts as Alerts,
537
586
  type Alert as Alert,
587
+ type Threshold as Threshold,
538
588
  AlertsPage as AlertsPage,
539
589
  type AlertUpdateParams as AlertUpdateParams,
540
590
  type AlertListParams as AlertListParams,
@@ -555,20 +605,157 @@ export declare namespace Orb {
555
605
 
556
606
  export {
557
607
  SubscriptionChanges as SubscriptionChanges,
608
+ type MutatedSubscription as MutatedSubscription,
558
609
  type SubscriptionChangeRetrieveResponse as SubscriptionChangeRetrieveResponse,
559
610
  type SubscriptionChangeApplyResponse as SubscriptionChangeApplyResponse,
560
611
  type SubscriptionChangeCancelResponse as SubscriptionChangeCancelResponse,
561
612
  type SubscriptionChangeApplyParams as SubscriptionChangeApplyParams,
562
613
  };
563
614
 
615
+ export type Address = API.Address;
616
+ export type AdjustmentInterval = API.AdjustmentInterval;
617
+ export type AggregatedCost = API.AggregatedCost;
618
+ export type Allocation = API.Allocation;
564
619
  export type AmountDiscount = API.AmountDiscount;
620
+ export type AmountDiscountInterval = API.AmountDiscountInterval;
621
+ export type BillableMetricTiny = API.BillableMetricTiny;
622
+ export type BillingCycleAnchorConfiguration = API.BillingCycleAnchorConfiguration;
623
+ export type BillingCycleConfiguration = API.BillingCycleConfiguration;
565
624
  export type BillingCycleRelativeDate = API.BillingCycleRelativeDate;
625
+ export type BPSConfig = API.BPSConfig;
626
+ export type BPSTier = API.BPSTier;
627
+ export type BulkBPSConfig = API.BulkBPSConfig;
628
+ export type BulkBPSTier = API.BulkBPSTier;
629
+ export type BulkConfig = API.BulkConfig;
630
+ export type BulkTier = API.BulkTier;
631
+ export type ChangedSubscriptionResources = API.ChangedSubscriptionResources;
632
+ export type ConversionRateTier = API.ConversionRateTier;
633
+ export type ConversionRateTieredConfig = API.ConversionRateTieredConfig;
634
+ export type ConversionRateUnitConfig = API.ConversionRateUnitConfig;
635
+ export type CouponRedemption = API.CouponRedemption;
636
+ export type CreditNote = API.CreditNote;
637
+ export type CreditNoteTiny = API.CreditNoteTiny;
638
+ export type CustomExpiration = API.CustomExpiration;
639
+ export type CustomerMinified = API.CustomerMinified;
640
+ export type CustomerTaxID = API.CustomerTaxID;
641
+ export type DimensionalPriceConfiguration = API.DimensionalPriceConfiguration;
566
642
  export type Discount = API.Discount;
643
+ export type FixedFeeQuantityScheduleEntry = API.FixedFeeQuantityScheduleEntry;
644
+ export type FixedFeeQuantityTransition = API.FixedFeeQuantityTransition;
645
+ export type Invoice = API.Invoice;
567
646
  export type InvoiceLevelDiscount = API.InvoiceLevelDiscount;
647
+ export type InvoiceTiny = API.InvoiceTiny;
648
+ export type ItemSlim = API.ItemSlim;
649
+ export type MatrixConfig = API.MatrixConfig;
650
+ export type MatrixSubLineItem = API.MatrixSubLineItem;
651
+ export type MatrixValue = API.MatrixValue;
652
+ export type MatrixWithAllocationConfig = API.MatrixWithAllocationConfig;
653
+ export type Maximum = API.Maximum;
654
+ export type MaximumInterval = API.MaximumInterval;
655
+ export type Minimum = API.Minimum;
656
+ export type MinimumInterval = API.MinimumInterval;
657
+ export type MonetaryAmountDiscountAdjustment = API.MonetaryAmountDiscountAdjustment;
658
+ export type MonetaryMaximumAdjustment = API.MonetaryMaximumAdjustment;
659
+ export type MonetaryMinimumAdjustment = API.MonetaryMinimumAdjustment;
660
+ export type MonetaryPercentageDiscountAdjustment = API.MonetaryPercentageDiscountAdjustment;
661
+ export type MonetaryUsageDiscountAdjustment = API.MonetaryUsageDiscountAdjustment;
662
+ export type NewAllocationPrice = API.NewAllocationPrice;
663
+ export type NewAmountDiscount = API.NewAmountDiscount;
664
+ export type NewBillingCycleConfiguration = API.NewBillingCycleConfiguration;
665
+ export type NewDimensionalPriceConfiguration = API.NewDimensionalPriceConfiguration;
666
+ export type NewFloatingBPSPrice = API.NewFloatingBPSPrice;
667
+ export type NewFloatingBulkBPSPrice = API.NewFloatingBulkBPSPrice;
668
+ export type NewFloatingBulkPrice = API.NewFloatingBulkPrice;
669
+ export type NewFloatingBulkWithProrationPrice = API.NewFloatingBulkWithProrationPrice;
670
+ export type NewFloatingCumulativeGroupedBulkPrice = API.NewFloatingCumulativeGroupedBulkPrice;
671
+ export type NewFloatingGroupedAllocationPrice = API.NewFloatingGroupedAllocationPrice;
672
+ export type NewFloatingGroupedTieredPackagePrice = API.NewFloatingGroupedTieredPackagePrice;
673
+ export type NewFloatingGroupedTieredPrice = API.NewFloatingGroupedTieredPrice;
674
+ export type NewFloatingGroupedWithMeteredMinimumPrice = API.NewFloatingGroupedWithMeteredMinimumPrice;
675
+ export type NewFloatingGroupedWithProratedMinimumPrice = API.NewFloatingGroupedWithProratedMinimumPrice;
676
+ export type NewFloatingMatrixPrice = API.NewFloatingMatrixPrice;
677
+ export type NewFloatingMatrixWithAllocationPrice = API.NewFloatingMatrixWithAllocationPrice;
678
+ export type NewFloatingMatrixWithDisplayNamePrice = API.NewFloatingMatrixWithDisplayNamePrice;
679
+ export type NewFloatingMaxGroupTieredPackagePrice = API.NewFloatingMaxGroupTieredPackagePrice;
680
+ export type NewFloatingPackagePrice = API.NewFloatingPackagePrice;
681
+ export type NewFloatingPackageWithAllocationPrice = API.NewFloatingPackageWithAllocationPrice;
682
+ export type NewFloatingScalableMatrixWithTieredPricingPrice =
683
+ API.NewFloatingScalableMatrixWithTieredPricingPrice;
684
+ export type NewFloatingScalableMatrixWithUnitPricingPrice =
685
+ API.NewFloatingScalableMatrixWithUnitPricingPrice;
686
+ export type NewFloatingThresholdTotalAmountPrice = API.NewFloatingThresholdTotalAmountPrice;
687
+ export type NewFloatingTieredBPSPrice = API.NewFloatingTieredBPSPrice;
688
+ export type NewFloatingTieredPackagePrice = API.NewFloatingTieredPackagePrice;
689
+ export type NewFloatingTieredPackageWithMinimumPrice = API.NewFloatingTieredPackageWithMinimumPrice;
690
+ export type NewFloatingTieredPrice = API.NewFloatingTieredPrice;
691
+ export type NewFloatingTieredWithMinimumPrice = API.NewFloatingTieredWithMinimumPrice;
692
+ export type NewFloatingTieredWithProrationPrice = API.NewFloatingTieredWithProrationPrice;
693
+ export type NewFloatingUnitPrice = API.NewFloatingUnitPrice;
694
+ export type NewFloatingUnitWithPercentPrice = API.NewFloatingUnitWithPercentPrice;
695
+ export type NewFloatingUnitWithProrationPrice = API.NewFloatingUnitWithProrationPrice;
696
+ export type NewMaximum = API.NewMaximum;
697
+ export type NewMinimum = API.NewMinimum;
698
+ export type NewPercentageDiscount = API.NewPercentageDiscount;
699
+ export type NewPlanBPSPrice = API.NewPlanBPSPrice;
700
+ export type NewPlanBulkBPSPrice = API.NewPlanBulkBPSPrice;
701
+ export type NewPlanBulkPrice = API.NewPlanBulkPrice;
702
+ export type NewPlanBulkWithProrationPrice = API.NewPlanBulkWithProrationPrice;
703
+ export type NewPlanCumulativeGroupedBulkPrice = API.NewPlanCumulativeGroupedBulkPrice;
704
+ export type NewPlanGroupedAllocationPrice = API.NewPlanGroupedAllocationPrice;
705
+ export type NewPlanGroupedTieredPackagePrice = API.NewPlanGroupedTieredPackagePrice;
706
+ export type NewPlanGroupedTieredPrice = API.NewPlanGroupedTieredPrice;
707
+ export type NewPlanGroupedWithMeteredMinimumPrice = API.NewPlanGroupedWithMeteredMinimumPrice;
708
+ export type NewPlanGroupedWithProratedMinimumPrice = API.NewPlanGroupedWithProratedMinimumPrice;
709
+ export type NewPlanMatrixPrice = API.NewPlanMatrixPrice;
710
+ export type NewPlanMatrixWithAllocationPrice = API.NewPlanMatrixWithAllocationPrice;
711
+ export type NewPlanMatrixWithDisplayNamePrice = API.NewPlanMatrixWithDisplayNamePrice;
712
+ export type NewPlanMaxGroupTieredPackagePrice = API.NewPlanMaxGroupTieredPackagePrice;
713
+ export type NewPlanPackagePrice = API.NewPlanPackagePrice;
714
+ export type NewPlanPackageWithAllocationPrice = API.NewPlanPackageWithAllocationPrice;
715
+ export type NewPlanScalableMatrixWithTieredPricingPrice = API.NewPlanScalableMatrixWithTieredPricingPrice;
716
+ export type NewPlanScalableMatrixWithUnitPricingPrice = API.NewPlanScalableMatrixWithUnitPricingPrice;
717
+ export type NewPlanThresholdTotalAmountPrice = API.NewPlanThresholdTotalAmountPrice;
718
+ export type NewPlanTierWithProrationPrice = API.NewPlanTierWithProrationPrice;
719
+ export type NewPlanTieredBPSPrice = API.NewPlanTieredBPSPrice;
720
+ export type NewPlanTieredPackagePrice = API.NewPlanTieredPackagePrice;
721
+ export type NewPlanTieredPackageWithMinimumPrice = API.NewPlanTieredPackageWithMinimumPrice;
722
+ export type NewPlanTieredPrice = API.NewPlanTieredPrice;
723
+ export type NewPlanTieredWithMinimumPrice = API.NewPlanTieredWithMinimumPrice;
724
+ export type NewPlanUnitPrice = API.NewPlanUnitPrice;
725
+ export type NewPlanUnitWithPercentPrice = API.NewPlanUnitWithPercentPrice;
726
+ export type NewPlanUnitWithProrationPrice = API.NewPlanUnitWithProrationPrice;
727
+ export type NewUsageDiscount = API.NewUsageDiscount;
728
+ export type OtherSubLineItem = API.OtherSubLineItem;
729
+ export type PackageConfig = API.PackageConfig;
568
730
  export type PaginationMetadata = API.PaginationMetadata;
731
+ export type PerPriceCost = API.PerPriceCost;
569
732
  export type PercentageDiscount = API.PercentageDiscount;
733
+ export type PercentageDiscountInterval = API.PercentageDiscountInterval;
734
+ export type PlanPhaseAmountDiscountAdjustment = API.PlanPhaseAmountDiscountAdjustment;
735
+ export type PlanPhaseMaximumAdjustment = API.PlanPhaseMaximumAdjustment;
736
+ export type PlanPhaseMinimumAdjustment = API.PlanPhaseMinimumAdjustment;
737
+ export type PlanPhasePercentageDiscountAdjustment = API.PlanPhasePercentageDiscountAdjustment;
738
+ export type PlanPhaseUsageDiscountAdjustment = API.PlanPhaseUsageDiscountAdjustment;
739
+ export type Price = API.Price;
740
+ export type PriceInterval = API.PriceInterval;
741
+ export type SubLineItemGrouping = API.SubLineItemGrouping;
742
+ export type SubLineItemMatrixConfig = API.SubLineItemMatrixConfig;
743
+ export type SubscriptionChangeMinified = API.SubscriptionChangeMinified;
744
+ export type SubscriptionMinified = API.SubscriptionMinified;
745
+ export type SubscriptionTrialInfo = API.SubscriptionTrialInfo;
746
+ export type TaxAmount = API.TaxAmount;
747
+ export type Tier = API.Tier;
748
+ export type TierConfig = API.TierConfig;
749
+ export type TierSubLineItem = API.TierSubLineItem;
750
+ export type TieredBPSConfig = API.TieredBPSConfig;
751
+ export type TieredConfig = API.TieredConfig;
752
+ export type TieredConversionRateConfig = API.TieredConversionRateConfig;
753
+ export type TransformPriceFilter = API.TransformPriceFilter;
570
754
  export type TrialDiscount = API.TrialDiscount;
755
+ export type UnitConfig = API.UnitConfig;
756
+ export type UnitConversionRateConfig = API.UnitConversionRateConfig;
571
757
  export type UsageDiscount = API.UsageDiscount;
758
+ export type UsageDiscountInterval = API.UsageDiscountInterval;
572
759
  }
573
760
 
574
761
  export { toFile, fileFromPath } from './uploads';
package/src/resource.ts CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  import type { Orb } from './index';
4
4
 
5
- export class APIResource {
5
+ export abstract class APIResource {
6
6
  protected _client: Orb;
7
7
 
8
8
  constructor(client: Orb) {