orb-billing 5.48.0 → 5.75.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 (205) hide show
  1. package/CHANGELOG.md +241 -0
  2. package/core.js +2 -2
  3. package/core.js.map +1 -1
  4. package/core.mjs +2 -2
  5. package/core.mjs.map +1 -1
  6. package/index.d.ts.map +1 -1
  7. package/index.js +11 -0
  8. package/index.js.map +1 -1
  9. package/index.mjs +11 -0
  10. package/index.mjs.map +1 -1
  11. package/package.json +1 -1
  12. package/resources/alerts.d.ts +140 -3
  13. package/resources/alerts.d.ts.map +1 -1
  14. package/resources/alerts.js.map +1 -1
  15. package/resources/alerts.mjs.map +1 -1
  16. package/resources/beta/beta.d.ts +738 -7570
  17. package/resources/beta/beta.d.ts.map +1 -1
  18. package/resources/beta/beta.js.map +1 -1
  19. package/resources/beta/beta.mjs.map +1 -1
  20. package/resources/beta/external-plan-id.d.ts +664 -7572
  21. package/resources/beta/external-plan-id.d.ts.map +1 -1
  22. package/resources/coupons/coupons.d.ts +29 -0
  23. package/resources/coupons/coupons.d.ts.map +1 -1
  24. package/resources/coupons/coupons.js +21 -0
  25. package/resources/coupons/coupons.js.map +1 -1
  26. package/resources/coupons/coupons.mjs +21 -0
  27. package/resources/coupons/coupons.mjs.map +1 -1
  28. package/resources/coupons/subscriptions.d.ts +10 -0
  29. package/resources/coupons/subscriptions.d.ts.map +1 -1
  30. package/resources/coupons/subscriptions.js.map +1 -1
  31. package/resources/coupons/subscriptions.mjs.map +1 -1
  32. package/resources/credit-blocks.d.ts +98 -7
  33. package/resources/credit-blocks.d.ts.map +1 -1
  34. package/resources/credit-blocks.js +10 -7
  35. package/resources/credit-blocks.js.map +1 -1
  36. package/resources/credit-blocks.mjs +10 -7
  37. package/resources/credit-blocks.mjs.map +1 -1
  38. package/resources/credit-notes.d.ts +28 -0
  39. package/resources/credit-notes.d.ts.map +1 -1
  40. package/resources/credit-notes.js +20 -0
  41. package/resources/credit-notes.js.map +1 -1
  42. package/resources/credit-notes.mjs +20 -0
  43. package/resources/credit-notes.mjs.map +1 -1
  44. package/resources/customers/credits/credits.d.ts +89 -0
  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/ledger.d.ts +34 -20
  49. package/resources/customers/credits/ledger.d.ts.map +1 -1
  50. package/resources/customers/credits/ledger.js +28 -14
  51. package/resources/customers/credits/ledger.js.map +1 -1
  52. package/resources/customers/credits/ledger.mjs +28 -14
  53. package/resources/customers/credits/ledger.mjs.map +1 -1
  54. package/resources/customers/customers.d.ts +89 -6
  55. package/resources/customers/customers.d.ts.map +1 -1
  56. package/resources/customers/customers.js.map +1 -1
  57. package/resources/customers/customers.mjs.map +1 -1
  58. package/resources/dimensional-price-groups/dimensional-price-groups.d.ts +35 -1
  59. package/resources/dimensional-price-groups/dimensional-price-groups.d.ts.map +1 -1
  60. package/resources/dimensional-price-groups/dimensional-price-groups.js +26 -0
  61. package/resources/dimensional-price-groups/dimensional-price-groups.js.map +1 -1
  62. package/resources/dimensional-price-groups/dimensional-price-groups.mjs +26 -0
  63. package/resources/dimensional-price-groups/dimensional-price-groups.mjs.map +1 -1
  64. package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.ts +16 -0
  65. package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.ts.map +1 -1
  66. package/resources/dimensional-price-groups/external-dimensional-price-group-id.js +16 -0
  67. package/resources/dimensional-price-groups/external-dimensional-price-group-id.js.map +1 -1
  68. package/resources/dimensional-price-groups/external-dimensional-price-group-id.mjs +16 -0
  69. package/resources/dimensional-price-groups/external-dimensional-price-group-id.mjs.map +1 -1
  70. package/resources/events/backfills.d.ts +37 -0
  71. package/resources/events/backfills.d.ts.map +1 -1
  72. package/resources/events/backfills.js +29 -0
  73. package/resources/events/backfills.js.map +1 -1
  74. package/resources/events/backfills.mjs +29 -0
  75. package/resources/events/backfills.mjs.map +1 -1
  76. package/resources/events/events.d.ts +41 -33
  77. package/resources/events/events.d.ts.map +1 -1
  78. package/resources/events/events.js +39 -31
  79. package/resources/events/events.js.map +1 -1
  80. package/resources/events/events.mjs +39 -31
  81. package/resources/events/events.mjs.map +1 -1
  82. package/resources/events/volume.d.ts +7 -0
  83. package/resources/events/volume.d.ts.map +1 -1
  84. package/resources/events/volume.js +7 -0
  85. package/resources/events/volume.js.map +1 -1
  86. package/resources/events/volume.mjs +7 -0
  87. package/resources/events/volume.mjs.map +1 -1
  88. package/resources/invoice-line-items.d.ts +89 -1
  89. package/resources/invoice-line-items.d.ts.map +1 -1
  90. package/resources/invoice-line-items.js +12 -0
  91. package/resources/invoice-line-items.js.map +1 -1
  92. package/resources/invoice-line-items.mjs +12 -0
  93. package/resources/invoice-line-items.mjs.map +1 -1
  94. package/resources/invoices.d.ts +200 -12
  95. package/resources/invoices.d.ts.map +1 -1
  96. package/resources/invoices.js +64 -0
  97. package/resources/invoices.js.map +1 -1
  98. package/resources/invoices.mjs +64 -0
  99. package/resources/invoices.mjs.map +1 -1
  100. package/resources/items.d.ts +30 -0
  101. package/resources/items.d.ts.map +1 -1
  102. package/resources/items.js +22 -0
  103. package/resources/items.js.map +1 -1
  104. package/resources/items.mjs +22 -0
  105. package/resources/items.mjs.map +1 -1
  106. package/resources/licenses/external-licenses.d.ts +13 -1
  107. package/resources/licenses/external-licenses.d.ts.map +1 -1
  108. package/resources/licenses/external-licenses.js +12 -0
  109. package/resources/licenses/external-licenses.js.map +1 -1
  110. package/resources/licenses/external-licenses.mjs +12 -0
  111. package/resources/licenses/external-licenses.mjs.map +1 -1
  112. package/resources/licenses/licenses.d.ts +44 -0
  113. package/resources/licenses/licenses.d.ts.map +1 -1
  114. package/resources/licenses/licenses.js +44 -0
  115. package/resources/licenses/licenses.js.map +1 -1
  116. package/resources/licenses/licenses.mjs +44 -0
  117. package/resources/licenses/licenses.mjs.map +1 -1
  118. package/resources/licenses/usage.d.ts +17 -2
  119. package/resources/licenses/usage.d.ts.map +1 -1
  120. package/resources/licenses/usage.js +8 -0
  121. package/resources/licenses/usage.js.map +1 -1
  122. package/resources/licenses/usage.mjs +8 -0
  123. package/resources/licenses/usage.mjs.map +1 -1
  124. package/resources/metrics.d.ts +37 -5
  125. package/resources/metrics.d.ts.map +1 -1
  126. package/resources/metrics.js +27 -2
  127. package/resources/metrics.js.map +1 -1
  128. package/resources/metrics.mjs +27 -2
  129. package/resources/metrics.mjs.map +1 -1
  130. package/resources/plans/external-plan-id.d.ts +6 -2
  131. package/resources/plans/external-plan-id.d.ts.map +1 -1
  132. package/resources/plans/external-plan-id.js +2 -2
  133. package/resources/plans/external-plan-id.mjs +2 -2
  134. package/resources/plans/migrations.d.ts +42 -0
  135. package/resources/plans/migrations.d.ts.map +1 -1
  136. package/resources/plans/migrations.js.map +1 -1
  137. package/resources/plans/migrations.mjs.map +1 -1
  138. package/resources/plans/plans.d.ts +382 -3754
  139. package/resources/plans/plans.d.ts.map +1 -1
  140. package/resources/plans/plans.js +2 -2
  141. package/resources/plans/plans.js.map +1 -1
  142. package/resources/plans/plans.mjs +2 -2
  143. package/resources/plans/plans.mjs.map +1 -1
  144. package/resources/prices/external-price-id.d.ts +14 -0
  145. package/resources/prices/external-price-id.d.ts.map +1 -1
  146. package/resources/prices/external-price-id.js +14 -0
  147. package/resources/prices/external-price-id.js.map +1 -1
  148. package/resources/prices/external-price-id.mjs +14 -0
  149. package/resources/prices/external-price-id.mjs.map +1 -1
  150. package/resources/prices/prices.d.ts +1632 -393
  151. package/resources/prices/prices.d.ts.map +1 -1
  152. package/resources/prices/prices.js +46 -0
  153. package/resources/prices/prices.js.map +1 -1
  154. package/resources/prices/prices.mjs +46 -0
  155. package/resources/prices/prices.mjs.map +1 -1
  156. package/resources/shared.d.ts +922 -52
  157. package/resources/shared.d.ts.map +1 -1
  158. package/resources/shared.js.map +1 -1
  159. package/resources/shared.mjs.map +1 -1
  160. package/resources/subscription-changes.d.ts +72 -1
  161. package/resources/subscription-changes.d.ts.map +1 -1
  162. package/resources/subscription-changes.js.map +1 -1
  163. package/resources/subscription-changes.mjs.map +1 -1
  164. package/resources/subscriptions.d.ts +3075 -464
  165. package/resources/subscriptions.d.ts.map +1 -1
  166. package/resources/subscriptions.js +111 -0
  167. package/resources/subscriptions.js.map +1 -1
  168. package/resources/subscriptions.mjs +111 -0
  169. package/resources/subscriptions.mjs.map +1 -1
  170. package/src/core.ts +2 -2
  171. package/src/index.ts +12 -0
  172. package/src/resources/alerts.ts +161 -3
  173. package/src/resources/beta/beta.ts +828 -8988
  174. package/src/resources/beta/external-plan-id.ts +745 -8997
  175. package/src/resources/coupons/coupons.ts +29 -0
  176. package/src/resources/coupons/subscriptions.ts +10 -0
  177. package/src/resources/credit-blocks.ts +120 -7
  178. package/src/resources/credit-notes.ts +28 -0
  179. package/src/resources/customers/credits/credits.ts +111 -0
  180. package/src/resources/customers/credits/ledger.ts +34 -20
  181. package/src/resources/customers/customers.ts +99 -6
  182. package/src/resources/dimensional-price-groups/dimensional-price-groups.ts +35 -1
  183. package/src/resources/dimensional-price-groups/external-dimensional-price-group-id.ts +16 -0
  184. package/src/resources/events/backfills.ts +37 -0
  185. package/src/resources/events/events.ts +41 -33
  186. package/src/resources/events/volume.ts +7 -0
  187. package/src/resources/invoice-line-items.ts +104 -0
  188. package/src/resources/invoices.ts +215 -11
  189. package/src/resources/items.ts +30 -0
  190. package/src/resources/licenses/external-licenses.ts +13 -1
  191. package/src/resources/licenses/licenses.ts +44 -0
  192. package/src/resources/licenses/usage.ts +17 -2
  193. package/src/resources/metrics.ts +37 -5
  194. package/src/resources/plans/external-plan-id.ts +7 -2
  195. package/src/resources/plans/migrations.ts +42 -0
  196. package/src/resources/plans/plans.ts +456 -4482
  197. package/src/resources/prices/external-price-id.ts +14 -0
  198. package/src/resources/prices/prices.ts +1743 -264
  199. package/src/resources/shared.ts +1172 -50
  200. package/src/resources/subscription-changes.ts +88 -1
  201. package/src/resources/subscriptions.ts +4707 -1585
  202. package/src/version.ts +1 -1
  203. package/version.d.ts +1 -1
  204. package/version.js +1 -1
  205. package/version.mjs +1 -1
@@ -61,6 +61,15 @@ export class Events extends APIResource {
61
61
  * - By default, no more than 100 events can be amended for a single customer in a
62
62
  * 100 day period. For higher volume updates, consider using the
63
63
  * [event backfill](create-backfill) endpoint.
64
+ *
65
+ * @example
66
+ * ```ts
67
+ * const event = await client.events.update('event_id', {
68
+ * event_name: 'event_name',
69
+ * properties: { foo: 'bar' },
70
+ * timestamp: '2020-12-09T16:09:53Z',
71
+ * });
72
+ * ```
64
73
  */
65
74
  update(eventId, body, options) {
66
75
  return this._client.put(`/events/${eventId}`, { body, ...options });
@@ -106,6 +115,11 @@ export class Events extends APIResource {
106
115
  * - By default, no more than 100 events can be deprecated for a single customer in
107
116
  * a 100 day period. For higher volume updates, consider using the
108
117
  * [event backfill](create-backfill) endpoint.
118
+ *
119
+ * @example
120
+ * ```ts
121
+ * const response = await client.events.deprecate('event_id');
122
+ * ```
109
123
  */
110
124
  deprecate(eventId, options) {
111
125
  return this._client.put(`/events/${eventId}/deprecate`, options);
@@ -226,8 +240,8 @@ export class Events extends APIResource {
226
240
  * billed for in the corresponding billing period.
227
241
  *
228
242
  * In general, Orb does not expect events with future dated timestamps. In cases
229
- * where the timestamp is at least 24 hours ahead of the current time, the event
230
- * will not be accepted as a valid event, and will throw validation errors.
243
+ * where the timestamp is 5 minutes ahead of the current time, the event will not
244
+ * be accepted as a valid event, and will throw validation errors.
231
245
  *
232
246
  * ## Event validation
233
247
  *
@@ -242,9 +256,9 @@ export class Events extends APIResource {
242
256
  * - If the `external_customer_id` is specified, the customer in Orb does not need
243
257
  * to exist. Events will be attributed to any future customers with the
244
258
  * `external_customer_id` on subscription creation.
245
- * - `timestamp` must conform to ISO 8601 and represent a timestamp at most 1 hour
246
- * in the future. This timestamp should be sent in UTC timezone (no timezone
247
- * offset).
259
+ * - `timestamp` must conform to ISO 8601 and represent a timestamp at most 5
260
+ * minutes in the future. This timestamp should be sent in UTC timezone (no
261
+ * timezone offset).
248
262
  *
249
263
  * ## Idempotency and retry semantics
250
264
  *
@@ -281,39 +295,26 @@ export class Events extends APIResource {
281
295
  * request payload size, but please give us a heads up if you’re changing either of
282
296
  * these factors by an order of magnitude from initial setup.
283
297
  *
284
- * ## Testing in debug mode
285
- *
286
- * The ingestion API supports a debug mode, which returns additional verbose output
287
- * to indicate which event idempotency keys were newly ingested or duplicates from
288
- * previous requests. To enable this mode, mark `debug=true` as a query parameter.
289
- *
290
- * If `debug=true` is not specified, the response will only contain
291
- * `validation_failed`. Orb will still honor the idempotency guarantees set
292
- * [here](/events-and-metrics/event-ingestion#event-volume-and-concurrency) in all
293
- * cases.
294
- *
295
- * We strongly recommend that you only use debug mode as part of testing your
296
- * initial Orb integration. Once you're ready to switch to production, disable
297
- * debug mode to take advantage of improved performance and maximal throughput.
298
- *
299
- * #### Example: ingestion response with `debug=true`
298
+ * #### Example: ingestion response
300
299
  *
301
300
  * ```json
302
301
  * {
303
- * "debug": {
304
- * "duplicate": [],
305
- * "ingested": ["B7E83HDMfJPAunXW", "SJs5DQJ3TnwSqEZE", "8SivfDsNKwCeAXim"]
306
- * },
307
302
  * "validation_failed": []
308
303
  * }
309
304
  * ```
310
305
  *
311
- * #### Example: ingestion response with `debug=false`
312
- *
313
- * ```json
314
- * {
315
- * "validation_failed": []
316
- * }
306
+ * @example
307
+ * ```ts
308
+ * const response = await client.events.ingest({
309
+ * events: [
310
+ * {
311
+ * event_name: 'event_name',
312
+ * idempotency_key: 'idempotency_key',
313
+ * properties: { foo: 'bar' },
314
+ * timestamp: '2020-12-09T16:09:53Z',
315
+ * },
316
+ * ],
317
+ * });
317
318
  * ```
318
319
  */
319
320
  ingest(params, options) {
@@ -336,6 +337,13 @@ export class Events extends APIResource {
336
337
  *
337
338
  * By default, Orb will not throw a `404` if no events matched, Orb will return an
338
339
  * empty array for `data` instead.
340
+ *
341
+ * @example
342
+ * ```ts
343
+ * const response = await client.events.search({
344
+ * event_ids: ['string'],
345
+ * });
346
+ * ```
339
347
  */
340
348
  search(body, options) {
341
349
  return this._client.post('/events/search', { body, ...options });
@@ -1 +1 @@
1
- {"version":3,"file":"events.mjs","sourceRoot":"","sources":["../../src/resources/events/events.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,KAAK,YAAY;OACjB,EAOL,yBAAyB,EAEzB,SAAS,GACV;OACM,KAAK,SAAS;OACd,EAAgB,MAAM,EAAoB;AAEjD;;;;GAIG;AACH,MAAM,OAAO,MAAO,SAAQ,WAAW;IAAvC;;QACE,cAAS,GAA2B,IAAI,YAAY,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC7E,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IA8UhE,CAAC;IA5UC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8CG;IACH,MAAM,CACJ,OAAe,EACf,IAAuB,EACvB,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtE,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAyCG;IACH,SAAS,CAAC,OAAe,EAAE,OAA6B;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,OAAO,YAAY,EAAE,OAAO,CAAC,CAAC;IACnE,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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class Volume extends APIResource {
20
20
  * where the start and end time are hour-aligned and in UTC. When a specific
21
21
  * timestamp is passed in for either start or end time, the response includes the
22
22
  * hours the timestamp falls in.
23
+ *
24
+ * @example
25
+ * ```ts
26
+ * const eventVolumes = await client.events.volume.list({
27
+ * timeframe_start: '2019-12-27T18:11:19.117Z',
28
+ * });
29
+ * ```
23
30
  */
24
31
  list(query: VolumeListParams, options?: Core.RequestOptions): Core.APIPromise<EventVolumes>;
25
32
  }
@@ -1 +1 @@
1
- {"version":3,"file":"volume.d.ts","sourceRoot":"","sources":["../../src/resources/events/volume.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AAEnC;;;;GAIG;AACH,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;;;;OAcG;IACH,IAAI,CAAC,KAAK,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC;CAG5F;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;CAChC;AAED,yBAAiB,YAAY,CAAC;IAC5B;;;OAGG;IACH,UAAiB,IAAI;QACnB;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;QAEd,aAAa,EAAE,MAAM,CAAC;QAEtB,eAAe,EAAE,MAAM,CAAC;KACzB;CACF;AAED,MAAM,WAAW,gBAAgB;IAC/B;;;;;OAKG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;;OAKG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EAAE,KAAK,YAAY,IAAI,YAAY,EAAE,KAAK,gBAAgB,IAAI,gBAAgB,EAAE,CAAC;CACzF"}
1
+ {"version":3,"file":"volume.d.ts","sourceRoot":"","sources":["../../src/resources/events/volume.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AAEnC;;;;GAIG;AACH,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,IAAI,CAAC,KAAK,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC;CAG5F;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;CAChC;AAED,yBAAiB,YAAY,CAAC;IAC5B;;;OAGG;IACH,UAAiB,IAAI;QACnB;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;QAEd,aAAa,EAAE,MAAM,CAAC;QAEtB,eAAe,EAAE,MAAM,CAAC;KACzB;CACF;AAED,MAAM,WAAW,gBAAgB;IAC/B;;;;;OAKG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;;OAKG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EAAE,KAAK,YAAY,IAAI,YAAY,EAAE,KAAK,gBAAgB,IAAI,gBAAgB,EAAE,CAAC;CACzF"}
@@ -23,6 +23,13 @@ class Volume extends resource_1.APIResource {
23
23
  * where the start and end time are hour-aligned and in UTC. When a specific
24
24
  * timestamp is passed in for either start or end time, the response includes the
25
25
  * hours the timestamp falls in.
26
+ *
27
+ * @example
28
+ * ```ts
29
+ * const eventVolumes = await client.events.volume.list({
30
+ * timeframe_start: '2019-12-27T18:11:19.117Z',
31
+ * });
32
+ * ```
26
33
  */
27
34
  list(query, options) {
28
35
  return this._client.get('/events/volume', { query, ...options });
@@ -1 +1 @@
1
- {"version":3,"file":"volume.js","sourceRoot":"","sources":["../../src/resources/events/volume.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAA6C;AAG7C;;;;GAIG;AACH,MAAa,MAAO,SAAQ,sBAAW;IACrC;;;;;;;;;;;;;;OAcG;IACH,IAAI,CAAC,KAAuB,EAAE,OAA6B;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnE,CAAC;CACF;AAnBD,wBAmBC"}
1
+ {"version":3,"file":"volume.js","sourceRoot":"","sources":["../../src/resources/events/volume.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAA6C;AAG7C;;;;GAIG;AACH,MAAa,MAAO,SAAQ,sBAAW;IACrC;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,IAAI,CAAC,KAAuB,EAAE,OAA6B;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnE,CAAC;CACF;AA1BD,wBA0BC"}
@@ -20,6 +20,13 @@ export class Volume extends APIResource {
20
20
  * where the start and end time are hour-aligned and in UTC. When a specific
21
21
  * timestamp is passed in for either start or end time, the response includes the
22
22
  * hours the timestamp falls in.
23
+ *
24
+ * @example
25
+ * ```ts
26
+ * const eventVolumes = await client.events.volume.list({
27
+ * timeframe_start: '2019-12-27T18:11:19.117Z',
28
+ * });
29
+ * ```
23
30
  */
24
31
  list(query, options) {
25
32
  return this._client.get('/events/volume', { query, ...options });
@@ -1 +1 @@
1
- {"version":3,"file":"volume.mjs","sourceRoot":"","sources":["../../src/resources/events/volume.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAGtB;;;;GAIG;AACH,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;;;;OAcG;IACH,IAAI,CAAC,KAAuB,EAAE,OAA6B;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnE,CAAC;CACF"}
1
+ {"version":3,"file":"volume.mjs","sourceRoot":"","sources":["../../src/resources/events/volume.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAGtB;;;;GAIG;AACH,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,IAAI,CAAC,KAAuB,EAAE,OAA6B;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnE,CAAC;CACF"}
@@ -22,6 +22,18 @@ export declare class InvoiceLineItems extends APIResource {
22
22
  * - If both `item_id` and `name` are provided: The item is looked up by ID for
23
23
  * association, but the provided `name` is used for the line item (not the item's
24
24
  * name).
25
+ *
26
+ * @example
27
+ * ```ts
28
+ * const invoiceLineItem =
29
+ * await client.invoiceLineItems.create({
30
+ * amount: '12.00',
31
+ * end_date: '2023-09-22',
32
+ * invoice_id: '4khy3nwzktxv7',
33
+ * quantity: 1,
34
+ * start_date: '2023-09-22',
35
+ * });
36
+ * ```
25
37
  */
26
38
  create(body: InvoiceLineItemCreateParams, options?: Core.RequestOptions): Core.APIPromise<InvoiceLineItemCreateResponse>;
27
39
  }
@@ -40,7 +52,7 @@ export interface InvoiceLineItemCreateResponse {
40
52
  * invoice calculations (ie. usage discounts -> amount discounts -> percentage
41
53
  * discounts -> minimums -> maximums).
42
54
  */
43
- adjustments: Array<Shared.MonetaryUsageDiscountAdjustment | Shared.MonetaryAmountDiscountAdjustment | Shared.MonetaryPercentageDiscountAdjustment | Shared.MonetaryMinimumAdjustment | Shared.MonetaryMaximumAdjustment>;
55
+ adjustments: Array<Shared.MonetaryUsageDiscountAdjustment | Shared.MonetaryAmountDiscountAdjustment | Shared.MonetaryPercentageDiscountAdjustment | InvoiceLineItemCreateResponse.MonetaryTieredPercentageDiscountAdjustment | Shared.MonetaryMinimumAdjustment | Shared.MonetaryMaximumAdjustment>;
44
56
  /**
45
57
  * The final amount for a line item after all adjustments and pre paid credits have
46
58
  * been applied.
@@ -112,6 +124,82 @@ export interface InvoiceLineItemCreateResponse {
112
124
  */
113
125
  usage_customer_ids: Array<string> | null;
114
126
  }
127
+ export declare namespace InvoiceLineItemCreateResponse {
128
+ interface MonetaryTieredPercentageDiscountAdjustment {
129
+ id: string;
130
+ adjustment_type: 'tiered_percentage_discount';
131
+ /**
132
+ * The value applied by an adjustment.
133
+ */
134
+ amount: string;
135
+ /**
136
+ * @deprecated The price IDs that this adjustment applies to.
137
+ */
138
+ applies_to_price_ids: Array<string>;
139
+ /**
140
+ * The filters that determine which prices to apply this adjustment to.
141
+ */
142
+ filters: Array<MonetaryTieredPercentageDiscountAdjustment.Filter>;
143
+ /**
144
+ * True for adjustments that apply to an entire invoice, false for adjustments that
145
+ * apply to only one price.
146
+ */
147
+ is_invoice_level: boolean;
148
+ /**
149
+ * The reason for the adjustment.
150
+ */
151
+ reason: string | null;
152
+ /**
153
+ * The adjustment id this adjustment replaces. This adjustment will take the place
154
+ * of the replaced adjustment in plan version migrations.
155
+ */
156
+ replaces_adjustment_id: string | null;
157
+ /**
158
+ * The ordered, contiguous bands of cumulative eligible spend, each discounted at
159
+ * its own percentage (progressive fill-a-tier), applied to the prices this
160
+ * adjustment covers in a given billing period.
161
+ */
162
+ tiers: Array<MonetaryTieredPercentageDiscountAdjustment.Tier>;
163
+ }
164
+ namespace MonetaryTieredPercentageDiscountAdjustment {
165
+ interface Filter {
166
+ /**
167
+ * The property of the price to filter on.
168
+ */
169
+ field: 'price_id' | 'item_id' | 'price_type' | 'currency' | 'pricing_unit_id';
170
+ /**
171
+ * Should prices that match the filter be included or excluded.
172
+ */
173
+ operator: 'includes' | 'excludes';
174
+ /**
175
+ * The IDs or values that match this filter.
176
+ */
177
+ values: Array<string>;
178
+ }
179
+ /**
180
+ * One band of a tiered percentage discount. Bounds are denominated in the
181
+ * discount's currency. `lower_bound` is the exclusive start of the band and
182
+ * `upper_bound` is the inclusive end; `upper_bound` is null only for the
183
+ * open-ended final tier.
184
+ */
185
+ interface Tier {
186
+ /**
187
+ * Exclusive lower bound of cumulative spend for this tier.
188
+ */
189
+ lower_bound: number;
190
+ /**
191
+ * The percentage (between 0 and 1) discounted from spend that falls within this
192
+ * tier.
193
+ */
194
+ percentage: number;
195
+ /**
196
+ * Inclusive upper bound of cumulative spend for this tier; null for the final
197
+ * open-ended tier.
198
+ */
199
+ upper_bound?: number | null;
200
+ }
201
+ }
202
+ }
115
203
  export interface InvoiceLineItemCreateParams {
116
204
  /**
117
205
  * The total amount in the invoice's currency to add to the line item.
@@ -1 +1 @@
1
- {"version":3,"file":"invoice-line-items.d.ts","sourceRoot":"","sources":["../src/resources/invoice-line-items.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,IAAI,MAAM,SAAS,CAAC;AAChC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC;;;;;GAKG;AACH,qBAAa,gBAAiB,SAAQ,WAAW;IAC/C;;;;;;;;;;;;;;OAcG;IACH,MAAM,CACJ,IAAI,EAAE,2BAA2B,EACjC,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,6BAA6B,CAAC;CAGlD;AAED,MAAM,WAAW,6BAA6B;IAC5C;;OA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AAI,CAAC,CAAC;KAC/D;IAED,UAAiB,0CAA0C,CAAC;QAC1D,UAAiB,MAAM;YACrB;;eAEG;YACH,KAAK,EAAE,UAAU,GAAG,SAAS,GAAG,YAAY,GAAG,UAAU,GAAG,iBAAiB,CAAC;YAE9E;;eAEG;YACH,QAAQ,EAAE,UAAU,GAAG,UAAU,CAAC;YAElC;;eAEG;YACH,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;SACvB;QAED;;;;;WAKG;QACH,UAAiB,IAAI;YACnB;;eAEG;YACH,WAAW,EAAE,MAAM,CAAC;YAEpB;;;eAGG;YACH,UAAU,EAAE,MAAM,CAAC;YAEnB;;;eAGG;YACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;SAC7B;KACF;CACF;AAED,MAAM,WAAW,2BAA2B;IAC1C;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAExB;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,WAAW,gBAAgB,CAAC;IACxC,OAAO,EACL,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,2BAA2B,IAAI,2BAA2B,GAChE,CAAC;CACH"}
@@ -24,6 +24,18 @@ class InvoiceLineItems extends resource_1.APIResource {
24
24
  * - If both `item_id` and `name` are provided: The item is looked up by ID for
25
25
  * association, but the provided `name` is used for the line item (not the item's
26
26
  * name).
27
+ *
28
+ * @example
29
+ * ```ts
30
+ * const invoiceLineItem =
31
+ * await client.invoiceLineItems.create({
32
+ * amount: '12.00',
33
+ * end_date: '2023-09-22',
34
+ * invoice_id: '4khy3nwzktxv7',
35
+ * quantity: 1,
36
+ * start_date: '2023-09-22',
37
+ * });
38
+ * ```
27
39
  */
28
40
  create(body, options) {
29
41
  return this._client.post('/invoice_line_items', { body, ...options });
@@ -1 +1 @@
1
- {"version":3,"file":"invoice-line-items.js","sourceRoot":"","sources":["../src/resources/invoice-line-items.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6CAA0C;AAI1C;;;;;GAKG;AACH,MAAa,gBAAiB,SAAQ,sBAAW;IAC/C;;;;;;;;;;;;;;OAcG;IACH,MAAM,CACJ,IAAiC,EACjC,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxE,CAAC;CACF;AAtBD,4CAsBC"}
1
+ {"version":3,"file":"invoice-line-items.js","sourceRoot":"","sources":["../src/resources/invoice-line-items.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6CAA0C;AAI1C;;;;;GAKG;AACH,MAAa,gBAAiB,SAAQ,sBAAW;IAC/C;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,MAAM,CACJ,IAAiC,EACjC,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxE,CAAC;CACF;AAlCD,4CAkCC"}
@@ -21,6 +21,18 @@ export class InvoiceLineItems extends APIResource {
21
21
  * - If both `item_id` and `name` are provided: The item is looked up by ID for
22
22
  * association, but the provided `name` is used for the line item (not the item's
23
23
  * name).
24
+ *
25
+ * @example
26
+ * ```ts
27
+ * const invoiceLineItem =
28
+ * await client.invoiceLineItems.create({
29
+ * amount: '12.00',
30
+ * end_date: '2023-09-22',
31
+ * invoice_id: '4khy3nwzktxv7',
32
+ * quantity: 1,
33
+ * start_date: '2023-09-22',
34
+ * });
35
+ * ```
24
36
  */
25
37
  create(body, options) {
26
38
  return this._client.post('/invoice_line_items', { body, ...options });
@@ -1 +1 @@
1
- {"version":3,"file":"invoice-line-items.mjs","sourceRoot":"","sources":["../src/resources/invoice-line-items.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB;;;;;GAKG;AACH,MAAM,OAAO,gBAAiB,SAAQ,WAAW;IAC/C;;;;;;;;;;;;;;OAcG;IACH,MAAM,CACJ,IAAiC,EACjC,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxE,CAAC;CACF"}
1
+ {"version":3,"file":"invoice-line-items.mjs","sourceRoot":"","sources":["../src/resources/invoice-line-items.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB;;;;;GAKG;AACH,MAAM,OAAO,gBAAiB,SAAQ,WAAW;IAC/C;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,MAAM,CACJ,IAAiC,EACjC,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxE,CAAC;CACF"}