@tirdad/sdk 2.1.47 → 2.1.48

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 (250) hide show
  1. package/esm/funcs/commitments-get-commitment-billing-terms.d.ts +17 -0
  2. package/esm/funcs/commitments-get-commitment-billing-terms.d.ts.map +1 -0
  3. package/esm/funcs/commitments-get-commitment-billing-terms.js +91 -0
  4. package/esm/funcs/commitments-get-commitment-billing-terms.js.map +1 -0
  5. package/esm/funcs/commitments-list-commitment-instalments.d.ts +17 -0
  6. package/esm/funcs/commitments-list-commitment-instalments.d.ts.map +1 -0
  7. package/esm/funcs/commitments-list-commitment-instalments.js +96 -0
  8. package/esm/funcs/commitments-list-commitment-instalments.js.map +1 -0
  9. package/esm/funcs/commitments-preview-commitment-billing-terms.d.ts +17 -0
  10. package/esm/funcs/commitments-preview-commitment-billing-terms.d.ts.map +1 -0
  11. package/esm/funcs/commitments-preview-commitment-billing-terms.js +93 -0
  12. package/esm/funcs/commitments-preview-commitment-billing-terms.js.map +1 -0
  13. package/esm/funcs/commitments-replace-commitment-billing-terms.d.ts +17 -0
  14. package/esm/funcs/commitments-replace-commitment-billing-terms.d.ts.map +1 -0
  15. package/esm/funcs/commitments-replace-commitment-billing-terms.js +93 -0
  16. package/esm/funcs/commitments-replace-commitment-billing-terms.js.map +1 -0
  17. package/esm/funcs/commitments-terminate-commitment.d.ts +1 -1
  18. package/esm/funcs/commitments-terminate-commitment.js +1 -1
  19. package/esm/funcs/commitments-trigger-commitment-instalment.d.ts +17 -0
  20. package/esm/funcs/commitments-trigger-commitment-instalment.d.ts.map +1 -0
  21. package/esm/funcs/commitments-trigger-commitment-instalment.js +98 -0
  22. package/esm/funcs/commitments-trigger-commitment-instalment.js.map +1 -0
  23. package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-cancelled.d.ts +17 -0
  24. package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-cancelled.d.ts.map +1 -0
  25. package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-cancelled.js +69 -0
  26. package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-cancelled.js.map +1 -0
  27. package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-created.d.ts +17 -0
  28. package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-created.d.ts.map +1 -0
  29. package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-created.js +69 -0
  30. package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-created.js.map +1 -0
  31. package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-invoiced.d.ts +17 -0
  32. package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-invoiced.d.ts.map +1 -0
  33. package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-invoiced.js +69 -0
  34. package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-invoiced.js.map +1 -0
  35. package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-updated.d.ts +17 -0
  36. package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-updated.d.ts.map +1 -0
  37. package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-updated.js +69 -0
  38. package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-updated.js.map +1 -0
  39. package/esm/funcs/webhook-events-post-webhook-events-billing-terms-created.d.ts +17 -0
  40. package/esm/funcs/webhook-events-post-webhook-events-billing-terms-created.d.ts.map +1 -0
  41. package/esm/funcs/webhook-events-post-webhook-events-billing-terms-created.js +69 -0
  42. package/esm/funcs/webhook-events-post-webhook-events-billing-terms-created.js.map +1 -0
  43. package/esm/funcs/webhook-events-post-webhook-events-billing-terms-updated.d.ts +17 -0
  44. package/esm/funcs/webhook-events-post-webhook-events-billing-terms-updated.d.ts.map +1 -0
  45. package/esm/funcs/webhook-events-post-webhook-events-billing-terms-updated.js +69 -0
  46. package/esm/funcs/webhook-events-post-webhook-events-billing-terms-updated.js.map +1 -0
  47. package/esm/lib/config.d.ts +2 -2
  48. package/esm/lib/config.js +2 -2
  49. package/esm/sdk/commitments.d.ts +36 -1
  50. package/esm/sdk/commitments.d.ts.map +1 -1
  51. package/esm/sdk/commitments.js +51 -1
  52. package/esm/sdk/commitments.js.map +1 -1
  53. package/esm/sdk/models/billing-term-input.d.ts +67 -0
  54. package/esm/sdk/models/billing-term-input.d.ts.map +1 -0
  55. package/esm/sdk/models/billing-term-input.js +43 -0
  56. package/esm/sdk/models/billing-term-input.js.map +1 -0
  57. package/esm/sdk/models/billing-term-kind.d.ts +12 -0
  58. package/esm/sdk/models/billing-term-kind.d.ts.map +1 -0
  59. package/esm/sdk/models/billing-term-kind.js +13 -0
  60. package/esm/sdk/models/billing-term-kind.js.map +1 -0
  61. package/esm/sdk/models/billing-term-owner-type.d.ts +9 -0
  62. package/esm/sdk/models/billing-term-owner-type.d.ts.map +1 -0
  63. package/esm/sdk/models/billing-term-owner-type.js +10 -0
  64. package/esm/sdk/models/billing-term-owner-type.js.map +1 -0
  65. package/esm/sdk/models/billing-term-split.d.ts +12 -0
  66. package/esm/sdk/models/billing-term-split.d.ts.map +1 -0
  67. package/esm/sdk/models/billing-term-split.js +13 -0
  68. package/esm/sdk/models/billing-term-split.js.map +1 -0
  69. package/esm/sdk/models/billing-term-value-type.d.ts +19 -0
  70. package/esm/sdk/models/billing-term-value-type.d.ts.map +1 -0
  71. package/esm/sdk/models/billing-term-value-type.js +17 -0
  72. package/esm/sdk/models/billing-term-value-type.js.map +1 -0
  73. package/esm/sdk/models/billing-terms-response.d.ts +13 -0
  74. package/esm/sdk/models/billing-terms-response.d.ts.map +1 -0
  75. package/esm/sdk/models/billing-terms-response.js +22 -0
  76. package/esm/sdk/models/billing-terms-response.js.map +1 -0
  77. package/esm/sdk/models/billingterm-instalment.d.ts +43 -0
  78. package/esm/sdk/models/billingterm-instalment.d.ts.map +1 -0
  79. package/esm/sdk/models/billingterm-instalment.js +68 -0
  80. package/esm/sdk/models/billingterm-instalment.js.map +1 -0
  81. package/esm/sdk/models/billingterm-term.d.ts +57 -0
  82. package/esm/sdk/models/billingterm-term.d.ts.map +1 -0
  83. package/esm/sdk/models/billingterm-term.js +65 -0
  84. package/esm/sdk/models/billingterm-term.js.map +1 -0
  85. package/esm/sdk/models/cancellation-fee-input.d.ts +18 -0
  86. package/esm/sdk/models/cancellation-fee-input.d.ts.map +1 -0
  87. package/esm/sdk/models/cancellation-fee-input.js +14 -0
  88. package/esm/sdk/models/cancellation-fee-input.js.map +1 -0
  89. package/esm/sdk/models/cancellation-fee-type.d.ts +16 -0
  90. package/esm/sdk/models/cancellation-fee-type.d.ts.map +1 -0
  91. package/esm/sdk/models/cancellation-fee-type.js +14 -0
  92. package/esm/sdk/models/cancellation-fee-type.js.map +1 -0
  93. package/esm/sdk/models/commitment-response.d.ts +9 -1
  94. package/esm/sdk/models/commitment-response.d.ts.map +1 -1
  95. package/esm/sdk/models/commitment-response.js +7 -1
  96. package/esm/sdk/models/commitment-response.js.map +1 -1
  97. package/esm/sdk/models/create-commitment-request.d.ts +12 -0
  98. package/esm/sdk/models/create-commitment-request.d.ts.map +1 -1
  99. package/esm/sdk/models/create-commitment-request.js +6 -0
  100. package/esm/sdk/models/create-commitment-request.js.map +1 -1
  101. package/esm/sdk/models/get-commitment-billing-terms-op.d.ts +15 -0
  102. package/esm/sdk/models/get-commitment-billing-terms-op.d.ts.map +1 -0
  103. package/esm/sdk/models/get-commitment-billing-terms-op.js +12 -0
  104. package/esm/sdk/models/get-commitment-billing-terms-op.js.map +1 -0
  105. package/esm/sdk/models/get-subscription-v2-op.d.ts +1 -1
  106. package/esm/sdk/models/index.d.ts +24 -0
  107. package/esm/sdk/models/index.d.ts.map +1 -1
  108. package/esm/sdk/models/index.js +24 -0
  109. package/esm/sdk/models/index.js.map +1 -1
  110. package/esm/sdk/models/instalment-bill-trigger.d.ts +12 -0
  111. package/esm/sdk/models/instalment-bill-trigger.d.ts.map +1 -0
  112. package/esm/sdk/models/instalment-bill-trigger.js +13 -0
  113. package/esm/sdk/models/instalment-bill-trigger.js.map +1 -0
  114. package/esm/sdk/models/instalment-delivery.d.ts +12 -0
  115. package/esm/sdk/models/instalment-delivery.d.ts.map +1 -0
  116. package/esm/sdk/models/instalment-delivery.js +13 -0
  117. package/esm/sdk/models/instalment-delivery.js.map +1 -0
  118. package/esm/sdk/models/instalment-kind.d.ts +10 -0
  119. package/esm/sdk/models/instalment-kind.d.ts.map +1 -0
  120. package/esm/sdk/models/instalment-kind.js +11 -0
  121. package/esm/sdk/models/instalment-kind.js.map +1 -0
  122. package/esm/sdk/models/instalment-status.d.ts +11 -0
  123. package/esm/sdk/models/instalment-status.d.ts.map +1 -0
  124. package/esm/sdk/models/instalment-status.js +12 -0
  125. package/esm/sdk/models/instalment-status.js.map +1 -0
  126. package/esm/sdk/models/invoice-billing-reason.d.ts +2 -0
  127. package/esm/sdk/models/invoice-billing-reason.d.ts.map +1 -1
  128. package/esm/sdk/models/invoice-billing-reason.js +2 -0
  129. package/esm/sdk/models/invoice-billing-reason.js.map +1 -1
  130. package/esm/sdk/models/invoice-line-item-response.d.ts +4 -0
  131. package/esm/sdk/models/invoice-line-item-response.d.ts.map +1 -1
  132. package/esm/sdk/models/invoice-line-item-response.js +2 -0
  133. package/esm/sdk/models/invoice-line-item-response.js.map +1 -1
  134. package/esm/sdk/models/list-commitment-instalments-op.d.ts +20 -0
  135. package/esm/sdk/models/list-commitment-instalments-op.d.ts.map +1 -0
  136. package/esm/sdk/models/list-commitment-instalments-op.js +13 -0
  137. package/esm/sdk/models/list-commitment-instalments-op.js.map +1 -0
  138. package/esm/sdk/models/list-instalments-response.d.ts +11 -0
  139. package/esm/sdk/models/list-instalments-response.d.ts.map +1 -0
  140. package/esm/sdk/models/list-instalments-response.js +15 -0
  141. package/esm/sdk/models/list-instalments-response.js.map +1 -0
  142. package/esm/sdk/models/preview-commitment-billing-terms-op.d.ts +21 -0
  143. package/esm/sdk/models/preview-commitment-billing-terms-op.d.ts.map +1 -0
  144. package/esm/sdk/models/preview-commitment-billing-terms-op.js +14 -0
  145. package/esm/sdk/models/preview-commitment-billing-terms-op.js.map +1 -0
  146. package/esm/sdk/models/replace-billing-terms-request.d.ts +13 -0
  147. package/esm/sdk/models/replace-billing-terms-request.d.ts.map +1 -0
  148. package/esm/sdk/models/replace-billing-terms-request.js +18 -0
  149. package/esm/sdk/models/replace-billing-terms-request.js.map +1 -0
  150. package/esm/sdk/models/replace-commitment-billing-terms-op.d.ts +21 -0
  151. package/esm/sdk/models/replace-commitment-billing-terms-op.d.ts.map +1 -0
  152. package/esm/sdk/models/replace-commitment-billing-terms-op.js +14 -0
  153. package/esm/sdk/models/replace-commitment-billing-terms-op.js.map +1 -0
  154. package/esm/sdk/models/subscription-response-v2.d.ts +5 -0
  155. package/esm/sdk/models/subscription-response-v2.d.ts.map +1 -1
  156. package/esm/sdk/models/subscription-response-v2.js +2 -0
  157. package/esm/sdk/models/subscription-response-v2.js.map +1 -1
  158. package/esm/sdk/models/subscription-response.d.ts +5 -0
  159. package/esm/sdk/models/subscription-response.d.ts.map +1 -1
  160. package/esm/sdk/models/subscription-response.js +2 -0
  161. package/esm/sdk/models/subscription-response.js.map +1 -1
  162. package/esm/sdk/models/terminate-commitment-request.d.ts +6 -2
  163. package/esm/sdk/models/terminate-commitment-request.d.ts.map +1 -1
  164. package/esm/sdk/models/terminate-commitment-request.js +2 -1
  165. package/esm/sdk/models/terminate-commitment-request.js.map +1 -1
  166. package/esm/sdk/models/trigger-commitment-instalment-op.d.ts +26 -0
  167. package/esm/sdk/models/trigger-commitment-instalment-op.d.ts.map +1 -0
  168. package/esm/sdk/models/trigger-commitment-instalment-op.js +20 -0
  169. package/esm/sdk/models/trigger-commitment-instalment-op.js.map +1 -0
  170. package/esm/sdk/models/trigger-instalment-request.d.ts +15 -0
  171. package/esm/sdk/models/trigger-instalment-request.d.ts.map +1 -0
  172. package/esm/sdk/models/trigger-instalment-request.js +17 -0
  173. package/esm/sdk/models/trigger-instalment-request.js.map +1 -0
  174. package/esm/sdk/models/update-commitment-request.d.ts +5 -0
  175. package/esm/sdk/models/update-commitment-request.d.ts.map +1 -1
  176. package/esm/sdk/models/update-commitment-request.js +2 -0
  177. package/esm/sdk/models/update-commitment-request.js.map +1 -1
  178. package/esm/sdk/models/webhook-dto-billing-instalment-webhook-payload.d.ts +13 -0
  179. package/esm/sdk/models/webhook-dto-billing-instalment-webhook-payload.d.ts.map +1 -0
  180. package/esm/sdk/models/webhook-dto-billing-instalment-webhook-payload.js +22 -0
  181. package/esm/sdk/models/webhook-dto-billing-instalment-webhook-payload.js.map +1 -0
  182. package/esm/sdk/models/webhook-dto-billing-terms-webhook-payload.d.ts +16 -0
  183. package/esm/sdk/models/webhook-dto-billing-terms-webhook-payload.d.ts.map +1 -0
  184. package/esm/sdk/models/webhook-dto-billing-terms-webhook-payload.js +28 -0
  185. package/esm/sdk/models/webhook-dto-billing-terms-webhook-payload.js.map +1 -0
  186. package/esm/sdk/models/webhook-dto-invoice-line-item.d.ts +1 -0
  187. package/esm/sdk/models/webhook-dto-invoice-line-item.d.ts.map +1 -1
  188. package/esm/sdk/models/webhook-dto-invoice-line-item.js +2 -0
  189. package/esm/sdk/models/webhook-dto-invoice-line-item.js.map +1 -1
  190. package/esm/sdk/models/webhook-event-name.d.ts +6 -0
  191. package/esm/sdk/models/webhook-event-name.d.ts.map +1 -1
  192. package/esm/sdk/models/webhook-event-name.js +6 -0
  193. package/esm/sdk/models/webhook-event-name.js.map +1 -1
  194. package/esm/sdk/webhook-events.d.ts +42 -0
  195. package/esm/sdk/webhook-events.d.ts.map +1 -1
  196. package/esm/sdk/webhook-events.js +60 -0
  197. package/esm/sdk/webhook-events.js.map +1 -1
  198. package/jsr.json +1 -1
  199. package/package.json +1 -1
  200. package/src/funcs/commitments-get-commitment-billing-terms.ts +182 -0
  201. package/src/funcs/commitments-list-commitment-instalments.ts +191 -0
  202. package/src/funcs/commitments-preview-commitment-billing-terms.ts +192 -0
  203. package/src/funcs/commitments-replace-commitment-billing-terms.ts +190 -0
  204. package/src/funcs/commitments-terminate-commitment.ts +1 -1
  205. package/src/funcs/commitments-trigger-commitment-instalment.ts +197 -0
  206. package/src/funcs/webhook-events-post-webhook-events-billing-instalment-cancelled.ts +144 -0
  207. package/src/funcs/webhook-events-post-webhook-events-billing-instalment-created.ts +144 -0
  208. package/src/funcs/webhook-events-post-webhook-events-billing-instalment-invoiced.ts +144 -0
  209. package/src/funcs/webhook-events-post-webhook-events-billing-instalment-updated.ts +144 -0
  210. package/src/funcs/webhook-events-post-webhook-events-billing-terms-created.ts +144 -0
  211. package/src/funcs/webhook-events-post-webhook-events-billing-terms-updated.ts +144 -0
  212. package/src/lib/config.ts +2 -2
  213. package/src/sdk/commitments.ts +101 -1
  214. package/src/sdk/models/billing-term-input.ts +127 -0
  215. package/src/sdk/models/billing-term-kind.ts +24 -0
  216. package/src/sdk/models/billing-term-owner-type.ts +16 -0
  217. package/src/sdk/models/billing-term-split.ts +24 -0
  218. package/src/sdk/models/billing-term-value-type.ts +31 -0
  219. package/src/sdk/models/billing-terms-response.ts +49 -0
  220. package/src/sdk/models/billingterm-instalment.ts +128 -0
  221. package/src/sdk/models/billingterm-term.ts +143 -0
  222. package/src/sdk/models/cancellation-fee-input.ts +40 -0
  223. package/src/sdk/models/cancellation-fee-type.ts +23 -0
  224. package/src/sdk/models/commitment-response.ts +22 -2
  225. package/src/sdk/models/create-commitment-request.ts +23 -0
  226. package/src/sdk/models/get-commitment-billing-terms-op.ts +35 -0
  227. package/src/sdk/models/get-subscription-v2-op.ts +1 -1
  228. package/src/sdk/models/index.ts +24 -0
  229. package/src/sdk/models/instalment-bill-trigger.ts +24 -0
  230. package/src/sdk/models/instalment-delivery.ts +24 -0
  231. package/src/sdk/models/instalment-kind.ts +19 -0
  232. package/src/sdk/models/instalment-status.ts +20 -0
  233. package/src/sdk/models/invoice-billing-reason.ts +2 -0
  234. package/src/sdk/models/invoice-line-item-response.ts +6 -0
  235. package/src/sdk/models/list-commitment-instalments-op.ts +41 -0
  236. package/src/sdk/models/list-instalments-response.ts +35 -0
  237. package/src/sdk/models/preview-commitment-billing-terms-op.ts +46 -0
  238. package/src/sdk/models/replace-billing-terms-request.ts +43 -0
  239. package/src/sdk/models/replace-commitment-billing-terms-op.ts +46 -0
  240. package/src/sdk/models/subscription-response-v2.ts +9 -0
  241. package/src/sdk/models/subscription-response.ts +9 -0
  242. package/src/sdk/models/terminate-commitment-request.ts +11 -3
  243. package/src/sdk/models/trigger-commitment-instalment-op.ts +60 -0
  244. package/src/sdk/models/trigger-instalment-request.ts +41 -0
  245. package/src/sdk/models/update-commitment-request.ts +7 -0
  246. package/src/sdk/models/webhook-dto-billing-instalment-webhook-payload.ts +53 -0
  247. package/src/sdk/models/webhook-dto-billing-terms-webhook-payload.ts +61 -0
  248. package/src/sdk/models/webhook-dto-invoice-line-item.ts +3 -0
  249. package/src/sdk/models/webhook-event-name.ts +6 -0
  250. package/src/sdk/webhook-events.ts +96 -0
@@ -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
  };
@@ -69,7 +69,15 @@ export * from "./billing-period-behaviour.js";
69
69
  export * from "./billing-period-config.js";
70
70
  export * from "./billing-period-info.js";
71
71
  export * from "./billing-period.js";
72
+ export * from "./billing-term-input.js";
73
+ export * from "./billing-term-kind.js";
74
+ export * from "./billing-term-owner-type.js";
75
+ export * from "./billing-term-split.js";
76
+ export * from "./billing-term-value-type.js";
77
+ export * from "./billing-terms-response.js";
72
78
  export * from "./billing-tier.js";
79
+ export * from "./billingterm-instalment.js";
80
+ export * from "./billingterm-term.js";
73
81
  export * from "./bucket-summary.js";
74
82
  export * from "./bucket.js";
75
83
  export * from "./bulk-ingest-event-request.js";
@@ -82,6 +90,8 @@ export * from "./cancel-subscription-op.js";
82
90
  export * from "./cancel-subscription-request.js";
83
91
  export * from "./cancel-subscription-response.js";
84
92
  export * from "./cancel-subscription-schedule-op.js";
93
+ export * from "./cancellation-fee-input.js";
94
+ export * from "./cancellation-fee-type.js";
85
95
  export * from "./cancellation-type.js";
86
96
  export * from "./changed-addon-association-action.js";
87
97
  export * from "./changed-addon-association.js";
@@ -317,6 +327,7 @@ export * from "./get-addon-op.js";
317
327
  export * from "./get-alert-settings-op.js";
318
328
  export * from "./get-analytics-view-op.js";
319
329
  export * from "./get-checkout-session-op.js";
330
+ export * from "./get-commitment-billing-terms-op.js";
320
331
  export * from "./get-commitment-op.js";
321
332
  export * from "./get-contract-op.js";
322
333
  export * from "./get-cost-analytics-request.js";
@@ -404,6 +415,10 @@ export * from "./improvement-direction.js";
404
415
  export * from "./ingest-event-request.js";
405
416
  export * from "./inheritance-action.js";
406
417
  export * from "./inline-fx-rate.js";
418
+ export * from "./instalment-bill-trigger.js";
419
+ export * from "./instalment-delivery.js";
420
+ export * from "./instalment-kind.js";
421
+ export * from "./instalment-status.js";
407
422
  export * from "./integration-config-entry.js";
408
423
  export * from "./integration-config-response.js";
409
424
  export * from "./integration-entity-type.js";
@@ -446,6 +461,7 @@ export * from "./list-alert-settings-response.js";
446
461
  export * from "./list-all-subscription-schedules-op.js";
447
462
  export * from "./list-analytics-views-op.js";
448
463
  export * from "./list-api-keys-op.js";
464
+ export * from "./list-commitment-instalments-op.js";
449
465
  export * from "./list-commitments-response.js";
450
466
  export * from "./list-contracts-response.js";
451
467
  export * from "./list-costsheet-response.js";
@@ -461,6 +477,7 @@ export * from "./list-entity-integration-mappings-response.js";
461
477
  export * from "./list-features-response.js";
462
478
  export * from "./list-fx-rates-response.js";
463
479
  export * from "./list-groups-response.js";
480
+ export * from "./list-instalments-response.js";
464
481
  export * from "./list-invoices-response.js";
465
482
  export * from "./list-journal-entries-response.js";
466
483
  export * from "./list-payments-op.js";
@@ -545,6 +562,7 @@ export * from "./pob-filter.js";
545
562
  export * from "./point-bucket.js";
546
563
  export * from "./poll-self-billing-checkout-op.js";
547
564
  export * from "./portal-session-response.js";
565
+ export * from "./preview-commitment-billing-terms-op.js";
548
566
  export * from "./preview-subscription-change-op.js";
549
567
  export * from "./preview-subscription-modify-op.js";
550
568
  export * from "./preview-subscription-plan-change-v2-op.js";
@@ -588,6 +606,8 @@ export * from "./rejected-event-reason.js";
588
606
  export * from "./remove-addon-ref.js";
589
607
  export * from "./remove-addon-request.js";
590
608
  export * from "./remove-user-op.js";
609
+ export * from "./replace-billing-terms-request.js";
610
+ export * from "./replace-commitment-billing-terms-op.js";
591
611
  export * from "./report-catalog-entry.js";
592
612
  export * from "./report-catalog-response.js";
593
613
  export * from "./report-category.js";
@@ -745,8 +765,10 @@ export * from "./transaction-reason.js";
745
765
  export * from "./transaction-status.js";
746
766
  export * from "./transaction-type.js";
747
767
  export * from "./trial-end-action.js";
768
+ export * from "./trigger-commitment-instalment-op.js";
748
769
  export * from "./trigger-force-run-request.js";
749
770
  export * from "./trigger-force-run-response.js";
771
+ export * from "./trigger-instalment-request.js";
750
772
  export * from "./trigger-invoice-comms-webhook-op.js";
751
773
  export * from "./trigger-scheduled-task-run-op.js";
752
774
  export * from "./update-addon-op.js";
@@ -844,6 +866,8 @@ export * from "./waterfall-request.js";
844
866
  export * from "./waterfall-response.js";
845
867
  export * from "./waterfall-row.js";
846
868
  export * from "./webhook-dto-alert-webhook-payload.js";
869
+ export * from "./webhook-dto-billing-instalment-webhook-payload.js";
870
+ export * from "./webhook-dto-billing-terms-webhook-payload.js";
847
871
  export * from "./webhook-dto-checkout-session-webhook-payload.js";
848
872
  export * from "./webhook-dto-checkout-session.js";
849
873
  export * from "./webhook-dto-commitment-webhook-payload.js";
@@ -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 InstalmentBillTrigger = {
10
+ Date: "date",
11
+ Manual: "manual",
12
+ } as const;
13
+ export type InstalmentBillTrigger = OpenEnum<typeof InstalmentBillTrigger>;
14
+
15
+ /** @internal */
16
+ export const InstalmentBillTrigger$inboundSchema: z.ZodMiniType<
17
+ InstalmentBillTrigger,
18
+ unknown
19
+ > = openEnums.inboundSchema(InstalmentBillTrigger);
20
+ /** @internal */
21
+ export const InstalmentBillTrigger$outboundSchema: z.ZodMiniType<
22
+ string,
23
+ InstalmentBillTrigger
24
+ > = openEnums.outboundSchema(InstalmentBillTrigger);
@@ -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 InstalmentDelivery = {
10
+ SubscriptionInvoice: "subscription_invoice",
11
+ SeparateInvoice: "separate_invoice",
12
+ } as const;
13
+ export type InstalmentDelivery = OpenEnum<typeof InstalmentDelivery>;
14
+
15
+ /** @internal */
16
+ export const InstalmentDelivery$inboundSchema: z.ZodMiniType<
17
+ InstalmentDelivery,
18
+ unknown
19
+ > = openEnums.inboundSchema(InstalmentDelivery);
20
+ /** @internal */
21
+ export const InstalmentDelivery$outboundSchema: z.ZodMiniType<
22
+ string,
23
+ InstalmentDelivery
24
+ > = openEnums.outboundSchema(InstalmentDelivery);
@@ -0,0 +1,19 @@
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 InstalmentKind = {
10
+ Instalment: "instalment",
11
+ Settlement: "settlement",
12
+ } as const;
13
+ export type InstalmentKind = OpenEnum<typeof InstalmentKind>;
14
+
15
+ /** @internal */
16
+ export const InstalmentKind$inboundSchema: z.ZodMiniType<
17
+ InstalmentKind,
18
+ unknown
19
+ > = openEnums.inboundSchema(InstalmentKind);
@@ -0,0 +1,20 @@
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 InstalmentStatus = {
10
+ Scheduled: "scheduled",
11
+ Invoiced: "invoiced",
12
+ Cancelled: "cancelled",
13
+ } as const;
14
+ export type InstalmentStatus = OpenEnum<typeof InstalmentStatus>;
15
+
16
+ /** @internal */
17
+ export const InstalmentStatus$inboundSchema: z.ZodMiniType<
18
+ InstalmentStatus,
19
+ unknown
20
+ > = openEnums.inboundSchema(InstalmentStatus);
@@ -17,6 +17,8 @@ export const InvoiceBillingReason = {
17
17
  WalletAutoTopup: "WALLET_AUTO_TOPUP",
18
18
  SubscriptionPaused: "SUBSCRIPTION_PAUSED",
19
19
  SubscriptionResume: "SUBSCRIPTION_RESUME",
20
+ BillingTerms: "BILLING_TERMS",
21
+ CommitmentTermination: "COMMITMENT_TERMINATION",
20
22
  } as const;
21
23
  export type InvoiceBillingReason = ClosedEnum<typeof InvoiceBillingReason>;
22
24
 
@@ -36,6 +36,10 @@ export type InvoiceLineItemResponse = {
36
36
  */
37
37
  adjustedEntitlementQuantity?: string | undefined;
38
38
  amount?: string | undefined;
39
+ /**
40
+ * billing_instalment_id links this line item to the billing instalment it bills.
41
+ */
42
+ billingInstalmentId?: string | undefined;
39
43
  /**
40
44
  * commitment_id links this line item to the commitment it bills.
41
45
  */
@@ -111,6 +115,7 @@ export const InvoiceLineItemResponse$inboundSchema: z.ZodMiniType<
111
115
  z.object({
112
116
  adjusted_entitlement_quantity: types.optional(types.string()),
113
117
  amount: types.optional(types.string()),
118
+ billing_instalment_id: types.optional(types.string()),
114
119
  commitment_id: types.optional(types.string()),
115
120
  commitment_info: types.optional(CommitmentInfo$inboundSchema),
116
121
  created_at: types.optional(types.date()),
@@ -153,6 +158,7 @@ export const InvoiceLineItemResponse$inboundSchema: z.ZodMiniType<
153
158
  z.transform((v) => {
154
159
  return remap$(v, {
155
160
  "adjusted_entitlement_quantity": "adjustedEntitlementQuantity",
161
+ "billing_instalment_id": "billingInstalmentId",
156
162
  "commitment_id": "commitmentId",
157
163
  "commitment_info": "commitmentInfo",
158
164
  "created_at": "createdAt",
@@ -0,0 +1,41 @@
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 ListCommitmentInstalmentsRequest = {
8
+ /**
9
+ * Commitment ID
10
+ */
11
+ id: string;
12
+ /**
13
+ * Only instalments in these statuses (scheduled, invoiced, cancelled)
14
+ */
15
+ status?: Array<string> | undefined;
16
+ };
17
+
18
+ /** @internal */
19
+ export type ListCommitmentInstalmentsRequest$Outbound = {
20
+ id: string;
21
+ status?: Array<string> | undefined;
22
+ };
23
+
24
+ /** @internal */
25
+ export const ListCommitmentInstalmentsRequest$outboundSchema: z.ZodMiniType<
26
+ ListCommitmentInstalmentsRequest$Outbound,
27
+ ListCommitmentInstalmentsRequest
28
+ > = z.object({
29
+ id: z.string(),
30
+ status: z.optional(z.array(z.string())),
31
+ });
32
+
33
+ export function listCommitmentInstalmentsRequestToJSON(
34
+ listCommitmentInstalmentsRequest: ListCommitmentInstalmentsRequest,
35
+ ): string {
36
+ return JSON.stringify(
37
+ ListCommitmentInstalmentsRequest$outboundSchema.parse(
38
+ listCommitmentInstalmentsRequest,
39
+ ),
40
+ );
41
+ }
@@ -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
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import * as types from "../../types/primitives.js";
9
+ import {
10
+ BillingtermInstalment,
11
+ BillingtermInstalment$inboundSchema,
12
+ } from "./billingterm-instalment.js";
13
+ import { SDKValidationError } from "./sdk-validation-error.js";
14
+
15
+ export type ListInstalmentsResponse = {
16
+ items?: Array<BillingtermInstalment> | undefined;
17
+ };
18
+
19
+ /** @internal */
20
+ export const ListInstalmentsResponse$inboundSchema: z.ZodMiniType<
21
+ ListInstalmentsResponse,
22
+ unknown
23
+ > = z.object({
24
+ items: types.optional(z.array(BillingtermInstalment$inboundSchema)),
25
+ });
26
+
27
+ export function listInstalmentsResponseFromJSON(
28
+ jsonString: string,
29
+ ): SafeParseResult<ListInstalmentsResponse, SDKValidationError> {
30
+ return safeParse(
31
+ jsonString,
32
+ (x) => ListInstalmentsResponse$inboundSchema.parse(JSON.parse(x)),
33
+ `Failed to parse 'ListInstalmentsResponse' from JSON`,
34
+ );
35
+ }
@@ -0,0 +1,46 @@
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
+ ReplaceBillingTermsRequest,
8
+ ReplaceBillingTermsRequest$Outbound,
9
+ ReplaceBillingTermsRequest$outboundSchema,
10
+ } from "./replace-billing-terms-request.js";
11
+
12
+ export type PreviewCommitmentBillingTermsRequest = {
13
+ /**
14
+ * Commitment ID
15
+ */
16
+ id: string;
17
+ /**
18
+ * Billing terms
19
+ */
20
+ body: ReplaceBillingTermsRequest;
21
+ };
22
+
23
+ /** @internal */
24
+ export type PreviewCommitmentBillingTermsRequest$Outbound = {
25
+ id: string;
26
+ body: ReplaceBillingTermsRequest$Outbound;
27
+ };
28
+
29
+ /** @internal */
30
+ export const PreviewCommitmentBillingTermsRequest$outboundSchema: z.ZodMiniType<
31
+ PreviewCommitmentBillingTermsRequest$Outbound,
32
+ PreviewCommitmentBillingTermsRequest
33
+ > = z.object({
34
+ id: z.string(),
35
+ body: ReplaceBillingTermsRequest$outboundSchema,
36
+ });
37
+
38
+ export function previewCommitmentBillingTermsRequestToJSON(
39
+ previewCommitmentBillingTermsRequest: PreviewCommitmentBillingTermsRequest,
40
+ ): string {
41
+ return JSON.stringify(
42
+ PreviewCommitmentBillingTermsRequest$outboundSchema.parse(
43
+ previewCommitmentBillingTermsRequest,
44
+ ),
45
+ );
46
+ }
@@ -0,0 +1,43 @@
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 {
8
+ BillingTermInput,
9
+ BillingTermInput$Outbound,
10
+ BillingTermInput$outboundSchema,
11
+ } from "./billing-term-input.js";
12
+
13
+ export type ReplaceBillingTermsRequest = {
14
+ billingTerms: Array<BillingTermInput>;
15
+ };
16
+
17
+ /** @internal */
18
+ export type ReplaceBillingTermsRequest$Outbound = {
19
+ billing_terms: Array<BillingTermInput$Outbound>;
20
+ };
21
+
22
+ /** @internal */
23
+ export const ReplaceBillingTermsRequest$outboundSchema: z.ZodMiniType<
24
+ ReplaceBillingTermsRequest$Outbound,
25
+ ReplaceBillingTermsRequest
26
+ > = z.pipe(
27
+ z.object({
28
+ billingTerms: z.array(BillingTermInput$outboundSchema),
29
+ }),
30
+ z.transform((v) => {
31
+ return remap$(v, {
32
+ billingTerms: "billing_terms",
33
+ });
34
+ }),
35
+ );
36
+
37
+ export function replaceBillingTermsRequestToJSON(
38
+ replaceBillingTermsRequest: ReplaceBillingTermsRequest,
39
+ ): string {
40
+ return JSON.stringify(
41
+ ReplaceBillingTermsRequest$outboundSchema.parse(replaceBillingTermsRequest),
42
+ );
43
+ }