orb-billing 4.32.0 → 4.33.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 (77) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/README.md +2 -2
  3. package/package.json +2 -2
  4. package/resources/customers/customers.d.ts +2 -4
  5. package/resources/customers/customers.d.ts.map +1 -1
  6. package/resources/customers/customers.js +15 -8
  7. package/resources/customers/customers.js.map +1 -1
  8. package/resources/customers/customers.mjs +15 -8
  9. package/resources/customers/customers.mjs.map +1 -1
  10. package/resources/events/volume.d.ts +8 -9
  11. package/resources/events/volume.d.ts.map +1 -1
  12. package/resources/events/volume.js +16 -5
  13. package/resources/events/volume.js.map +1 -1
  14. package/resources/events/volume.mjs +16 -5
  15. package/resources/events/volume.mjs.map +1 -1
  16. package/resources/invoices.d.ts +3 -5
  17. package/resources/invoices.d.ts.map +1 -1
  18. package/resources/invoices.js +14 -8
  19. package/resources/invoices.js.map +1 -1
  20. package/resources/invoices.mjs +14 -8
  21. package/resources/invoices.mjs.map +1 -1
  22. package/resources/items.d.ts +1 -2
  23. package/resources/items.d.ts.map +1 -1
  24. package/resources/items.js +4 -4
  25. package/resources/items.js.map +1 -1
  26. package/resources/items.mjs +4 -4
  27. package/resources/items.mjs.map +1 -1
  28. package/resources/metrics.d.ts +1 -2
  29. package/resources/metrics.d.ts.map +1 -1
  30. package/resources/metrics.js +6 -4
  31. package/resources/metrics.js.map +1 -1
  32. package/resources/metrics.mjs +6 -4
  33. package/resources/metrics.mjs.map +1 -1
  34. package/resources/plans/external-plan-id.d.ts +1 -2
  35. package/resources/plans/external-plan-id.d.ts.map +1 -1
  36. package/resources/plans/external-plan-id.js +7 -5
  37. package/resources/plans/external-plan-id.js.map +1 -1
  38. package/resources/plans/external-plan-id.mjs +7 -5
  39. package/resources/plans/external-plan-id.mjs.map +1 -1
  40. package/resources/plans/plans.d.ts +1 -2
  41. package/resources/plans/plans.d.ts.map +1 -1
  42. package/resources/plans/plans.js +7 -4
  43. package/resources/plans/plans.js.map +1 -1
  44. package/resources/plans/plans.mjs +7 -4
  45. package/resources/plans/plans.mjs.map +1 -1
  46. package/resources/prices/external-price-id.d.ts +1 -2
  47. package/resources/prices/external-price-id.d.ts.map +1 -1
  48. package/resources/prices/external-price-id.js +6 -5
  49. package/resources/prices/external-price-id.js.map +1 -1
  50. package/resources/prices/external-price-id.mjs +6 -5
  51. package/resources/prices/external-price-id.mjs.map +1 -1
  52. package/resources/prices/prices.d.ts +1 -2
  53. package/resources/prices/prices.d.ts.map +1 -1
  54. package/resources/prices/prices.js +6 -4
  55. package/resources/prices/prices.js.map +1 -1
  56. package/resources/prices/prices.mjs +6 -4
  57. package/resources/prices/prices.mjs.map +1 -1
  58. package/resources/subscriptions.d.ts +10 -12
  59. package/resources/subscriptions.d.ts.map +1 -1
  60. package/resources/subscriptions.js +346 -18
  61. package/resources/subscriptions.js.map +1 -1
  62. package/resources/subscriptions.mjs +346 -18
  63. package/resources/subscriptions.mjs.map +1 -1
  64. package/src/resources/customers/customers.ts +2 -20
  65. package/src/resources/events/volume.ts +9 -18
  66. package/src/resources/invoices.ts +3 -20
  67. package/src/resources/items.ts +1 -10
  68. package/src/resources/metrics.ts +1 -10
  69. package/src/resources/plans/external-plan-id.ts +1 -11
  70. package/src/resources/plans/plans.ts +1 -10
  71. package/src/resources/prices/external-price-id.ts +1 -11
  72. package/src/resources/prices/prices.ts +1 -10
  73. package/src/resources/subscriptions.ts +10 -43
  74. package/src/version.ts +1 -1
  75. package/version.d.ts +1 -1
  76. package/version.js +1 -1
  77. package/version.mjs +1 -1
@@ -32,16 +32,7 @@ export class Prices extends APIResource {
32
32
  * pass null for the metadata value, it will clear any existing metadata for that
33
33
  * price.
34
34
  */
35
- update(priceId: string, body?: PriceUpdateParams, options?: Core.RequestOptions): Core.APIPromise<Price>;
36
- update(priceId: string, options?: Core.RequestOptions): Core.APIPromise<Price>;
37
- update(
38
- priceId: string,
39
- body: PriceUpdateParams | Core.RequestOptions = {},
40
- options?: Core.RequestOptions,
41
- ): Core.APIPromise<Price> {
42
- if (isRequestOptions(body)) {
43
- return this.update(priceId, {}, body);
44
- }
35
+ update(priceId: string, body: PriceUpdateParams, options?: Core.RequestOptions): Core.APIPromise<Price> {
45
36
  return this._client.put(`/prices/${priceId}`, { body, ...options });
46
37
  }
47
38
 
@@ -47,8 +47,9 @@ export class Subscriptions extends APIResource {
47
47
  * subscription being created. This is useful when a customer has prices that
48
48
  * differ from the default prices for a specific plan.
49
49
  *
50
- * :::info This feature is only available for accounts that have migrated off of
51
- * legacy subscription overrides. :::
50
+ * :::info This feature is only available for accounts that have migrated to
51
+ * Subscription Overrides Version 2. You can find your Subscription Overrides
52
+ * Version at the bottom of your [Plans page](https://app.withorb.com/plans) :::
52
53
  *
53
54
  * ### Adding Prices
54
55
  *
@@ -266,15 +267,7 @@ export class Subscriptions extends APIResource {
266
267
  * subscription. E.g. pass in `10.00` to issue an invoice when usage amounts hit
267
268
  * $10.00 for a subscription that invoices in USD.
268
269
  */
269
- create(body?: SubscriptionCreateParams, options?: Core.RequestOptions): Core.APIPromise<Subscription>;
270
- create(options?: Core.RequestOptions): Core.APIPromise<Subscription>;
271
- create(
272
- body: SubscriptionCreateParams | Core.RequestOptions = {},
273
- options?: Core.RequestOptions,
274
- ): Core.APIPromise<Subscription> {
275
- if (isRequestOptions(body)) {
276
- return this.create({}, body);
277
- }
270
+ create(body: SubscriptionCreateParams, options?: Core.RequestOptions): Core.APIPromise<Subscription> {
278
271
  return this._client.post('/subscriptions', { body, ...options });
279
272
  }
280
273
 
@@ -285,18 +278,9 @@ export class Subscriptions extends APIResource {
285
278
  */
286
279
  update(
287
280
  subscriptionId: string,
288
- body?: SubscriptionUpdateParams,
289
- options?: Core.RequestOptions,
290
- ): Core.APIPromise<Subscription>;
291
- update(subscriptionId: string, options?: Core.RequestOptions): Core.APIPromise<Subscription>;
292
- update(
293
- subscriptionId: string,
294
- body: SubscriptionUpdateParams | Core.RequestOptions = {},
281
+ body: SubscriptionUpdateParams,
295
282
  options?: Core.RequestOptions,
296
283
  ): Core.APIPromise<Subscription> {
297
- if (isRequestOptions(body)) {
298
- return this.update(subscriptionId, {}, body);
299
- }
300
284
  return this._client.put(`/subscriptions/${subscriptionId}`, { body, ...options });
301
285
  }
302
286
 
@@ -756,18 +740,9 @@ export class Subscriptions extends APIResource {
756
740
  */
757
741
  priceIntervals(
758
742
  subscriptionId: string,
759
- body?: SubscriptionPriceIntervalsParams,
760
- options?: Core.RequestOptions,
761
- ): Core.APIPromise<Subscription>;
762
- priceIntervals(subscriptionId: string, options?: Core.RequestOptions): Core.APIPromise<Subscription>;
763
- priceIntervals(
764
- subscriptionId: string,
765
- body: SubscriptionPriceIntervalsParams | Core.RequestOptions = {},
743
+ body: SubscriptionPriceIntervalsParams,
766
744
  options?: Core.RequestOptions,
767
745
  ): Core.APIPromise<Subscription> {
768
- if (isRequestOptions(body)) {
769
- return this.priceIntervals(subscriptionId, {}, body);
770
- }
771
746
  return this._client.post(`/subscriptions/${subscriptionId}/price_intervals`, { body, ...options });
772
747
  }
773
748
 
@@ -816,8 +791,9 @@ export class Subscriptions extends APIResource {
816
791
  * subscription when you schedule the plan change. This is useful when a customer
817
792
  * has prices that differ from the default prices for a specific plan.
818
793
  *
819
- * :::info This feature is only available for accounts that have migrated off of
820
- * legacy subscription overrides. :::
794
+ * :::info This feature is only available for accounts that have migrated to
795
+ * Subscription Overrides Version 2. You can find your Subscription Overrides
796
+ * Version at the bottom of your [Plans page](https://app.withorb.com/plans) :::
821
797
  *
822
798
  * ### Adding Prices
823
799
  *
@@ -966,18 +942,9 @@ export class Subscriptions extends APIResource {
966
942
  */
967
943
  triggerPhase(
968
944
  subscriptionId: string,
969
- body?: SubscriptionTriggerPhaseParams,
970
- options?: Core.RequestOptions,
971
- ): Core.APIPromise<Subscription>;
972
- triggerPhase(subscriptionId: string, options?: Core.RequestOptions): Core.APIPromise<Subscription>;
973
- triggerPhase(
974
- subscriptionId: string,
975
- body: SubscriptionTriggerPhaseParams | Core.RequestOptions = {},
945
+ body: SubscriptionTriggerPhaseParams,
976
946
  options?: Core.RequestOptions,
977
947
  ): Core.APIPromise<Subscription> {
978
- if (isRequestOptions(body)) {
979
- return this.triggerPhase(subscriptionId, {}, body);
980
- }
981
948
  return this._client.post(`/subscriptions/${subscriptionId}/trigger_phase`, { body, ...options });
982
949
  }
983
950
 
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '4.32.0'; // x-release-please-version
1
+ export const VERSION = '4.33.0'; // x-release-please-version
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "4.32.0";
1
+ export declare const VERSION = "4.33.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '4.32.0'; // x-release-please-version
4
+ exports.VERSION = '4.33.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '4.32.0'; // x-release-please-version
1
+ export const VERSION = '4.33.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map