@flexprice/sdk 2.1.47 → 2.1.48-dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (267) hide show
  1. package/docs/sdk/models/billing-term-input.md +29 -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 +36 -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/instalment-bill-trigger.md +17 -0
  15. package/docs/sdk/models/instalment-delivery.md +17 -0
  16. package/docs/sdk/models/instalment-kind.md +17 -0
  17. package/docs/sdk/models/instalment-status.md +17 -0
  18. package/docs/sdk/models/invoice-billing-reason.md +1 -1
  19. package/docs/sdk/models/invoice-line-item-response.md +1 -0
  20. package/docs/sdk/models/list-commitment-instalments-request.md +18 -0
  21. package/docs/sdk/models/list-instalments-response.md +15 -0
  22. package/docs/sdk/models/preview-commitment-billing-terms-request.md +21 -0
  23. package/docs/sdk/models/replace-billing-terms-request.md +17 -0
  24. package/docs/sdk/models/replace-commitment-billing-terms-request.md +21 -0
  25. package/docs/sdk/models/terminate-commitment-request.md +2 -2
  26. package/docs/sdk/models/trigger-commitment-instalment-request.md +20 -0
  27. package/docs/sdk/models/trigger-instalment-request.md +15 -0
  28. package/docs/sdk/models/webhook-dto-billing-instalment-webhook-payload.md +16 -0
  29. package/docs/sdk/models/webhook-dto-billing-terms-webhook-payload.md +18 -0
  30. package/docs/sdk/models/webhook-dto-invoice-line-item.md +1 -0
  31. package/docs/sdk/models/webhook-event-name.md +1 -1
  32. package/docs/sdks/commitments/README.md +384 -1
  33. package/docs/sdks/webhookevents/README.md +414 -0
  34. package/esm/funcs/commitments-get-commitment-billing-terms.d.ts +17 -0
  35. package/esm/funcs/commitments-get-commitment-billing-terms.d.ts.map +1 -0
  36. package/esm/funcs/commitments-get-commitment-billing-terms.js +91 -0
  37. package/esm/funcs/commitments-get-commitment-billing-terms.js.map +1 -0
  38. package/esm/funcs/commitments-list-commitment-instalments.d.ts +17 -0
  39. package/esm/funcs/commitments-list-commitment-instalments.d.ts.map +1 -0
  40. package/esm/funcs/commitments-list-commitment-instalments.js +96 -0
  41. package/esm/funcs/commitments-list-commitment-instalments.js.map +1 -0
  42. package/esm/funcs/commitments-preview-commitment-billing-terms.d.ts +17 -0
  43. package/esm/funcs/commitments-preview-commitment-billing-terms.d.ts.map +1 -0
  44. package/esm/funcs/commitments-preview-commitment-billing-terms.js +93 -0
  45. package/esm/funcs/commitments-preview-commitment-billing-terms.js.map +1 -0
  46. package/esm/funcs/commitments-replace-commitment-billing-terms.d.ts +17 -0
  47. package/esm/funcs/commitments-replace-commitment-billing-terms.d.ts.map +1 -0
  48. package/esm/funcs/commitments-replace-commitment-billing-terms.js +93 -0
  49. package/esm/funcs/commitments-replace-commitment-billing-terms.js.map +1 -0
  50. package/esm/funcs/commitments-terminate-commitment.d.ts +1 -1
  51. package/esm/funcs/commitments-terminate-commitment.js +1 -1
  52. package/esm/funcs/commitments-trigger-commitment-instalment.d.ts +17 -0
  53. package/esm/funcs/commitments-trigger-commitment-instalment.d.ts.map +1 -0
  54. package/esm/funcs/commitments-trigger-commitment-instalment.js +98 -0
  55. package/esm/funcs/commitments-trigger-commitment-instalment.js.map +1 -0
  56. package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-cancelled.d.ts +17 -0
  57. package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-cancelled.d.ts.map +1 -0
  58. package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-cancelled.js +69 -0
  59. package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-cancelled.js.map +1 -0
  60. package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-created.d.ts +17 -0
  61. package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-created.d.ts.map +1 -0
  62. package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-created.js +69 -0
  63. package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-created.js.map +1 -0
  64. package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-invoiced.d.ts +17 -0
  65. package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-invoiced.d.ts.map +1 -0
  66. package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-invoiced.js +69 -0
  67. package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-invoiced.js.map +1 -0
  68. package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-updated.d.ts +17 -0
  69. package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-updated.d.ts.map +1 -0
  70. package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-updated.js +69 -0
  71. package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-updated.js.map +1 -0
  72. package/esm/funcs/webhook-events-post-webhook-events-billing-terms-created.d.ts +17 -0
  73. package/esm/funcs/webhook-events-post-webhook-events-billing-terms-created.d.ts.map +1 -0
  74. package/esm/funcs/webhook-events-post-webhook-events-billing-terms-created.js +69 -0
  75. package/esm/funcs/webhook-events-post-webhook-events-billing-terms-created.js.map +1 -0
  76. package/esm/funcs/webhook-events-post-webhook-events-billing-terms-updated.d.ts +17 -0
  77. package/esm/funcs/webhook-events-post-webhook-events-billing-terms-updated.d.ts.map +1 -0
  78. package/esm/funcs/webhook-events-post-webhook-events-billing-terms-updated.js +69 -0
  79. package/esm/funcs/webhook-events-post-webhook-events-billing-terms-updated.js.map +1 -0
  80. package/esm/lib/config.d.ts +3 -3
  81. package/esm/lib/config.js +3 -3
  82. package/esm/lib/config.js.map +1 -1
  83. package/esm/sdk/commitments.d.ts +36 -1
  84. package/esm/sdk/commitments.d.ts.map +1 -1
  85. package/esm/sdk/commitments.js +51 -1
  86. package/esm/sdk/commitments.js.map +1 -1
  87. package/esm/sdk/models/billing-term-input.d.ts +61 -0
  88. package/esm/sdk/models/billing-term-input.d.ts.map +1 -0
  89. package/esm/sdk/models/billing-term-input.js +40 -0
  90. package/esm/sdk/models/billing-term-input.js.map +1 -0
  91. package/esm/sdk/models/billing-term-kind.d.ts +12 -0
  92. package/esm/sdk/models/billing-term-kind.d.ts.map +1 -0
  93. package/esm/sdk/models/billing-term-kind.js +13 -0
  94. package/esm/sdk/models/billing-term-kind.js.map +1 -0
  95. package/esm/sdk/models/billing-term-owner-type.d.ts +9 -0
  96. package/esm/sdk/models/billing-term-owner-type.d.ts.map +1 -0
  97. package/esm/sdk/models/billing-term-owner-type.js +10 -0
  98. package/esm/sdk/models/billing-term-owner-type.js.map +1 -0
  99. package/esm/sdk/models/billing-term-split.d.ts +12 -0
  100. package/esm/sdk/models/billing-term-split.d.ts.map +1 -0
  101. package/esm/sdk/models/billing-term-split.js +13 -0
  102. package/esm/sdk/models/billing-term-split.js.map +1 -0
  103. package/esm/sdk/models/billing-term-value-type.d.ts +19 -0
  104. package/esm/sdk/models/billing-term-value-type.d.ts.map +1 -0
  105. package/esm/sdk/models/billing-term-value-type.js +17 -0
  106. package/esm/sdk/models/billing-term-value-type.js.map +1 -0
  107. package/esm/sdk/models/billing-terms-response.d.ts +13 -0
  108. package/esm/sdk/models/billing-terms-response.d.ts.map +1 -0
  109. package/esm/sdk/models/billing-terms-response.js +22 -0
  110. package/esm/sdk/models/billing-terms-response.js.map +1 -0
  111. package/esm/sdk/models/billingterm-instalment.d.ts +43 -0
  112. package/esm/sdk/models/billingterm-instalment.d.ts.map +1 -0
  113. package/esm/sdk/models/billingterm-instalment.js +68 -0
  114. package/esm/sdk/models/billingterm-instalment.js.map +1 -0
  115. package/esm/sdk/models/billingterm-term.d.ts +55 -0
  116. package/esm/sdk/models/billingterm-term.d.ts.map +1 -0
  117. package/esm/sdk/models/billingterm-term.js +62 -0
  118. package/esm/sdk/models/billingterm-term.js.map +1 -0
  119. package/esm/sdk/models/cancellation-fee-input.d.ts +18 -0
  120. package/esm/sdk/models/cancellation-fee-input.d.ts.map +1 -0
  121. package/esm/sdk/models/cancellation-fee-input.js +14 -0
  122. package/esm/sdk/models/cancellation-fee-input.js.map +1 -0
  123. package/esm/sdk/models/cancellation-fee-type.d.ts +16 -0
  124. package/esm/sdk/models/cancellation-fee-type.d.ts.map +1 -0
  125. package/esm/sdk/models/cancellation-fee-type.js +14 -0
  126. package/esm/sdk/models/cancellation-fee-type.js.map +1 -0
  127. package/esm/sdk/models/commitment-response.d.ts +9 -1
  128. package/esm/sdk/models/commitment-response.d.ts.map +1 -1
  129. package/esm/sdk/models/commitment-response.js +7 -1
  130. package/esm/sdk/models/commitment-response.js.map +1 -1
  131. package/esm/sdk/models/create-commitment-request.d.ts +12 -0
  132. package/esm/sdk/models/create-commitment-request.d.ts.map +1 -1
  133. package/esm/sdk/models/create-commitment-request.js +6 -0
  134. package/esm/sdk/models/create-commitment-request.js.map +1 -1
  135. package/esm/sdk/models/get-commitment-billing-terms-op.d.ts +15 -0
  136. package/esm/sdk/models/get-commitment-billing-terms-op.d.ts.map +1 -0
  137. package/esm/sdk/models/get-commitment-billing-terms-op.js +12 -0
  138. package/esm/sdk/models/get-commitment-billing-terms-op.js.map +1 -0
  139. package/esm/sdk/models/index.d.ts +24 -0
  140. package/esm/sdk/models/index.d.ts.map +1 -1
  141. package/esm/sdk/models/index.js +24 -0
  142. package/esm/sdk/models/index.js.map +1 -1
  143. package/esm/sdk/models/instalment-bill-trigger.d.ts +12 -0
  144. package/esm/sdk/models/instalment-bill-trigger.d.ts.map +1 -0
  145. package/esm/sdk/models/instalment-bill-trigger.js +13 -0
  146. package/esm/sdk/models/instalment-bill-trigger.js.map +1 -0
  147. package/esm/sdk/models/instalment-delivery.d.ts +12 -0
  148. package/esm/sdk/models/instalment-delivery.d.ts.map +1 -0
  149. package/esm/sdk/models/instalment-delivery.js +13 -0
  150. package/esm/sdk/models/instalment-delivery.js.map +1 -0
  151. package/esm/sdk/models/instalment-kind.d.ts +10 -0
  152. package/esm/sdk/models/instalment-kind.d.ts.map +1 -0
  153. package/esm/sdk/models/instalment-kind.js +11 -0
  154. package/esm/sdk/models/instalment-kind.js.map +1 -0
  155. package/esm/sdk/models/instalment-status.d.ts +11 -0
  156. package/esm/sdk/models/instalment-status.d.ts.map +1 -0
  157. package/esm/sdk/models/instalment-status.js +12 -0
  158. package/esm/sdk/models/instalment-status.js.map +1 -0
  159. package/esm/sdk/models/invoice-billing-reason.d.ts +1 -0
  160. package/esm/sdk/models/invoice-billing-reason.d.ts.map +1 -1
  161. package/esm/sdk/models/invoice-billing-reason.js +1 -0
  162. package/esm/sdk/models/invoice-billing-reason.js.map +1 -1
  163. package/esm/sdk/models/invoice-line-item-response.d.ts +4 -0
  164. package/esm/sdk/models/invoice-line-item-response.d.ts.map +1 -1
  165. package/esm/sdk/models/invoice-line-item-response.js +2 -0
  166. package/esm/sdk/models/invoice-line-item-response.js.map +1 -1
  167. package/esm/sdk/models/list-commitment-instalments-op.d.ts +20 -0
  168. package/esm/sdk/models/list-commitment-instalments-op.d.ts.map +1 -0
  169. package/esm/sdk/models/list-commitment-instalments-op.js +13 -0
  170. package/esm/sdk/models/list-commitment-instalments-op.js.map +1 -0
  171. package/esm/sdk/models/list-instalments-response.d.ts +11 -0
  172. package/esm/sdk/models/list-instalments-response.d.ts.map +1 -0
  173. package/esm/sdk/models/list-instalments-response.js +15 -0
  174. package/esm/sdk/models/list-instalments-response.js.map +1 -0
  175. package/esm/sdk/models/preview-commitment-billing-terms-op.d.ts +21 -0
  176. package/esm/sdk/models/preview-commitment-billing-terms-op.d.ts.map +1 -0
  177. package/esm/sdk/models/preview-commitment-billing-terms-op.js +14 -0
  178. package/esm/sdk/models/preview-commitment-billing-terms-op.js.map +1 -0
  179. package/esm/sdk/models/replace-billing-terms-request.d.ts +13 -0
  180. package/esm/sdk/models/replace-billing-terms-request.d.ts.map +1 -0
  181. package/esm/sdk/models/replace-billing-terms-request.js +18 -0
  182. package/esm/sdk/models/replace-billing-terms-request.js.map +1 -0
  183. package/esm/sdk/models/replace-commitment-billing-terms-op.d.ts +21 -0
  184. package/esm/sdk/models/replace-commitment-billing-terms-op.d.ts.map +1 -0
  185. package/esm/sdk/models/replace-commitment-billing-terms-op.js +14 -0
  186. package/esm/sdk/models/replace-commitment-billing-terms-op.js.map +1 -0
  187. package/esm/sdk/models/terminate-commitment-request.d.ts +6 -2
  188. package/esm/sdk/models/terminate-commitment-request.d.ts.map +1 -1
  189. package/esm/sdk/models/terminate-commitment-request.js +2 -1
  190. package/esm/sdk/models/terminate-commitment-request.js.map +1 -1
  191. package/esm/sdk/models/trigger-commitment-instalment-op.d.ts +26 -0
  192. package/esm/sdk/models/trigger-commitment-instalment-op.d.ts.map +1 -0
  193. package/esm/sdk/models/trigger-commitment-instalment-op.js +20 -0
  194. package/esm/sdk/models/trigger-commitment-instalment-op.js.map +1 -0
  195. package/esm/sdk/models/trigger-instalment-request.d.ts +15 -0
  196. package/esm/sdk/models/trigger-instalment-request.d.ts.map +1 -0
  197. package/esm/sdk/models/trigger-instalment-request.js +17 -0
  198. package/esm/sdk/models/trigger-instalment-request.js.map +1 -0
  199. package/esm/sdk/models/webhook-dto-billing-instalment-webhook-payload.d.ts +13 -0
  200. package/esm/sdk/models/webhook-dto-billing-instalment-webhook-payload.d.ts.map +1 -0
  201. package/esm/sdk/models/webhook-dto-billing-instalment-webhook-payload.js +22 -0
  202. package/esm/sdk/models/webhook-dto-billing-instalment-webhook-payload.js.map +1 -0
  203. package/esm/sdk/models/webhook-dto-billing-terms-webhook-payload.d.ts +16 -0
  204. package/esm/sdk/models/webhook-dto-billing-terms-webhook-payload.d.ts.map +1 -0
  205. package/esm/sdk/models/webhook-dto-billing-terms-webhook-payload.js +28 -0
  206. package/esm/sdk/models/webhook-dto-billing-terms-webhook-payload.js.map +1 -0
  207. package/esm/sdk/models/webhook-dto-invoice-line-item.d.ts +1 -0
  208. package/esm/sdk/models/webhook-dto-invoice-line-item.d.ts.map +1 -1
  209. package/esm/sdk/models/webhook-dto-invoice-line-item.js +2 -0
  210. package/esm/sdk/models/webhook-dto-invoice-line-item.js.map +1 -1
  211. package/esm/sdk/models/webhook-event-name.d.ts +6 -0
  212. package/esm/sdk/models/webhook-event-name.d.ts.map +1 -1
  213. package/esm/sdk/models/webhook-event-name.js +6 -0
  214. package/esm/sdk/models/webhook-event-name.js.map +1 -1
  215. package/esm/sdk/webhook-events.d.ts +42 -0
  216. package/esm/sdk/webhook-events.d.ts.map +1 -1
  217. package/esm/sdk/webhook-events.js +60 -0
  218. package/esm/sdk/webhook-events.js.map +1 -1
  219. package/jsr.json +1 -1
  220. package/package.json +3 -3
  221. package/src/funcs/commitments-get-commitment-billing-terms.ts +182 -0
  222. package/src/funcs/commitments-list-commitment-instalments.ts +191 -0
  223. package/src/funcs/commitments-preview-commitment-billing-terms.ts +192 -0
  224. package/src/funcs/commitments-replace-commitment-billing-terms.ts +190 -0
  225. package/src/funcs/commitments-terminate-commitment.ts +1 -1
  226. package/src/funcs/commitments-trigger-commitment-instalment.ts +197 -0
  227. package/src/funcs/webhook-events-post-webhook-events-billing-instalment-cancelled.ts +144 -0
  228. package/src/funcs/webhook-events-post-webhook-events-billing-instalment-created.ts +144 -0
  229. package/src/funcs/webhook-events-post-webhook-events-billing-instalment-invoiced.ts +144 -0
  230. package/src/funcs/webhook-events-post-webhook-events-billing-instalment-updated.ts +144 -0
  231. package/src/funcs/webhook-events-post-webhook-events-billing-terms-created.ts +144 -0
  232. package/src/funcs/webhook-events-post-webhook-events-billing-terms-updated.ts +144 -0
  233. package/src/lib/config.ts +3 -3
  234. package/src/sdk/commitments.ts +101 -1
  235. package/src/sdk/models/billing-term-input.ts +116 -0
  236. package/src/sdk/models/billing-term-kind.ts +24 -0
  237. package/src/sdk/models/billing-term-owner-type.ts +16 -0
  238. package/src/sdk/models/billing-term-split.ts +24 -0
  239. package/src/sdk/models/billing-term-value-type.ts +31 -0
  240. package/src/sdk/models/billing-terms-response.ts +49 -0
  241. package/src/sdk/models/billingterm-instalment.ts +128 -0
  242. package/src/sdk/models/billingterm-term.ts +136 -0
  243. package/src/sdk/models/cancellation-fee-input.ts +40 -0
  244. package/src/sdk/models/cancellation-fee-type.ts +23 -0
  245. package/src/sdk/models/commitment-response.ts +22 -2
  246. package/src/sdk/models/create-commitment-request.ts +23 -0
  247. package/src/sdk/models/get-commitment-billing-terms-op.ts +35 -0
  248. package/src/sdk/models/index.ts +24 -0
  249. package/src/sdk/models/instalment-bill-trigger.ts +24 -0
  250. package/src/sdk/models/instalment-delivery.ts +24 -0
  251. package/src/sdk/models/instalment-kind.ts +19 -0
  252. package/src/sdk/models/instalment-status.ts +20 -0
  253. package/src/sdk/models/invoice-billing-reason.ts +1 -0
  254. package/src/sdk/models/invoice-line-item-response.ts +6 -0
  255. package/src/sdk/models/list-commitment-instalments-op.ts +41 -0
  256. package/src/sdk/models/list-instalments-response.ts +35 -0
  257. package/src/sdk/models/preview-commitment-billing-terms-op.ts +46 -0
  258. package/src/sdk/models/replace-billing-terms-request.ts +43 -0
  259. package/src/sdk/models/replace-commitment-billing-terms-op.ts +46 -0
  260. package/src/sdk/models/terminate-commitment-request.ts +11 -3
  261. package/src/sdk/models/trigger-commitment-instalment-op.ts +60 -0
  262. package/src/sdk/models/trigger-instalment-request.ts +41 -0
  263. package/src/sdk/models/webhook-dto-billing-instalment-webhook-payload.ts +53 -0
  264. package/src/sdk/models/webhook-dto-billing-terms-webhook-payload.ts +61 -0
  265. package/src/sdk/models/webhook-dto-invoice-line-item.ts +3 -0
  266. package/src/sdk/models/webhook-event-name.ts +6 -0
  267. package/src/sdk/webhook-events.ts +96 -0
@@ -0,0 +1,20 @@
1
+ # TriggerCommitmentInstalmentRequest
2
+
3
+ ## Example Usage
4
+
5
+ ```typescript
6
+ import { TriggerCommitmentInstalmentRequest } from "@flexprice/sdk/sdk/models";
7
+
8
+ let value: TriggerCommitmentInstalmentRequest = {
9
+ id: "<id>",
10
+ instalmentId: "<id>",
11
+ };
12
+ ```
13
+
14
+ ## Fields
15
+
16
+ | Field | Type | Required | Description |
17
+ | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
18
+ | `id` | *string* | :heavy_check_mark: | Commitment ID |
19
+ | `instalmentId` | *string* | :heavy_check_mark: | Instalment ID |
20
+ | `body` | [models.TriggerInstalmentRequest](../../sdk/models/trigger-instalment-request.md) | :heavy_minus_sign: | Trigger request |
@@ -0,0 +1,15 @@
1
+ # TriggerInstalmentRequest
2
+
3
+ ## Example Usage
4
+
5
+ ```typescript
6
+ import { TriggerInstalmentRequest } from "@flexprice/sdk/sdk/models";
7
+
8
+ let value: TriggerInstalmentRequest = {};
9
+ ```
10
+
11
+ ## Fields
12
+
13
+ | Field | Type | Required | Description |
14
+ | ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ |
15
+ | `billOn` | *string* | :heavy_minus_sign: | BillOn must be a whole second. |
@@ -0,0 +1,16 @@
1
+ # WebhookDtoBillingInstalmentWebhookPayload
2
+
3
+ ## Example Usage
4
+
5
+ ```typescript
6
+ import { WebhookDtoBillingInstalmentWebhookPayload } from "@flexprice/sdk/sdk/models";
7
+
8
+ let value: WebhookDtoBillingInstalmentWebhookPayload = {};
9
+ ```
10
+
11
+ ## Fields
12
+
13
+ | Field | Type | Required | Description |
14
+ | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
15
+ | `eventType` | [models.WebhookEventName](../../sdk/models/webhook-event-name.md) | :heavy_minus_sign: | N/A |
16
+ | `instalment` | [models.BillingtermInstalment](../../sdk/models/billingterm-instalment.md) | :heavy_minus_sign: | N/A |
@@ -0,0 +1,18 @@
1
+ # WebhookDtoBillingTermsWebhookPayload
2
+
3
+ ## Example Usage
4
+
5
+ ```typescript
6
+ import { WebhookDtoBillingTermsWebhookPayload } from "@flexprice/sdk/sdk/models";
7
+
8
+ let value: WebhookDtoBillingTermsWebhookPayload = {};
9
+ ```
10
+
11
+ ## Fields
12
+
13
+ | Field | Type | Required | Description |
14
+ | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
15
+ | `billingTerms` | [models.BillingtermTerm](../../sdk/models/billingterm-term.md)[] | :heavy_minus_sign: | N/A |
16
+ | `eventType` | [models.WebhookEventName](../../sdk/models/webhook-event-name.md) | :heavy_minus_sign: | N/A |
17
+ | `ownerId` | *string* | :heavy_minus_sign: | N/A |
18
+ | `ownerType` | [models.BillingTermOwnerType](../../sdk/models/billing-term-owner-type.md) | :heavy_minus_sign: | N/A |
@@ -14,6 +14,7 @@ let value: WebhookDtoInvoiceLineItem = {};
14
14
  | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
15
15
  | `adjustedEntitlementQuantity` | *string* | :heavy_minus_sign: | N/A |
16
16
  | `amount` | *string* | :heavy_minus_sign: | N/A |
17
+ | `billingInstalmentId` | *string* | :heavy_minus_sign: | N/A |
17
18
  | `commitmentInfo` | [models.CommitmentInfo](../../sdk/models/commitment-info.md) | :heavy_minus_sign: | N/A |
18
19
  | `currency` | *string* | :heavy_minus_sign: | N/A |
19
20
  | `displayName` | *string* | :heavy_minus_sign: | N/A |
@@ -13,5 +13,5 @@ let value: WebhookEventName = "subscription.draft.created";
13
13
  ## Values
14
14
 
15
15
  ```typescript
16
- "subscription.created" | "subscription.draft.created" | "subscription.activated" | "subscription.updated" | "subscription.paused" | "subscription.cancelled" | "subscription.resumed" | "subscription.plan_changed" | "subscription.phase.created" | "subscription.phase.updated" | "subscription.phase.deleted" | "feature.created" | "feature.updated" | "feature.deleted" | "feature.wallet_balance.alert" | "entitlement.created" | "entitlement.updated" | "entitlement.deleted" | "commitment.created" | "commitment.updated" | "commitment.terminated" | "wallet.created" | "wallet.updated" | "wallet.terminated" | "wallet.transaction.created" | "wallet.transaction.updated" | "payment.created" | "payment.updated" | "payment.failed" | "payment.attempt.failed" | "payment.success" | "payment.pending" | "refund.created" | "refund.succeeded" | "refund.failed" | "customer.created" | "customer.updated" | "customer.deleted" | "invoice.update.finalized" | "invoice.update.payment" | "invoice.update.voided" | "invoice.update" | "invoice.payment.overdue" | "invoice.sync.success" | "invoice.sync.failed" | "wallet.credit_balance.dropped" | "wallet.credit_balance.recovered" | "wallet.ongoing_balance.dropped" | "wallet.ongoing_balance.recovered" | "wallet.ongoing_balance.updated" | "subscription.spend.threshold_reached" | "subscription.spend.threshold_recovered" | "subscription.line_item_spend.threshold_reached" | "subscription.line_item_spend.threshold_recovered" | "subscription.group_spend.threshold_reached" | "subscription.group_spend.threshold_recovered" | "entitlement.grant.exhausted" | "subscription.renewal.due" | "invoice.communication.triggered" | "credit_note.created" | "credit_note.updated" | "checkout.session.initiated" | "checkout.session.completed" | "checkout.session.failed" | "checkout.session.expired" | "event.rejected" | Unrecognized<string>
16
+ "subscription.created" | "subscription.draft.created" | "subscription.activated" | "subscription.updated" | "subscription.paused" | "subscription.cancelled" | "subscription.resumed" | "subscription.plan_changed" | "subscription.phase.created" | "subscription.phase.updated" | "subscription.phase.deleted" | "feature.created" | "feature.updated" | "feature.deleted" | "feature.wallet_balance.alert" | "entitlement.created" | "entitlement.updated" | "entitlement.deleted" | "commitment.created" | "commitment.updated" | "commitment.terminated" | "billing_terms.created" | "billing_terms.updated" | "billing_instalment.created" | "billing_instalment.updated" | "billing_instalment.cancelled" | "billing_instalment.invoiced" | "wallet.created" | "wallet.updated" | "wallet.terminated" | "wallet.transaction.created" | "wallet.transaction.updated" | "payment.created" | "payment.updated" | "payment.failed" | "payment.attempt.failed" | "payment.success" | "payment.pending" | "refund.created" | "refund.succeeded" | "refund.failed" | "customer.created" | "customer.updated" | "customer.deleted" | "invoice.update.finalized" | "invoice.update.payment" | "invoice.update.voided" | "invoice.update" | "invoice.payment.overdue" | "invoice.sync.success" | "invoice.sync.failed" | "wallet.credit_balance.dropped" | "wallet.credit_balance.recovered" | "wallet.ongoing_balance.dropped" | "wallet.ongoing_balance.recovered" | "wallet.ongoing_balance.updated" | "subscription.spend.threshold_reached" | "subscription.spend.threshold_recovered" | "subscription.line_item_spend.threshold_reached" | "subscription.line_item_spend.threshold_recovered" | "subscription.group_spend.threshold_reached" | "subscription.group_spend.threshold_recovered" | "entitlement.grant.exhausted" | "subscription.renewal.due" | "invoice.communication.triggered" | "credit_note.created" | "credit_note.updated" | "checkout.session.initiated" | "checkout.session.completed" | "checkout.session.failed" | "checkout.session.expired" | "event.rejected" | Unrecognized<string>
17
17
  ```
@@ -9,6 +9,11 @@
9
9
  * [queryCommitment](#querycommitment) - Query commitments
10
10
  * [getCommitment](#getcommitment) - Get commitment
11
11
  * [updateCommitment](#updatecommitment) - Update commitment
12
+ * [getCommitmentBillingTerms](#getcommitmentbillingterms) - Get billing terms
13
+ * [replaceCommitmentBillingTerms](#replacecommitmentbillingterms) - Edit billing terms
14
+ * [previewCommitmentBillingTerms](#previewcommitmentbillingterms) - Preview billing terms edit
15
+ * [listCommitmentInstalments](#listcommitmentinstalments) - List instalments
16
+ * [triggerCommitmentInstalment](#triggercommitmentinstalment) - Trigger instalment
12
17
  * [terminateCommitment](#terminatecommitment) - Terminate commitment
13
18
 
14
19
  ## createCommitment
@@ -399,9 +404,387 @@ run();
399
404
  | models.ErrorsErrorResponse | 500 | application/json |
400
405
  | models.SDKError | 4XX, 5XX | \*/\* |
401
406
 
407
+ ## getCommitmentBillingTerms
408
+
409
+ Returns the commitment's current billing terms with its scheduled and invoiced instalments in billing order. Invoiced instalments may come from terms an edit replaced. Cancelled instalments are listed by the instalments endpoint.
410
+
411
+ ### Example Usage
412
+
413
+ <!-- UsageSnippet language="typescript" operationID="getCommitmentBillingTerms" method="get" path="/commitments/{id}/billing-terms" -->
414
+ ```typescript
415
+ import { Flexprice } from "@flexprice/sdk";
416
+
417
+ const flexprice = new Flexprice({
418
+ apiKeyAuth: "<YOUR_API_KEY_HERE>",
419
+ });
420
+
421
+ async function run() {
422
+ const result = await flexprice.commitments.getCommitmentBillingTerms("<id>");
423
+
424
+ console.log(result);
425
+ }
426
+
427
+ run();
428
+ ```
429
+
430
+ ### Standalone function
431
+
432
+ The standalone function version of this method:
433
+
434
+ ```typescript
435
+ import { FlexpriceCore } from "@flexprice/sdk/core.js";
436
+ import { commitmentsGetCommitmentBillingTerms } from "@flexprice/sdk/funcs/commitments-get-commitment-billing-terms.js";
437
+
438
+ // Use `FlexpriceCore` for best tree-shaking performance.
439
+ // You can create one instance of it to use across an application.
440
+ const flexprice = new FlexpriceCore({
441
+ apiKeyAuth: "<YOUR_API_KEY_HERE>",
442
+ });
443
+
444
+ async function run() {
445
+ const res = await commitmentsGetCommitmentBillingTerms(flexprice, "<id>");
446
+ if (res.ok) {
447
+ const { value: result } = res;
448
+ console.log(result);
449
+ } else {
450
+ console.log("commitmentsGetCommitmentBillingTerms failed:", res.error);
451
+ }
452
+ }
453
+
454
+ run();
455
+ ```
456
+
457
+ ### Parameters
458
+
459
+ | Parameter | Type | Required | Description |
460
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
461
+ | `id` | *string* | :heavy_check_mark: | Commitment ID |
462
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
463
+ | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
464
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
465
+
466
+ ### Response
467
+
468
+ **Promise\<[models.BillingTermsResponse](../../sdk/models/billing-terms-response.md)\>**
469
+
470
+ ### Errors
471
+
472
+ | Error Type | Status Code | Content Type |
473
+ | -------------------------- | -------------------------- | -------------------------- |
474
+ | models.ErrorsErrorResponse | 400, 404 | application/json |
475
+ | models.ErrorsErrorResponse | 500 | application/json |
476
+ | models.SDKError | 4XX, 5XX | \*/\* |
477
+
478
+ ## replaceCommitmentBillingTerms
479
+
480
+ Replaces the whole set of billing terms of an active commitment. Its scheduled instalments are cancelled and the new terms generate instalments for what the invoiced ones leave of the commitment total; invoiced instalments and their invoices are kept. A term without bill_on or start_date starts at the billing period holding now, or at the commitment start once its term has ended. Returns the new terms with the scheduled and invoiced instalments in billing order.
481
+
482
+ ### Example Usage
483
+
484
+ <!-- UsageSnippet language="typescript" operationID="replaceCommitmentBillingTerms" method="put" path="/commitments/{id}/billing-terms" -->
485
+ ```typescript
486
+ import { Flexprice } from "@flexprice/sdk";
487
+
488
+ const flexprice = new Flexprice({
489
+ apiKeyAuth: "<YOUR_API_KEY_HERE>",
490
+ });
491
+
492
+ async function run() {
493
+ const result = await flexprice.commitments.replaceCommitmentBillingTerms("<id>", {
494
+ billingTerms: [],
495
+ });
496
+
497
+ console.log(result);
498
+ }
499
+
500
+ run();
501
+ ```
502
+
503
+ ### Standalone function
504
+
505
+ The standalone function version of this method:
506
+
507
+ ```typescript
508
+ import { FlexpriceCore } from "@flexprice/sdk/core.js";
509
+ import { commitmentsReplaceCommitmentBillingTerms } from "@flexprice/sdk/funcs/commitments-replace-commitment-billing-terms.js";
510
+
511
+ // Use `FlexpriceCore` for best tree-shaking performance.
512
+ // You can create one instance of it to use across an application.
513
+ const flexprice = new FlexpriceCore({
514
+ apiKeyAuth: "<YOUR_API_KEY_HERE>",
515
+ });
516
+
517
+ async function run() {
518
+ const res = await commitmentsReplaceCommitmentBillingTerms(flexprice, "<id>", {
519
+ billingTerms: [],
520
+ });
521
+ if (res.ok) {
522
+ const { value: result } = res;
523
+ console.log(result);
524
+ } else {
525
+ console.log("commitmentsReplaceCommitmentBillingTerms failed:", res.error);
526
+ }
527
+ }
528
+
529
+ run();
530
+ ```
531
+
532
+ ### Parameters
533
+
534
+ | Parameter | Type | Required | Description |
535
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
536
+ | `id` | *string* | :heavy_check_mark: | Commitment ID |
537
+ | `body` | [models.ReplaceBillingTermsRequest](../../sdk/models/replace-billing-terms-request.md) | :heavy_check_mark: | Billing terms |
538
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
539
+ | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
540
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
541
+
542
+ ### Response
543
+
544
+ **Promise\<[models.BillingTermsResponse](../../sdk/models/billing-terms-response.md)\>**
545
+
546
+ ### Errors
547
+
548
+ | Error Type | Status Code | Content Type |
549
+ | -------------------------- | -------------------------- | -------------------------- |
550
+ | models.ErrorsErrorResponse | 400, 404 | application/json |
551
+ | models.ErrorsErrorResponse | 500 | application/json |
552
+ | models.SDKError | 4XX, 5XX | \*/\* |
553
+
554
+ ## previewCommitmentBillingTerms
555
+
556
+ Returns what editing the billing terms would produce, without saving anything: the new terms with the invoiced and new instalments in billing order.
557
+
558
+ ### Example Usage
559
+
560
+ <!-- UsageSnippet language="typescript" operationID="previewCommitmentBillingTerms" method="post" path="/commitments/{id}/billing-terms/preview" -->
561
+ ```typescript
562
+ import { Flexprice } from "@flexprice/sdk";
563
+
564
+ const flexprice = new Flexprice({
565
+ apiKeyAuth: "<YOUR_API_KEY_HERE>",
566
+ });
567
+
568
+ async function run() {
569
+ const result = await flexprice.commitments.previewCommitmentBillingTerms("<id>", {
570
+ billingTerms: [
571
+ {
572
+ kind: "once",
573
+ valueType: "fixed",
574
+ },
575
+ ],
576
+ });
577
+
578
+ console.log(result);
579
+ }
580
+
581
+ run();
582
+ ```
583
+
584
+ ### Standalone function
585
+
586
+ The standalone function version of this method:
587
+
588
+ ```typescript
589
+ import { FlexpriceCore } from "@flexprice/sdk/core.js";
590
+ import { commitmentsPreviewCommitmentBillingTerms } from "@flexprice/sdk/funcs/commitments-preview-commitment-billing-terms.js";
591
+
592
+ // Use `FlexpriceCore` for best tree-shaking performance.
593
+ // You can create one instance of it to use across an application.
594
+ const flexprice = new FlexpriceCore({
595
+ apiKeyAuth: "<YOUR_API_KEY_HERE>",
596
+ });
597
+
598
+ async function run() {
599
+ const res = await commitmentsPreviewCommitmentBillingTerms(flexprice, "<id>", {
600
+ billingTerms: [
601
+ {
602
+ kind: "once",
603
+ valueType: "fixed",
604
+ },
605
+ ],
606
+ });
607
+ if (res.ok) {
608
+ const { value: result } = res;
609
+ console.log(result);
610
+ } else {
611
+ console.log("commitmentsPreviewCommitmentBillingTerms failed:", res.error);
612
+ }
613
+ }
614
+
615
+ run();
616
+ ```
617
+
618
+ ### Parameters
619
+
620
+ | Parameter | Type | Required | Description |
621
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
622
+ | `id` | *string* | :heavy_check_mark: | Commitment ID |
623
+ | `body` | [models.ReplaceBillingTermsRequest](../../sdk/models/replace-billing-terms-request.md) | :heavy_check_mark: | Billing terms |
624
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
625
+ | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
626
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
627
+
628
+ ### Response
629
+
630
+ **Promise\<[models.BillingTermsResponse](../../sdk/models/billing-terms-response.md)\>**
631
+
632
+ ### Errors
633
+
634
+ | Error Type | Status Code | Content Type |
635
+ | -------------------------- | -------------------------- | -------------------------- |
636
+ | models.ErrorsErrorResponse | 400, 404 | application/json |
637
+ | models.ErrorsErrorResponse | 500 | application/json |
638
+ | models.SDKError | 4XX, 5XX | \*/\* |
639
+
640
+ ## listCommitmentInstalments
641
+
642
+ Lists the instalments of the commitment in billing order. Without a status filter every instalment is listed, cancelled ones included.
643
+
644
+ ### Example Usage
645
+
646
+ <!-- UsageSnippet language="typescript" operationID="listCommitmentInstalments" method="get" path="/commitments/{id}/instalments" -->
647
+ ```typescript
648
+ import { Flexprice } from "@flexprice/sdk";
649
+
650
+ const flexprice = new Flexprice({
651
+ apiKeyAuth: "<YOUR_API_KEY_HERE>",
652
+ });
653
+
654
+ async function run() {
655
+ const result = await flexprice.commitments.listCommitmentInstalments("<id>");
656
+
657
+ console.log(result);
658
+ }
659
+
660
+ run();
661
+ ```
662
+
663
+ ### Standalone function
664
+
665
+ The standalone function version of this method:
666
+
667
+ ```typescript
668
+ import { FlexpriceCore } from "@flexprice/sdk/core.js";
669
+ import { commitmentsListCommitmentInstalments } from "@flexprice/sdk/funcs/commitments-list-commitment-instalments.js";
670
+
671
+ // Use `FlexpriceCore` for best tree-shaking performance.
672
+ // You can create one instance of it to use across an application.
673
+ const flexprice = new FlexpriceCore({
674
+ apiKeyAuth: "<YOUR_API_KEY_HERE>",
675
+ });
676
+
677
+ async function run() {
678
+ const res = await commitmentsListCommitmentInstalments(flexprice, "<id>");
679
+ if (res.ok) {
680
+ const { value: result } = res;
681
+ console.log(result);
682
+ } else {
683
+ console.log("commitmentsListCommitmentInstalments failed:", res.error);
684
+ }
685
+ }
686
+
687
+ run();
688
+ ```
689
+
690
+ ### Parameters
691
+
692
+ | Parameter | Type | Required | Description |
693
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
694
+ | `id` | *string* | :heavy_check_mark: | Commitment ID |
695
+ | `status` | *string*[] | :heavy_minus_sign: | Only instalments in these statuses (scheduled, invoiced, cancelled) |
696
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
697
+ | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
698
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
699
+
700
+ ### Response
701
+
702
+ **Promise\<[models.ListInstalmentsResponse](../../sdk/models/list-instalments-response.md)\>**
703
+
704
+ ### Errors
705
+
706
+ | Error Type | Status Code | Content Type |
707
+ | -------------------------- | -------------------------- | -------------------------- |
708
+ | models.ErrorsErrorResponse | 400, 404 | application/json |
709
+ | models.ErrorsErrorResponse | 500 | application/json |
710
+ | models.SDKError | 4XX, 5XX | \*/\* |
711
+
712
+ ## triggerCommitmentInstalment
713
+
714
+ Bills a manual instalment of an active commitment on bill_on, now by default, which must fall within the commitment term. The instalment goes on the first subscription invoice at or after that date, or on its own invoice once due when the commitment's instalment_invoicing is separate_invoice. Either way it waits while the subscription is trialing or paused. Until it is triggered, a manual instalment waits at the end of the term, and bill_on can only move earlier; edit the billing terms to bill it later.
715
+
716
+ ### Example Usage
717
+
718
+ <!-- UsageSnippet language="typescript" operationID="triggerCommitmentInstalment" method="post" path="/commitments/{id}/instalments/{instalment_id}/trigger" -->
719
+ ```typescript
720
+ import { Flexprice } from "@flexprice/sdk";
721
+
722
+ const flexprice = new Flexprice({
723
+ apiKeyAuth: "<YOUR_API_KEY_HERE>",
724
+ });
725
+
726
+ async function run() {
727
+ const result = await flexprice.commitments.triggerCommitmentInstalment("<id>", "<id>");
728
+
729
+ console.log(result);
730
+ }
731
+
732
+ run();
733
+ ```
734
+
735
+ ### Standalone function
736
+
737
+ The standalone function version of this method:
738
+
739
+ ```typescript
740
+ import { FlexpriceCore } from "@flexprice/sdk/core.js";
741
+ import { commitmentsTriggerCommitmentInstalment } from "@flexprice/sdk/funcs/commitments-trigger-commitment-instalment.js";
742
+
743
+ // Use `FlexpriceCore` for best tree-shaking performance.
744
+ // You can create one instance of it to use across an application.
745
+ const flexprice = new FlexpriceCore({
746
+ apiKeyAuth: "<YOUR_API_KEY_HERE>",
747
+ });
748
+
749
+ async function run() {
750
+ const res = await commitmentsTriggerCommitmentInstalment(flexprice, "<id>", "<id>");
751
+ if (res.ok) {
752
+ const { value: result } = res;
753
+ console.log(result);
754
+ } else {
755
+ console.log("commitmentsTriggerCommitmentInstalment failed:", res.error);
756
+ }
757
+ }
758
+
759
+ run();
760
+ ```
761
+
762
+ ### Parameters
763
+
764
+ | Parameter | Type | Required | Description |
765
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
766
+ | `id` | *string* | :heavy_check_mark: | Commitment ID |
767
+ | `instalmentId` | *string* | :heavy_check_mark: | Instalment ID |
768
+ | `body` | [models.TriggerInstalmentRequest](../../sdk/models/trigger-instalment-request.md) | :heavy_minus_sign: | Trigger request |
769
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
770
+ | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
771
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
772
+
773
+ ### Response
774
+
775
+ **Promise\<[models.BillingtermInstalment](../../sdk/models/billingterm-instalment.md)\>**
776
+
777
+ ### Errors
778
+
779
+ | Error Type | Status Code | Content Type |
780
+ | -------------------------- | -------------------------- | -------------------------- |
781
+ | models.ErrorsErrorResponse | 400, 404 | application/json |
782
+ | models.ErrorsErrorResponse | 500 | application/json |
783
+ | models.SDKError | 4XX, 5XX | \*/\* |
784
+
402
785
  ## terminateCommitment
403
786
 
404
- Ends a commitment early, effective at the given time or now.
787
+ Ends a commitment immediately. effective_at defaults to now and cannot be in the future. Under billing terms, its scheduled instalments are cancelled and any amount it earned beyond what is already invoiced is billed as a settlement. The settlement and a fixed cancellation fee, when given, are billed together on one one-off invoice.
405
788
 
406
789
  ### Example Usage
407
790