@flexprice/sdk 2.1.47 → 2.1.48-dev.10

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 (290) hide show
  1. package/docs/sdk/models/billing-term-input.md +30 -0
  2. package/docs/sdk/models/billing-term-kind.md +17 -0
  3. package/docs/sdk/models/billing-term-owner-type.md +15 -0
  4. package/docs/sdk/models/billing-term-split.md +17 -0
  5. package/docs/sdk/models/billing-term-value-type.md +19 -0
  6. package/docs/sdk/models/billing-terms-response.md +16 -0
  7. package/docs/sdk/models/billingterm-instalment.md +40 -0
  8. package/docs/sdk/models/billingterm-term.md +37 -0
  9. package/docs/sdk/models/cancellation-fee-input.md +19 -0
  10. package/docs/sdk/models/cancellation-fee-type.md +17 -0
  11. package/docs/sdk/models/commitment-response.md +3 -1
  12. package/docs/sdk/models/create-commitment-request.md +3 -1
  13. package/docs/sdk/models/get-commitment-billing-terms-request.md +17 -0
  14. package/docs/sdk/models/get-subscription-v2-request.md +4 -4
  15. package/docs/sdk/models/instalment-bill-trigger.md +17 -0
  16. package/docs/sdk/models/instalment-delivery.md +17 -0
  17. package/docs/sdk/models/instalment-kind.md +17 -0
  18. package/docs/sdk/models/instalment-status.md +17 -0
  19. package/docs/sdk/models/invoice-billing-reason.md +1 -1
  20. package/docs/sdk/models/invoice-line-item-response.md +1 -0
  21. package/docs/sdk/models/list-commitment-instalments-request.md +18 -0
  22. package/docs/sdk/models/list-instalments-response.md +15 -0
  23. package/docs/sdk/models/preview-commitment-billing-terms-request.md +21 -0
  24. package/docs/sdk/models/replace-billing-terms-request.md +17 -0
  25. package/docs/sdk/models/replace-commitment-billing-terms-request.md +21 -0
  26. package/docs/sdk/models/subscription-response-v2.md +1 -0
  27. package/docs/sdk/models/subscription-response.md +1 -0
  28. package/docs/sdk/models/terminate-commitment-request.md +4 -4
  29. package/docs/sdk/models/trigger-commitment-instalment-request.md +20 -0
  30. package/docs/sdk/models/trigger-instalment-request.md +15 -0
  31. package/docs/sdk/models/update-commitment-request.md +7 -6
  32. package/docs/sdk/models/webhook-dto-billing-instalment-webhook-payload.md +16 -0
  33. package/docs/sdk/models/webhook-dto-billing-terms-webhook-payload.md +18 -0
  34. package/docs/sdk/models/webhook-dto-invoice-line-item.md +1 -0
  35. package/docs/sdk/models/webhook-event-name.md +1 -1
  36. package/docs/sdks/commitments/README.md +384 -1
  37. package/docs/sdks/subscriptions/README.md +1 -1
  38. package/docs/sdks/webhookevents/README.md +414 -0
  39. package/esm/funcs/commitments-get-commitment-billing-terms.d.ts +17 -0
  40. package/esm/funcs/commitments-get-commitment-billing-terms.d.ts.map +1 -0
  41. package/esm/funcs/commitments-get-commitment-billing-terms.js +91 -0
  42. package/esm/funcs/commitments-get-commitment-billing-terms.js.map +1 -0
  43. package/esm/funcs/commitments-list-commitment-instalments.d.ts +17 -0
  44. package/esm/funcs/commitments-list-commitment-instalments.d.ts.map +1 -0
  45. package/esm/funcs/commitments-list-commitment-instalments.js +96 -0
  46. package/esm/funcs/commitments-list-commitment-instalments.js.map +1 -0
  47. package/esm/funcs/commitments-preview-commitment-billing-terms.d.ts +17 -0
  48. package/esm/funcs/commitments-preview-commitment-billing-terms.d.ts.map +1 -0
  49. package/esm/funcs/commitments-preview-commitment-billing-terms.js +93 -0
  50. package/esm/funcs/commitments-preview-commitment-billing-terms.js.map +1 -0
  51. package/esm/funcs/commitments-replace-commitment-billing-terms.d.ts +17 -0
  52. package/esm/funcs/commitments-replace-commitment-billing-terms.d.ts.map +1 -0
  53. package/esm/funcs/commitments-replace-commitment-billing-terms.js +93 -0
  54. package/esm/funcs/commitments-replace-commitment-billing-terms.js.map +1 -0
  55. package/esm/funcs/commitments-terminate-commitment.d.ts +1 -1
  56. package/esm/funcs/commitments-terminate-commitment.js +1 -1
  57. package/esm/funcs/commitments-trigger-commitment-instalment.d.ts +17 -0
  58. package/esm/funcs/commitments-trigger-commitment-instalment.d.ts.map +1 -0
  59. package/esm/funcs/commitments-trigger-commitment-instalment.js +98 -0
  60. package/esm/funcs/commitments-trigger-commitment-instalment.js.map +1 -0
  61. package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-cancelled.d.ts +17 -0
  62. package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-cancelled.d.ts.map +1 -0
  63. package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-cancelled.js +69 -0
  64. package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-cancelled.js.map +1 -0
  65. package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-created.d.ts +17 -0
  66. package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-created.d.ts.map +1 -0
  67. package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-created.js +69 -0
  68. package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-created.js.map +1 -0
  69. package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-invoiced.d.ts +17 -0
  70. package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-invoiced.d.ts.map +1 -0
  71. package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-invoiced.js +69 -0
  72. package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-invoiced.js.map +1 -0
  73. package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-updated.d.ts +17 -0
  74. package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-updated.d.ts.map +1 -0
  75. package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-updated.js +69 -0
  76. package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-updated.js.map +1 -0
  77. package/esm/funcs/webhook-events-post-webhook-events-billing-terms-created.d.ts +17 -0
  78. package/esm/funcs/webhook-events-post-webhook-events-billing-terms-created.d.ts.map +1 -0
  79. package/esm/funcs/webhook-events-post-webhook-events-billing-terms-created.js +69 -0
  80. package/esm/funcs/webhook-events-post-webhook-events-billing-terms-created.js.map +1 -0
  81. package/esm/funcs/webhook-events-post-webhook-events-billing-terms-updated.d.ts +17 -0
  82. package/esm/funcs/webhook-events-post-webhook-events-billing-terms-updated.d.ts.map +1 -0
  83. package/esm/funcs/webhook-events-post-webhook-events-billing-terms-updated.js +69 -0
  84. package/esm/funcs/webhook-events-post-webhook-events-billing-terms-updated.js.map +1 -0
  85. package/esm/lib/config.d.ts +3 -3
  86. package/esm/lib/config.d.ts.map +1 -1
  87. package/esm/lib/config.js +3 -3
  88. package/esm/lib/config.js.map +1 -1
  89. package/esm/sdk/commitments.d.ts +36 -1
  90. package/esm/sdk/commitments.d.ts.map +1 -1
  91. package/esm/sdk/commitments.js +51 -1
  92. package/esm/sdk/commitments.js.map +1 -1
  93. package/esm/sdk/models/billing-term-input.d.ts +67 -0
  94. package/esm/sdk/models/billing-term-input.d.ts.map +1 -0
  95. package/esm/sdk/models/billing-term-input.js +43 -0
  96. package/esm/sdk/models/billing-term-input.js.map +1 -0
  97. package/esm/sdk/models/billing-term-kind.d.ts +12 -0
  98. package/esm/sdk/models/billing-term-kind.d.ts.map +1 -0
  99. package/esm/sdk/models/billing-term-kind.js +13 -0
  100. package/esm/sdk/models/billing-term-kind.js.map +1 -0
  101. package/esm/sdk/models/billing-term-owner-type.d.ts +9 -0
  102. package/esm/sdk/models/billing-term-owner-type.d.ts.map +1 -0
  103. package/esm/sdk/models/billing-term-owner-type.js +10 -0
  104. package/esm/sdk/models/billing-term-owner-type.js.map +1 -0
  105. package/esm/sdk/models/billing-term-split.d.ts +12 -0
  106. package/esm/sdk/models/billing-term-split.d.ts.map +1 -0
  107. package/esm/sdk/models/billing-term-split.js +13 -0
  108. package/esm/sdk/models/billing-term-split.js.map +1 -0
  109. package/esm/sdk/models/billing-term-value-type.d.ts +19 -0
  110. package/esm/sdk/models/billing-term-value-type.d.ts.map +1 -0
  111. package/esm/sdk/models/billing-term-value-type.js +17 -0
  112. package/esm/sdk/models/billing-term-value-type.js.map +1 -0
  113. package/esm/sdk/models/billing-terms-response.d.ts +13 -0
  114. package/esm/sdk/models/billing-terms-response.d.ts.map +1 -0
  115. package/esm/sdk/models/billing-terms-response.js +22 -0
  116. package/esm/sdk/models/billing-terms-response.js.map +1 -0
  117. package/esm/sdk/models/billingterm-instalment.d.ts +43 -0
  118. package/esm/sdk/models/billingterm-instalment.d.ts.map +1 -0
  119. package/esm/sdk/models/billingterm-instalment.js +68 -0
  120. package/esm/sdk/models/billingterm-instalment.js.map +1 -0
  121. package/esm/sdk/models/billingterm-term.d.ts +57 -0
  122. package/esm/sdk/models/billingterm-term.d.ts.map +1 -0
  123. package/esm/sdk/models/billingterm-term.js +65 -0
  124. package/esm/sdk/models/billingterm-term.js.map +1 -0
  125. package/esm/sdk/models/cancellation-fee-input.d.ts +18 -0
  126. package/esm/sdk/models/cancellation-fee-input.d.ts.map +1 -0
  127. package/esm/sdk/models/cancellation-fee-input.js +14 -0
  128. package/esm/sdk/models/cancellation-fee-input.js.map +1 -0
  129. package/esm/sdk/models/cancellation-fee-type.d.ts +16 -0
  130. package/esm/sdk/models/cancellation-fee-type.d.ts.map +1 -0
  131. package/esm/sdk/models/cancellation-fee-type.js +14 -0
  132. package/esm/sdk/models/cancellation-fee-type.js.map +1 -0
  133. package/esm/sdk/models/commitment-response.d.ts +9 -1
  134. package/esm/sdk/models/commitment-response.d.ts.map +1 -1
  135. package/esm/sdk/models/commitment-response.js +7 -1
  136. package/esm/sdk/models/commitment-response.js.map +1 -1
  137. package/esm/sdk/models/create-commitment-request.d.ts +12 -0
  138. package/esm/sdk/models/create-commitment-request.d.ts.map +1 -1
  139. package/esm/sdk/models/create-commitment-request.js +6 -0
  140. package/esm/sdk/models/create-commitment-request.js.map +1 -1
  141. package/esm/sdk/models/get-commitment-billing-terms-op.d.ts +15 -0
  142. package/esm/sdk/models/get-commitment-billing-terms-op.d.ts.map +1 -0
  143. package/esm/sdk/models/get-commitment-billing-terms-op.js +12 -0
  144. package/esm/sdk/models/get-commitment-billing-terms-op.js.map +1 -0
  145. package/esm/sdk/models/get-subscription-v2-op.d.ts +1 -1
  146. package/esm/sdk/models/index.d.ts +24 -0
  147. package/esm/sdk/models/index.d.ts.map +1 -1
  148. package/esm/sdk/models/index.js +24 -0
  149. package/esm/sdk/models/index.js.map +1 -1
  150. package/esm/sdk/models/instalment-bill-trigger.d.ts +12 -0
  151. package/esm/sdk/models/instalment-bill-trigger.d.ts.map +1 -0
  152. package/esm/sdk/models/instalment-bill-trigger.js +13 -0
  153. package/esm/sdk/models/instalment-bill-trigger.js.map +1 -0
  154. package/esm/sdk/models/instalment-delivery.d.ts +12 -0
  155. package/esm/sdk/models/instalment-delivery.d.ts.map +1 -0
  156. package/esm/sdk/models/instalment-delivery.js +13 -0
  157. package/esm/sdk/models/instalment-delivery.js.map +1 -0
  158. package/esm/sdk/models/instalment-kind.d.ts +10 -0
  159. package/esm/sdk/models/instalment-kind.d.ts.map +1 -0
  160. package/esm/sdk/models/instalment-kind.js +11 -0
  161. package/esm/sdk/models/instalment-kind.js.map +1 -0
  162. package/esm/sdk/models/instalment-status.d.ts +11 -0
  163. package/esm/sdk/models/instalment-status.d.ts.map +1 -0
  164. package/esm/sdk/models/instalment-status.js +12 -0
  165. package/esm/sdk/models/instalment-status.js.map +1 -0
  166. package/esm/sdk/models/invoice-billing-reason.d.ts +2 -0
  167. package/esm/sdk/models/invoice-billing-reason.d.ts.map +1 -1
  168. package/esm/sdk/models/invoice-billing-reason.js +2 -0
  169. package/esm/sdk/models/invoice-billing-reason.js.map +1 -1
  170. package/esm/sdk/models/invoice-line-item-response.d.ts +4 -0
  171. package/esm/sdk/models/invoice-line-item-response.d.ts.map +1 -1
  172. package/esm/sdk/models/invoice-line-item-response.js +2 -0
  173. package/esm/sdk/models/invoice-line-item-response.js.map +1 -1
  174. package/esm/sdk/models/list-commitment-instalments-op.d.ts +20 -0
  175. package/esm/sdk/models/list-commitment-instalments-op.d.ts.map +1 -0
  176. package/esm/sdk/models/list-commitment-instalments-op.js +13 -0
  177. package/esm/sdk/models/list-commitment-instalments-op.js.map +1 -0
  178. package/esm/sdk/models/list-instalments-response.d.ts +11 -0
  179. package/esm/sdk/models/list-instalments-response.d.ts.map +1 -0
  180. package/esm/sdk/models/list-instalments-response.js +15 -0
  181. package/esm/sdk/models/list-instalments-response.js.map +1 -0
  182. package/esm/sdk/models/preview-commitment-billing-terms-op.d.ts +21 -0
  183. package/esm/sdk/models/preview-commitment-billing-terms-op.d.ts.map +1 -0
  184. package/esm/sdk/models/preview-commitment-billing-terms-op.js +14 -0
  185. package/esm/sdk/models/preview-commitment-billing-terms-op.js.map +1 -0
  186. package/esm/sdk/models/replace-billing-terms-request.d.ts +13 -0
  187. package/esm/sdk/models/replace-billing-terms-request.d.ts.map +1 -0
  188. package/esm/sdk/models/replace-billing-terms-request.js +18 -0
  189. package/esm/sdk/models/replace-billing-terms-request.js.map +1 -0
  190. package/esm/sdk/models/replace-commitment-billing-terms-op.d.ts +21 -0
  191. package/esm/sdk/models/replace-commitment-billing-terms-op.d.ts.map +1 -0
  192. package/esm/sdk/models/replace-commitment-billing-terms-op.js +14 -0
  193. package/esm/sdk/models/replace-commitment-billing-terms-op.js.map +1 -0
  194. package/esm/sdk/models/subscription-response-v2.d.ts +5 -0
  195. package/esm/sdk/models/subscription-response-v2.d.ts.map +1 -1
  196. package/esm/sdk/models/subscription-response-v2.js +2 -0
  197. package/esm/sdk/models/subscription-response-v2.js.map +1 -1
  198. package/esm/sdk/models/subscription-response.d.ts +5 -0
  199. package/esm/sdk/models/subscription-response.d.ts.map +1 -1
  200. package/esm/sdk/models/subscription-response.js +2 -0
  201. package/esm/sdk/models/subscription-response.js.map +1 -1
  202. package/esm/sdk/models/terminate-commitment-request.d.ts +6 -2
  203. package/esm/sdk/models/terminate-commitment-request.d.ts.map +1 -1
  204. package/esm/sdk/models/terminate-commitment-request.js +2 -1
  205. package/esm/sdk/models/terminate-commitment-request.js.map +1 -1
  206. package/esm/sdk/models/trigger-commitment-instalment-op.d.ts +26 -0
  207. package/esm/sdk/models/trigger-commitment-instalment-op.d.ts.map +1 -0
  208. package/esm/sdk/models/trigger-commitment-instalment-op.js +20 -0
  209. package/esm/sdk/models/trigger-commitment-instalment-op.js.map +1 -0
  210. package/esm/sdk/models/trigger-instalment-request.d.ts +15 -0
  211. package/esm/sdk/models/trigger-instalment-request.d.ts.map +1 -0
  212. package/esm/sdk/models/trigger-instalment-request.js +17 -0
  213. package/esm/sdk/models/trigger-instalment-request.js.map +1 -0
  214. package/esm/sdk/models/update-commitment-request.d.ts +5 -0
  215. package/esm/sdk/models/update-commitment-request.d.ts.map +1 -1
  216. package/esm/sdk/models/update-commitment-request.js +2 -0
  217. package/esm/sdk/models/update-commitment-request.js.map +1 -1
  218. package/esm/sdk/models/webhook-dto-billing-instalment-webhook-payload.d.ts +13 -0
  219. package/esm/sdk/models/webhook-dto-billing-instalment-webhook-payload.d.ts.map +1 -0
  220. package/esm/sdk/models/webhook-dto-billing-instalment-webhook-payload.js +22 -0
  221. package/esm/sdk/models/webhook-dto-billing-instalment-webhook-payload.js.map +1 -0
  222. package/esm/sdk/models/webhook-dto-billing-terms-webhook-payload.d.ts +16 -0
  223. package/esm/sdk/models/webhook-dto-billing-terms-webhook-payload.d.ts.map +1 -0
  224. package/esm/sdk/models/webhook-dto-billing-terms-webhook-payload.js +28 -0
  225. package/esm/sdk/models/webhook-dto-billing-terms-webhook-payload.js.map +1 -0
  226. package/esm/sdk/models/webhook-dto-invoice-line-item.d.ts +1 -0
  227. package/esm/sdk/models/webhook-dto-invoice-line-item.d.ts.map +1 -1
  228. package/esm/sdk/models/webhook-dto-invoice-line-item.js +2 -0
  229. package/esm/sdk/models/webhook-dto-invoice-line-item.js.map +1 -1
  230. package/esm/sdk/models/webhook-event-name.d.ts +6 -0
  231. package/esm/sdk/models/webhook-event-name.d.ts.map +1 -1
  232. package/esm/sdk/models/webhook-event-name.js +6 -0
  233. package/esm/sdk/models/webhook-event-name.js.map +1 -1
  234. package/esm/sdk/webhook-events.d.ts +42 -0
  235. package/esm/sdk/webhook-events.d.ts.map +1 -1
  236. package/esm/sdk/webhook-events.js +60 -0
  237. package/esm/sdk/webhook-events.js.map +1 -1
  238. package/jsr.json +1 -1
  239. package/package.json +3 -3
  240. package/src/funcs/commitments-get-commitment-billing-terms.ts +182 -0
  241. package/src/funcs/commitments-list-commitment-instalments.ts +191 -0
  242. package/src/funcs/commitments-preview-commitment-billing-terms.ts +192 -0
  243. package/src/funcs/commitments-replace-commitment-billing-terms.ts +190 -0
  244. package/src/funcs/commitments-terminate-commitment.ts +1 -1
  245. package/src/funcs/commitments-trigger-commitment-instalment.ts +197 -0
  246. package/src/funcs/webhook-events-post-webhook-events-billing-instalment-cancelled.ts +144 -0
  247. package/src/funcs/webhook-events-post-webhook-events-billing-instalment-created.ts +144 -0
  248. package/src/funcs/webhook-events-post-webhook-events-billing-instalment-invoiced.ts +144 -0
  249. package/src/funcs/webhook-events-post-webhook-events-billing-instalment-updated.ts +144 -0
  250. package/src/funcs/webhook-events-post-webhook-events-billing-terms-created.ts +144 -0
  251. package/src/funcs/webhook-events-post-webhook-events-billing-terms-updated.ts +144 -0
  252. package/src/lib/config.ts +4 -3
  253. package/src/sdk/commitments.ts +101 -1
  254. package/src/sdk/models/billing-term-input.ts +127 -0
  255. package/src/sdk/models/billing-term-kind.ts +24 -0
  256. package/src/sdk/models/billing-term-owner-type.ts +16 -0
  257. package/src/sdk/models/billing-term-split.ts +24 -0
  258. package/src/sdk/models/billing-term-value-type.ts +31 -0
  259. package/src/sdk/models/billing-terms-response.ts +49 -0
  260. package/src/sdk/models/billingterm-instalment.ts +128 -0
  261. package/src/sdk/models/billingterm-term.ts +143 -0
  262. package/src/sdk/models/cancellation-fee-input.ts +40 -0
  263. package/src/sdk/models/cancellation-fee-type.ts +23 -0
  264. package/src/sdk/models/commitment-response.ts +22 -2
  265. package/src/sdk/models/create-commitment-request.ts +23 -0
  266. package/src/sdk/models/get-commitment-billing-terms-op.ts +35 -0
  267. package/src/sdk/models/get-subscription-v2-op.ts +1 -1
  268. package/src/sdk/models/index.ts +24 -0
  269. package/src/sdk/models/instalment-bill-trigger.ts +24 -0
  270. package/src/sdk/models/instalment-delivery.ts +24 -0
  271. package/src/sdk/models/instalment-kind.ts +19 -0
  272. package/src/sdk/models/instalment-status.ts +20 -0
  273. package/src/sdk/models/invoice-billing-reason.ts +2 -0
  274. package/src/sdk/models/invoice-line-item-response.ts +6 -0
  275. package/src/sdk/models/list-commitment-instalments-op.ts +41 -0
  276. package/src/sdk/models/list-instalments-response.ts +35 -0
  277. package/src/sdk/models/preview-commitment-billing-terms-op.ts +46 -0
  278. package/src/sdk/models/replace-billing-terms-request.ts +43 -0
  279. package/src/sdk/models/replace-commitment-billing-terms-op.ts +46 -0
  280. package/src/sdk/models/subscription-response-v2.ts +9 -0
  281. package/src/sdk/models/subscription-response.ts +9 -0
  282. package/src/sdk/models/terminate-commitment-request.ts +11 -3
  283. package/src/sdk/models/trigger-commitment-instalment-op.ts +60 -0
  284. package/src/sdk/models/trigger-instalment-request.ts +41 -0
  285. package/src/sdk/models/update-commitment-request.ts +7 -0
  286. package/src/sdk/models/webhook-dto-billing-instalment-webhook-payload.ts +53 -0
  287. package/src/sdk/models/webhook-dto-billing-terms-webhook-payload.ts +61 -0
  288. package/src/sdk/models/webhook-dto-invoice-line-item.ts +3 -0
  289. package/src/sdk/models/webhook-event-name.ts +6 -0
  290. package/src/sdk/webhook-events.ts +96 -0
@@ -0,0 +1,24 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import * as openEnums from "../../types/enums.js";
7
+ import { OpenEnum } from "../../types/enums.js";
8
+
9
+ export const BillingTermKind = {
10
+ Once: "once",
11
+ Recurring: "recurring",
12
+ } as const;
13
+ export type BillingTermKind = OpenEnum<typeof BillingTermKind>;
14
+
15
+ /** @internal */
16
+ export const BillingTermKind$inboundSchema: z.ZodMiniType<
17
+ BillingTermKind,
18
+ unknown
19
+ > = openEnums.inboundSchema(BillingTermKind);
20
+ /** @internal */
21
+ export const BillingTermKind$outboundSchema: z.ZodMiniType<
22
+ string,
23
+ BillingTermKind
24
+ > = openEnums.outboundSchema(BillingTermKind);
@@ -0,0 +1,16 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { ClosedEnum } from "../../types/enums.js";
7
+
8
+ export const BillingTermOwnerType = {
9
+ Commitment: "commitment",
10
+ } as const;
11
+ export type BillingTermOwnerType = ClosedEnum<typeof BillingTermOwnerType>;
12
+
13
+ /** @internal */
14
+ export const BillingTermOwnerType$inboundSchema: z.ZodMiniEnum<
15
+ typeof BillingTermOwnerType
16
+ > = z.enum(BillingTermOwnerType);
@@ -0,0 +1,24 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import * as openEnums from "../../types/enums.js";
7
+ import { OpenEnum } from "../../types/enums.js";
8
+
9
+ export const BillingTermSplit = {
10
+ Even: "even",
11
+ Proportional: "proportional",
12
+ } as const;
13
+ export type BillingTermSplit = OpenEnum<typeof BillingTermSplit>;
14
+
15
+ /** @internal */
16
+ export const BillingTermSplit$inboundSchema: z.ZodMiniType<
17
+ BillingTermSplit,
18
+ unknown
19
+ > = openEnums.inboundSchema(BillingTermSplit);
20
+ /** @internal */
21
+ export const BillingTermSplit$outboundSchema: z.ZodMiniType<
22
+ string,
23
+ BillingTermSplit
24
+ > = openEnums.outboundSchema(BillingTermSplit);
@@ -0,0 +1,31 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import * as openEnums from "../../types/enums.js";
7
+ import { OpenEnum } from "../../types/enums.js";
8
+
9
+ /**
10
+ * fixed or remainder; percentage is reserved and rejected as not supported yet
11
+ */
12
+ export const BillingTermValueType = {
13
+ Fixed: "fixed",
14
+ Percentage: "percentage",
15
+ Remainder: "remainder",
16
+ } as const;
17
+ /**
18
+ * fixed or remainder; percentage is reserved and rejected as not supported yet
19
+ */
20
+ export type BillingTermValueType = OpenEnum<typeof BillingTermValueType>;
21
+
22
+ /** @internal */
23
+ export const BillingTermValueType$inboundSchema: z.ZodMiniType<
24
+ BillingTermValueType,
25
+ unknown
26
+ > = openEnums.inboundSchema(BillingTermValueType);
27
+ /** @internal */
28
+ export const BillingTermValueType$outboundSchema: z.ZodMiniType<
29
+ string,
30
+ BillingTermValueType
31
+ > = openEnums.outboundSchema(BillingTermValueType);
@@ -0,0 +1,49 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import * as types from "../../types/primitives.js";
10
+ import {
11
+ BillingtermInstalment,
12
+ BillingtermInstalment$inboundSchema,
13
+ } from "./billingterm-instalment.js";
14
+ import {
15
+ BillingtermTerm,
16
+ BillingtermTerm$inboundSchema,
17
+ } from "./billingterm-term.js";
18
+ import { SDKValidationError } from "./sdk-validation-error.js";
19
+
20
+ export type BillingTermsResponse = {
21
+ billingTerms?: Array<BillingtermTerm> | undefined;
22
+ instalments?: Array<BillingtermInstalment> | undefined;
23
+ };
24
+
25
+ /** @internal */
26
+ export const BillingTermsResponse$inboundSchema: z.ZodMiniType<
27
+ BillingTermsResponse,
28
+ unknown
29
+ > = z.pipe(
30
+ z.object({
31
+ billing_terms: types.optional(z.array(BillingtermTerm$inboundSchema)),
32
+ instalments: types.optional(z.array(BillingtermInstalment$inboundSchema)),
33
+ }),
34
+ z.transform((v) => {
35
+ return remap$(v, {
36
+ "billing_terms": "billingTerms",
37
+ });
38
+ }),
39
+ );
40
+
41
+ export function billingTermsResponseFromJSON(
42
+ jsonString: string,
43
+ ): SafeParseResult<BillingTermsResponse, SDKValidationError> {
44
+ return safeParse(
45
+ jsonString,
46
+ (x) => BillingTermsResponse$inboundSchema.parse(JSON.parse(x)),
47
+ `Failed to parse 'BillingTermsResponse' from JSON`,
48
+ );
49
+ }
@@ -0,0 +1,128 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import * as types from "../../types/primitives.js";
10
+ import {
11
+ BillingTermOwnerType,
12
+ BillingTermOwnerType$inboundSchema,
13
+ } from "./billing-term-owner-type.js";
14
+ import {
15
+ InstalmentBillTrigger,
16
+ InstalmentBillTrigger$inboundSchema,
17
+ } from "./instalment-bill-trigger.js";
18
+ import {
19
+ InstalmentDelivery,
20
+ InstalmentDelivery$inboundSchema,
21
+ } from "./instalment-delivery.js";
22
+ import {
23
+ InstalmentKind,
24
+ InstalmentKind$inboundSchema,
25
+ } from "./instalment-kind.js";
26
+ import {
27
+ InstalmentStatus,
28
+ InstalmentStatus$inboundSchema,
29
+ } from "./instalment-status.js";
30
+ import { SDKValidationError } from "./sdk-validation-error.js";
31
+ import { Status, Status$inboundSchema } from "./status.js";
32
+
33
+ export type BillingtermInstalment = {
34
+ amount?: string | undefined;
35
+ billOn?: string | undefined;
36
+ billTrigger?: InstalmentBillTrigger | undefined;
37
+ billingTermId?: string | undefined;
38
+ createdAt?: Date | undefined;
39
+ createdBy?: string | undefined;
40
+ currency?: string | undefined;
41
+ customerId?: string | undefined;
42
+ delivery?: InstalmentDelivery | undefined;
43
+ environmentId?: string | undefined;
44
+ id?: string | undefined;
45
+ instalmentStatus?: InstalmentStatus | undefined;
46
+ invoiceId?: string | undefined;
47
+ invoiceLabel?: string | undefined;
48
+ kind?: InstalmentKind | undefined;
49
+ metadata?: { [k: string]: string } | undefined;
50
+ ownerId?: string | undefined;
51
+ ownerType?: BillingTermOwnerType | undefined;
52
+ servicePeriodEnd?: Date | undefined;
53
+ servicePeriodStart?: Date | undefined;
54
+ status?: Status | undefined;
55
+ subscriptionId?: string | undefined;
56
+ tenantId?: string | undefined;
57
+ triggeredAt?: Date | undefined;
58
+ updatedAt?: Date | undefined;
59
+ updatedBy?: string | undefined;
60
+ };
61
+
62
+ /** @internal */
63
+ export const BillingtermInstalment$inboundSchema: z.ZodMiniType<
64
+ BillingtermInstalment,
65
+ unknown
66
+ > = z.pipe(
67
+ z.object({
68
+ amount: types.optional(types.string()),
69
+ bill_on: types.optional(types.string()),
70
+ bill_trigger: types.optional(InstalmentBillTrigger$inboundSchema),
71
+ billing_term_id: types.optional(types.string()),
72
+ created_at: types.optional(types.date()),
73
+ created_by: types.optional(types.string()),
74
+ currency: types.optional(types.string()),
75
+ customer_id: types.optional(types.string()),
76
+ delivery: types.optional(InstalmentDelivery$inboundSchema),
77
+ environment_id: types.optional(types.string()),
78
+ id: types.optional(types.string()),
79
+ instalment_status: types.optional(InstalmentStatus$inboundSchema),
80
+ invoice_id: types.optional(types.string()),
81
+ invoice_label: types.optional(types.string()),
82
+ kind: types.optional(InstalmentKind$inboundSchema),
83
+ metadata: types.optional(z.record(z.string(), types.string())),
84
+ owner_id: types.optional(types.string()),
85
+ owner_type: types.optional(BillingTermOwnerType$inboundSchema),
86
+ service_period_end: types.optional(types.date()),
87
+ service_period_start: types.optional(types.date()),
88
+ status: types.optional(Status$inboundSchema),
89
+ subscription_id: types.optional(types.string()),
90
+ tenant_id: types.optional(types.string()),
91
+ triggered_at: types.optional(types.date()),
92
+ updated_at: types.optional(types.date()),
93
+ updated_by: types.optional(types.string()),
94
+ }),
95
+ z.transform((v) => {
96
+ return remap$(v, {
97
+ "bill_on": "billOn",
98
+ "bill_trigger": "billTrigger",
99
+ "billing_term_id": "billingTermId",
100
+ "created_at": "createdAt",
101
+ "created_by": "createdBy",
102
+ "customer_id": "customerId",
103
+ "environment_id": "environmentId",
104
+ "instalment_status": "instalmentStatus",
105
+ "invoice_id": "invoiceId",
106
+ "invoice_label": "invoiceLabel",
107
+ "owner_id": "ownerId",
108
+ "owner_type": "ownerType",
109
+ "service_period_end": "servicePeriodEnd",
110
+ "service_period_start": "servicePeriodStart",
111
+ "subscription_id": "subscriptionId",
112
+ "tenant_id": "tenantId",
113
+ "triggered_at": "triggeredAt",
114
+ "updated_at": "updatedAt",
115
+ "updated_by": "updatedBy",
116
+ });
117
+ }),
118
+ );
119
+
120
+ export function billingtermInstalmentFromJSON(
121
+ jsonString: string,
122
+ ): SafeParseResult<BillingtermInstalment, SDKValidationError> {
123
+ return safeParse(
124
+ jsonString,
125
+ (x) => BillingtermInstalment$inboundSchema.parse(JSON.parse(x)),
126
+ `Failed to parse 'BillingtermInstalment' from JSON`,
127
+ );
128
+ }
@@ -0,0 +1,143 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import * as types from "../../types/primitives.js";
10
+ import {
11
+ BillingTermKind,
12
+ BillingTermKind$inboundSchema,
13
+ } from "./billing-term-kind.js";
14
+ import {
15
+ BillingTermOwnerType,
16
+ BillingTermOwnerType$inboundSchema,
17
+ } from "./billing-term-owner-type.js";
18
+ import {
19
+ BillingTermSplit,
20
+ BillingTermSplit$inboundSchema,
21
+ } from "./billing-term-split.js";
22
+ import {
23
+ BillingTermValueType,
24
+ BillingTermValueType$inboundSchema,
25
+ } from "./billing-term-value-type.js";
26
+ import {
27
+ InstalmentBillTrigger,
28
+ InstalmentBillTrigger$inboundSchema,
29
+ } from "./instalment-bill-trigger.js";
30
+ import {
31
+ InstalmentDelivery,
32
+ InstalmentDelivery$inboundSchema,
33
+ } from "./instalment-delivery.js";
34
+ import {
35
+ InvoiceCadence,
36
+ InvoiceCadence$inboundSchema,
37
+ } from "./invoice-cadence.js";
38
+ import { SDKValidationError } from "./sdk-validation-error.js";
39
+ import { Status, Status$inboundSchema } from "./status.js";
40
+
41
+ export type BillingtermTerm = {
42
+ billOn?: string | undefined;
43
+ billTrigger?: InstalmentBillTrigger | undefined;
44
+ createdAt?: Date | undefined;
45
+ createdBy?: string | undefined;
46
+ endDate?: Date | undefined;
47
+ environmentId?: string | undefined;
48
+ id?: string | undefined;
49
+ instalmentInvoicing?: InstalmentDelivery | undefined;
50
+ invoiceCadence?: InvoiceCadence | undefined;
51
+ /**
52
+ * InvoiceLabel names its instalments on the invoice, after the owner's label. It may use {n} and {of}, which number
53
+ *
54
+ * @remarks
55
+ * the owner's instalments whose labels use them.
56
+ */
57
+ invoiceLabel?: string | undefined;
58
+ kind?: BillingTermKind | undefined;
59
+ metadata?: { [k: string]: string } | undefined;
60
+ ownerId?: string | undefined;
61
+ ownerType?: BillingTermOwnerType | undefined;
62
+ periodCount?: number | undefined;
63
+ split?: BillingTermSplit | undefined;
64
+ /**
65
+ * Recurring terms.
66
+ */
67
+ startDate?: Date | undefined;
68
+ status?: Status | undefined;
69
+ tenantId?: string | undefined;
70
+ updatedAt?: Date | undefined;
71
+ updatedBy?: string | undefined;
72
+ /**
73
+ * Value is the amount of a fixed term, per instalment on a recurring one; it is nil for a remainder term.
74
+ */
75
+ value?: string | undefined;
76
+ /**
77
+ * fixed or remainder; percentage is reserved and rejected as not supported yet
78
+ */
79
+ valueType?: BillingTermValueType | undefined;
80
+ };
81
+
82
+ /** @internal */
83
+ export const BillingtermTerm$inboundSchema: z.ZodMiniType<
84
+ BillingtermTerm,
85
+ unknown
86
+ > = z.pipe(
87
+ z.object({
88
+ bill_on: types.optional(types.string()),
89
+ bill_trigger: types.optional(InstalmentBillTrigger$inboundSchema),
90
+ created_at: types.optional(types.date()),
91
+ created_by: types.optional(types.string()),
92
+ end_date: types.optional(types.date()),
93
+ environment_id: types.optional(types.string()),
94
+ id: types.optional(types.string()),
95
+ instalment_invoicing: types.optional(InstalmentDelivery$inboundSchema),
96
+ invoice_cadence: types.optional(InvoiceCadence$inboundSchema),
97
+ invoice_label: types.optional(types.string()),
98
+ kind: types.optional(BillingTermKind$inboundSchema),
99
+ metadata: types.optional(z.record(z.string(), types.string())),
100
+ owner_id: types.optional(types.string()),
101
+ owner_type: types.optional(BillingTermOwnerType$inboundSchema),
102
+ period_count: types.optional(types.number()),
103
+ split: types.optional(BillingTermSplit$inboundSchema),
104
+ start_date: types.optional(types.date()),
105
+ status: types.optional(Status$inboundSchema),
106
+ tenant_id: types.optional(types.string()),
107
+ updated_at: types.optional(types.date()),
108
+ updated_by: types.optional(types.string()),
109
+ value: types.optional(types.string()),
110
+ value_type: types.optional(BillingTermValueType$inboundSchema),
111
+ }),
112
+ z.transform((v) => {
113
+ return remap$(v, {
114
+ "bill_on": "billOn",
115
+ "bill_trigger": "billTrigger",
116
+ "created_at": "createdAt",
117
+ "created_by": "createdBy",
118
+ "end_date": "endDate",
119
+ "environment_id": "environmentId",
120
+ "instalment_invoicing": "instalmentInvoicing",
121
+ "invoice_cadence": "invoiceCadence",
122
+ "invoice_label": "invoiceLabel",
123
+ "owner_id": "ownerId",
124
+ "owner_type": "ownerType",
125
+ "period_count": "periodCount",
126
+ "start_date": "startDate",
127
+ "tenant_id": "tenantId",
128
+ "updated_at": "updatedAt",
129
+ "updated_by": "updatedBy",
130
+ "value_type": "valueType",
131
+ });
132
+ }),
133
+ );
134
+
135
+ export function billingtermTermFromJSON(
136
+ jsonString: string,
137
+ ): SafeParseResult<BillingtermTerm, SDKValidationError> {
138
+ return safeParse(
139
+ jsonString,
140
+ (x) => BillingtermTerm$inboundSchema.parse(JSON.parse(x)),
141
+ `Failed to parse 'BillingtermTerm' from JSON`,
142
+ );
143
+ }
@@ -0,0 +1,40 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import {
7
+ CancellationFeeType,
8
+ CancellationFeeType$outboundSchema,
9
+ } from "./cancellation-fee-type.js";
10
+
11
+ export type CancellationFeeInput = {
12
+ /**
13
+ * fixed; percentage is reserved and rejected as not supported yet
14
+ */
15
+ type: CancellationFeeType;
16
+ value: string;
17
+ };
18
+
19
+ /** @internal */
20
+ export type CancellationFeeInput$Outbound = {
21
+ type: string;
22
+ value: string;
23
+ };
24
+
25
+ /** @internal */
26
+ export const CancellationFeeInput$outboundSchema: z.ZodMiniType<
27
+ CancellationFeeInput$Outbound,
28
+ CancellationFeeInput
29
+ > = z.object({
30
+ type: CancellationFeeType$outboundSchema,
31
+ value: z.string(),
32
+ });
33
+
34
+ export function cancellationFeeInputToJSON(
35
+ cancellationFeeInput: CancellationFeeInput,
36
+ ): string {
37
+ return JSON.stringify(
38
+ CancellationFeeInput$outboundSchema.parse(cancellationFeeInput),
39
+ );
40
+ }
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { ClosedEnum } from "../../types/enums.js";
7
+
8
+ /**
9
+ * fixed; percentage is reserved and rejected as not supported yet
10
+ */
11
+ export const CancellationFeeType = {
12
+ Fixed: "fixed",
13
+ Percentage: "percentage",
14
+ } as const;
15
+ /**
16
+ * fixed; percentage is reserved and rejected as not supported yet
17
+ */
18
+ export type CancellationFeeType = ClosedEnum<typeof CancellationFeeType>;
19
+
20
+ /** @internal */
21
+ export const CancellationFeeType$outboundSchema: z.ZodMiniEnum<
22
+ typeof CancellationFeeType
23
+ > = z.enum(CancellationFeeType);
@@ -8,6 +8,14 @@ import { safeParse } from "../../lib/schemas.js";
8
8
  import { Result as SafeParseResult } from "../../types/fp.js";
9
9
  import * as types from "../../types/primitives.js";
10
10
  import { ActiveWindow, ActiveWindow$inboundSchema } from "./active-window.js";
11
+ import {
12
+ BillingtermInstalment,
13
+ BillingtermInstalment$inboundSchema,
14
+ } from "./billingterm-instalment.js";
15
+ import {
16
+ BillingtermTerm,
17
+ BillingtermTerm$inboundSchema,
18
+ } from "./billingterm-term.js";
11
19
  import {
12
20
  CommitmentCollectionMethod,
13
21
  CommitmentCollectionMethod$inboundSchema,
@@ -32,11 +40,19 @@ import {
32
40
  CommitmentType,
33
41
  CommitmentType$inboundSchema,
34
42
  } from "./commitment-type.js";
43
+ import {
44
+ InstalmentDelivery,
45
+ InstalmentDelivery$inboundSchema,
46
+ } from "./instalment-delivery.js";
35
47
  import { SDKValidationError } from "./sdk-validation-error.js";
36
48
  import { Status, Status$inboundSchema } from "./status.js";
37
49
 
38
50
  export type CommitmentResponse = {
39
51
  activeWindows?: Array<ActiveWindow> | undefined;
52
+ /**
53
+ * BillingTerms and Instalments are set by create and preview.
54
+ */
55
+ billingTerms?: Array<BillingtermTerm> | undefined;
40
56
  binding?: boolean | undefined;
41
57
  collectionMethod?: CommitmentCollectionMethod | undefined;
42
58
  commitmentStatus?: CommitmentStatus | undefined;
@@ -53,7 +69,8 @@ export type CommitmentResponse = {
53
69
  environmentId?: string | undefined;
54
70
  id?: string | undefined;
55
71
  idempotencyKey?: string | undefined;
56
- instalmentInvoicing?: string | undefined;
72
+ instalmentInvoicing?: InstalmentDelivery | undefined;
73
+ instalments?: Array<BillingtermInstalment> | undefined;
57
74
  invoiceDescription?: string | undefined;
58
75
  invoiceLabel?: string | undefined;
59
76
  measurement?: CommitmentMeasurement | undefined;
@@ -85,6 +102,7 @@ export const CommitmentResponse$inboundSchema: z.ZodMiniType<
85
102
  > = z.pipe(
86
103
  z.object({
87
104
  active_windows: types.optional(z.array(ActiveWindow$inboundSchema)),
105
+ billing_terms: types.optional(z.array(BillingtermTerm$inboundSchema)),
88
106
  binding: types.optional(types.boolean()),
89
107
  collection_method: types.optional(CommitmentCollectionMethod$inboundSchema),
90
108
  commitment_status: types.optional(CommitmentStatus$inboundSchema),
@@ -98,7 +116,8 @@ export const CommitmentResponse$inboundSchema: z.ZodMiniType<
98
116
  environment_id: types.optional(types.string()),
99
117
  id: types.optional(types.string()),
100
118
  idempotency_key: types.optional(types.string()),
101
- instalment_invoicing: types.optional(types.string()),
119
+ instalment_invoicing: types.optional(InstalmentDelivery$inboundSchema),
120
+ instalments: types.optional(z.array(BillingtermInstalment$inboundSchema)),
102
121
  invoice_description: types.optional(types.string()),
103
122
  invoice_label: types.optional(types.string()),
104
123
  measurement: types.optional(CommitmentMeasurement$inboundSchema),
@@ -127,6 +146,7 @@ export const CommitmentResponse$inboundSchema: z.ZodMiniType<
127
146
  z.transform((v) => {
128
147
  return remap$(v, {
129
148
  "active_windows": "activeWindows",
149
+ "billing_terms": "billingTerms",
130
150
  "collection_method": "collectionMethod",
131
151
  "commitment_status": "commitmentStatus",
132
152
  "commitment_value": "commitmentValue",
@@ -9,6 +9,11 @@ import {
9
9
  ActiveWindow$Outbound,
10
10
  ActiveWindow$outboundSchema,
11
11
  } from "./active-window.js";
12
+ import {
13
+ BillingTermInput,
14
+ BillingTermInput$Outbound,
15
+ BillingTermInput$outboundSchema,
16
+ } from "./billing-term-input.js";
12
17
  import {
13
18
  CommitmentCollectionMethod,
14
19
  CommitmentCollectionMethod$outboundSchema,
@@ -31,9 +36,17 @@ import {
31
36
  CommitmentType,
32
37
  CommitmentType$outboundSchema,
33
38
  } from "./commitment-type.js";
39
+ import {
40
+ InstalmentDelivery,
41
+ InstalmentDelivery$outboundSchema,
42
+ } from "./instalment-delivery.js";
34
43
 
35
44
  export type CreateCommitmentRequest = {
36
45
  activeWindows?: Array<ActiveWindow> | undefined;
46
+ /**
47
+ * BillingTerms apply only to collection_method billing_terms, which requires at least one.
48
+ */
49
+ billingTerms?: Array<BillingTermInput> | undefined;
37
50
  /**
38
51
  * default false
39
52
  */
@@ -45,6 +58,7 @@ export type CreateCommitmentRequest = {
45
58
  */
46
59
  endDate?: Date | undefined;
47
60
  idempotencyKey?: string | undefined;
61
+ instalmentInvoicing?: InstalmentDelivery | undefined;
48
62
  invoiceDescription?: string | undefined;
49
63
  invoiceLabel?: string | undefined;
50
64
  measurement: CommitmentMeasurement;
@@ -53,6 +67,9 @@ export type CreateCommitmentRequest = {
53
67
  overagePrice?: CommitmentPriceInput | undefined;
54
68
  priority?: number | undefined;
55
69
  scope: CommitmentScopeInput;
70
+ /**
71
+ * StartDate and EndDate within a second after a billing period edge are taken as that edge.
72
+ */
56
73
  startDate: Date;
57
74
  /**
58
75
  * SubscriptionID is required on POST /commitments and set server-side on inline commitments.
@@ -66,11 +83,13 @@ export type CreateCommitmentRequest = {
66
83
  /** @internal */
67
84
  export type CreateCommitmentRequest$Outbound = {
68
85
  active_windows?: Array<ActiveWindow$Outbound> | undefined;
86
+ billing_terms?: Array<BillingTermInput$Outbound> | undefined;
69
87
  binding?: boolean | undefined;
70
88
  collection_method?: string | undefined;
71
89
  committed_price?: CommitmentPriceInput$Outbound | undefined;
72
90
  end_date?: string | undefined;
73
91
  idempotency_key?: string | undefined;
92
+ instalment_invoicing?: string | undefined;
74
93
  invoice_description?: string | undefined;
75
94
  invoice_label?: string | undefined;
76
95
  measurement: string;
@@ -93,11 +112,13 @@ export const CreateCommitmentRequest$outboundSchema: z.ZodMiniType<
93
112
  > = z.pipe(
94
113
  z.object({
95
114
  activeWindows: z.optional(z.array(ActiveWindow$outboundSchema)),
115
+ billingTerms: z.optional(z.array(BillingTermInput$outboundSchema)),
96
116
  binding: z.optional(z.boolean()),
97
117
  collectionMethod: z.optional(CommitmentCollectionMethod$outboundSchema),
98
118
  committedPrice: z.optional(CommitmentPriceInput$outboundSchema),
99
119
  endDate: z.optional(z.pipe(z.date(), z.transform(v => v.toISOString()))),
100
120
  idempotencyKey: z.optional(z.string()),
121
+ instalmentInvoicing: z.optional(InstalmentDelivery$outboundSchema),
101
122
  invoiceDescription: z.optional(z.string()),
102
123
  invoiceLabel: z.optional(z.string()),
103
124
  measurement: CommitmentMeasurement$outboundSchema,
@@ -115,10 +136,12 @@ export const CreateCommitmentRequest$outboundSchema: z.ZodMiniType<
115
136
  z.transform((v) => {
116
137
  return remap$(v, {
117
138
  activeWindows: "active_windows",
139
+ billingTerms: "billing_terms",
118
140
  collectionMethod: "collection_method",
119
141
  committedPrice: "committed_price",
120
142
  endDate: "end_date",
121
143
  idempotencyKey: "idempotency_key",
144
+ instalmentInvoicing: "instalment_invoicing",
122
145
  invoiceDescription: "invoice_description",
123
146
  invoiceLabel: "invoice_label",
124
147
  overagePrice: "overage_price",
@@ -0,0 +1,35 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+
7
+ export type GetCommitmentBillingTermsRequest = {
8
+ /**
9
+ * Commitment ID
10
+ */
11
+ id: string;
12
+ };
13
+
14
+ /** @internal */
15
+ export type GetCommitmentBillingTermsRequest$Outbound = {
16
+ id: string;
17
+ };
18
+
19
+ /** @internal */
20
+ export const GetCommitmentBillingTermsRequest$outboundSchema: z.ZodMiniType<
21
+ GetCommitmentBillingTermsRequest$Outbound,
22
+ GetCommitmentBillingTermsRequest
23
+ > = z.object({
24
+ id: z.string(),
25
+ });
26
+
27
+ export function getCommitmentBillingTermsRequestToJSON(
28
+ getCommitmentBillingTermsRequest: GetCommitmentBillingTermsRequest,
29
+ ): string {
30
+ return JSON.stringify(
31
+ GetCommitmentBillingTermsRequest$outboundSchema.parse(
32
+ getCommitmentBillingTermsRequest,
33
+ ),
34
+ );
35
+ }
@@ -10,7 +10,7 @@ export type GetSubscriptionV2Request = {
10
10
  */
11
11
  id: string;
12
12
  /**
13
- * Comma-separated list of fields to expand (e.g., 'subscription_line_items,prices,plan')
13
+ * Comma-separated list of fields to expand (e.g., 'subscription_line_items,prices,plan,commitments')
14
14
  */
15
15
  expand?: string | undefined;
16
16
  };