@metronome/sdk 3.6.0 → 3.8.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 (312) hide show
  1. package/CHANGELOG.md +61 -0
  2. package/api-promise.d.mts +1 -0
  3. package/api-promise.d.mts.map +1 -1
  4. package/api-promise.d.ts +1 -0
  5. package/api-promise.d.ts.map +1 -1
  6. package/api-promise.mjs +1 -0
  7. package/api-promise.mjs.map +1 -1
  8. package/client.d.mts.map +1 -1
  9. package/client.d.ts.map +1 -1
  10. package/client.js +9 -1
  11. package/client.js.map +1 -1
  12. package/client.mjs +9 -1
  13. package/client.mjs.map +1 -1
  14. package/core/api-promise.d.mts.map +1 -1
  15. package/core/api-promise.d.ts.map +1 -1
  16. package/core/api-promise.mjs.map +1 -1
  17. package/core/error.mjs.map +1 -1
  18. package/core/pagination.d.mts.map +1 -1
  19. package/core/pagination.d.ts.map +1 -1
  20. package/core/pagination.mjs.map +1 -1
  21. package/core/resource.d.mts.map +1 -1
  22. package/core/resource.d.ts.map +1 -1
  23. package/core/uploads.d.mts.map +1 -1
  24. package/core/uploads.d.ts.map +1 -1
  25. package/core/uploads.mjs.map +1 -1
  26. package/error.d.mts +1 -0
  27. package/error.d.mts.map +1 -1
  28. package/error.d.ts +1 -0
  29. package/error.d.ts.map +1 -1
  30. package/error.mjs +1 -0
  31. package/error.mjs.map +1 -1
  32. package/index.d.mts.map +1 -1
  33. package/index.d.ts.map +1 -1
  34. package/index.mjs.map +1 -1
  35. package/internal/detect-platform.mjs.map +1 -1
  36. package/internal/headers.mjs.map +1 -1
  37. package/internal/parse.d.mts.map +1 -1
  38. package/internal/parse.d.ts.map +1 -1
  39. package/internal/parse.mjs.map +1 -1
  40. package/internal/qs/formats.d.mts.map +1 -1
  41. package/internal/qs/formats.d.ts.map +1 -1
  42. package/internal/qs/index.d.mts +2 -2
  43. package/internal/qs/index.d.mts.map +1 -1
  44. package/internal/qs/index.d.ts +2 -2
  45. package/internal/qs/index.d.ts.map +1 -1
  46. package/internal/qs/index.mjs.map +1 -1
  47. package/internal/qs/stringify.d.mts.map +1 -1
  48. package/internal/qs/stringify.d.ts.map +1 -1
  49. package/internal/qs/stringify.mjs.map +1 -1
  50. package/internal/qs/utils.d.mts.map +1 -1
  51. package/internal/qs/utils.d.ts.map +1 -1
  52. package/internal/qs/utils.mjs.map +1 -1
  53. package/internal/request-options.d.mts.map +1 -1
  54. package/internal/request-options.d.ts.map +1 -1
  55. package/internal/shims.d.mts +6 -0
  56. package/internal/shims.d.mts.map +1 -1
  57. package/internal/shims.d.ts +6 -0
  58. package/internal/shims.d.ts.map +1 -1
  59. package/internal/to-file.d.mts.map +1 -1
  60. package/internal/to-file.d.ts.map +1 -1
  61. package/internal/to-file.mjs.map +1 -1
  62. package/internal/types.d.mts +4 -4
  63. package/internal/types.d.mts.map +1 -1
  64. package/internal/types.d.ts +4 -4
  65. package/internal/types.d.ts.map +1 -1
  66. package/internal/uploads.d.mts.map +1 -1
  67. package/internal/uploads.d.ts.map +1 -1
  68. package/internal/uploads.mjs.map +1 -1
  69. package/internal/utils/base64.mjs.map +1 -1
  70. package/internal/utils/log.d.mts.map +1 -1
  71. package/internal/utils/log.d.ts.map +1 -1
  72. package/internal/utils/log.mjs.map +1 -1
  73. package/internal/utils/path.mjs.map +1 -1
  74. package/internal/utils/query.mjs.map +1 -1
  75. package/internal/utils/values.mjs.map +1 -1
  76. package/internal/utils.d.mts.map +1 -1
  77. package/internal/utils.d.ts.map +1 -1
  78. package/internal/utils.mjs.map +1 -1
  79. package/package.json +1 -1
  80. package/pagination.d.mts +1 -0
  81. package/pagination.d.mts.map +1 -1
  82. package/pagination.d.ts +1 -0
  83. package/pagination.d.ts.map +1 -1
  84. package/pagination.mjs +1 -0
  85. package/pagination.mjs.map +1 -1
  86. package/resource.d.mts +1 -0
  87. package/resource.d.mts.map +1 -1
  88. package/resource.d.ts +1 -0
  89. package/resource.d.ts.map +1 -1
  90. package/resource.mjs +1 -0
  91. package/resource.mjs.map +1 -1
  92. package/resources/index.d.mts.map +1 -1
  93. package/resources/index.d.ts.map +1 -1
  94. package/resources/index.mjs.map +1 -1
  95. package/resources/shared.d.mts +420 -4
  96. package/resources/shared.d.mts.map +1 -1
  97. package/resources/shared.d.ts +420 -4
  98. package/resources/shared.d.ts.map +1 -1
  99. package/resources/v1/alerts.d.mts +39 -0
  100. package/resources/v1/alerts.d.mts.map +1 -1
  101. package/resources/v1/alerts.d.ts +39 -0
  102. package/resources/v1/alerts.d.ts.map +1 -1
  103. package/resources/v1/alerts.mjs.map +1 -1
  104. package/resources/v1/audit-logs.d.mts.map +1 -1
  105. package/resources/v1/audit-logs.d.ts.map +1 -1
  106. package/resources/v1/audit-logs.mjs.map +1 -1
  107. package/resources/v1/billable-metrics.d.mts.map +1 -1
  108. package/resources/v1/billable-metrics.d.ts.map +1 -1
  109. package/resources/v1/billable-metrics.mjs.map +1 -1
  110. package/resources/v1/contracts/contracts.d.mts +674 -10
  111. package/resources/v1/contracts/contracts.d.mts.map +1 -1
  112. package/resources/v1/contracts/contracts.d.ts +674 -10
  113. package/resources/v1/contracts/contracts.d.ts.map +1 -1
  114. package/resources/v1/contracts/contracts.js +43 -0
  115. package/resources/v1/contracts/contracts.js.map +1 -1
  116. package/resources/v1/contracts/contracts.mjs +43 -0
  117. package/resources/v1/contracts/contracts.mjs.map +1 -1
  118. package/resources/v1/contracts/index.d.mts +1 -1
  119. package/resources/v1/contracts/index.d.mts.map +1 -1
  120. package/resources/v1/contracts/index.d.ts +1 -1
  121. package/resources/v1/contracts/index.d.ts.map +1 -1
  122. package/resources/v1/contracts/index.js.map +1 -1
  123. package/resources/v1/contracts/index.mjs.map +1 -1
  124. package/resources/v1/contracts/named-schedules.d.mts.map +1 -1
  125. package/resources/v1/contracts/named-schedules.d.ts.map +1 -1
  126. package/resources/v1/contracts/named-schedules.mjs.map +1 -1
  127. package/resources/v1/contracts/products.d.mts.map +1 -1
  128. package/resources/v1/contracts/products.d.ts.map +1 -1
  129. package/resources/v1/contracts/products.mjs.map +1 -1
  130. package/resources/v1/contracts/rate-cards/index.d.mts.map +1 -1
  131. package/resources/v1/contracts/rate-cards/index.d.ts.map +1 -1
  132. package/resources/v1/contracts/rate-cards/index.mjs.map +1 -1
  133. package/resources/v1/contracts/rate-cards/named-schedules.d.mts.map +1 -1
  134. package/resources/v1/contracts/rate-cards/named-schedules.d.ts.map +1 -1
  135. package/resources/v1/contracts/rate-cards/named-schedules.mjs.map +1 -1
  136. package/resources/v1/contracts/rate-cards/product-orders.d.mts.map +1 -1
  137. package/resources/v1/contracts/rate-cards/product-orders.d.ts.map +1 -1
  138. package/resources/v1/contracts/rate-cards/product-orders.mjs.map +1 -1
  139. package/resources/v1/contracts/rate-cards/rate-cards.d.mts.map +1 -1
  140. package/resources/v1/contracts/rate-cards/rate-cards.d.ts.map +1 -1
  141. package/resources/v1/contracts/rate-cards/rate-cards.mjs.map +1 -1
  142. package/resources/v1/contracts/rate-cards/rates.d.mts +4 -0
  143. package/resources/v1/contracts/rate-cards/rates.d.mts.map +1 -1
  144. package/resources/v1/contracts/rate-cards/rates.d.ts +4 -0
  145. package/resources/v1/contracts/rate-cards/rates.d.ts.map +1 -1
  146. package/resources/v1/contracts/rate-cards/rates.js +4 -0
  147. package/resources/v1/contracts/rate-cards/rates.js.map +1 -1
  148. package/resources/v1/contracts/rate-cards/rates.mjs +4 -0
  149. package/resources/v1/contracts/rate-cards/rates.mjs.map +1 -1
  150. package/resources/v1/contracts/rate-cards.d.mts.map +1 -1
  151. package/resources/v1/contracts/rate-cards.d.ts.map +1 -1
  152. package/resources/v1/contracts/rate-cards.mjs.map +1 -1
  153. package/resources/v1/contracts.d.mts.map +1 -1
  154. package/resources/v1/contracts.d.ts.map +1 -1
  155. package/resources/v1/contracts.mjs.map +1 -1
  156. package/resources/v1/credit-grants.d.mts.map +1 -1
  157. package/resources/v1/credit-grants.d.ts.map +1 -1
  158. package/resources/v1/credit-grants.mjs.map +1 -1
  159. package/resources/v1/custom-fields.d.mts.map +1 -1
  160. package/resources/v1/custom-fields.d.ts.map +1 -1
  161. package/resources/v1/custom-fields.mjs.map +1 -1
  162. package/resources/v1/customers/alerts.d.mts +79 -2
  163. package/resources/v1/customers/alerts.d.mts.map +1 -1
  164. package/resources/v1/customers/alerts.d.ts +79 -2
  165. package/resources/v1/customers/alerts.d.ts.map +1 -1
  166. package/resources/v1/customers/alerts.js +1 -1
  167. package/resources/v1/customers/alerts.mjs +1 -1
  168. package/resources/v1/customers/alerts.mjs.map +1 -1
  169. package/resources/v1/customers/billing-config.d.mts.map +1 -1
  170. package/resources/v1/customers/billing-config.d.ts.map +1 -1
  171. package/resources/v1/customers/billing-config.mjs.map +1 -1
  172. package/resources/v1/customers/commits.d.mts.map +1 -1
  173. package/resources/v1/customers/commits.d.ts.map +1 -1
  174. package/resources/v1/customers/commits.mjs.map +1 -1
  175. package/resources/v1/customers/credits.d.mts.map +1 -1
  176. package/resources/v1/customers/credits.d.ts.map +1 -1
  177. package/resources/v1/customers/credits.mjs.map +1 -1
  178. package/resources/v1/customers/customers.d.mts.map +1 -1
  179. package/resources/v1/customers/customers.d.ts.map +1 -1
  180. package/resources/v1/customers/customers.mjs.map +1 -1
  181. package/resources/v1/customers/index.d.mts.map +1 -1
  182. package/resources/v1/customers/index.d.ts.map +1 -1
  183. package/resources/v1/customers/index.mjs.map +1 -1
  184. package/resources/v1/customers/invoices.d.mts +5 -0
  185. package/resources/v1/customers/invoices.d.mts.map +1 -1
  186. package/resources/v1/customers/invoices.d.ts +5 -0
  187. package/resources/v1/customers/invoices.d.ts.map +1 -1
  188. package/resources/v1/customers/invoices.mjs.map +1 -1
  189. package/resources/v1/customers/named-schedules.d.mts.map +1 -1
  190. package/resources/v1/customers/named-schedules.d.ts.map +1 -1
  191. package/resources/v1/customers/named-schedules.mjs.map +1 -1
  192. package/resources/v1/customers/plans.d.mts.map +1 -1
  193. package/resources/v1/customers/plans.d.ts.map +1 -1
  194. package/resources/v1/customers/plans.mjs.map +1 -1
  195. package/resources/v1/customers.d.mts.map +1 -1
  196. package/resources/v1/customers.d.ts.map +1 -1
  197. package/resources/v1/customers.mjs.map +1 -1
  198. package/resources/v1/dashboards.d.mts +8 -3
  199. package/resources/v1/dashboards.d.mts.map +1 -1
  200. package/resources/v1/dashboards.d.ts +8 -3
  201. package/resources/v1/dashboards.d.ts.map +1 -1
  202. package/resources/v1/dashboards.js +7 -2
  203. package/resources/v1/dashboards.js.map +1 -1
  204. package/resources/v1/dashboards.mjs +7 -2
  205. package/resources/v1/dashboards.mjs.map +1 -1
  206. package/resources/v1/index.d.mts +1 -2
  207. package/resources/v1/index.d.mts.map +1 -1
  208. package/resources/v1/index.d.ts +1 -2
  209. package/resources/v1/index.d.ts.map +1 -1
  210. package/resources/v1/index.js +1 -3
  211. package/resources/v1/index.js.map +1 -1
  212. package/resources/v1/index.mjs +0 -1
  213. package/resources/v1/index.mjs.map +1 -1
  214. package/resources/v1/invoices.d.mts.map +1 -1
  215. package/resources/v1/invoices.d.ts.map +1 -1
  216. package/resources/v1/invoices.mjs.map +1 -1
  217. package/resources/v1/packages.d.mts +297 -13
  218. package/resources/v1/packages.d.mts.map +1 -1
  219. package/resources/v1/packages.d.ts +297 -13
  220. package/resources/v1/packages.d.ts.map +1 -1
  221. package/resources/v1/packages.js +3 -4
  222. package/resources/v1/packages.js.map +1 -1
  223. package/resources/v1/packages.mjs +3 -4
  224. package/resources/v1/packages.mjs.map +1 -1
  225. package/resources/v1/plans.d.mts.map +1 -1
  226. package/resources/v1/plans.d.ts.map +1 -1
  227. package/resources/v1/plans.mjs.map +1 -1
  228. package/resources/v1/pricing-units.d.mts.map +1 -1
  229. package/resources/v1/pricing-units.d.ts.map +1 -1
  230. package/resources/v1/pricing-units.mjs.map +1 -1
  231. package/resources/v1/services.d.mts.map +1 -1
  232. package/resources/v1/services.d.ts.map +1 -1
  233. package/resources/v1/services.mjs.map +1 -1
  234. package/resources/v1/settings/billing-providers.d.mts.map +1 -1
  235. package/resources/v1/settings/billing-providers.d.ts.map +1 -1
  236. package/resources/v1/settings/billing-providers.mjs.map +1 -1
  237. package/resources/v1/settings/index.d.mts.map +1 -1
  238. package/resources/v1/settings/index.d.ts.map +1 -1
  239. package/resources/v1/settings/index.mjs.map +1 -1
  240. package/resources/v1/settings/settings.d.mts.map +1 -1
  241. package/resources/v1/settings/settings.d.ts.map +1 -1
  242. package/resources/v1/settings/settings.mjs.map +1 -1
  243. package/resources/v1/settings.d.mts.map +1 -1
  244. package/resources/v1/settings.d.ts.map +1 -1
  245. package/resources/v1/settings.mjs.map +1 -1
  246. package/resources/v1/usage.d.mts.map +1 -1
  247. package/resources/v1/usage.d.ts.map +1 -1
  248. package/resources/v1/usage.mjs.map +1 -1
  249. package/resources/v1/v1.d.mts +2 -6
  250. package/resources/v1/v1.d.mts.map +1 -1
  251. package/resources/v1/v1.d.ts +2 -6
  252. package/resources/v1/v1.d.ts.map +1 -1
  253. package/resources/v1/v1.js +0 -4
  254. package/resources/v1/v1.js.map +1 -1
  255. package/resources/v1/v1.mjs +0 -4
  256. package/resources/v1/v1.mjs.map +1 -1
  257. package/resources/v1.d.mts.map +1 -1
  258. package/resources/v1.d.ts.map +1 -1
  259. package/resources/v1.mjs.map +1 -1
  260. package/resources/v2/contracts.d.mts +1762 -5
  261. package/resources/v2/contracts.d.mts.map +1 -1
  262. package/resources/v2/contracts.d.ts +1762 -5
  263. package/resources/v2/contracts.d.ts.map +1 -1
  264. package/resources/v2/contracts.mjs.map +1 -1
  265. package/resources/v2/index.d.mts.map +1 -1
  266. package/resources/v2/index.d.ts.map +1 -1
  267. package/resources/v2/index.mjs.map +1 -1
  268. package/resources/v2/v2.d.mts.map +1 -1
  269. package/resources/v2/v2.d.ts.map +1 -1
  270. package/resources/v2/v2.mjs.map +1 -1
  271. package/resources/v2.d.mts.map +1 -1
  272. package/resources/v2.d.ts.map +1 -1
  273. package/resources/v2.mjs.map +1 -1
  274. package/resources/webhooks.d.mts.map +1 -1
  275. package/resources/webhooks.d.ts.map +1 -1
  276. package/resources/webhooks.mjs.map +1 -1
  277. package/resources.d.mts.map +1 -1
  278. package/resources.d.ts.map +1 -1
  279. package/resources.mjs.map +1 -1
  280. package/src/client.ts +9 -1
  281. package/src/resources/shared.ts +524 -4
  282. package/src/resources/v1/alerts.ts +49 -0
  283. package/src/resources/v1/contracts/contracts.ts +850 -9
  284. package/src/resources/v1/contracts/index.ts +2 -0
  285. package/src/resources/v1/contracts/rate-cards/rates.ts +4 -0
  286. package/src/resources/v1/customers/alerts.ts +99 -2
  287. package/src/resources/v1/customers/invoices.ts +6 -0
  288. package/src/resources/v1/dashboards.ts +10 -3
  289. package/src/resources/v1/index.ts +2 -11
  290. package/src/resources/v1/packages.ts +372 -13
  291. package/src/resources/v1/v1.ts +4 -26
  292. package/src/resources/v2/contracts.ts +2271 -5
  293. package/src/version.ts +1 -1
  294. package/uploads.d.mts +1 -0
  295. package/uploads.d.mts.map +1 -1
  296. package/uploads.d.ts +1 -0
  297. package/uploads.d.ts.map +1 -1
  298. package/uploads.mjs +1 -0
  299. package/uploads.mjs.map +1 -1
  300. package/version.d.mts +1 -1
  301. package/version.d.ts +1 -1
  302. package/version.js +1 -1
  303. package/version.mjs +1 -1
  304. package/resources/v1/payments.d.mts +0 -127
  305. package/resources/v1/payments.d.mts.map +0 -1
  306. package/resources/v1/payments.d.ts +0 -127
  307. package/resources/v1/payments.d.ts.map +0 -1
  308. package/resources/v1/payments.js +0 -71
  309. package/resources/v1/payments.js.map +0 -1
  310. package/resources/v1/payments.mjs +0 -67
  311. package/resources/v1/payments.mjs.map +0 -1
  312. package/src/resources/v1/payments.ts +0 -187
@@ -121,10 +121,9 @@ export declare class Packages extends APIResource {
121
121
  *
122
122
  * ### **Usage guidelines:**
123
123
  *
124
- * Use the **`starting_at`**, **`covering_date`**,
125
- * and **`include_archived`** parameters to filter the list of returned contracts.
126
- * For example, to list only currently active contracts,
127
- * pass **`covering_date`** equal to the current time.
124
+ * Use the **`starting_at`**, **`covering_date`**, and **`include_archived`**
125
+ * parameters to filter the list of returned contracts. For example, to list only
126
+ * currently active contracts, pass **`covering_date`** equal to the current time.
128
127
  *
129
128
  * @example
130
129
  * ```ts
@@ -187,6 +186,7 @@ export declare namespace PackageRetrieveResponse {
187
186
  */
188
187
  scheduled_charges_on_usage_invoices?: 'ALL';
189
188
  spend_threshold_configuration?: Shared.SpendThresholdConfiguration;
189
+ spend_trackers?: Array<Data.SpendTracker>;
190
190
  subscriptions?: Array<Data.Subscription>;
191
191
  /**
192
192
  * Prevents the creation of duplicates. If a request to create a record is made
@@ -308,6 +308,7 @@ export declare namespace PackageRetrieveResponse {
308
308
  }
309
309
  namespace Override {
310
310
  interface OverrideSpecifier {
311
+ any_commit_or_credit_template_ids?: Array<string>;
311
312
  billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
312
313
  commit_template_ids?: Array<string>;
313
314
  presentation_group_values?: {
@@ -479,6 +480,10 @@ export declare namespace PackageRetrieveResponse {
479
480
  * the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
480
481
  */
481
482
  proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
483
+ /**
484
+ * Rounding configuration for prorated recurring commit amounts.
485
+ */
486
+ proration_rounding?: RecurringCommit.ProrationRounding | null;
482
487
  /**
483
488
  * The frequency at which the recurring commits will be created. If not provided: -
484
489
  * The commits will be created on the usage invoice frequency. If provided: - The
@@ -486,7 +491,7 @@ export declare namespace PackageRetrieveResponse {
486
491
  * be created aligned with the recurring commit's starting_at rather than the usage
487
492
  * invoice dates.
488
493
  */
489
- recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
494
+ recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
490
495
  /**
491
496
  * Will be passed down to the individual commits. This controls how much of an
492
497
  * individual unexpired commit will roll over upon contract transition. Must be
@@ -548,6 +553,35 @@ export declare namespace PackageRetrieveResponse {
548
553
  quantity: number;
549
554
  unit_price: number;
550
555
  }
556
+ /**
557
+ * Rounding configuration for prorated recurring commit amounts.
558
+ */
559
+ interface ProrationRounding {
560
+ access?: ProrationRounding.Access;
561
+ invoice?: ProrationRounding.Invoice;
562
+ }
563
+ namespace ProrationRounding {
564
+ interface Access {
565
+ /**
566
+ * Number of decimal places to round to. Applied directly to the stored monetary
567
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
568
+ * nearest 100 in the stored unit. For USD, this means rounding to the nearest
569
+ * dollar).
570
+ */
571
+ decimal_places: number;
572
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
573
+ }
574
+ interface Invoice {
575
+ /**
576
+ * Number of decimal places to round to. Applied directly to the stored monetary
577
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
578
+ * nearest 100 in the stored unit. For USD, this means rounding to the nearest
579
+ * dollar).
580
+ */
581
+ decimal_places: number;
582
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
583
+ }
584
+ }
551
585
  /**
552
586
  * Attach a subscription to the recurring commit/credit.
553
587
  */
@@ -606,6 +640,10 @@ export declare namespace PackageRetrieveResponse {
606
640
  * the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
607
641
  */
608
642
  proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
643
+ /**
644
+ * Rounding configuration for prorated recurring credit amounts.
645
+ */
646
+ proration_rounding?: RecurringCredit.ProrationRounding | null;
609
647
  /**
610
648
  * The frequency at which the recurring commits will be created. If not provided: -
611
649
  * The commits will be created on the usage invoice frequency. If provided: - The
@@ -613,7 +651,7 @@ export declare namespace PackageRetrieveResponse {
613
651
  * be created aligned with the recurring commit's starting_at rather than the usage
614
652
  * invoice dates.
615
653
  */
616
- recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
654
+ recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
617
655
  /**
618
656
  * Will be passed down to the individual commits. This controls how much of an
619
657
  * individual unexpired commit will roll over upon contract transition. Must be
@@ -667,6 +705,24 @@ export declare namespace PackageRetrieveResponse {
667
705
  unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS';
668
706
  value: number;
669
707
  }
708
+ /**
709
+ * Rounding configuration for prorated recurring credit amounts.
710
+ */
711
+ interface ProrationRounding {
712
+ access?: ProrationRounding.Access;
713
+ }
714
+ namespace ProrationRounding {
715
+ interface Access {
716
+ /**
717
+ * Number of decimal places to round to. Applied directly to the stored monetary
718
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
719
+ * nearest 100 in the stored unit. For USD, this means rounding to the nearest
720
+ * dollar).
721
+ */
722
+ decimal_places: number;
723
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
724
+ }
725
+ }
670
726
  /**
671
727
  * Attach a subscription to the recurring commit/credit.
672
728
  */
@@ -684,11 +740,28 @@ export declare namespace PackageRetrieveResponse {
684
740
  }
685
741
  }
686
742
  }
743
+ interface SpendTracker {
744
+ /**
745
+ * Human-readable identifier, unique per contract.
746
+ */
747
+ alias: string;
748
+ applicable_spend_specifiers: Array<SpendTracker.ApplicableSpendSpecifier>;
749
+ credit_type_id: string;
750
+ reset_frequency: 'BILLING_PERIOD';
751
+ }
752
+ namespace SpendTracker {
753
+ interface ApplicableSpendSpecifier {
754
+ sources: Array<'THRESHOLD_RECHARGE' | 'MANUAL'>;
755
+ spend_type: 'COMMIT_PURCHASE';
756
+ discounted?: 'ANY' | 'DISCOUNTED_ONLY' | 'UNDISCOUNTED_ONLY';
757
+ }
758
+ }
687
759
  interface Subscription {
688
760
  collection_schedule: 'ADVANCE' | 'ARREARS';
689
761
  proration: Subscription.Proration;
690
762
  subscription_rate: Subscription.SubscriptionRate;
691
763
  id?: string;
764
+ billing_cycle_config?: Subscription.BillingCycleConfig;
692
765
  /**
693
766
  * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
694
767
  */
@@ -719,6 +792,19 @@ export declare namespace PackageRetrieveResponse {
719
792
  interface Proration {
720
793
  invoice_behavior: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE';
721
794
  is_prorated: boolean;
795
+ rounding?: Proration.Rounding;
796
+ }
797
+ namespace Proration {
798
+ interface Rounding {
799
+ /**
800
+ * Number of decimal places to round to. Applied directly to the stored monetary
801
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
802
+ * nearest 100 in the stored unit. For USD, this means rounding to the nearest
803
+ * dollar).
804
+ */
805
+ decimal_places: number;
806
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
807
+ }
722
808
  }
723
809
  interface SubscriptionRate {
724
810
  billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
@@ -730,6 +816,9 @@ export declare namespace PackageRetrieveResponse {
730
816
  name: string;
731
817
  }
732
818
  }
819
+ interface BillingCycleConfig {
820
+ invoice_placement?: 'ON_SCHEDULED_INVOICE' | 'ON_USAGE_INVOICE';
821
+ }
733
822
  interface Duration {
734
823
  unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS';
735
824
  value: number;
@@ -792,6 +881,7 @@ export interface PackageListResponse {
792
881
  */
793
882
  scheduled_charges_on_usage_invoices?: 'ALL';
794
883
  spend_threshold_configuration?: Shared.SpendThresholdConfiguration;
884
+ spend_trackers?: Array<PackageListResponse.SpendTracker>;
795
885
  subscriptions?: Array<PackageListResponse.Subscription>;
796
886
  /**
797
887
  * Prevents the creation of duplicates. If a request to create a record is made
@@ -913,6 +1003,7 @@ export declare namespace PackageListResponse {
913
1003
  }
914
1004
  namespace Override {
915
1005
  interface OverrideSpecifier {
1006
+ any_commit_or_credit_template_ids?: Array<string>;
916
1007
  billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
917
1008
  commit_template_ids?: Array<string>;
918
1009
  presentation_group_values?: {
@@ -1084,6 +1175,10 @@ export declare namespace PackageListResponse {
1084
1175
  * the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
1085
1176
  */
1086
1177
  proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
1178
+ /**
1179
+ * Rounding configuration for prorated recurring commit amounts.
1180
+ */
1181
+ proration_rounding?: RecurringCommit.ProrationRounding | null;
1087
1182
  /**
1088
1183
  * The frequency at which the recurring commits will be created. If not provided: -
1089
1184
  * The commits will be created on the usage invoice frequency. If provided: - The
@@ -1091,7 +1186,7 @@ export declare namespace PackageListResponse {
1091
1186
  * be created aligned with the recurring commit's starting_at rather than the usage
1092
1187
  * invoice dates.
1093
1188
  */
1094
- recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
1189
+ recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
1095
1190
  /**
1096
1191
  * Will be passed down to the individual commits. This controls how much of an
1097
1192
  * individual unexpired commit will roll over upon contract transition. Must be
@@ -1153,6 +1248,35 @@ export declare namespace PackageListResponse {
1153
1248
  quantity: number;
1154
1249
  unit_price: number;
1155
1250
  }
1251
+ /**
1252
+ * Rounding configuration for prorated recurring commit amounts.
1253
+ */
1254
+ interface ProrationRounding {
1255
+ access?: ProrationRounding.Access;
1256
+ invoice?: ProrationRounding.Invoice;
1257
+ }
1258
+ namespace ProrationRounding {
1259
+ interface Access {
1260
+ /**
1261
+ * Number of decimal places to round to. Applied directly to the stored monetary
1262
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
1263
+ * nearest 100 in the stored unit. For USD, this means rounding to the nearest
1264
+ * dollar).
1265
+ */
1266
+ decimal_places: number;
1267
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
1268
+ }
1269
+ interface Invoice {
1270
+ /**
1271
+ * Number of decimal places to round to. Applied directly to the stored monetary
1272
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
1273
+ * nearest 100 in the stored unit. For USD, this means rounding to the nearest
1274
+ * dollar).
1275
+ */
1276
+ decimal_places: number;
1277
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
1278
+ }
1279
+ }
1156
1280
  /**
1157
1281
  * Attach a subscription to the recurring commit/credit.
1158
1282
  */
@@ -1211,6 +1335,10 @@ export declare namespace PackageListResponse {
1211
1335
  * the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
1212
1336
  */
1213
1337
  proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
1338
+ /**
1339
+ * Rounding configuration for prorated recurring credit amounts.
1340
+ */
1341
+ proration_rounding?: RecurringCredit.ProrationRounding | null;
1214
1342
  /**
1215
1343
  * The frequency at which the recurring commits will be created. If not provided: -
1216
1344
  * The commits will be created on the usage invoice frequency. If provided: - The
@@ -1218,7 +1346,7 @@ export declare namespace PackageListResponse {
1218
1346
  * be created aligned with the recurring commit's starting_at rather than the usage
1219
1347
  * invoice dates.
1220
1348
  */
1221
- recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
1349
+ recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
1222
1350
  /**
1223
1351
  * Will be passed down to the individual commits. This controls how much of an
1224
1352
  * individual unexpired commit will roll over upon contract transition. Must be
@@ -1272,6 +1400,24 @@ export declare namespace PackageListResponse {
1272
1400
  unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS';
1273
1401
  value: number;
1274
1402
  }
1403
+ /**
1404
+ * Rounding configuration for prorated recurring credit amounts.
1405
+ */
1406
+ interface ProrationRounding {
1407
+ access?: ProrationRounding.Access;
1408
+ }
1409
+ namespace ProrationRounding {
1410
+ interface Access {
1411
+ /**
1412
+ * Number of decimal places to round to. Applied directly to the stored monetary
1413
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
1414
+ * nearest 100 in the stored unit. For USD, this means rounding to the nearest
1415
+ * dollar).
1416
+ */
1417
+ decimal_places: number;
1418
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
1419
+ }
1420
+ }
1275
1421
  /**
1276
1422
  * Attach a subscription to the recurring commit/credit.
1277
1423
  */
@@ -1289,11 +1435,28 @@ export declare namespace PackageListResponse {
1289
1435
  }
1290
1436
  }
1291
1437
  }
1438
+ interface SpendTracker {
1439
+ /**
1440
+ * Human-readable identifier, unique per contract.
1441
+ */
1442
+ alias: string;
1443
+ applicable_spend_specifiers: Array<SpendTracker.ApplicableSpendSpecifier>;
1444
+ credit_type_id: string;
1445
+ reset_frequency: 'BILLING_PERIOD';
1446
+ }
1447
+ namespace SpendTracker {
1448
+ interface ApplicableSpendSpecifier {
1449
+ sources: Array<'THRESHOLD_RECHARGE' | 'MANUAL'>;
1450
+ spend_type: 'COMMIT_PURCHASE';
1451
+ discounted?: 'ANY' | 'DISCOUNTED_ONLY' | 'UNDISCOUNTED_ONLY';
1452
+ }
1453
+ }
1292
1454
  interface Subscription {
1293
1455
  collection_schedule: 'ADVANCE' | 'ARREARS';
1294
1456
  proration: Subscription.Proration;
1295
1457
  subscription_rate: Subscription.SubscriptionRate;
1296
1458
  id?: string;
1459
+ billing_cycle_config?: Subscription.BillingCycleConfig;
1297
1460
  /**
1298
1461
  * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
1299
1462
  */
@@ -1324,6 +1487,19 @@ export declare namespace PackageListResponse {
1324
1487
  interface Proration {
1325
1488
  invoice_behavior: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE';
1326
1489
  is_prorated: boolean;
1490
+ rounding?: Proration.Rounding;
1491
+ }
1492
+ namespace Proration {
1493
+ interface Rounding {
1494
+ /**
1495
+ * Number of decimal places to round to. Applied directly to the stored monetary
1496
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
1497
+ * nearest 100 in the stored unit. For USD, this means rounding to the nearest
1498
+ * dollar).
1499
+ */
1500
+ decimal_places: number;
1501
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
1502
+ }
1327
1503
  }
1328
1504
  interface SubscriptionRate {
1329
1505
  billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
@@ -1335,6 +1511,9 @@ export declare namespace PackageListResponse {
1335
1511
  name: string;
1336
1512
  }
1337
1513
  }
1514
+ interface BillingCycleConfig {
1515
+ invoice_placement?: 'ON_SCHEDULED_INVOICE' | 'ON_USAGE_INVOICE';
1516
+ }
1338
1517
  interface Duration {
1339
1518
  unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS';
1340
1519
  value: number;
@@ -1408,6 +1587,7 @@ export interface PackageCreateParams {
1408
1587
  */
1409
1588
  scheduled_charges_on_usage_invoices?: 'ALL';
1410
1589
  spend_threshold_configuration?: Shared.SpendThresholdConfiguration;
1590
+ spend_trackers?: Array<PackageCreateParams.SpendTracker>;
1411
1591
  subscriptions?: Array<PackageCreateParams.Subscription>;
1412
1592
  /**
1413
1593
  * Prevents the creation of duplicates. If a request to create a record is made
@@ -1689,9 +1869,10 @@ export declare namespace PackageCreateParams {
1689
1869
  entitled?: boolean;
1690
1870
  /**
1691
1871
  * Indicates whether the override should only apply to commits. Defaults to
1692
- * `false`. If `true`, you can specify relevant commits in `override_specifiers` by
1693
- * passing `commit_ids`. if you do not specify `commit_ids`, then the override will
1694
- * apply when consuming any prepaid or postpaid commit.
1872
+ * `false`. If `true` you can specify relevant commits in `override_specifiers` by
1873
+ * passing `commit_ids`, `recurring_commit_ids`, or `any_commit_or_credit_ids`. If
1874
+ * you do not specify any of these fields, the override will apply when consuming
1875
+ * any prepaid commit, postpaid commit, or credit
1695
1876
  */
1696
1877
  is_commit_specific?: boolean;
1697
1878
  /**
@@ -1726,6 +1907,14 @@ export declare namespace PackageCreateParams {
1726
1907
  }
1727
1908
  namespace Override {
1728
1909
  interface OverrideSpecifier {
1910
+ /**
1911
+ * Can only be used for commit specific overrides. Must be used in conjunction with
1912
+ * one of `product_id`, `product_tags`, `pricing_group_values`, or
1913
+ * `presentation_group_values`. Must be used instead of both `commit_ids` and
1914
+ * `recurring_commit_ids` If provided, the override will apply to any specified
1915
+ * commit, credit, recurring commit or recurring credit IDs.
1916
+ */
1917
+ any_commit_or_credit_ids?: Array<string>;
1729
1918
  billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
1730
1919
  /**
1731
1920
  * Can only be used for commit specific overrides. Must be used in conjunction with
@@ -1869,6 +2058,10 @@ export declare namespace PackageCreateParams {
1869
2058
  * the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
1870
2059
  */
1871
2060
  proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
2061
+ /**
2062
+ * Optional rounding configuration for prorated recurring commit amounts.
2063
+ */
2064
+ proration_rounding?: RecurringCommit.ProrationRounding;
1872
2065
  /**
1873
2066
  * Whether the created commits will use the commit rate or list rate
1874
2067
  */
@@ -1880,7 +2073,7 @@ export declare namespace PackageCreateParams {
1880
2073
  * be created aligned with the recurring commit's starting_at rather than the usage
1881
2074
  * invoice dates.
1882
2075
  */
1883
- recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
2076
+ recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
1884
2077
  /**
1885
2078
  * Will be passed down to the individual commits. This controls how much of an
1886
2079
  * individual unexpired commit will roll over upon contract transition. Must be
@@ -1950,6 +2143,35 @@ export declare namespace PackageCreateParams {
1950
2143
  quantity: number;
1951
2144
  unit_price: number;
1952
2145
  }
2146
+ /**
2147
+ * Optional rounding configuration for prorated recurring commit amounts.
2148
+ */
2149
+ interface ProrationRounding {
2150
+ access?: ProrationRounding.Access;
2151
+ invoice?: ProrationRounding.Invoice;
2152
+ }
2153
+ namespace ProrationRounding {
2154
+ interface Access {
2155
+ /**
2156
+ * Number of decimal places to round to. Applied directly to the stored monetary
2157
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
2158
+ * nearest 100 in the stored unit. For USD, this means rounding to the nearest
2159
+ * dollar).
2160
+ */
2161
+ decimal_places: number;
2162
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
2163
+ }
2164
+ interface Invoice {
2165
+ /**
2166
+ * Number of decimal places to round to. Applied directly to the stored monetary
2167
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
2168
+ * nearest 100 in the stored unit. For USD, this means rounding to the nearest
2169
+ * dollar).
2170
+ */
2171
+ decimal_places: number;
2172
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
2173
+ }
2174
+ }
1953
2175
  /**
1954
2176
  * Attach a subscription to the recurring commit/credit.
1955
2177
  */
@@ -2021,6 +2243,10 @@ export declare namespace PackageCreateParams {
2021
2243
  * the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
2022
2244
  */
2023
2245
  proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
2246
+ /**
2247
+ * Optional rounding configuration for prorated recurring credit amounts.
2248
+ */
2249
+ proration_rounding?: RecurringCredit.ProrationRounding;
2024
2250
  /**
2025
2251
  * Whether the created commits will use the commit rate or list rate
2026
2252
  */
@@ -2032,7 +2258,7 @@ export declare namespace PackageCreateParams {
2032
2258
  * be created aligned with the recurring commit's starting_at rather than the usage
2033
2259
  * invoice dates.
2034
2260
  */
2035
- recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
2261
+ recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
2036
2262
  /**
2037
2263
  * Will be passed down to the individual commits. This controls how much of an
2038
2264
  * individual unexpired commit will roll over upon contract transition. Must be
@@ -2094,6 +2320,24 @@ export declare namespace PackageCreateParams {
2094
2320
  unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS';
2095
2321
  value: number;
2096
2322
  }
2323
+ /**
2324
+ * Optional rounding configuration for prorated recurring credit amounts.
2325
+ */
2326
+ interface ProrationRounding {
2327
+ access?: ProrationRounding.Access;
2328
+ }
2329
+ namespace ProrationRounding {
2330
+ interface Access {
2331
+ /**
2332
+ * Number of decimal places to round to. Applied directly to the stored monetary
2333
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
2334
+ * nearest 100 in the stored unit. For USD, this means rounding to the nearest
2335
+ * dollar).
2336
+ */
2337
+ decimal_places: number;
2338
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
2339
+ }
2340
+ }
2097
2341
  /**
2098
2342
  * Attach a subscription to the recurring commit/credit.
2099
2343
  */
@@ -2177,10 +2421,30 @@ export declare namespace PackageCreateParams {
2177
2421
  }
2178
2422
  }
2179
2423
  }
2424
+ interface SpendTracker {
2425
+ /**
2426
+ * Human-readable identifier, unique per contract.
2427
+ */
2428
+ alias: string;
2429
+ applicable_spend_specifiers: Array<SpendTracker.ApplicableSpendSpecifier>;
2430
+ credit_type_id: string;
2431
+ reset_frequency: 'BILLING_PERIOD';
2432
+ }
2433
+ namespace SpendTracker {
2434
+ interface ApplicableSpendSpecifier {
2435
+ sources: Array<'THRESHOLD_RECHARGE' | 'MANUAL'>;
2436
+ spend_type: 'COMMIT_PURCHASE';
2437
+ /**
2438
+ * Filter by whether the spend was discounted. Defaults to ANY if omitted.
2439
+ */
2440
+ discounted?: 'ANY' | 'DISCOUNTED_ONLY' | 'UNDISCOUNTED_ONLY';
2441
+ }
2442
+ }
2180
2443
  interface Subscription {
2181
2444
  collection_schedule: 'ADVANCE' | 'ARREARS';
2182
2445
  proration: Subscription.Proration;
2183
2446
  subscription_rate: Subscription.SubscriptionRate;
2447
+ billing_cycle_config?: Subscription.BillingCycleConfig;
2184
2448
  /**
2185
2449
  * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
2186
2450
  */
@@ -2237,6 +2501,19 @@ export declare namespace PackageCreateParams {
2237
2501
  * Indicates if the partial period will be prorated or charged a full amount.
2238
2502
  */
2239
2503
  is_prorated?: boolean;
2504
+ rounding?: Proration.Rounding;
2505
+ }
2506
+ namespace Proration {
2507
+ interface Rounding {
2508
+ /**
2509
+ * Number of decimal places to round to. Applied directly to the stored monetary
2510
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
2511
+ * nearest 100 in the stored unit. For USD, this means rounding to the nearest
2512
+ * dollar).
2513
+ */
2514
+ decimal_places: number;
2515
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
2516
+ }
2240
2517
  }
2241
2518
  interface SubscriptionRate {
2242
2519
  /**
@@ -2249,6 +2526,13 @@ export declare namespace PackageCreateParams {
2249
2526
  */
2250
2527
  product_id: string;
2251
2528
  }
2529
+ interface BillingCycleConfig {
2530
+ /**
2531
+ * Controls whether subscriptions consolidate onto usage invoices. Defaults to
2532
+ * ON_USAGE_INVOICE if omitted.
2533
+ */
2534
+ invoice_placement?: 'ON_SCHEDULED_INVOICE' | 'ON_USAGE_INVOICE';
2535
+ }
2252
2536
  /**
2253
2537
  * Lifetime of the subscription from its start. If not provided, subscription
2254
2538
  * inherits contract end date.