@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
@@ -103,6 +103,12 @@ export interface Commit {
103
103
 
104
104
  contract?: Commit.Contract;
105
105
 
106
+ /**
107
+ * The actor who created this commit. Omitted for system-generated commits such as
108
+ * recurring commits, rollover commits, and threshold commits.
109
+ */
110
+ created_by?: string;
111
+
106
112
  /**
107
113
  * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
108
114
  */
@@ -183,6 +189,11 @@ export interface Commit {
183
189
  */
184
190
  specifiers?: Array<CommitSpecifier>;
185
191
 
192
+ /**
193
+ * Optional attributes controlling how this commit interacts with spend trackers.
194
+ */
195
+ spend_tracker_attributes?: Commit.SpendTrackerAttributes;
196
+
186
197
  /**
187
198
  * The subscription configuration for this commit, if it was generated from a
188
199
  * recurring commit with a subscription attached.
@@ -380,6 +391,17 @@ export namespace Commit {
380
391
  contract_id: string;
381
392
  }
382
393
 
394
+ /**
395
+ * Optional attributes controlling how this commit interacts with spend trackers.
396
+ */
397
+ export interface SpendTrackerAttributes {
398
+ /**
399
+ * If true, this commit is included in spend trackers with discounted set to
400
+ * DISCOUNTED_ONLY
401
+ */
402
+ counts_as_discounted: boolean;
403
+ }
404
+
383
405
  /**
384
406
  * The subscription configuration for this commit, if it was generated from a
385
407
  * recurring commit with a subscription attached.
@@ -532,6 +554,11 @@ export interface Contract {
532
554
 
533
555
  spend_threshold_configuration?: SpendThresholdConfiguration;
534
556
 
557
+ /**
558
+ * Spend trackers attached to this contract.
559
+ */
560
+ spend_trackers?: Array<Contract.SpendTracker>;
561
+
535
562
  /**
536
563
  * List of subscriptions on the contract.
537
564
  */
@@ -642,6 +669,39 @@ export namespace Contract {
642
669
  */
643
670
  configuration?: { [key: string]: unknown };
644
671
  }
672
+
673
+ export interface SpendTracker {
674
+ /**
675
+ * Human-readable identifier, unique per contract.
676
+ */
677
+ alias: string;
678
+
679
+ applicable_spend_specifiers: Array<SpendTracker.ApplicableSpendSpecifier>;
680
+
681
+ credit_type_id: string;
682
+
683
+ reset_frequency: 'BILLING_PERIOD';
684
+
685
+ accumulated_spend?: SpendTracker.AccumulatedSpend;
686
+ }
687
+
688
+ export namespace SpendTracker {
689
+ export interface ApplicableSpendSpecifier {
690
+ sources: Array<'THRESHOLD_RECHARGE' | 'MANUAL'>;
691
+
692
+ spend_type: 'COMMIT_PURCHASE';
693
+
694
+ discounted?: 'ANY' | 'DISCOUNTED_ONLY' | 'UNDISCOUNTED_ONLY';
695
+ }
696
+
697
+ export interface AccumulatedSpend {
698
+ amount: number;
699
+
700
+ period_ending_before: string;
701
+
702
+ period_starting_at: string;
703
+ }
704
+ }
645
705
  }
646
706
 
647
707
  export interface ContractV2 {
@@ -758,6 +818,11 @@ export interface ContractV2 {
758
818
 
759
819
  spend_threshold_configuration?: SpendThresholdConfigurationV2;
760
820
 
821
+ /**
822
+ * Spend trackers attached to this contract.
823
+ */
824
+ spend_trackers?: Array<ContractV2.SpendTracker>;
825
+
761
826
  /**
762
827
  * List of subscriptions on the contract.
763
828
  */
@@ -816,6 +881,12 @@ export namespace ContractV2 {
816
881
 
817
882
  contract?: Commit.Contract;
818
883
 
884
+ /**
885
+ * The actor who created this commit. Omitted for system-generated commits such as
886
+ * recurring commits, rollover commits, and threshold commits.
887
+ */
888
+ created_by?: string;
889
+
819
890
  /**
820
891
  * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
821
892
  */
@@ -895,6 +966,11 @@ export namespace ContractV2 {
895
966
  */
896
967
  specifiers?: Array<Shared.CommitSpecifier>;
897
968
 
969
+ /**
970
+ * Optional attributes controlling how this commit interacts with spend trackers.
971
+ */
972
+ spend_tracker_attributes?: Commit.SpendTrackerAttributes;
973
+
898
974
  /**
899
975
  * Attach a subscription to the recurring commit/credit.
900
976
  */
@@ -1082,6 +1158,17 @@ export namespace ContractV2 {
1082
1158
 
1083
1159
  contract_id: string;
1084
1160
  }
1161
+
1162
+ /**
1163
+ * Optional attributes controlling how this commit interacts with spend trackers.
1164
+ */
1165
+ export interface SpendTrackerAttributes {
1166
+ /**
1167
+ * If true, this commit is included in spend trackers with discounted set to
1168
+ * DISCOUNTED_ONLY
1169
+ */
1170
+ counts_as_discounted: boolean;
1171
+ }
1085
1172
  }
1086
1173
 
1087
1174
  export interface Override {
@@ -1118,6 +1205,8 @@ export namespace ContractV2 {
1118
1205
 
1119
1206
  export namespace Override {
1120
1207
  export interface OverrideSpecifier {
1208
+ any_commit_or_credit_ids?: Array<string>;
1209
+
1121
1210
  billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
1122
1211
 
1123
1212
  commit_ids?: Array<string>;
@@ -1251,6 +1340,12 @@ export namespace ContractV2 {
1251
1340
  */
1252
1341
  created_at?: string;
1253
1342
 
1343
+ /**
1344
+ * The actor who created this credit. Omitted for system-generated credits such as
1345
+ * recurring credits.
1346
+ */
1347
+ created_by?: string;
1348
+
1254
1349
  /**
1255
1350
  * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
1256
1351
  */
@@ -1616,6 +1711,11 @@ export namespace ContractV2 {
1616
1711
  */
1617
1712
  proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
1618
1713
 
1714
+ /**
1715
+ * Rounding configuration for prorated recurring commit amounts.
1716
+ */
1717
+ proration_rounding?: RecurringCommit.ProrationRounding | null;
1718
+
1619
1719
  /**
1620
1720
  * The frequency at which the recurring commits will be created. If not provided: -
1621
1721
  * The commits will be created on the usage invoice frequency. If provided: - The
@@ -1623,7 +1723,7 @@ export namespace ContractV2 {
1623
1723
  * be created aligned with the recurring commit's starting_at rather than the usage
1624
1724
  * invoice dates.
1625
1725
  */
1626
- recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
1726
+ recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
1627
1727
 
1628
1728
  /**
1629
1729
  * Will be passed down to the individual commits. This controls how much of an
@@ -1686,6 +1786,39 @@ export namespace ContractV2 {
1686
1786
 
1687
1787
  unit_price: number;
1688
1788
  }
1789
+
1790
+ /**
1791
+ * Rounding configuration for prorated recurring commit amounts.
1792
+ */
1793
+ export interface ProrationRounding {
1794
+ access?: ProrationRounding.Access;
1795
+
1796
+ invoice?: ProrationRounding.Invoice;
1797
+ }
1798
+
1799
+ export namespace ProrationRounding {
1800
+ export interface Access {
1801
+ /**
1802
+ * Number of decimal places to round to. Applied directly to the stored monetary
1803
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
1804
+ * nearest 100 in the stored unit).
1805
+ */
1806
+ decimal_places: number;
1807
+
1808
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
1809
+ }
1810
+
1811
+ export interface Invoice {
1812
+ /**
1813
+ * Number of decimal places to round to. Applied directly to the stored monetary
1814
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
1815
+ * nearest 100 in the stored unit).
1816
+ */
1817
+ decimal_places: number;
1818
+
1819
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
1820
+ }
1821
+ }
1689
1822
  }
1690
1823
 
1691
1824
  export interface RecurringCredit {
@@ -1761,6 +1894,11 @@ export namespace ContractV2 {
1761
1894
  */
1762
1895
  proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
1763
1896
 
1897
+ /**
1898
+ * Rounding configuration for prorated recurring credit amounts.
1899
+ */
1900
+ proration_rounding?: RecurringCredit.ProrationRounding | null;
1901
+
1764
1902
  /**
1765
1903
  * The frequency at which the recurring commits will be created. If not provided: -
1766
1904
  * The commits will be created on the usage invoice frequency. If provided: - The
@@ -1768,7 +1906,7 @@ export namespace ContractV2 {
1768
1906
  * be created aligned with the recurring commit's starting_at rather than the usage
1769
1907
  * invoice dates.
1770
1908
  */
1771
- recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
1909
+ recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
1772
1910
 
1773
1911
  /**
1774
1912
  * Will be passed down to the individual commits. This controls how much of an
@@ -1820,6 +1958,26 @@ export namespace ContractV2 {
1820
1958
  export interface Contract {
1821
1959
  id: string;
1822
1960
  }
1961
+
1962
+ /**
1963
+ * Rounding configuration for prorated recurring credit amounts.
1964
+ */
1965
+ export interface ProrationRounding {
1966
+ access?: ProrationRounding.Access;
1967
+ }
1968
+
1969
+ export namespace ProrationRounding {
1970
+ export interface Access {
1971
+ /**
1972
+ * Number of decimal places to round to. Applied directly to the stored monetary
1973
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
1974
+ * nearest 100 in the stored unit).
1975
+ */
1976
+ decimal_places: number;
1977
+
1978
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
1979
+ }
1980
+ }
1823
1981
  }
1824
1982
 
1825
1983
  export interface ResellerRoyalty {
@@ -1858,6 +2016,39 @@ export namespace ContractV2 {
1858
2016
  }
1859
2017
  }
1860
2018
 
2019
+ export interface SpendTracker {
2020
+ /**
2021
+ * Human-readable identifier, unique per contract.
2022
+ */
2023
+ alias: string;
2024
+
2025
+ applicable_spend_specifiers: Array<SpendTracker.ApplicableSpendSpecifier>;
2026
+
2027
+ credit_type_id: string;
2028
+
2029
+ reset_frequency: 'BILLING_PERIOD';
2030
+
2031
+ accumulated_spend?: SpendTracker.AccumulatedSpend;
2032
+ }
2033
+
2034
+ export namespace SpendTracker {
2035
+ export interface ApplicableSpendSpecifier {
2036
+ sources: Array<'THRESHOLD_RECHARGE' | 'MANUAL'>;
2037
+
2038
+ spend_type: 'COMMIT_PURCHASE';
2039
+
2040
+ discounted?: 'ANY' | 'DISCOUNTED_ONLY' | 'UNDISCOUNTED_ONLY';
2041
+ }
2042
+
2043
+ export interface AccumulatedSpend {
2044
+ amount: number;
2045
+
2046
+ period_ending_before: string;
2047
+
2048
+ period_starting_at: string;
2049
+ }
2050
+ }
2051
+
1861
2052
  export interface Subscription {
1862
2053
  /**
1863
2054
  * Previous, current, and next billing periods for the subscription.
@@ -1893,6 +2084,8 @@ export namespace ContractV2 {
1893
2084
 
1894
2085
  id?: string;
1895
2086
 
2087
+ billing_cycle_config?: Subscription.BillingCycleConfig;
2088
+
1896
2089
  /**
1897
2090
  * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
1898
2091
  */
@@ -1945,6 +2138,21 @@ export namespace ContractV2 {
1945
2138
  invoice_behavior: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE';
1946
2139
 
1947
2140
  is_prorated: boolean;
2141
+
2142
+ rounding?: Proration.Rounding;
2143
+ }
2144
+
2145
+ export namespace Proration {
2146
+ export interface Rounding {
2147
+ /**
2148
+ * Number of decimal places to round to. Applied directly to the stored monetary
2149
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
2150
+ * nearest 100 in the stored unit).
2151
+ */
2152
+ decimal_places: number;
2153
+
2154
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
2155
+ }
1948
2156
  }
1949
2157
 
1950
2158
  export interface QuantitySchedule {
@@ -1969,6 +2177,19 @@ export namespace ContractV2 {
1969
2177
  }
1970
2178
  }
1971
2179
 
2180
+ export interface BillingCycleConfig {
2181
+ /**
2182
+ * The date this subscription's billing cycle is anchored to.
2183
+ */
2184
+ anchor_date: string;
2185
+
2186
+ /**
2187
+ * Controls whether this subscription consolidates onto usage invoices or gets its
2188
+ * own scheduled invoice.
2189
+ */
2190
+ invoice_placement: 'ON_SCHEDULED_INVOICE' | 'ON_USAGE_INVOICE';
2191
+ }
2192
+
1972
2193
  export interface SeatConfig {
1973
2194
  /**
1974
2195
  * The property name, sent on usage events, that identifies the seat ID associated
@@ -2058,6 +2279,11 @@ export interface ContractWithoutAmendments {
2058
2279
 
2059
2280
  spend_threshold_configuration?: SpendThresholdConfiguration;
2060
2281
 
2282
+ /**
2283
+ * Spend trackers attached to this contract.
2284
+ */
2285
+ spend_trackers?: Array<ContractWithoutAmendments.SpendTracker>;
2286
+
2061
2287
  /**
2062
2288
  * This field's availability is dependent on your client's configuration.
2063
2289
  */
@@ -2162,6 +2388,11 @@ export namespace ContractWithoutAmendments {
2162
2388
  */
2163
2389
  proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
2164
2390
 
2391
+ /**
2392
+ * Rounding configuration for prorated recurring commit amounts.
2393
+ */
2394
+ proration_rounding?: RecurringCommit.ProrationRounding | null;
2395
+
2165
2396
  /**
2166
2397
  * The frequency at which the recurring commits will be created. If not provided: -
2167
2398
  * The commits will be created on the usage invoice frequency. If provided: - The
@@ -2169,7 +2400,7 @@ export namespace ContractWithoutAmendments {
2169
2400
  * be created aligned with the recurring commit's starting_at rather than the usage
2170
2401
  * invoice dates.
2171
2402
  */
2172
- recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
2403
+ recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
2173
2404
 
2174
2405
  /**
2175
2406
  * Will be passed down to the individual commits. This controls how much of an
@@ -2232,6 +2463,41 @@ export namespace ContractWithoutAmendments {
2232
2463
 
2233
2464
  unit_price: number;
2234
2465
  }
2466
+
2467
+ /**
2468
+ * Rounding configuration for prorated recurring commit amounts.
2469
+ */
2470
+ export interface ProrationRounding {
2471
+ access?: ProrationRounding.Access;
2472
+
2473
+ invoice?: ProrationRounding.Invoice;
2474
+ }
2475
+
2476
+ export namespace ProrationRounding {
2477
+ export interface Access {
2478
+ /**
2479
+ * Number of decimal places to round to. Applied directly to the stored monetary
2480
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
2481
+ * nearest 100 in the stored unit. For USD, this means rounding to the nearest
2482
+ * dollar).
2483
+ */
2484
+ decimal_places: number;
2485
+
2486
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
2487
+ }
2488
+
2489
+ export interface Invoice {
2490
+ /**
2491
+ * Number of decimal places to round to. Applied directly to the stored monetary
2492
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
2493
+ * nearest 100 in the stored unit. For USD, this means rounding to the nearest
2494
+ * dollar).
2495
+ */
2496
+ decimal_places: number;
2497
+
2498
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
2499
+ }
2500
+ }
2235
2501
  }
2236
2502
 
2237
2503
  export interface RecurringCredit {
@@ -2307,6 +2573,11 @@ export namespace ContractWithoutAmendments {
2307
2573
  */
2308
2574
  proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
2309
2575
 
2576
+ /**
2577
+ * Rounding configuration for prorated recurring credit amounts.
2578
+ */
2579
+ proration_rounding?: RecurringCredit.ProrationRounding | null;
2580
+
2310
2581
  /**
2311
2582
  * The frequency at which the recurring commits will be created. If not provided: -
2312
2583
  * The commits will be created on the usage invoice frequency. If provided: - The
@@ -2314,7 +2585,7 @@ export namespace ContractWithoutAmendments {
2314
2585
  * be created aligned with the recurring commit's starting_at rather than the usage
2315
2586
  * invoice dates.
2316
2587
  */
2317
- recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
2588
+ recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
2318
2589
 
2319
2590
  /**
2320
2591
  * Will be passed down to the individual commits. This controls how much of an
@@ -2366,6 +2637,27 @@ export namespace ContractWithoutAmendments {
2366
2637
  export interface Contract {
2367
2638
  id: string;
2368
2639
  }
2640
+
2641
+ /**
2642
+ * Rounding configuration for prorated recurring credit amounts.
2643
+ */
2644
+ export interface ProrationRounding {
2645
+ access?: ProrationRounding.Access;
2646
+ }
2647
+
2648
+ export namespace ProrationRounding {
2649
+ export interface Access {
2650
+ /**
2651
+ * Number of decimal places to round to. Applied directly to the stored monetary
2652
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
2653
+ * nearest 100 in the stored unit. For USD, this means rounding to the nearest
2654
+ * dollar).
2655
+ */
2656
+ decimal_places: number;
2657
+
2658
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
2659
+ }
2660
+ }
2369
2661
  }
2370
2662
 
2371
2663
  export interface ResellerRoyalty {
@@ -2396,6 +2688,39 @@ export namespace ContractWithoutAmendments {
2396
2688
  reseller_contract_value?: number;
2397
2689
  }
2398
2690
 
2691
+ export interface SpendTracker {
2692
+ /**
2693
+ * Human-readable identifier, unique per contract.
2694
+ */
2695
+ alias: string;
2696
+
2697
+ applicable_spend_specifiers: Array<SpendTracker.ApplicableSpendSpecifier>;
2698
+
2699
+ credit_type_id: string;
2700
+
2701
+ reset_frequency: 'BILLING_PERIOD';
2702
+
2703
+ accumulated_spend?: SpendTracker.AccumulatedSpend;
2704
+ }
2705
+
2706
+ export namespace SpendTracker {
2707
+ export interface ApplicableSpendSpecifier {
2708
+ sources: Array<'THRESHOLD_RECHARGE' | 'MANUAL'>;
2709
+
2710
+ spend_type: 'COMMIT_PURCHASE';
2711
+
2712
+ discounted?: 'ANY' | 'DISCOUNTED_ONLY' | 'UNDISCOUNTED_ONLY';
2713
+ }
2714
+
2715
+ export interface AccumulatedSpend {
2716
+ amount: number;
2717
+
2718
+ period_ending_before: string;
2719
+
2720
+ period_starting_at: string;
2721
+ }
2722
+ }
2723
+
2399
2724
  export interface UsageFilter {
2400
2725
  current: Shared.BaseUsageFilter | null;
2401
2726
 
@@ -2447,6 +2772,12 @@ export interface Credit {
2447
2772
 
2448
2773
  contract?: Credit.Contract;
2449
2774
 
2775
+ /**
2776
+ * The actor who created this credit. Omitted for system-generated credits such as
2777
+ * recurring credits.
2778
+ */
2779
+ created_by?: string;
2780
+
2450
2781
  /**
2451
2782
  * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
2452
2783
  */
@@ -2859,6 +3190,8 @@ export interface Override {
2859
3190
 
2860
3191
  export namespace Override {
2861
3192
  export interface OverrideSpecifier {
3193
+ any_commit_or_credit_ids?: Array<string>;
3194
+
2862
3195
  billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
2863
3196
 
2864
3197
  commit_ids?: Array<string>;
@@ -3075,6 +3408,12 @@ export interface PrepaidBalanceThresholdConfiguration {
3075
3408
  custom_credit_type_id?: string;
3076
3409
 
3077
3410
  discount_configuration?: PrepaidBalanceThresholdConfiguration.DiscountConfiguration;
3411
+
3412
+ /**
3413
+ * Determines which balances are excluded from remaining balance calculation for
3414
+ * threshold billing.
3415
+ */
3416
+ threshold_balance_specifiers?: Array<PrepaidBalanceThresholdConfiguration.ThresholdBalanceSpecifier>;
3078
3417
  }
3079
3418
 
3080
3419
  export namespace PrepaidBalanceThresholdConfiguration {
@@ -3109,6 +3448,58 @@ export namespace PrepaidBalanceThresholdConfiguration {
3109
3448
  * (a 15% discount).
3110
3449
  */
3111
3450
  payment_fraction: number;
3451
+
3452
+ /**
3453
+ * If provided, the discount stops applying once the spend tracker has accumulated
3454
+ * this much spend in the billing period.
3455
+ */
3456
+ cap?: DiscountConfiguration.Cap;
3457
+ }
3458
+
3459
+ export namespace DiscountConfiguration {
3460
+ /**
3461
+ * If provided, the discount stops applying once the spend tracker has accumulated
3462
+ * this much spend in the billing period.
3463
+ */
3464
+ export interface Cap {
3465
+ /**
3466
+ * Accumulated spend ceiling above which the discount stops applying.
3467
+ */
3468
+ amount: number;
3469
+
3470
+ /**
3471
+ * Alias of the spend tracker this cap is measured against.
3472
+ */
3473
+ spend_tracker_alias: string;
3474
+ }
3475
+ }
3476
+
3477
+ export interface ThresholdBalanceSpecifier {
3478
+ /**
3479
+ * If any of the exclude specifier is met, the balance is not considered when
3480
+ * evaluating threshold billing
3481
+ */
3482
+ exclude: Array<ThresholdBalanceSpecifier.Exclude>;
3483
+ }
3484
+
3485
+ export namespace ThresholdBalanceSpecifier {
3486
+ export interface Exclude {
3487
+ /**
3488
+ * If provided, balances with all the custom fields will not be considered when
3489
+ * evaluating threshold billing
3490
+ */
3491
+ custom_field_filters: Array<Exclude.CustomFieldFilter>;
3492
+ }
3493
+
3494
+ export namespace Exclude {
3495
+ export interface CustomFieldFilter {
3496
+ entity: 'Commit' | 'ContractCredit' | 'ContractCreditOrCommit';
3497
+
3498
+ key: string;
3499
+
3500
+ value: string;
3501
+ }
3502
+ }
3112
3503
  }
3113
3504
  }
3114
3505
 
@@ -3142,6 +3533,12 @@ export interface PrepaidBalanceThresholdConfigurationV2 {
3142
3533
  custom_credit_type_id?: string;
3143
3534
 
3144
3535
  discount_configuration?: PrepaidBalanceThresholdConfigurationV2.DiscountConfiguration;
3536
+
3537
+ /**
3538
+ * Determines which balances are excluded from remaining balance calculation for
3539
+ * threshold billing.
3540
+ */
3541
+ threshold_balance_specifiers?: Array<PrepaidBalanceThresholdConfigurationV2.ThresholdBalanceSpecifier>;
3145
3542
  }
3146
3543
 
3147
3544
  export namespace PrepaidBalanceThresholdConfigurationV2 {
@@ -3178,6 +3575,50 @@ export namespace PrepaidBalanceThresholdConfigurationV2 {
3178
3575
  * (a 15% discount).
3179
3576
  */
3180
3577
  payment_fraction: number;
3578
+
3579
+ /**
3580
+ * If provided, the discount stops applying once the spend tracker has accumulated
3581
+ * this much spend in the billing period.
3582
+ */
3583
+ cap?: DiscountConfiguration.Cap;
3584
+ }
3585
+
3586
+ export namespace DiscountConfiguration {
3587
+ /**
3588
+ * If provided, the discount stops applying once the spend tracker has accumulated
3589
+ * this much spend in the billing period.
3590
+ */
3591
+ export interface Cap {
3592
+ /**
3593
+ * Accumulated spend ceiling above which the discount stops applying.
3594
+ */
3595
+ amount: number;
3596
+
3597
+ /**
3598
+ * Alias of the spend tracker this cap is measured against.
3599
+ */
3600
+ spend_tracker_alias: string;
3601
+ }
3602
+ }
3603
+
3604
+ export interface ThresholdBalanceSpecifier {
3605
+ exclude: Array<ThresholdBalanceSpecifier.Exclude>;
3606
+ }
3607
+
3608
+ export namespace ThresholdBalanceSpecifier {
3609
+ export interface Exclude {
3610
+ custom_field_filters: Array<Exclude.CustomFieldFilter>;
3611
+ }
3612
+
3613
+ export namespace Exclude {
3614
+ export interface CustomFieldFilter {
3615
+ entity: 'Commit' | 'ContractCredit' | 'ContractCreditOrCommit';
3616
+
3617
+ key: string;
3618
+
3619
+ value: string;
3620
+ }
3621
+ }
3181
3622
  }
3182
3623
  }
3183
3624
 
@@ -3412,6 +3853,30 @@ export namespace SpendThresholdConfiguration {
3412
3853
  * (a 15% discount).
3413
3854
  */
3414
3855
  payment_fraction: number;
3856
+
3857
+ /**
3858
+ * If provided, the discount stops applying once the spend tracker has accumulated
3859
+ * this much spend in the billing period.
3860
+ */
3861
+ cap?: DiscountConfiguration.Cap;
3862
+ }
3863
+
3864
+ export namespace DiscountConfiguration {
3865
+ /**
3866
+ * If provided, the discount stops applying once the spend tracker has accumulated
3867
+ * this much spend in the billing period.
3868
+ */
3869
+ export interface Cap {
3870
+ /**
3871
+ * Accumulated spend ceiling above which the discount stops applying.
3872
+ */
3873
+ amount: number;
3874
+
3875
+ /**
3876
+ * Alias of the spend tracker this cap is measured against.
3877
+ */
3878
+ spend_tracker_alias: string;
3879
+ }
3415
3880
  }
3416
3881
  }
3417
3882
 
@@ -3444,6 +3909,30 @@ export namespace SpendThresholdConfigurationV2 {
3444
3909
  * (a 15% discount).
3445
3910
  */
3446
3911
  payment_fraction: number;
3912
+
3913
+ /**
3914
+ * If provided, the discount stops applying once the spend tracker has accumulated
3915
+ * this much spend in the billing period.
3916
+ */
3917
+ cap?: DiscountConfiguration.Cap;
3918
+ }
3919
+
3920
+ export namespace DiscountConfiguration {
3921
+ /**
3922
+ * If provided, the discount stops applying once the spend tracker has accumulated
3923
+ * this much spend in the billing period.
3924
+ */
3925
+ export interface Cap {
3926
+ /**
3927
+ * Accumulated spend ceiling above which the discount stops applying.
3928
+ */
3929
+ amount: number;
3930
+
3931
+ /**
3932
+ * Alias of the spend tracker this cap is measured against.
3933
+ */
3934
+ spend_tracker_alias: string;
3935
+ }
3447
3936
  }
3448
3937
  }
3449
3938
 
@@ -3482,6 +3971,8 @@ export interface Subscription {
3482
3971
 
3483
3972
  id?: string;
3484
3973
 
3974
+ billing_cycle_config?: Subscription.BillingCycleConfig;
3975
+
3485
3976
  /**
3486
3977
  * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
3487
3978
  */
@@ -3534,6 +4025,22 @@ export namespace Subscription {
3534
4025
  invoice_behavior: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE';
3535
4026
 
3536
4027
  is_prorated: boolean;
4028
+
4029
+ rounding?: Proration.Rounding;
4030
+ }
4031
+
4032
+ export namespace Proration {
4033
+ export interface Rounding {
4034
+ /**
4035
+ * Number of decimal places to round to. Applied directly to the stored monetary
4036
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
4037
+ * nearest 100 in the stored unit. For USD, this means rounding to the nearest
4038
+ * dollar).
4039
+ */
4040
+ decimal_places: number;
4041
+
4042
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
4043
+ }
3537
4044
  }
3538
4045
 
3539
4046
  export interface QuantitySchedule {
@@ -3558,6 +4065,19 @@ export namespace Subscription {
3558
4065
  }
3559
4066
  }
3560
4067
 
4068
+ export interface BillingCycleConfig {
4069
+ /**
4070
+ * The date this subscription's billing cycle is anchored to.
4071
+ */
4072
+ anchor_date: string;
4073
+
4074
+ /**
4075
+ * Controls whether this subscription consolidates onto usage invoices or gets its
4076
+ * own scheduled invoice.
4077
+ */
4078
+ invoice_placement: 'ON_SCHEDULED_INVOICE' | 'ON_USAGE_INVOICE';
4079
+ }
4080
+
3561
4081
  export interface SeatConfig {
3562
4082
  /**
3563
4083
  * The property name, sent on usage events, that identifies the seat ID associated