orb-billing 4.32.0 → 4.47.1

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 (252) hide show
  1. package/CHANGELOG.md +184 -0
  2. package/LICENSE +1 -1
  3. package/README.md +12 -3
  4. package/core.d.ts +4 -5
  5. package/core.d.ts.map +1 -1
  6. package/core.js +16 -11
  7. package/core.js.map +1 -1
  8. package/core.mjs +16 -11
  9. package/core.mjs.map +1 -1
  10. package/error.d.ts +30 -36
  11. package/error.d.ts.map +1 -1
  12. package/error.js +24 -43
  13. package/error.js.map +1 -1
  14. package/error.mjs +24 -43
  15. package/error.mjs.map +1 -1
  16. package/index.d.mts +43 -109
  17. package/index.d.ts +43 -109
  18. package/index.d.ts.map +1 -1
  19. package/index.js +71 -33
  20. package/index.js.map +1 -1
  21. package/index.mjs +43 -32
  22. package/index.mjs.map +1 -1
  23. package/package.json +2 -2
  24. package/resources/alerts.d.ts +58 -19
  25. package/resources/alerts.d.ts.map +1 -1
  26. package/resources/alerts.js +19 -37
  27. package/resources/alerts.js.map +1 -1
  28. package/resources/alerts.mjs +19 -14
  29. package/resources/alerts.mjs.map +1 -1
  30. package/resources/coupons/coupons.d.ts +3 -7
  31. package/resources/coupons/coupons.d.ts.map +1 -1
  32. package/resources/coupons/coupons.js +3 -5
  33. package/resources/coupons/coupons.js.map +1 -1
  34. package/resources/coupons/coupons.mjs +3 -5
  35. package/resources/coupons/coupons.mjs.map +1 -1
  36. package/resources/coupons/index.d.ts +2 -2
  37. package/resources/coupons/index.d.ts.map +1 -1
  38. package/resources/coupons/index.js.map +1 -1
  39. package/resources/coupons/index.mjs.map +1 -1
  40. package/resources/coupons/subscriptions.d.ts +1 -2
  41. package/resources/coupons/subscriptions.d.ts.map +1 -1
  42. package/resources/coupons/subscriptions.js +0 -2
  43. package/resources/coupons/subscriptions.js.map +1 -1
  44. package/resources/coupons/subscriptions.mjs +0 -2
  45. package/resources/coupons/subscriptions.mjs.map +1 -1
  46. package/resources/credit-notes.d.ts +29 -4
  47. package/resources/credit-notes.d.ts.map +1 -1
  48. package/resources/credit-notes.js +8 -27
  49. package/resources/credit-notes.js.map +1 -1
  50. package/resources/credit-notes.mjs +8 -4
  51. package/resources/credit-notes.mjs.map +1 -1
  52. package/resources/customers/balance-transactions.d.ts +1 -6
  53. package/resources/customers/balance-transactions.d.ts.map +1 -1
  54. package/resources/customers/balance-transactions.js +1 -27
  55. package/resources/customers/balance-transactions.js.map +1 -1
  56. package/resources/customers/balance-transactions.mjs +1 -4
  57. package/resources/customers/balance-transactions.mjs.map +1 -1
  58. package/resources/customers/costs.d.ts +1 -5
  59. package/resources/customers/costs.d.ts.map +1 -1
  60. package/resources/customers/costs.js +0 -2
  61. package/resources/customers/costs.js.map +1 -1
  62. package/resources/customers/costs.mjs +0 -2
  63. package/resources/customers/costs.mjs.map +1 -1
  64. package/resources/customers/credits/credits.d.ts +15 -31
  65. package/resources/customers/credits/credits.d.ts.map +1 -1
  66. package/resources/customers/credits/credits.js +10 -11
  67. package/resources/customers/credits/credits.js.map +1 -1
  68. package/resources/customers/credits/credits.mjs +10 -11
  69. package/resources/customers/credits/credits.mjs.map +1 -1
  70. package/resources/customers/credits/index.d.ts +3 -3
  71. package/resources/customers/credits/index.d.ts.map +1 -1
  72. package/resources/customers/credits/index.js.map +1 -1
  73. package/resources/customers/credits/index.mjs.map +1 -1
  74. package/resources/customers/credits/ledger.d.ts +15 -23
  75. package/resources/customers/credits/ledger.d.ts.map +1 -1
  76. package/resources/customers/credits/ledger.js +12 -36
  77. package/resources/customers/credits/ledger.js.map +1 -1
  78. package/resources/customers/credits/ledger.mjs +12 -13
  79. package/resources/customers/credits/ledger.mjs.map +1 -1
  80. package/resources/customers/credits/top-ups.d.ts +1 -11
  81. package/resources/customers/credits/top-ups.d.ts.map +1 -1
  82. package/resources/customers/credits/top-ups.js +2 -28
  83. package/resources/customers/credits/top-ups.js.map +1 -1
  84. package/resources/customers/credits/top-ups.mjs +2 -5
  85. package/resources/customers/credits/top-ups.mjs.map +1 -1
  86. package/resources/customers/customers.d.ts +9 -29
  87. package/resources/customers/customers.d.ts.map +1 -1
  88. package/resources/customers/customers.js +25 -18
  89. package/resources/customers/customers.js.map +1 -1
  90. package/resources/customers/customers.mjs +25 -18
  91. package/resources/customers/customers.mjs.map +1 -1
  92. package/resources/customers/index.d.ts +4 -4
  93. package/resources/customers/index.d.ts.map +1 -1
  94. package/resources/customers/index.js.map +1 -1
  95. package/resources/customers/index.mjs.map +1 -1
  96. package/resources/dimensional-price-groups/dimensional-price-groups.d.ts +90 -0
  97. package/resources/dimensional-price-groups/dimensional-price-groups.d.ts.map +1 -0
  98. package/resources/dimensional-price-groups/dimensional-price-groups.js +73 -0
  99. package/resources/dimensional-price-groups/dimensional-price-groups.js.map +1 -0
  100. package/resources/dimensional-price-groups/dimensional-price-groups.mjs +45 -0
  101. package/resources/dimensional-price-groups/dimensional-price-groups.mjs.map +1 -0
  102. package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.ts +10 -0
  103. package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.ts.map +1 -0
  104. package/resources/dimensional-price-groups/external-dimensional-price-group-id.js +15 -0
  105. package/resources/dimensional-price-groups/external-dimensional-price-group-id.js.map +1 -0
  106. package/resources/dimensional-price-groups/external-dimensional-price-group-id.mjs +11 -0
  107. package/resources/dimensional-price-groups/external-dimensional-price-group-id.mjs.map +1 -0
  108. package/resources/dimensional-price-groups/index.d.ts +3 -0
  109. package/resources/dimensional-price-groups/index.d.ts.map +1 -0
  110. package/resources/dimensional-price-groups/index.js +9 -0
  111. package/resources/dimensional-price-groups/index.js.map +1 -0
  112. package/resources/dimensional-price-groups/index.mjs +4 -0
  113. package/resources/dimensional-price-groups/index.mjs.map +1 -0
  114. package/resources/events/backfills.d.ts +5 -11
  115. package/resources/events/backfills.d.ts.map +1 -1
  116. package/resources/events/backfills.js +5 -29
  117. package/resources/events/backfills.js.map +1 -1
  118. package/resources/events/backfills.mjs +5 -6
  119. package/resources/events/backfills.mjs.map +1 -1
  120. package/resources/events/events.d.ts +7 -22
  121. package/resources/events/events.d.ts.map +1 -1
  122. package/resources/events/events.js +7 -7
  123. package/resources/events/events.js.map +1 -1
  124. package/resources/events/events.mjs +7 -7
  125. package/resources/events/events.mjs.map +1 -1
  126. package/resources/events/index.d.ts +3 -3
  127. package/resources/events/index.d.ts.map +1 -1
  128. package/resources/events/index.js.map +1 -1
  129. package/resources/events/index.mjs.map +1 -1
  130. package/resources/events/volume.d.ts +9 -12
  131. package/resources/events/volume.d.ts.map +1 -1
  132. package/resources/events/volume.js +16 -7
  133. package/resources/events/volume.js.map +1 -1
  134. package/resources/events/volume.mjs +16 -7
  135. package/resources/events/volume.mjs.map +1 -1
  136. package/resources/index.d.ts +14 -13
  137. package/resources/index.d.ts.map +1 -1
  138. package/resources/index.js +10 -7
  139. package/resources/index.js.map +1 -1
  140. package/resources/index.mjs +8 -7
  141. package/resources/index.mjs.map +1 -1
  142. package/resources/invoice-line-items.d.ts +1 -3
  143. package/resources/invoice-line-items.d.ts.map +1 -1
  144. package/resources/invoice-line-items.js +0 -2
  145. package/resources/invoice-line-items.js.map +1 -1
  146. package/resources/invoice-line-items.mjs +0 -2
  147. package/resources/invoice-line-items.mjs.map +1 -1
  148. package/resources/invoices.d.ts +81 -18
  149. package/resources/invoices.d.ts.map +1 -1
  150. package/resources/invoices.js +22 -35
  151. package/resources/invoices.js.map +1 -1
  152. package/resources/invoices.mjs +22 -12
  153. package/resources/invoices.mjs.map +1 -1
  154. package/resources/items.d.ts +2 -8
  155. package/resources/items.d.ts.map +1 -1
  156. package/resources/items.js +5 -31
  157. package/resources/items.js.map +1 -1
  158. package/resources/items.mjs +5 -8
  159. package/resources/items.mjs.map +1 -1
  160. package/resources/metrics.d.ts +2 -8
  161. package/resources/metrics.d.ts.map +1 -1
  162. package/resources/metrics.js +7 -31
  163. package/resources/metrics.js.map +1 -1
  164. package/resources/metrics.mjs +7 -8
  165. package/resources/metrics.mjs.map +1 -1
  166. package/resources/plans/external-plan-id.d.ts +2 -4
  167. package/resources/plans/external-plan-id.d.ts.map +1 -1
  168. package/resources/plans/external-plan-id.js +7 -7
  169. package/resources/plans/external-plan-id.js.map +1 -1
  170. package/resources/plans/external-plan-id.mjs +7 -7
  171. package/resources/plans/external-plan-id.mjs.map +1 -1
  172. package/resources/plans/index.d.ts +2 -2
  173. package/resources/plans/index.d.ts.map +1 -1
  174. package/resources/plans/index.js.map +1 -1
  175. package/resources/plans/index.mjs +1 -1
  176. package/resources/plans/index.mjs.map +1 -1
  177. package/resources/plans/plans.d.ts +332 -11
  178. package/resources/plans/plans.d.ts.map +1 -1
  179. package/resources/plans/plans.js +10 -9
  180. package/resources/plans/plans.js.map +1 -1
  181. package/resources/plans/plans.mjs +10 -9
  182. package/resources/plans/plans.mjs.map +1 -1
  183. package/resources/prices/external-price-id.d.ts +2 -4
  184. package/resources/prices/external-price-id.d.ts.map +1 -1
  185. package/resources/prices/external-price-id.js +6 -7
  186. package/resources/prices/external-price-id.js.map +1 -1
  187. package/resources/prices/external-price-id.mjs +6 -7
  188. package/resources/prices/external-price-id.mjs.map +1 -1
  189. package/resources/prices/index.d.ts +2 -2
  190. package/resources/prices/index.d.ts.map +1 -1
  191. package/resources/prices/index.js +3 -3
  192. package/resources/prices/index.js.map +1 -1
  193. package/resources/prices/index.mjs +1 -1
  194. package/resources/prices/index.mjs.map +1 -1
  195. package/resources/prices/prices.d.ts +340 -15
  196. package/resources/prices/prices.d.ts.map +1 -1
  197. package/resources/prices/prices.js +9 -9
  198. package/resources/prices/prices.js.map +1 -1
  199. package/resources/prices/prices.mjs +9 -9
  200. package/resources/prices/prices.mjs.map +1 -1
  201. package/resources/subscriptions.d.ts +7636 -200
  202. package/resources/subscriptions.d.ts.map +1 -1
  203. package/resources/subscriptions.js +348 -47
  204. package/resources/subscriptions.js.map +1 -1
  205. package/resources/subscriptions.mjs +348 -24
  206. package/resources/subscriptions.mjs.map +1 -1
  207. package/resources/top-level.d.ts +1 -2
  208. package/resources/top-level.d.ts.map +1 -1
  209. package/resources/top-level.js +0 -2
  210. package/resources/top-level.js.map +1 -1
  211. package/resources/top-level.mjs +0 -2
  212. package/resources/top-level.mjs.map +1 -1
  213. package/src/core.ts +23 -19
  214. package/src/error.ts +82 -125
  215. package/src/index.ts +334 -130
  216. package/src/resources/alerts.ts +117 -24
  217. package/src/resources/coupons/coupons.ts +13 -8
  218. package/src/resources/coupons/index.ts +2 -2
  219. package/src/resources/coupons/subscriptions.ts +2 -3
  220. package/src/resources/credit-notes.ts +45 -5
  221. package/src/resources/customers/balance-transactions.ts +10 -7
  222. package/src/resources/customers/costs.ts +7 -6
  223. package/src/resources/customers/credits/credits.ts +82 -32
  224. package/src/resources/customers/credits/index.ts +20 -20
  225. package/src/resources/customers/credits/ledger.ts +30 -24
  226. package/src/resources/customers/credits/top-ups.ts +16 -12
  227. package/src/resources/customers/customers.ts +70 -46
  228. package/src/resources/customers/index.ts +17 -17
  229. package/src/resources/dimensional-price-groups/dimensional-price-groups.ts +146 -0
  230. package/src/resources/dimensional-price-groups/external-dimensional-price-group-id.ts +20 -0
  231. package/src/resources/dimensional-price-groups/index.ts +10 -0
  232. package/src/resources/events/backfills.ts +17 -12
  233. package/src/resources/events/events.ts +42 -23
  234. package/src/resources/events/index.ts +15 -15
  235. package/src/resources/events/volume.ts +11 -22
  236. package/src/resources/index.ts +113 -67
  237. package/src/resources/invoice-line-items.ts +5 -4
  238. package/src/resources/invoices.ts +111 -34
  239. package/src/resources/items.ts +11 -17
  240. package/src/resources/metrics.ts +11 -17
  241. package/src/resources/plans/external-plan-id.ts +3 -14
  242. package/src/resources/plans/index.ts +9 -2
  243. package/src/resources/plans/plans.ts +425 -19
  244. package/src/resources/prices/external-price-id.ts +3 -14
  245. package/src/resources/prices/index.ts +8 -8
  246. package/src/resources/prices/prices.ts +471 -24
  247. package/src/resources/subscriptions.ts +9238 -440
  248. package/src/resources/top-level.ts +2 -3
  249. package/src/version.ts +1 -1
  250. package/version.d.ts +1 -1
  251. package/version.js +1 -1
  252. package/version.mjs +1 -1
@@ -1,45 +1,276 @@
1
1
  "use strict";
2
2
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
- if (k2 === undefined) k2 = k;
5
- var desc = Object.getOwnPropertyDescriptor(m, k);
6
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
- desc = { enumerable: true, get: function() { return m[k]; } };
8
- }
9
- Object.defineProperty(o, k2, desc);
10
- }) : (function(o, m, k, k2) {
11
- if (k2 === undefined) k2 = k;
12
- o[k2] = m[k];
13
- }));
14
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
- Object.defineProperty(o, "default", { enumerable: true, value: v });
16
- }) : function(o, v) {
17
- o["default"] = v;
18
- });
19
- var __importStar = (this && this.__importStar) || function (mod) {
20
- if (mod && mod.__esModule) return mod;
21
- var result = {};
22
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
23
- __setModuleDefault(result, mod);
24
- return result;
25
- };
26
3
  Object.defineProperty(exports, "__esModule", { value: true });
27
4
  exports.SubscriptionFetchScheduleResponsesPage = exports.SubscriptionsPage = exports.Subscriptions = void 0;
28
5
  const resource_1 = require("../resource.js");
29
6
  const core_1 = require("../core.js");
30
- const SubscriptionsAPI = __importStar(require("./subscriptions.js"));
31
7
  const pagination_1 = require("../pagination.js");
32
8
  class Subscriptions extends resource_1.APIResource {
33
- create(body = {}, options) {
34
- if ((0, core_1.isRequestOptions)(body)) {
35
- return this.create({}, body);
36
- }
9
+ /**
10
+ * A subscription represents the purchase of a plan by a customer. The customer is
11
+ * identified by either the `customer_id` or the `external_customer_id`, and
12
+ * exactly one of these fields must be provided.
13
+ *
14
+ * By default, subscriptions begin on the day that they're created and renew
15
+ * automatically for each billing cycle at the cadence that's configured in the
16
+ * plan definition.
17
+ *
18
+ * The default configuration for subscriptions in Orb is **In-advance billing** and
19
+ * **Beginning of month alignment** (see
20
+ * [Subscription](../guides/concepts#subscription) for more details).
21
+ *
22
+ * In order to change the alignment behavior, Orb also supports billing
23
+ * subscriptions on the day of the month they are created. If
24
+ * `align_billing_with_subscription_start_date = true` is specified, subscriptions
25
+ * have billing cycles that are aligned with their `start_date`. For example, a
26
+ * subscription that begins on January 15th will have a billing cycle from January
27
+ * 15th to February 15th. Every subsequent billing cycle will continue to start and
28
+ * invoice on the 15th.
29
+ *
30
+ * If the "day" value is greater than the number of days in the month, the next
31
+ * billing cycle will start at the end of the month. For example, if the start_date
32
+ * is January 31st, the next billing cycle will start on February 28th.
33
+ *
34
+ * If a customer was created with a currency, Orb only allows subscribing the
35
+ * customer to a plan with a matching `invoicing_currency`. If the customer does
36
+ * not have a currency set, on subscription creation, we set the customer's
37
+ * currency to be the `invoicing_currency` of the plan.
38
+ *
39
+ * ## Customize your customer's subscriptions
40
+ *
41
+ * Prices and adjustments in a plan can be added, removed, or replaced for the
42
+ * subscription being created. This is useful when a customer has prices that
43
+ * differ from the default prices for a specific plan.
44
+ *
45
+ * :::info This feature is only available for accounts that have migrated to
46
+ * Subscription Overrides Version 2. You can find your Subscription Overrides
47
+ * Version at the bottom of your [Plans page](https://app.withorb.com/plans) :::
48
+ *
49
+ * ### Adding Prices
50
+ *
51
+ * To add prices, provide a list of objects with the key `add_prices`. An object in
52
+ * the list must specify an existing add-on price with a `price_id` or
53
+ * `external_price_id` field, or create a new add-on price by including an object
54
+ * with the key `price`, identical to what would be used in the request body for
55
+ * the [create price endpoint](../reference/create-price). See the
56
+ * [Price resource](../reference/price) for the specification of different price
57
+ * model configurations possible in this object.
58
+ *
59
+ * If the plan has phases, each object in the list must include a number with
60
+ * `plan_phase_order` key to indicate which phase the price should be added to.
61
+ *
62
+ * An object in the list can specify an optional `start_date` and optional
63
+ * `end_date`. This is equivalent to creating a price interval with the
64
+ * [add/edit price intervals endpoint](../reference/add-edit-price-intervals). If
65
+ * unspecified, the start or end date of the phase or subscription will be used.
66
+ *
67
+ * An object in the list can specify an optional `minimum_amount`,
68
+ * `maximum_amount`, or `discounts`. This will create adjustments which apply only
69
+ * to this price.
70
+ *
71
+ * Additionally, an object in the list can specify an optional `reference_id`. This
72
+ * ID can be used to reference this price when
73
+ * [adding an adjustment](#adding-adjustments) in the same API call. However the ID
74
+ * is _transient_ and cannot be used to refer to the price in future API calls.
75
+ *
76
+ * ### Removing Prices
77
+ *
78
+ * To remove prices, provide a list of objects with the key `remove_prices`. An
79
+ * object in the list must specify a plan price with either a `price_id` or
80
+ * `external_price_id` field.
81
+ *
82
+ * ### Replacing Prices
83
+ *
84
+ * To replace prices, provide a list of objects with the key `replace_prices`. An
85
+ * object in the list must specify a plan price to replace with the
86
+ * `replaces_price_id` key, and it must specify a price to replace it with by
87
+ * either referencing an existing add-on price with a `price_id` or
88
+ * `external_price_id` field, or by creating a new add-on price by including an
89
+ * object with the key `price`, identical to what would be used in the request body
90
+ * for the [create price endpoint](../reference/create-price). See the
91
+ * [Price resource](../reference/price) for the specification of different price
92
+ * model configurations possible in this object.
93
+ *
94
+ * For fixed fees, an object in the list can supply a `fixed_price_quantity`
95
+ * instead of a `price`, `price_id`, or `external_price_id` field. This will update
96
+ * only the quantity for the price, similar to the
97
+ * [Update price quantity](../reference/update-fixed-fee-quantity) endpoint.
98
+ *
99
+ * The replacement price will have the same phase, if applicable, and the same
100
+ * start and end dates as the price it replaces.
101
+ *
102
+ * An object in the list can specify an optional `minimum_amount`,
103
+ * `maximum_amount`, or `discounts`. This will create adjustments which apply only
104
+ * to this price.
105
+ *
106
+ * Additionally, an object in the list can specify an optional `reference_id`. This
107
+ * ID can be used to reference the replacement price when
108
+ * [adding an adjustment](#adding-adjustments) in the same API call. However the ID
109
+ * is _transient_ and cannot be used to refer to the price in future API calls.
110
+ *
111
+ * ### Adding adjustments
112
+ *
113
+ * To add adjustments, provide a list of objects with the key `add_adjustments`. An
114
+ * object in the list must include an object with the key `adjustment`, identical
115
+ * to the adjustment object in the
116
+ * [add/edit price intervals endpoint](../reference/add-edit-price-intervals).
117
+ *
118
+ * If the plan has phases, each object in the list must include a number with
119
+ * `plan_phase_order` key to indicate which phase the adjustment should be added
120
+ * to.
121
+ *
122
+ * An object in the list can specify an optional `start_date` and optional
123
+ * `end_date`. If unspecified, the start or end date of the phase or subscription
124
+ * will be used.
125
+ *
126
+ * ### Removing adjustments
127
+ *
128
+ * To remove adjustments, provide a list of objects with the key
129
+ * `remove_adjustments`. An object in the list must include a key, `adjustment_id`,
130
+ * with the ID of the adjustment to be removed.
131
+ *
132
+ * ### Replacing adjustments
133
+ *
134
+ * To replace adjustments, provide a list of objects with the key
135
+ * `replace_adjustments`. An object in the list must specify a plan adjustment to
136
+ * replace with the `replaces_adjustment_id` key, and it must specify an adjustment
137
+ * to replace it with by including an object with the key `adjustment`, identical
138
+ * to the adjustment object in the
139
+ * [add/edit price intervals endpoint](../reference/add-edit-price-intervals).
140
+ *
141
+ * The replacement adjustment will have the same phase, if applicable, and the same
142
+ * start and end dates as the adjustment it replaces.
143
+ *
144
+ * ## Price overrides (DEPRECATED)
145
+ *
146
+ * :::info Price overrides are being phased out in favor adding/removing/replacing
147
+ * prices. (See
148
+ * [Customize your customer's subscriptions](../reference/create-subscription#customize-your-customers-subscriptions))
149
+ * :::
150
+ *
151
+ * Price overrides are used to update some or all prices in a plan for the specific
152
+ * subscription being created. This is useful when a new customer has negotiated a
153
+ * rate that is unique to the customer.
154
+ *
155
+ * To override prices, provide a list of objects with the key `price_overrides`.
156
+ * The price object in the list of overrides is expected to contain the existing
157
+ * price id, the `model_type` and configuration. (See the
158
+ * [Price resource](../reference/price) for the specification of different price
159
+ * model configurations.) The numerical values can be updated, but the billable
160
+ * metric, cadence, type, and name of a price can not be overridden.
161
+ *
162
+ * ### Maximums and Minimums
163
+ *
164
+ * Minimums and maximums, much like price overrides, can be useful when a new
165
+ * customer has negotiated a new or different minimum or maximum spend cap than the
166
+ * default for a given price. If one exists for a price and null is provided for
167
+ * the minimum/maximum override on creation, then there will be no minimum/maximum
168
+ * on the new subscription. If no value is provided, then the default price maximum
169
+ * or minimum is used.
170
+ *
171
+ * To add a minimum for a specific price, add `minimum_amount` to the specific
172
+ * price in the `price_overrides` object.
173
+ *
174
+ * To add a maximum for a specific price, add `maximum_amount` to the specific
175
+ * price in the `price_overrides` object.
176
+ *
177
+ * ### Minimum override example
178
+ *
179
+ * Price minimum override example:
180
+ *
181
+ * ```json
182
+ * {
183
+ * ...
184
+ * "id": "price_id",
185
+ * "model_type": "unit",
186
+ * "unit_config": {
187
+ * "unit_amount": "0.50"
188
+ * },
189
+ * "minimum_amount": "100.00"
190
+ * ...
191
+ * }
192
+ * ```
193
+ *
194
+ * Removing an existing minimum example
195
+ *
196
+ * ```json
197
+ * {
198
+ * ...
199
+ * "id": "price_id",
200
+ * "model_type": "unit",
201
+ * "unit_config": {
202
+ * "unit_amount": "0.50"
203
+ * },
204
+ * "minimum_amount": null
205
+ * ...
206
+ * }
207
+ * ```
208
+ *
209
+ * ### Discounts
210
+ *
211
+ * Discounts, like price overrides, can be useful when a new customer has
212
+ * negotiated a new or different discount than the default for a price. If a
213
+ * discount exists for a price and a null discount is provided on creation, then
214
+ * there will be no discount on the new subscription.
215
+ *
216
+ * To add a discount for a specific price, add `discount` to the price in the
217
+ * `price_overrides` object. Discount should be a dictionary of the format:
218
+ *
219
+ * ```ts
220
+ * {
221
+ * "discount_type": "amount" | "percentage" | "usage",
222
+ * "amount_discount": string,
223
+ * "percentage_discount": string,
224
+ * "usage_discount": string
225
+ * }
226
+ * ```
227
+ *
228
+ * where either `amount_discount`, `percentage_discount`, or `usage_discount` is
229
+ * provided.
230
+ *
231
+ * Price discount example
232
+ *
233
+ * ```json
234
+ * {
235
+ * ...
236
+ * "id": "price_id",
237
+ * "model_type": "unit",
238
+ * "unit_config": {
239
+ * "unit_amount": "0.50"
240
+ * },
241
+ * "discount": {"discount_type": "amount", "amount_discount": "175"},
242
+ * }
243
+ * ```
244
+ *
245
+ * Removing an existing discount example
246
+ *
247
+ * ```json
248
+ * {
249
+ * "customer_id": "customer_id",
250
+ * "plan_id": "plan_id",
251
+ * "discount": null,
252
+ * "price_overrides": [ ... ]
253
+ * ...
254
+ * }
255
+ * ```
256
+ *
257
+ * ## Threshold Billing
258
+ *
259
+ * Orb supports invoicing for a subscription when a preconfigured usage threshold
260
+ * is hit. To enable threshold billing, pass in an `invoicing_threshold`, which is
261
+ * specified in the subscription's invoicing currency, when creating a
262
+ * subscription. E.g. pass in `10.00` to issue an invoice when usage amounts hit
263
+ * $10.00 for a subscription that invoices in USD.
264
+ */
265
+ create(body, options) {
37
266
  return this._client.post('/subscriptions', { body, ...options });
38
267
  }
39
- update(subscriptionId, body = {}, options) {
40
- if ((0, core_1.isRequestOptions)(body)) {
41
- return this.update(subscriptionId, {}, body);
42
- }
268
+ /**
269
+ * This endpoint can be used to update the `metadata`, `net terms`,
270
+ * `auto_collection`, `invoicing_threshold`, and `default_invoice_memo` properties
271
+ * on a subscription.
272
+ */
273
+ update(subscriptionId, body, options) {
43
274
  return this._client.put(`/subscriptions/${subscriptionId}`, { body, ...options });
44
275
  }
45
276
  list(query = {}, options) {
@@ -139,10 +370,81 @@ class Subscriptions extends resource_1.APIResource {
139
370
  }
140
371
  return this._client.get(`/subscriptions/${subscriptionId}/usage`, { query, ...options });
141
372
  }
142
- priceIntervals(subscriptionId, body = {}, options) {
143
- if ((0, core_1.isRequestOptions)(body)) {
144
- return this.priceIntervals(subscriptionId, {}, body);
145
- }
373
+ /**
374
+ * This endpoint is used to add and edit subscription
375
+ * [price intervals](../reference/price-interval). By making modifications to a
376
+ * subscription’s price intervals, you can
377
+ * [flexibly and atomically control the billing behavior of a subscription](../guides/product-catalog/modifying-subscriptions).
378
+ *
379
+ * ## Adding price intervals
380
+ *
381
+ * Prices can be added as price intervals to a subscription by specifying them in
382
+ * the `add` array. A `price_id` or `external_price_id` from an add-on price or
383
+ * previously removed plan price can be specified to reuse an existing price
384
+ * definition (however, please note that prices from other plans cannot be added to
385
+ * the subscription). Additionally, a new price can be specified using the `price`
386
+ * field — this price will be created automatically.
387
+ *
388
+ * A `start_date` must be specified for the price interval. This is the date when
389
+ * the price will start billing on the subscription, so this will notably result in
390
+ * an immediate charge at this time for any billed in advance fixed fees. The
391
+ * `end_date` will default to null, resulting in a price interval that will bill on
392
+ * a continually recurring basis. Both of these dates can be set in the past or the
393
+ * future and Orb will generate or modify invoices to ensure the subscription’s
394
+ * invoicing behavior is correct.
395
+ *
396
+ * Additionally, a discount, minimum, or maximum can be specified on the price
397
+ * interval. This will only apply to this price interval, not any other price
398
+ * intervals on the subscription.
399
+ *
400
+ * ## Adjustment intervals
401
+ *
402
+ * An adjustment interval represents the time period that a particular adjustment
403
+ * (a discount, minimum, or maximum) applies to the prices on a subscription.
404
+ * Adjustment intervals can be added to a subscription by specifying them in the
405
+ * `add_adjustments` array, or modified via the `edit_adjustments` array. When
406
+ * creating an adjustment interval, you'll need to provide the definition of the
407
+ * new adjustment (the type of adjustment, and which prices it applies to), as well
408
+ * as the start and end dates for the adjustment interval. The start and end dates
409
+ * of an existing adjustment interval can be edited via the `edit_adjustments`
410
+ * field (just like price intervals). (To "change" the amount of a discount,
411
+ * minimum, or maximum, then, you'll need to end the existing interval, and create
412
+ * a new adjustment interval with the new amount and a start date that matches the
413
+ * end date of the previous interval.)
414
+ *
415
+ * ## Editing price intervals
416
+ *
417
+ * Price intervals can be adjusted by specifying edits to make in the `edit` array.
418
+ * A `price_interval_id` to edit must be specified — this can be retrieved from the
419
+ * `price_intervals` field on the subscription.
420
+ *
421
+ * A new `start_date` or `end_date` can be specified to change the range of the
422
+ * price interval, which will modify past or future invoices to ensure correctness.
423
+ * If either of these dates are unspecified, they will default to the existing date
424
+ * on the price interval. To remove a price interval entirely from a subscription,
425
+ * set the `end_date` to be equivalent to the `start_date`.
426
+ *
427
+ * ## Fixed fee quantity transitions
428
+ *
429
+ * The fixed fee quantity transitions for a fixed fee price interval can also be
430
+ * specified when adding or editing by passing an array for
431
+ * `fixed_fee_quantity_transitions`. A fixed fee quantity transition must have a
432
+ * `quantity` and an `effective_date`, which is the date after which the new
433
+ * quantity will be used for billing. If a fixed fee quantity transition is
434
+ * scheduled at a billing period boundary, the full quantity will be billed on an
435
+ * invoice with the other prices on the subscription. If the fixed fee quantity
436
+ * transition is scheduled mid-billing period, the difference between the existing
437
+ * quantity and quantity specified in the transition will be prorated for the rest
438
+ * of the billing period and billed immediately, which will generate a new invoice.
439
+ *
440
+ * Notably, the list of fixed fee quantity transitions passed will overwrite the
441
+ * existing fixed fee quantity transitions on the price interval, so the entire
442
+ * list of transitions must be specified to add additional transitions. The
443
+ * existing list of transitions can be retrieved using the
444
+ * `fixed_fee_quantity_transitions` property on a subscription’s serialized price
445
+ * intervals.
446
+ */
447
+ priceIntervals(subscriptionId, body, options) {
146
448
  return this._client.post(`/subscriptions/${subscriptionId}/price_intervals`, { body, ...options });
147
449
  }
148
450
  /**
@@ -190,8 +492,9 @@ class Subscriptions extends resource_1.APIResource {
190
492
  * subscription when you schedule the plan change. This is useful when a customer
191
493
  * has prices that differ from the default prices for a specific plan.
192
494
  *
193
- * :::info This feature is only available for accounts that have migrated off of
194
- * legacy subscription overrides. :::
495
+ * :::info This feature is only available for accounts that have migrated to
496
+ * Subscription Overrides Version 2. You can find your Subscription Overrides
497
+ * Version at the bottom of your [Plans page](https://app.withorb.com/plans) :::
195
498
  *
196
499
  * ### Adding Prices
197
500
  *
@@ -329,10 +632,11 @@ class Subscriptions extends resource_1.APIResource {
329
632
  schedulePlanChange(subscriptionId, body, options) {
330
633
  return this._client.post(`/subscriptions/${subscriptionId}/schedule_plan_change`, { body, ...options });
331
634
  }
332
- triggerPhase(subscriptionId, body = {}, options) {
333
- if ((0, core_1.isRequestOptions)(body)) {
334
- return this.triggerPhase(subscriptionId, {}, body);
335
- }
635
+ /**
636
+ * Manually trigger a phase, effective the given date (or the current time, if not
637
+ * specified).
638
+ */
639
+ triggerPhase(subscriptionId, body, options) {
336
640
  return this._client.post(`/subscriptions/${subscriptionId}/trigger_phase`, { body, ...options });
337
641
  }
338
642
  /**
@@ -419,9 +723,6 @@ exports.SubscriptionsPage = SubscriptionsPage;
419
723
  class SubscriptionFetchScheduleResponsesPage extends pagination_1.Page {
420
724
  }
421
725
  exports.SubscriptionFetchScheduleResponsesPage = SubscriptionFetchScheduleResponsesPage;
422
- (function (Subscriptions) {
423
- Subscriptions.Subscriptions = SubscriptionsAPI.Subscriptions;
424
- Subscriptions.SubscriptionsPage = SubscriptionsAPI.SubscriptionsPage;
425
- Subscriptions.SubscriptionFetchScheduleResponsesPage = SubscriptionsAPI.SubscriptionFetchScheduleResponsesPage;
426
- })(Subscriptions = exports.Subscriptions || (exports.Subscriptions = {}));
726
+ Subscriptions.SubscriptionsPage = SubscriptionsPage;
727
+ Subscriptions.SubscriptionFetchScheduleResponsesPage = SubscriptionFetchScheduleResponsesPage;
427
728
  //# sourceMappingURL=subscriptions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"subscriptions.js","sourceRoot":"","sources":["../src/resources/subscriptions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtF,6CAA0C;AAC1C,qCAA2C;AAE3C,qEAAoD;AAKpD,iDAAsD;AAEtD,MAAa,aAAc,SAAQ,sBAAW;IAkQ5C,MAAM,CACJ,OAAuD,EAAE,EACzD,OAA6B;QAE7B,IAAI,IAAA,uBAAgB,EAAC,IAAI,CAAC,EAAE;YAC1B,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;SAC9B;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnE,CAAC;IAaD,MAAM,CACJ,cAAsB,EACtB,OAAuD,EA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