@paygentic/sdk 0.9.12 → 0.9.14

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 (557) hide show
  1. package/README.md +9 -5
  2. package/dist/commonjs/funcs/approvalsCreateApproval.d.ts +1 -1
  3. package/dist/commonjs/funcs/approvalsCreateApproval.d.ts.map +1 -1
  4. package/dist/commonjs/funcs/approvalsCreateApproval.js +1 -1
  5. package/dist/commonjs/funcs/approvalsCreateApproval.js.map +1 -1
  6. package/dist/commonjs/funcs/approvalsGetApproval.d.ts +1 -1
  7. package/dist/commonjs/funcs/approvalsGetApproval.d.ts.map +1 -1
  8. package/dist/commonjs/funcs/approvalsGetApproval.js +1 -1
  9. package/dist/commonjs/funcs/approvalsGetApproval.js.map +1 -1
  10. package/dist/commonjs/funcs/approvalsUpdateApproval.d.ts +1 -1
  11. package/dist/commonjs/funcs/approvalsUpdateApproval.d.ts.map +1 -1
  12. package/dist/commonjs/funcs/approvalsUpdateApproval.js +1 -1
  13. package/dist/commonjs/funcs/approvalsUpdateApproval.js.map +1 -1
  14. package/dist/commonjs/funcs/billingSchedulesCreateBillingSchedule.d.ts +1 -1
  15. package/dist/commonjs/funcs/billingSchedulesCreateBillingSchedule.d.ts.map +1 -1
  16. package/dist/commonjs/funcs/billingSchedulesCreateBillingSchedule.js +1 -1
  17. package/dist/commonjs/funcs/billingSchedulesCreateBillingSchedule.js.map +1 -1
  18. package/dist/commonjs/funcs/billingSchedulesGetBillingSchedule.d.ts +1 -1
  19. package/dist/commonjs/funcs/billingSchedulesGetBillingSchedule.d.ts.map +1 -1
  20. package/dist/commonjs/funcs/billingSchedulesGetBillingSchedule.js +1 -1
  21. package/dist/commonjs/funcs/billingSchedulesGetBillingSchedule.js.map +1 -1
  22. package/dist/commonjs/funcs/billingSchedulesUpdateBillingSchedule.d.ts +1 -1
  23. package/dist/commonjs/funcs/billingSchedulesUpdateBillingSchedule.d.ts.map +1 -1
  24. package/dist/commonjs/funcs/billingSchedulesUpdateBillingSchedule.js +1 -1
  25. package/dist/commonjs/funcs/billingSchedulesUpdateBillingSchedule.js.map +1 -1
  26. package/dist/commonjs/funcs/customersCreateCustomerPaymentMethod.d.ts +1 -1
  27. package/dist/commonjs/funcs/customersCreateCustomerPaymentMethod.d.ts.map +1 -1
  28. package/dist/commonjs/funcs/customersCreateCustomerPaymentMethod.js +1 -1
  29. package/dist/commonjs/funcs/customersCreateCustomerPaymentMethod.js.map +1 -1
  30. package/dist/commonjs/funcs/ordersCreateOrderApproval.d.ts +1 -1
  31. package/dist/commonjs/funcs/ordersCreateOrderApproval.d.ts.map +1 -1
  32. package/dist/commonjs/funcs/ordersCreateOrderApproval.js +1 -1
  33. package/dist/commonjs/funcs/ordersCreateOrderApproval.js.map +1 -1
  34. package/dist/commonjs/funcs/plansMintPlanVersion.d.ts +1 -1
  35. package/dist/commonjs/funcs/plansMintPlanVersion.js +1 -1
  36. package/dist/commonjs/funcs/pricesCreate.d.ts +1 -1
  37. package/dist/commonjs/funcs/pricesCreate.d.ts.map +1 -1
  38. package/dist/commonjs/funcs/pricesCreate.js +1 -1
  39. package/dist/commonjs/funcs/pricesCreate.js.map +1 -1
  40. package/dist/commonjs/funcs/pricesGet.d.ts +1 -1
  41. package/dist/commonjs/funcs/pricesGet.d.ts.map +1 -1
  42. package/dist/commonjs/funcs/pricesGet.js +1 -1
  43. package/dist/commonjs/funcs/pricesGet.js.map +1 -1
  44. package/dist/commonjs/funcs/pricesUpdate.d.ts +1 -1
  45. package/dist/commonjs/funcs/pricesUpdate.d.ts.map +1 -1
  46. package/dist/commonjs/funcs/pricesUpdate.js +1 -1
  47. package/dist/commonjs/funcs/pricesUpdate.js.map +1 -1
  48. package/dist/commonjs/funcs/revenueGet.js +1 -0
  49. package/dist/commonjs/funcs/revenueGet.js.map +1 -1
  50. package/dist/commonjs/funcs/subscriptionsEditSubscriptionIntervals.d.ts +19 -0
  51. package/dist/commonjs/funcs/subscriptionsEditSubscriptionIntervals.d.ts.map +1 -0
  52. package/dist/commonjs/funcs/subscriptionsEditSubscriptionIntervals.js +127 -0
  53. package/dist/commonjs/funcs/subscriptionsEditSubscriptionIntervals.js.map +1 -0
  54. package/dist/commonjs/funcs/subscriptionsGetSubscriptionIntervals.d.ts +19 -0
  55. package/dist/commonjs/funcs/subscriptionsGetSubscriptionIntervals.d.ts.map +1 -0
  56. package/dist/commonjs/funcs/subscriptionsGetSubscriptionIntervals.js +124 -0
  57. package/dist/commonjs/funcs/subscriptionsGetSubscriptionIntervals.js.map +1 -0
  58. package/dist/commonjs/lib/config.d.ts +2 -2
  59. package/dist/commonjs/lib/config.js +2 -2
  60. package/dist/commonjs/models/approval.d.ts +17 -2
  61. package/dist/commonjs/models/approval.d.ts.map +1 -1
  62. package/dist/commonjs/models/approval.js +16 -3
  63. package/dist/commonjs/models/approval.js.map +1 -1
  64. package/dist/commonjs/models/approvallist.d.ts +2 -2
  65. package/dist/commonjs/models/approvallist.d.ts.map +1 -1
  66. package/dist/commonjs/models/approvallist.js +2 -2
  67. package/dist/commonjs/models/approvallist.js.map +1 -1
  68. package/dist/commonjs/models/billingschedule.d.ts +6 -4
  69. package/dist/commonjs/models/billingschedule.d.ts.map +1 -1
  70. package/dist/commonjs/models/billingschedule.js +3 -1
  71. package/dist/commonjs/models/billingschedule.js.map +1 -1
  72. package/dist/commonjs/models/customerpaymentsession.d.ts +53 -0
  73. package/dist/commonjs/models/customerpaymentsession.d.ts.map +1 -0
  74. package/dist/commonjs/models/{schemaspaymentsession.js → customerpaymentsession.js} +25 -24
  75. package/dist/commonjs/models/customerpaymentsession.js.map +1 -0
  76. package/dist/commonjs/models/editsubscriptionintervalsrequest.d.ts +31 -0
  77. package/dist/commonjs/models/editsubscriptionintervalsrequest.d.ts.map +1 -0
  78. package/dist/commonjs/models/editsubscriptionintervalsrequest.js +54 -0
  79. package/dist/commonjs/models/editsubscriptionintervalsrequest.js.map +1 -0
  80. package/dist/commonjs/models/editsubscriptionintervalsresponse.d.ts +36 -0
  81. package/dist/commonjs/models/editsubscriptionintervalsresponse.d.ts.map +1 -0
  82. package/dist/commonjs/models/editsubscriptionintervalsresponse.js +63 -0
  83. package/dist/commonjs/models/editsubscriptionintervalsresponse.js.map +1 -0
  84. package/dist/commonjs/models/index.d.ts +16 -4
  85. package/dist/commonjs/models/index.d.ts.map +1 -1
  86. package/dist/commonjs/models/index.js +16 -4
  87. package/dist/commonjs/models/index.js.map +1 -1
  88. package/dist/commonjs/models/item.d.ts +3 -0
  89. package/dist/commonjs/models/item.d.ts.map +1 -1
  90. package/dist/commonjs/models/item.js.map +1 -1
  91. package/dist/commonjs/models/mintplanlineinput.d.ts +23 -0
  92. package/dist/commonjs/models/mintplanlineinput.d.ts.map +1 -0
  93. package/dist/commonjs/models/mintplanlineinput.js +50 -0
  94. package/dist/commonjs/models/mintplanlineinput.js.map +1 -0
  95. package/dist/commonjs/models/mintplanlineref.d.ts +12 -0
  96. package/dist/commonjs/models/mintplanlineref.d.ts.map +1 -0
  97. package/dist/commonjs/models/mintplanlineref.js +48 -0
  98. package/dist/commonjs/models/mintplanlineref.js.map +1 -0
  99. package/dist/commonjs/models/mintplanversionrequest.d.ts +8 -30
  100. package/dist/commonjs/models/mintplanversionrequest.d.ts.map +1 -1
  101. package/dist/commonjs/models/mintplanversionrequest.js +4 -13
  102. package/dist/commonjs/models/mintplanversionrequest.js.map +1 -1
  103. package/dist/commonjs/models/operations/createexternalreference.d.ts +3 -0
  104. package/dist/commonjs/models/operations/createexternalreference.d.ts.map +1 -1
  105. package/dist/commonjs/models/operations/createexternalreference.js.map +1 -1
  106. package/dist/commonjs/models/operations/createitem.d.ts +3 -0
  107. package/dist/commonjs/models/operations/createitem.d.ts.map +1 -1
  108. package/dist/commonjs/models/operations/createitem.js.map +1 -1
  109. package/dist/commonjs/models/operations/createplan.d.ts +3 -3
  110. package/dist/commonjs/models/operations/createplan.d.ts.map +1 -1
  111. package/dist/commonjs/models/operations/createplan.js +1 -1
  112. package/dist/commonjs/models/operations/createplan.js.map +1 -1
  113. package/dist/commonjs/models/operations/createsubscription.d.ts +5 -0
  114. package/dist/commonjs/models/operations/createsubscription.d.ts.map +1 -1
  115. package/dist/commonjs/models/operations/createsubscription.js +1 -0
  116. package/dist/commonjs/models/operations/createsubscription.js.map +1 -1
  117. package/dist/commonjs/models/operations/editsubscriptionintervals.d.ts +18 -0
  118. package/dist/commonjs/models/operations/editsubscriptionintervals.d.ts.map +1 -0
  119. package/dist/commonjs/models/operations/editsubscriptionintervals.js +56 -0
  120. package/dist/commonjs/models/operations/editsubscriptionintervals.js.map +1 -0
  121. package/dist/commonjs/models/operations/getrevenue.d.ts +18 -0
  122. package/dist/commonjs/models/operations/getrevenue.d.ts.map +1 -1
  123. package/dist/commonjs/models/operations/getrevenue.js +12 -1
  124. package/dist/commonjs/models/operations/getrevenue.js.map +1 -1
  125. package/dist/commonjs/models/operations/getsubscriptionintervals.d.ts +15 -0
  126. package/dist/commonjs/models/operations/getsubscriptionintervals.d.ts.map +1 -0
  127. package/dist/commonjs/models/operations/getsubscriptionintervals.js +49 -0
  128. package/dist/commonjs/models/operations/getsubscriptionintervals.js.map +1 -0
  129. package/dist/commonjs/models/operations/index.d.ts +2 -0
  130. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  131. package/dist/commonjs/models/operations/index.js +2 -0
  132. package/dist/commonjs/models/operations/index.js.map +1 -1
  133. package/dist/commonjs/models/operations/listbillingschedules.d.ts +1 -1
  134. package/dist/commonjs/models/operations/listbillingschedules.d.ts.map +1 -1
  135. package/dist/commonjs/models/operations/listbillingschedules.js +1 -1
  136. package/dist/commonjs/models/operations/listbillingschedules.js.map +1 -1
  137. package/dist/commonjs/models/operations/listpaymentsessions.d.ts +1 -1
  138. package/dist/commonjs/models/operations/listpaymentsessions.d.ts.map +1 -1
  139. package/dist/commonjs/models/operations/listpaymentsessions.js +1 -1
  140. package/dist/commonjs/models/operations/listpaymentsessions.js.map +1 -1
  141. package/dist/commonjs/models/operations/listprices.d.ts +1 -1
  142. package/dist/commonjs/models/operations/listprices.d.ts.map +1 -1
  143. package/dist/commonjs/models/operations/listprices.js +1 -1
  144. package/dist/commonjs/models/operations/listprices.js.map +1 -1
  145. package/dist/commonjs/models/operations/updatesubscription.d.ts +6 -0
  146. package/dist/commonjs/models/operations/updatesubscription.d.ts.map +1 -1
  147. package/dist/commonjs/models/operations/updatesubscription.js +2 -0
  148. package/dist/commonjs/models/operations/updatesubscription.js.map +1 -1
  149. package/dist/commonjs/models/order.d.ts +2 -2
  150. package/dist/commonjs/models/order.d.ts.map +1 -1
  151. package/dist/commonjs/models/order.js +2 -2
  152. package/dist/commonjs/models/order.js.map +1 -1
  153. package/dist/commonjs/models/orderapproval.d.ts +38 -0
  154. package/dist/commonjs/models/orderapproval.d.ts.map +1 -0
  155. package/dist/commonjs/models/{schemasapproval.js → orderapproval.js} +14 -27
  156. package/dist/commonjs/models/orderapproval.js.map +1 -0
  157. package/dist/commonjs/models/orderbillingschedule.d.ts +72 -0
  158. package/dist/commonjs/models/orderbillingschedule.d.ts.map +1 -0
  159. package/dist/commonjs/models/{schemasbillingschedule.js → orderbillingschedule.js} +22 -24
  160. package/dist/commonjs/models/orderbillingschedule.js.map +1 -0
  161. package/dist/commonjs/models/paymentsession.d.ts +41 -18
  162. package/dist/commonjs/models/paymentsession.d.ts.map +1 -1
  163. package/dist/commonjs/models/paymentsession.js +13 -14
  164. package/dist/commonjs/models/paymentsession.js.map +1 -1
  165. package/dist/commonjs/models/plan.d.ts +2 -2
  166. package/dist/commonjs/models/plan.d.ts.map +1 -1
  167. package/dist/commonjs/models/plan.js +2 -2
  168. package/dist/commonjs/models/plan.js.map +1 -1
  169. package/dist/commonjs/models/planlineinput.d.ts +23 -0
  170. package/dist/commonjs/models/planlineinput.d.ts.map +1 -0
  171. package/dist/commonjs/models/planlineinput.js +50 -0
  172. package/dist/commonjs/models/planlineinput.js.map +1 -0
  173. package/dist/commonjs/models/planlineref.d.ts +12 -0
  174. package/dist/commonjs/models/planlineref.d.ts.map +1 -0
  175. package/dist/commonjs/models/planlineref.js +48 -0
  176. package/dist/commonjs/models/planlineref.js.map +1 -0
  177. package/dist/{esm/models/schemasprice.d.ts → commonjs/models/planprice.d.ts} +55 -37
  178. package/dist/commonjs/models/planprice.d.ts.map +1 -0
  179. package/dist/commonjs/models/{schemasprice.js → planprice.js} +39 -22
  180. package/dist/commonjs/models/planprice.js.map +1 -0
  181. package/dist/commonjs/models/planversionpriceslot.d.ts +5 -1
  182. package/dist/commonjs/models/planversionpriceslot.d.ts.map +1 -1
  183. package/dist/commonjs/models/planversionpriceslot.js +1 -0
  184. package/dist/commonjs/models/planversionpriceslot.js.map +1 -1
  185. package/dist/commonjs/models/price.d.ts +25 -43
  186. package/dist/commonjs/models/price.d.ts.map +1 -1
  187. package/dist/commonjs/models/price.js +11 -29
  188. package/dist/commonjs/models/price.js.map +1 -1
  189. package/dist/commonjs/models/subscription.d.ts +5 -0
  190. package/dist/commonjs/models/subscription.d.ts.map +1 -1
  191. package/dist/commonjs/models/subscription.js +2 -0
  192. package/dist/commonjs/models/subscription.js.map +1 -1
  193. package/dist/commonjs/models/subscriptioninterval.d.ts +80 -0
  194. package/dist/commonjs/models/subscriptioninterval.d.ts.map +1 -0
  195. package/dist/commonjs/models/subscriptioninterval.js +86 -0
  196. package/dist/commonjs/models/subscriptioninterval.js.map +1 -0
  197. package/dist/commonjs/models/subscriptionintervaladdop.d.ts +85 -0
  198. package/dist/commonjs/models/subscriptionintervaladdop.d.ts.map +1 -0
  199. package/dist/commonjs/models/subscriptionintervaladdop.js +74 -0
  200. package/dist/commonjs/models/subscriptionintervaladdop.js.map +1 -0
  201. package/dist/commonjs/models/subscriptionintervaleditop.d.ts +102 -0
  202. package/dist/commonjs/models/subscriptionintervaleditop.d.ts.map +1 -0
  203. package/dist/commonjs/models/subscriptionintervaleditop.js +78 -0
  204. package/dist/commonjs/models/subscriptionintervaleditop.js.map +1 -0
  205. package/dist/commonjs/models/subscriptionintervalremoveop.d.ts +15 -0
  206. package/dist/commonjs/models/subscriptionintervalremoveop.d.ts.map +1 -0
  207. package/dist/commonjs/models/subscriptionintervalremoveop.js +49 -0
  208. package/dist/commonjs/models/subscriptionintervalremoveop.js.map +1 -0
  209. package/dist/commonjs/models/subscriptionintervalsresponse.d.ts +14 -0
  210. package/dist/commonjs/models/subscriptionintervalsresponse.d.ts.map +1 -0
  211. package/dist/commonjs/models/subscriptionintervalsresponse.js +51 -0
  212. package/dist/commonjs/models/subscriptionintervalsresponse.js.map +1 -0
  213. package/dist/commonjs/models/subscriptionversionpolicy.d.ts +18 -0
  214. package/dist/commonjs/models/subscriptionversionpolicy.d.ts.map +1 -0
  215. package/dist/commonjs/models/subscriptionversionpolicy.js +52 -0
  216. package/dist/commonjs/models/subscriptionversionpolicy.js.map +1 -0
  217. package/dist/commonjs/sdk/approvals.d.ts +3 -3
  218. package/dist/commonjs/sdk/approvals.d.ts.map +1 -1
  219. package/dist/commonjs/sdk/billingschedules.d.ts +3 -3
  220. package/dist/commonjs/sdk/billingschedules.d.ts.map +1 -1
  221. package/dist/commonjs/sdk/customers.d.ts +1 -1
  222. package/dist/commonjs/sdk/customers.d.ts.map +1 -1
  223. package/dist/commonjs/sdk/orders.d.ts +1 -1
  224. package/dist/commonjs/sdk/orders.d.ts.map +1 -1
  225. package/dist/commonjs/sdk/plans.d.ts +1 -1
  226. package/dist/commonjs/sdk/plans.js +1 -1
  227. package/dist/commonjs/sdk/prices.d.ts +3 -3
  228. package/dist/commonjs/sdk/prices.d.ts.map +1 -1
  229. package/dist/commonjs/sdk/subscriptions.d.ts +14 -0
  230. package/dist/commonjs/sdk/subscriptions.d.ts.map +1 -1
  231. package/dist/commonjs/sdk/subscriptions.js +20 -0
  232. package/dist/commonjs/sdk/subscriptions.js.map +1 -1
  233. package/dist/esm/funcs/approvalsCreateApproval.d.ts +1 -1
  234. package/dist/esm/funcs/approvalsCreateApproval.d.ts.map +1 -1
  235. package/dist/esm/funcs/approvalsCreateApproval.js +1 -1
  236. package/dist/esm/funcs/approvalsCreateApproval.js.map +1 -1
  237. package/dist/esm/funcs/approvalsGetApproval.d.ts +1 -1
  238. package/dist/esm/funcs/approvalsGetApproval.d.ts.map +1 -1
  239. package/dist/esm/funcs/approvalsGetApproval.js +1 -1
  240. package/dist/esm/funcs/approvalsGetApproval.js.map +1 -1
  241. package/dist/esm/funcs/approvalsUpdateApproval.d.ts +1 -1
  242. package/dist/esm/funcs/approvalsUpdateApproval.d.ts.map +1 -1
  243. package/dist/esm/funcs/approvalsUpdateApproval.js +1 -1
  244. package/dist/esm/funcs/approvalsUpdateApproval.js.map +1 -1
  245. package/dist/esm/funcs/billingSchedulesCreateBillingSchedule.d.ts +1 -1
  246. package/dist/esm/funcs/billingSchedulesCreateBillingSchedule.d.ts.map +1 -1
  247. package/dist/esm/funcs/billingSchedulesCreateBillingSchedule.js +1 -1
  248. package/dist/esm/funcs/billingSchedulesCreateBillingSchedule.js.map +1 -1
  249. package/dist/esm/funcs/billingSchedulesGetBillingSchedule.d.ts +1 -1
  250. package/dist/esm/funcs/billingSchedulesGetBillingSchedule.d.ts.map +1 -1
  251. package/dist/esm/funcs/billingSchedulesGetBillingSchedule.js +1 -1
  252. package/dist/esm/funcs/billingSchedulesGetBillingSchedule.js.map +1 -1
  253. package/dist/esm/funcs/billingSchedulesUpdateBillingSchedule.d.ts +1 -1
  254. package/dist/esm/funcs/billingSchedulesUpdateBillingSchedule.d.ts.map +1 -1
  255. package/dist/esm/funcs/billingSchedulesUpdateBillingSchedule.js +1 -1
  256. package/dist/esm/funcs/billingSchedulesUpdateBillingSchedule.js.map +1 -1
  257. package/dist/esm/funcs/customersCreateCustomerPaymentMethod.d.ts +1 -1
  258. package/dist/esm/funcs/customersCreateCustomerPaymentMethod.d.ts.map +1 -1
  259. package/dist/esm/funcs/customersCreateCustomerPaymentMethod.js +1 -1
  260. package/dist/esm/funcs/customersCreateCustomerPaymentMethod.js.map +1 -1
  261. package/dist/esm/funcs/ordersCreateOrderApproval.d.ts +1 -1
  262. package/dist/esm/funcs/ordersCreateOrderApproval.d.ts.map +1 -1
  263. package/dist/esm/funcs/ordersCreateOrderApproval.js +1 -1
  264. package/dist/esm/funcs/ordersCreateOrderApproval.js.map +1 -1
  265. package/dist/esm/funcs/plansMintPlanVersion.d.ts +1 -1
  266. package/dist/esm/funcs/plansMintPlanVersion.js +1 -1
  267. package/dist/esm/funcs/pricesCreate.d.ts +1 -1
  268. package/dist/esm/funcs/pricesCreate.d.ts.map +1 -1
  269. package/dist/esm/funcs/pricesCreate.js +1 -1
  270. package/dist/esm/funcs/pricesCreate.js.map +1 -1
  271. package/dist/esm/funcs/pricesGet.d.ts +1 -1
  272. package/dist/esm/funcs/pricesGet.d.ts.map +1 -1
  273. package/dist/esm/funcs/pricesGet.js +1 -1
  274. package/dist/esm/funcs/pricesGet.js.map +1 -1
  275. package/dist/esm/funcs/pricesUpdate.d.ts +1 -1
  276. package/dist/esm/funcs/pricesUpdate.d.ts.map +1 -1
  277. package/dist/esm/funcs/pricesUpdate.js +1 -1
  278. package/dist/esm/funcs/pricesUpdate.js.map +1 -1
  279. package/dist/esm/funcs/revenueGet.js +1 -0
  280. package/dist/esm/funcs/revenueGet.js.map +1 -1
  281. package/dist/esm/funcs/subscriptionsEditSubscriptionIntervals.d.ts +19 -0
  282. package/dist/esm/funcs/subscriptionsEditSubscriptionIntervals.d.ts.map +1 -0
  283. package/dist/esm/funcs/subscriptionsEditSubscriptionIntervals.js +91 -0
  284. package/dist/esm/funcs/subscriptionsEditSubscriptionIntervals.js.map +1 -0
  285. package/dist/esm/funcs/subscriptionsGetSubscriptionIntervals.d.ts +19 -0
  286. package/dist/esm/funcs/subscriptionsGetSubscriptionIntervals.d.ts.map +1 -0
  287. package/dist/esm/funcs/subscriptionsGetSubscriptionIntervals.js +88 -0
  288. package/dist/esm/funcs/subscriptionsGetSubscriptionIntervals.js.map +1 -0
  289. package/dist/esm/lib/config.d.ts +2 -2
  290. package/dist/esm/lib/config.js +2 -2
  291. package/dist/esm/models/approval.d.ts +17 -2
  292. package/dist/esm/models/approval.d.ts.map +1 -1
  293. package/dist/esm/models/approval.js +15 -2
  294. package/dist/esm/models/approval.js.map +1 -1
  295. package/dist/esm/models/approvallist.d.ts +2 -2
  296. package/dist/esm/models/approvallist.d.ts.map +1 -1
  297. package/dist/esm/models/approvallist.js +2 -2
  298. package/dist/esm/models/approvallist.js.map +1 -1
  299. package/dist/esm/models/billingschedule.d.ts +6 -4
  300. package/dist/esm/models/billingschedule.d.ts.map +1 -1
  301. package/dist/esm/models/billingschedule.js +3 -1
  302. package/dist/esm/models/billingschedule.js.map +1 -1
  303. package/dist/esm/models/customerpaymentsession.d.ts +53 -0
  304. package/dist/esm/models/customerpaymentsession.d.ts.map +1 -0
  305. package/dist/esm/models/customerpaymentsession.js +44 -0
  306. package/dist/esm/models/customerpaymentsession.js.map +1 -0
  307. package/dist/esm/models/editsubscriptionintervalsrequest.d.ts +31 -0
  308. package/dist/esm/models/editsubscriptionintervalsrequest.d.ts.map +1 -0
  309. package/dist/esm/models/editsubscriptionintervalsrequest.js +17 -0
  310. package/dist/esm/models/editsubscriptionintervalsrequest.js.map +1 -0
  311. package/dist/esm/models/editsubscriptionintervalsresponse.d.ts +36 -0
  312. package/dist/esm/models/editsubscriptionintervalsresponse.d.ts.map +1 -0
  313. package/dist/esm/models/editsubscriptionintervalsresponse.js +25 -0
  314. package/dist/esm/models/editsubscriptionintervalsresponse.js.map +1 -0
  315. package/dist/esm/models/index.d.ts +16 -4
  316. package/dist/esm/models/index.d.ts.map +1 -1
  317. package/dist/esm/models/index.js +16 -4
  318. package/dist/esm/models/index.js.map +1 -1
  319. package/dist/esm/models/item.d.ts +3 -0
  320. package/dist/esm/models/item.d.ts.map +1 -1
  321. package/dist/esm/models/item.js.map +1 -1
  322. package/dist/esm/models/mintplanlineinput.d.ts +23 -0
  323. package/dist/esm/models/mintplanlineinput.d.ts.map +1 -0
  324. package/dist/esm/models/mintplanlineinput.js +13 -0
  325. package/dist/esm/models/mintplanlineinput.js.map +1 -0
  326. package/dist/esm/models/mintplanlineref.d.ts +12 -0
  327. package/dist/esm/models/mintplanlineref.d.ts.map +1 -0
  328. package/dist/esm/models/mintplanlineref.js +11 -0
  329. package/dist/esm/models/mintplanlineref.js.map +1 -0
  330. package/dist/esm/models/mintplanversionrequest.d.ts +8 -30
  331. package/dist/esm/models/mintplanversionrequest.d.ts.map +1 -1
  332. package/dist/esm/models/mintplanversionrequest.js +3 -11
  333. package/dist/esm/models/mintplanversionrequest.js.map +1 -1
  334. package/dist/esm/models/operations/createexternalreference.d.ts +3 -0
  335. package/dist/esm/models/operations/createexternalreference.d.ts.map +1 -1
  336. package/dist/esm/models/operations/createexternalreference.js.map +1 -1
  337. package/dist/esm/models/operations/createitem.d.ts +3 -0
  338. package/dist/esm/models/operations/createitem.d.ts.map +1 -1
  339. package/dist/esm/models/operations/createitem.js.map +1 -1
  340. package/dist/esm/models/operations/createplan.d.ts +3 -3
  341. package/dist/esm/models/operations/createplan.d.ts.map +1 -1
  342. package/dist/esm/models/operations/createplan.js +1 -1
  343. package/dist/esm/models/operations/createplan.js.map +1 -1
  344. package/dist/esm/models/operations/createsubscription.d.ts +5 -0
  345. package/dist/esm/models/operations/createsubscription.d.ts.map +1 -1
  346. package/dist/esm/models/operations/createsubscription.js +1 -0
  347. package/dist/esm/models/operations/createsubscription.js.map +1 -1
  348. package/dist/esm/models/operations/editsubscriptionintervals.d.ts +18 -0
  349. package/dist/esm/models/operations/editsubscriptionintervals.d.ts.map +1 -0
  350. package/dist/esm/models/operations/editsubscriptionintervals.js +19 -0
  351. package/dist/esm/models/operations/editsubscriptionintervals.js.map +1 -0
  352. package/dist/esm/models/operations/getrevenue.d.ts +18 -0
  353. package/dist/esm/models/operations/getrevenue.d.ts.map +1 -1
  354. package/dist/esm/models/operations/getrevenue.js +11 -0
  355. package/dist/esm/models/operations/getrevenue.js.map +1 -1
  356. package/dist/esm/models/operations/getsubscriptionintervals.d.ts +15 -0
  357. package/dist/esm/models/operations/getsubscriptionintervals.d.ts.map +1 -0
  358. package/dist/esm/models/operations/getsubscriptionintervals.js +12 -0
  359. package/dist/esm/models/operations/getsubscriptionintervals.js.map +1 -0
  360. package/dist/esm/models/operations/index.d.ts +2 -0
  361. package/dist/esm/models/operations/index.d.ts.map +1 -1
  362. package/dist/esm/models/operations/index.js +2 -0
  363. package/dist/esm/models/operations/index.js.map +1 -1
  364. package/dist/esm/models/operations/listbillingschedules.d.ts +1 -1
  365. package/dist/esm/models/operations/listbillingschedules.d.ts.map +1 -1
  366. package/dist/esm/models/operations/listbillingschedules.js +1 -1
  367. package/dist/esm/models/operations/listbillingschedules.js.map +1 -1
  368. package/dist/esm/models/operations/listpaymentsessions.d.ts +1 -1
  369. package/dist/esm/models/operations/listpaymentsessions.d.ts.map +1 -1
  370. package/dist/esm/models/operations/listpaymentsessions.js +1 -1
  371. package/dist/esm/models/operations/listpaymentsessions.js.map +1 -1
  372. package/dist/esm/models/operations/listprices.d.ts +1 -1
  373. package/dist/esm/models/operations/listprices.d.ts.map +1 -1
  374. package/dist/esm/models/operations/listprices.js +1 -1
  375. package/dist/esm/models/operations/listprices.js.map +1 -1
  376. package/dist/esm/models/operations/updatesubscription.d.ts +6 -0
  377. package/dist/esm/models/operations/updatesubscription.d.ts.map +1 -1
  378. package/dist/esm/models/operations/updatesubscription.js +2 -0
  379. package/dist/esm/models/operations/updatesubscription.js.map +1 -1
  380. package/dist/esm/models/order.d.ts +2 -2
  381. package/dist/esm/models/order.d.ts.map +1 -1
  382. package/dist/esm/models/order.js +2 -2
  383. package/dist/esm/models/order.js.map +1 -1
  384. package/dist/esm/models/orderapproval.d.ts +38 -0
  385. package/dist/esm/models/orderapproval.d.ts.map +1 -0
  386. package/dist/esm/models/orderapproval.js +38 -0
  387. package/dist/esm/models/orderapproval.js.map +1 -0
  388. package/dist/esm/models/orderbillingschedule.d.ts +72 -0
  389. package/dist/esm/models/orderbillingschedule.d.ts.map +1 -0
  390. package/dist/esm/models/orderbillingschedule.js +64 -0
  391. package/dist/esm/models/orderbillingschedule.js.map +1 -0
  392. package/dist/esm/models/paymentsession.d.ts +41 -18
  393. package/dist/esm/models/paymentsession.d.ts.map +1 -1
  394. package/dist/esm/models/paymentsession.js +12 -13
  395. package/dist/esm/models/paymentsession.js.map +1 -1
  396. package/dist/esm/models/plan.d.ts +2 -2
  397. package/dist/esm/models/plan.d.ts.map +1 -1
  398. package/dist/esm/models/plan.js +2 -2
  399. package/dist/esm/models/plan.js.map +1 -1
  400. package/dist/esm/models/planlineinput.d.ts +23 -0
  401. package/dist/esm/models/planlineinput.d.ts.map +1 -0
  402. package/dist/esm/models/planlineinput.js +13 -0
  403. package/dist/esm/models/planlineinput.js.map +1 -0
  404. package/dist/esm/models/planlineref.d.ts +12 -0
  405. package/dist/esm/models/planlineref.d.ts.map +1 -0
  406. package/dist/esm/models/planlineref.js +11 -0
  407. package/dist/esm/models/planlineref.js.map +1 -0
  408. package/dist/{commonjs/models/schemasprice.d.ts → esm/models/planprice.d.ts} +55 -37
  409. package/dist/esm/models/planprice.d.ts.map +1 -0
  410. package/dist/esm/models/planprice.js +65 -0
  411. package/dist/esm/models/planprice.js.map +1 -0
  412. package/dist/esm/models/planversionpriceslot.d.ts +5 -1
  413. package/dist/esm/models/planversionpriceslot.d.ts.map +1 -1
  414. package/dist/esm/models/planversionpriceslot.js +1 -0
  415. package/dist/esm/models/planversionpriceslot.js.map +1 -1
  416. package/dist/esm/models/price.d.ts +25 -43
  417. package/dist/esm/models/price.d.ts.map +1 -1
  418. package/dist/esm/models/price.js +10 -28
  419. package/dist/esm/models/price.js.map +1 -1
  420. package/dist/esm/models/subscription.d.ts +5 -0
  421. package/dist/esm/models/subscription.d.ts.map +1 -1
  422. package/dist/esm/models/subscription.js +2 -0
  423. package/dist/esm/models/subscription.js.map +1 -1
  424. package/dist/esm/models/subscriptioninterval.d.ts +80 -0
  425. package/dist/esm/models/subscriptioninterval.d.ts.map +1 -0
  426. package/dist/esm/models/subscriptioninterval.js +48 -0
  427. package/dist/esm/models/subscriptioninterval.js.map +1 -0
  428. package/dist/esm/models/subscriptionintervaladdop.d.ts +85 -0
  429. package/dist/esm/models/subscriptionintervaladdop.d.ts.map +1 -0
  430. package/dist/esm/models/subscriptionintervaladdop.js +36 -0
  431. package/dist/esm/models/subscriptionintervaladdop.js.map +1 -0
  432. package/dist/esm/models/subscriptionintervaleditop.d.ts +102 -0
  433. package/dist/esm/models/subscriptionintervaleditop.d.ts.map +1 -0
  434. package/dist/esm/models/subscriptionintervaleditop.js +40 -0
  435. package/dist/esm/models/subscriptionintervaleditop.js.map +1 -0
  436. package/dist/esm/models/subscriptionintervalremoveop.d.ts +15 -0
  437. package/dist/esm/models/subscriptionintervalremoveop.d.ts.map +1 -0
  438. package/dist/esm/models/subscriptionintervalremoveop.js +12 -0
  439. package/dist/esm/models/subscriptionintervalremoveop.js.map +1 -0
  440. package/dist/esm/models/subscriptionintervalsresponse.d.ts +14 -0
  441. package/dist/esm/models/subscriptionintervalsresponse.d.ts.map +1 -0
  442. package/dist/esm/models/subscriptionintervalsresponse.js +14 -0
  443. package/dist/esm/models/subscriptionintervalsresponse.js.map +1 -0
  444. package/dist/esm/models/subscriptionversionpolicy.d.ts +18 -0
  445. package/dist/esm/models/subscriptionversionpolicy.d.ts.map +1 -0
  446. package/dist/esm/models/subscriptionversionpolicy.js +16 -0
  447. package/dist/esm/models/subscriptionversionpolicy.js.map +1 -0
  448. package/dist/esm/sdk/approvals.d.ts +3 -3
  449. package/dist/esm/sdk/approvals.d.ts.map +1 -1
  450. package/dist/esm/sdk/billingschedules.d.ts +3 -3
  451. package/dist/esm/sdk/billingschedules.d.ts.map +1 -1
  452. package/dist/esm/sdk/customers.d.ts +1 -1
  453. package/dist/esm/sdk/customers.d.ts.map +1 -1
  454. package/dist/esm/sdk/orders.d.ts +1 -1
  455. package/dist/esm/sdk/orders.d.ts.map +1 -1
  456. package/dist/esm/sdk/plans.d.ts +1 -1
  457. package/dist/esm/sdk/plans.js +1 -1
  458. package/dist/esm/sdk/prices.d.ts +3 -3
  459. package/dist/esm/sdk/prices.d.ts.map +1 -1
  460. package/dist/esm/sdk/subscriptions.d.ts +14 -0
  461. package/dist/esm/sdk/subscriptions.d.ts.map +1 -1
  462. package/dist/esm/sdk/subscriptions.js +20 -0
  463. package/dist/esm/sdk/subscriptions.js.map +1 -1
  464. package/jsr.json +1 -1
  465. package/package.json +1 -1
  466. package/src/funcs/approvalsCreateApproval.ts +4 -4
  467. package/src/funcs/approvalsGetApproval.ts +4 -4
  468. package/src/funcs/approvalsUpdateApproval.ts +4 -4
  469. package/src/funcs/billingSchedulesCreateBillingSchedule.ts +4 -4
  470. package/src/funcs/billingSchedulesGetBillingSchedule.ts +4 -4
  471. package/src/funcs/billingSchedulesUpdateBillingSchedule.ts +4 -4
  472. package/src/funcs/customersCreateCustomerPaymentMethod.ts +4 -4
  473. package/src/funcs/ordersCreateOrderApproval.ts +4 -4
  474. package/src/funcs/plansMintPlanVersion.ts +1 -1
  475. package/src/funcs/pricesCreate.ts +4 -4
  476. package/src/funcs/pricesGet.ts +4 -4
  477. package/src/funcs/pricesUpdate.ts +4 -4
  478. package/src/funcs/revenueGet.ts +1 -0
  479. package/src/funcs/subscriptionsEditSubscriptionIntervals.ts +184 -0
  480. package/src/funcs/subscriptionsGetSubscriptionIntervals.ts +177 -0
  481. package/src/lib/config.ts +2 -2
  482. package/src/models/approval.ts +26 -4
  483. package/src/models/approvallist.ts +3 -6
  484. package/src/models/billingschedule.ts +13 -5
  485. package/src/models/customerpaymentsession.ts +100 -0
  486. package/src/models/editsubscriptionintervalsrequest.ts +66 -0
  487. package/src/models/editsubscriptionintervalsresponse.ts +87 -0
  488. package/src/models/index.ts +16 -4
  489. package/src/models/item.ts +3 -0
  490. package/src/models/mintplanlineinput.ts +43 -0
  491. package/src/models/mintplanlineref.ts +31 -0
  492. package/src/models/mintplanversionrequest.ts +14 -46
  493. package/src/models/operations/createexternalreference.ts +3 -0
  494. package/src/models/operations/createitem.ts +3 -0
  495. package/src/models/operations/createplan.ts +4 -4
  496. package/src/models/operations/createsubscription.ts +6 -0
  497. package/src/models/operations/editsubscriptionintervals.ts +47 -0
  498. package/src/models/operations/getrevenue.ts +22 -0
  499. package/src/models/operations/getsubscriptionintervals.ts +36 -0
  500. package/src/models/operations/index.ts +2 -0
  501. package/src/models/operations/listbillingschedules.ts +2 -2
  502. package/src/models/operations/listpaymentsessions.ts +2 -2
  503. package/src/models/operations/listprices.ts +2 -2
  504. package/src/models/operations/updatesubscription.ts +7 -0
  505. package/src/models/order.ts +6 -6
  506. package/src/models/orderapproval.ts +81 -0
  507. package/src/models/orderbillingschedule.ts +138 -0
  508. package/src/models/paymentsession.ts +49 -26
  509. package/src/models/plan.ts +3 -3
  510. package/src/models/planlineinput.ts +39 -0
  511. package/src/models/planlineref.ts +29 -0
  512. package/src/models/{schemasprice.ts → planprice.ts} +80 -58
  513. package/src/models/planversionpriceslot.ts +6 -1
  514. package/src/models/price.ts +35 -58
  515. package/src/models/subscription.ts +9 -0
  516. package/src/models/subscriptioninterval.ts +152 -0
  517. package/src/models/subscriptionintervaladdop.ts +148 -0
  518. package/src/models/subscriptionintervaleditop.ts +166 -0
  519. package/src/models/subscriptionintervalremoveop.ts +36 -0
  520. package/src/models/subscriptionintervalsresponse.ts +38 -0
  521. package/src/models/subscriptionversionpolicy.ts +29 -0
  522. package/src/sdk/approvals.ts +3 -3
  523. package/src/sdk/billingschedules.ts +3 -3
  524. package/src/sdk/customers.ts +1 -1
  525. package/src/sdk/orders.ts +1 -1
  526. package/src/sdk/plans.ts +1 -1
  527. package/src/sdk/prices.ts +3 -3
  528. package/src/sdk/subscriptions.ts +36 -0
  529. package/dist/commonjs/models/schemasapproval.d.ts +0 -53
  530. package/dist/commonjs/models/schemasapproval.d.ts.map +0 -1
  531. package/dist/commonjs/models/schemasapproval.js.map +0 -1
  532. package/dist/commonjs/models/schemasbillingschedule.d.ts +0 -74
  533. package/dist/commonjs/models/schemasbillingschedule.d.ts.map +0 -1
  534. package/dist/commonjs/models/schemasbillingschedule.js.map +0 -1
  535. package/dist/commonjs/models/schemaspaymentsession.d.ts +0 -76
  536. package/dist/commonjs/models/schemaspaymentsession.d.ts.map +0 -1
  537. package/dist/commonjs/models/schemaspaymentsession.js.map +0 -1
  538. package/dist/commonjs/models/schemasprice.d.ts.map +0 -1
  539. package/dist/commonjs/models/schemasprice.js.map +0 -1
  540. package/dist/esm/models/schemasapproval.d.ts +0 -53
  541. package/dist/esm/models/schemasapproval.d.ts.map +0 -1
  542. package/dist/esm/models/schemasapproval.js +0 -51
  543. package/dist/esm/models/schemasapproval.js.map +0 -1
  544. package/dist/esm/models/schemasbillingschedule.d.ts +0 -74
  545. package/dist/esm/models/schemasbillingschedule.d.ts.map +0 -1
  546. package/dist/esm/models/schemasbillingschedule.js +0 -66
  547. package/dist/esm/models/schemasbillingschedule.js.map +0 -1
  548. package/dist/esm/models/schemaspaymentsession.d.ts +0 -76
  549. package/dist/esm/models/schemaspaymentsession.d.ts.map +0 -1
  550. package/dist/esm/models/schemaspaymentsession.js +0 -43
  551. package/dist/esm/models/schemaspaymentsession.js.map +0 -1
  552. package/dist/esm/models/schemasprice.d.ts.map +0 -1
  553. package/dist/esm/models/schemasprice.js +0 -48
  554. package/dist/esm/models/schemasprice.js.map +0 -1
  555. package/src/models/schemasapproval.ts +0 -108
  556. package/src/models/schemasbillingschedule.ts +0 -148
  557. package/src/models/schemaspaymentsession.ts +0 -123
@@ -0,0 +1,43 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+
7
+ /**
8
+ * One line of the new version: the price it bills, and the key that names it.
9
+ */
10
+ export type MintPlanLineInput = {
11
+ /**
12
+ * Unique identifier for a price
13
+ */
14
+ priceId: string;
15
+ /**
16
+ * The key of the line. A key this plan already holds keeps that line, whatever its shape, because a line created before keys could be supplied carries a generated key. A key the plan does not hold names a new line and must match the format in `PlanLineKey`. Omit this to receive a generated key.
17
+ */
18
+ key?: string | undefined;
19
+ };
20
+
21
+ /** @internal */
22
+ export type MintPlanLineInput$Outbound = {
23
+ priceId: string;
24
+ key?: string | undefined;
25
+ };
26
+
27
+ /** @internal */
28
+ export const MintPlanLineInput$outboundSchema: z.ZodType<
29
+ MintPlanLineInput$Outbound,
30
+ z.ZodTypeDef,
31
+ MintPlanLineInput
32
+ > = z.object({
33
+ priceId: z.string(),
34
+ key: z.string().optional(),
35
+ });
36
+
37
+ export function mintPlanLineInputToJSON(
38
+ mintPlanLineInput: MintPlanLineInput,
39
+ ): string {
40
+ return JSON.stringify(
41
+ MintPlanLineInput$outboundSchema.parse(mintPlanLineInput),
42
+ );
43
+ }
@@ -0,0 +1,31 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import {
7
+ MintPlanLineInput,
8
+ MintPlanLineInput$Outbound,
9
+ MintPlanLineInput$outboundSchema,
10
+ } from "./mintplanlineinput.js";
11
+
12
+ /**
13
+ * Either a price ID on its own, or a price ID with the key that names its line.
14
+ */
15
+ export type MintPlanLineRef = MintPlanLineInput | string;
16
+
17
+ /** @internal */
18
+ export type MintPlanLineRef$Outbound = MintPlanLineInput$Outbound | string;
19
+
20
+ /** @internal */
21
+ export const MintPlanLineRef$outboundSchema: z.ZodType<
22
+ MintPlanLineRef$Outbound,
23
+ z.ZodTypeDef,
24
+ MintPlanLineRef
25
+ > = z.union([MintPlanLineInput$outboundSchema, z.string()]);
26
+
27
+ export function mintPlanLineRefToJSON(
28
+ mintPlanLineRef: MintPlanLineRef,
29
+ ): string {
30
+ return JSON.stringify(MintPlanLineRef$outboundSchema.parse(mintPlanLineRef));
31
+ }
@@ -3,61 +3,30 @@
3
3
  */
4
4
 
5
5
  import * as z from "zod/v3";
6
-
7
- export type ReplacePrice = {
8
- /**
9
- * Unique identifier for a price
10
- */
11
- replacesPriceId: string;
12
- /**
13
- * Unique identifier for a price
14
- */
15
- withPriceId: string;
16
- };
6
+ import {
7
+ MintPlanLineRef,
8
+ MintPlanLineRef$Outbound,
9
+ MintPlanLineRef$outboundSchema,
10
+ } from "./mintplanlineref.js";
17
11
 
18
12
  /**
19
- * A reference-by-id price diff applied to the prices of the plan's current version. Every id references an existing price created via POST /prices; inline price definitions are not accepted. A mint must carry at least one price change, so an empty body is rejected. A version must carry at least one price, so a diff that would leave none is rejected.
13
+ * The price set the new version is to hold. Every price ID references an existing price created via POST /prices; inline price definitions are not accepted. The change against the plan's current version follows from the keys: a key on both sides with a different price ID replaces that line and keeps its identity, a key only in this request adds a line, and a key the current version holds and this request omits removes that line. An entry with no key adds a line under a generated key; it is never matched to an existing line by price ID. A version must carry at least one price, so an empty set is rejected.
20
14
  */
21
15
  export type MintPlanVersionRequest = {
22
16
  /**
23
- * Prices to add to the version. Each must not already be on the plan's current version.
24
- */
25
- addPrices?: Array<string> | undefined;
26
- /**
27
- * Prices to remove. Each must be on the plan's current version.
17
+ * The full price set the new version holds. To move off the previous addPrices, removePrices and replacePrices fields: a replacePrices entry becomes the same key with the new price ID, a removePrices entry becomes an omitted key, and an addPrices entry becomes a new entry.
28
18
  */
29
- removePrices?: Array<string> | undefined;
19
+ prices: Array<MintPlanLineRef>;
30
20
  /**
31
- * Prices to swap in place, preserving the slot's lineage so the price keeps its identity where the plan is configured for stable price ids. replacesPriceId must be on the plan's current version; withPriceId is the new price.
21
+ * The ID of the plan version you read the current price set from. Supply it to be told when the plan has moved on: the request is rejected with 409 if the plan's current version is no longer this one, so a set built from a stale read cannot drop a line another caller has just added. Omit it to write the set unconditionally.
32
22
  */
33
- replacePrices?: Array<ReplacePrice> | undefined;
34
- };
35
-
36
- /** @internal */
37
- export type ReplacePrice$Outbound = {
38
- replacesPriceId: string;
39
- withPriceId: string;
23
+ basedOnVersionId?: string | undefined;
40
24
  };
41
25
 
42
- /** @internal */
43
- export const ReplacePrice$outboundSchema: z.ZodType<
44
- ReplacePrice$Outbound,
45
- z.ZodTypeDef,
46
- ReplacePrice
47
- > = z.object({
48
- replacesPriceId: z.string(),
49
- withPriceId: z.string(),
50
- });
51
-
52
- export function replacePriceToJSON(replacePrice: ReplacePrice): string {
53
- return JSON.stringify(ReplacePrice$outboundSchema.parse(replacePrice));
54
- }
55
-
56
26
  /** @internal */
57
27
  export type MintPlanVersionRequest$Outbound = {
58
- addPrices?: Array<string> | undefined;
59
- removePrices?: Array<string> | undefined;
60
- replacePrices?: Array<ReplacePrice$Outbound> | undefined;
28
+ prices: Array<MintPlanLineRef$Outbound>;
29
+ basedOnVersionId?: string | undefined;
61
30
  };
62
31
 
63
32
  /** @internal */
@@ -66,9 +35,8 @@ export const MintPlanVersionRequest$outboundSchema: z.ZodType<
66
35
  z.ZodTypeDef,
67
36
  MintPlanVersionRequest
68
37
  > = z.object({
69
- addPrices: z.array(z.string()).optional(),
70
- removePrices: z.array(z.string()).optional(),
71
- replacePrices: z.array(z.lazy(() => ReplacePrice$outboundSchema)).optional(),
38
+ prices: z.array(MintPlanLineRef$outboundSchema),
39
+ basedOnVersionId: z.string().optional(),
72
40
  });
73
41
 
74
42
  export function mintPlanVersionRequestToJSON(
@@ -6,6 +6,9 @@ import * as z from "zod/v3";
6
6
  import * as models from "../index.js";
7
7
 
8
8
  export type CreateExternalReferenceRequest = {
9
+ /**
10
+ * Unique identifier for an organization
11
+ */
9
12
  merchantId: string;
10
13
  /**
11
14
  * The type of Paygentic entity this external reference points at
@@ -5,6 +5,9 @@
5
5
  import * as z from "zod/v3";
6
6
 
7
7
  export type CreateItemRequest = {
8
+ /**
9
+ * Unique identifier for an organization
10
+ */
8
11
  merchantId: string;
9
12
  /**
10
13
  * Canonical sellable name for the Item
@@ -99,9 +99,9 @@ export type CreatePlanRequest = {
99
99
  */
100
100
  name: string;
101
101
  /**
102
- * Array of price IDs to associate with this plan
102
+ * The prices this plan starts with. An entry is either a price ID on its own, or an object that names a price ID and the key by which you address that line. A price ID on its own receives a generated key.
103
103
  */
104
- prices?: Array<string> | undefined;
104
+ prices?: Array<models.PlanLineRef> | undefined;
105
105
  /**
106
106
  * Unique identifier for a product
107
107
  */
@@ -167,7 +167,7 @@ export type CreatePlanRequest$Outbound = {
167
167
  invoiceDisplayName?: string | undefined;
168
168
  merchantId: string;
169
169
  name: string;
170
- prices?: Array<string> | undefined;
170
+ prices?: Array<models.PlanLineRef$Outbound> | undefined;
171
171
  productId: string;
172
172
  taxBehavior: string;
173
173
  renewalReminderEnabled: boolean;
@@ -193,7 +193,7 @@ export const CreatePlanRequest$outboundSchema: z.ZodType<
193
193
  invoiceDisplayName: z.string().optional(),
194
194
  merchantId: z.string(),
195
195
  name: z.string(),
196
- prices: z.array(z.string()).optional(),
196
+ prices: z.array(models.PlanLineRef$outboundSchema).optional(),
197
197
  productId: z.string(),
198
198
  taxBehavior: CreatePlanTaxBehavior$outboundSchema.default("exclusive"),
199
199
  renewalReminderEnabled: z.boolean().default(true),
@@ -117,6 +117,10 @@ export type CreateSubscriptionRequest = {
117
117
  * Number of minutes until the payment session expires. Defaults to 240 minutes (4 hours) if not provided.
118
118
  */
119
119
  sessionExpiryMinutes?: number | undefined;
120
+ /**
121
+ * How the subscription follows new versions of its plan. `floating` follows the plan's default version: when the default changes, the subscription bills from the new default from its next billing period. `pinned` keeps the plan version that the subscription holds. A subscription created without a value is `floating`. A change to this value does not change a billing period that has already started.
122
+ */
123
+ versionPolicy?: models.SubscriptionVersionPolicy | undefined;
120
124
  /**
121
125
  * Free-form merchant metadata to attach to the subscription. Values must be strings, numbers, or booleans.
122
126
  */
@@ -215,6 +219,7 @@ export type CreateSubscriptionRequest$Outbound = {
215
219
  renewalReminderDays?: number | null | undefined;
216
220
  paymentTermDays?: number | undefined;
217
221
  sessionExpiryMinutes?: number | undefined;
222
+ versionPolicy?: string | undefined;
218
223
  metadata?: { [k: string]: models.SubscriptionMetadata$Outbound } | undefined;
219
224
  };
220
225
 
@@ -240,6 +245,7 @@ export const CreateSubscriptionRequest$outboundSchema: z.ZodType<
240
245
  renewalReminderDays: z.nullable(z.number().int()).optional(),
241
246
  paymentTermDays: z.number().int().optional(),
242
247
  sessionExpiryMinutes: z.number().optional(),
248
+ versionPolicy: models.SubscriptionVersionPolicy$outboundSchema.optional(),
243
249
  metadata: z.record(models.SubscriptionMetadata$outboundSchema).optional(),
244
250
  });
245
251
 
@@ -0,0 +1,47 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import * as models from "../index.js";
8
+
9
+ export type EditSubscriptionIntervalsRequest = {
10
+ /**
11
+ * The subscription ID
12
+ */
13
+ id: string;
14
+ editSubscriptionIntervalsRequest: models.EditSubscriptionIntervalsRequest;
15
+ };
16
+
17
+ /** @internal */
18
+ export type EditSubscriptionIntervalsRequest$Outbound = {
19
+ id: string;
20
+ EditSubscriptionIntervalsRequest:
21
+ models.EditSubscriptionIntervalsRequest$Outbound;
22
+ };
23
+
24
+ /** @internal */
25
+ export const EditSubscriptionIntervalsRequest$outboundSchema: z.ZodType<
26
+ EditSubscriptionIntervalsRequest$Outbound,
27
+ z.ZodTypeDef,
28
+ EditSubscriptionIntervalsRequest
29
+ > = z.object({
30
+ id: z.string(),
31
+ editSubscriptionIntervalsRequest:
32
+ models.EditSubscriptionIntervalsRequest$outboundSchema,
33
+ }).transform((v) => {
34
+ return remap$(v, {
35
+ editSubscriptionIntervalsRequest: "EditSubscriptionIntervalsRequest",
36
+ });
37
+ });
38
+
39
+ export function editSubscriptionIntervalsRequestToJSON(
40
+ editSubscriptionIntervalsRequest: EditSubscriptionIntervalsRequest,
41
+ ): string {
42
+ return JSON.stringify(
43
+ EditSubscriptionIntervalsRequest$outboundSchema.parse(
44
+ editSubscriptionIntervalsRequest,
45
+ ),
46
+ );
47
+ }
@@ -31,6 +31,18 @@ export const GroupBy = {
31
31
  */
32
32
  export type GroupBy = ClosedEnum<typeof GroupBy>;
33
33
 
34
+ /**
35
+ * Which date places revenue inside the window. 'issued' (default) counts whole invoices by their issue date, the basis revenue is recognised on. 'billingPeriod' counts invoice lines by the start of the period each line bills, so a window covering one billing period returns that period's charges, whichever invoices carry them: this month's advance fee and this month's arrears usage. Paid, outstanding and written-off follow each line's invoice; a refund splits across its invoice's lines by subtotal; payments not tied to an invoice are excluded because they bill no period.
36
+ */
37
+ export const PeriodBasis = {
38
+ Issued: "issued",
39
+ BillingPeriod: "billingPeriod",
40
+ } as const;
41
+ /**
42
+ * Which date places revenue inside the window. 'issued' (default) counts whole invoices by their issue date, the basis revenue is recognised on. 'billingPeriod' counts invoice lines by the start of the period each line bills, so a window covering one billing period returns that period's charges, whichever invoices carry them: this month's advance fee and this month's arrears usage. Paid, outstanding and written-off follow each line's invoice; a refund splits across its invoice's lines by subtotal; payments not tied to an invoice are excluded because they bill no period.
43
+ */
44
+ export type PeriodBasis = ClosedEnum<typeof PeriodBasis>;
45
+
34
46
  export type GetRevenueRequest = {
35
47
  /**
36
48
  * Start of the time range (ISO 8601 format)
@@ -64,6 +76,10 @@ export type GetRevenueRequest = {
64
76
  * Group invoice data by dimension. Allowed values: 'plan' (max 5 groups, top 4 + 'other' when exceeding), 'customer' (max 25 groups, top 24 + 'other' when exceeding, sorted by revenue descending), 'currency' (one entry per currency, primary currency first then alphabetical). Note: groupBy values are mutually exclusive — combining them returns a 400 error. When groupBy=currency is active, top-level netRevenue, invoices, and payments fields are omitted; currencyBreakdown is the sole data source.
65
77
  */
66
78
  groupBy?: GroupBy | undefined;
79
+ /**
80
+ * Which date places revenue inside the window. 'issued' (default) counts whole invoices by their issue date, the basis revenue is recognised on. 'billingPeriod' counts invoice lines by the start of the period each line bills, so a window covering one billing period returns that period's charges, whichever invoices carry them: this month's advance fee and this month's arrears usage. Paid, outstanding and written-off follow each line's invoice; a refund splits across its invoice's lines by subtotal; payments not tied to an invoice are excluded because they bill no period.
81
+ */
82
+ periodBasis?: PeriodBasis | undefined;
67
83
  };
68
84
 
69
85
  /** @internal */
@@ -75,6 +91,10 @@ export const GetRevenueBucketWidth$outboundSchema: z.ZodNativeEnum<
75
91
  export const GroupBy$outboundSchema: z.ZodNativeEnum<typeof GroupBy> = z
76
92
  .nativeEnum(GroupBy);
77
93
 
94
+ /** @internal */
95
+ export const PeriodBasis$outboundSchema: z.ZodNativeEnum<typeof PeriodBasis> = z
96
+ .nativeEnum(PeriodBasis);
97
+
78
98
  /** @internal */
79
99
  export type GetRevenueRequest$Outbound = {
80
100
  startTime: string;
@@ -85,6 +105,7 @@ export type GetRevenueRequest$Outbound = {
85
105
  subscriptionIds?: Array<string> | undefined;
86
106
  currency?: string | undefined;
87
107
  groupBy?: string | undefined;
108
+ periodBasis: string;
88
109
  };
89
110
 
90
111
  /** @internal */
@@ -101,6 +122,7 @@ export const GetRevenueRequest$outboundSchema: z.ZodType<
101
122
  subscriptionIds: z.array(z.string()).optional(),
102
123
  currency: z.string().optional(),
103
124
  groupBy: GroupBy$outboundSchema.optional(),
125
+ periodBasis: PeriodBasis$outboundSchema.default("issued"),
104
126
  });
105
127
 
106
128
  export function getRevenueRequestToJSON(
@@ -0,0 +1,36 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+
7
+ export type GetSubscriptionIntervalsRequest = {
8
+ /**
9
+ * The subscription ID
10
+ */
11
+ id: string;
12
+ };
13
+
14
+ /** @internal */
15
+ export type GetSubscriptionIntervalsRequest$Outbound = {
16
+ id: string;
17
+ };
18
+
19
+ /** @internal */
20
+ export const GetSubscriptionIntervalsRequest$outboundSchema: z.ZodType<
21
+ GetSubscriptionIntervalsRequest$Outbound,
22
+ z.ZodTypeDef,
23
+ GetSubscriptionIntervalsRequest
24
+ > = z.object({
25
+ id: z.string(),
26
+ });
27
+
28
+ export function getSubscriptionIntervalsRequestToJSON(
29
+ getSubscriptionIntervalsRequest: GetSubscriptionIntervalsRequest,
30
+ ): string {
31
+ return JSON.stringify(
32
+ GetSubscriptionIntervalsRequest$outboundSchema.parse(
33
+ getSubscriptionIntervalsRequest,
34
+ ),
35
+ );
36
+ }
@@ -41,6 +41,7 @@ export * from "./deletesubscriptionadjustment.js";
41
41
  export * from "./deletetestclock.js";
42
42
  export * from "./disconnectmerchantintegration.js";
43
43
  export * from "./downloadinvoicepdf.js";
44
+ export * from "./editsubscriptionintervals.js";
44
45
  export * from "./generateportallink.js";
45
46
  export * from "./generatescheduleinvoices.js";
46
47
  export * from "./getapproval.js";
@@ -71,6 +72,7 @@ export * from "./getrevenue.js";
71
72
  export * from "./getsource.js";
72
73
  export * from "./getsourcerule.js";
73
74
  export * from "./getsubscription.js";
75
+ export * from "./getsubscriptionintervals.js";
74
76
  export * from "./gettestclock.js";
75
77
  export * from "./getuser.js";
76
78
  export * from "./ingestevent.js";
@@ -32,7 +32,7 @@ export type ListBillingSchedulesObject = ClosedEnum<
32
32
  */
33
33
  export type ListBillingSchedulesResponse = {
34
34
  object: ListBillingSchedulesObject;
35
- data: Array<models.SchemasBillingSchedule>;
35
+ data: Array<models.BillingSchedule>;
36
36
  /**
37
37
  * Offset-based pagination response.
38
38
  */
@@ -77,7 +77,7 @@ export const ListBillingSchedulesResponse$inboundSchema: z.ZodType<
77
77
  unknown
78
78
  > = z.object({
79
79
  object: ListBillingSchedulesObject$inboundSchema,
80
- data: z.array(models.SchemasBillingSchedule$inboundSchema),
80
+ data: z.array(models.BillingSchedule$inboundSchema),
81
81
  pagination: models.OffsetPagination$inboundSchema,
82
82
  });
83
83
 
@@ -84,7 +84,7 @@ export type ListPaymentSessionsObject = ClosedEnum<
84
84
  */
85
85
  export type ListPaymentSessionsResponse = {
86
86
  object: ListPaymentSessionsObject;
87
- data: Array<models.SchemasPaymentSession>;
87
+ data: Array<models.PaymentSession>;
88
88
  /**
89
89
  * Offset-based pagination response.
90
90
  */
@@ -146,7 +146,7 @@ export const ListPaymentSessionsResponse$inboundSchema: z.ZodType<
146
146
  unknown
147
147
  > = z.object({
148
148
  object: ListPaymentSessionsObject$inboundSchema,
149
- data: z.array(models.SchemasPaymentSession$inboundSchema),
149
+ data: z.array(models.PaymentSession$inboundSchema),
150
150
  pagination: models.OffsetPagination$inboundSchema,
151
151
  });
152
152
 
@@ -37,7 +37,7 @@ export type ListPricesPagination = {
37
37
  * List of prices
38
38
  */
39
39
  export type ListPricesResponse = {
40
- data?: Array<models.SchemasPrice> | undefined;
40
+ data?: Array<models.Price> | undefined;
41
41
  pagination?: ListPricesPagination | undefined;
42
42
  };
43
43
 
@@ -96,7 +96,7 @@ export const ListPricesResponse$inboundSchema: z.ZodType<
96
96
  z.ZodTypeDef,
97
97
  unknown
98
98
  > = z.object({
99
- data: z.array(models.SchemasPrice$inboundSchema).optional(),
99
+ data: z.array(models.Price$inboundSchema).optional(),
100
100
  pagination: z.lazy(() => ListPricesPagination$inboundSchema).optional(),
101
101
  });
102
102
 
@@ -5,6 +5,7 @@
5
5
  import * as z from "zod/v3";
6
6
  import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { ClosedEnum } from "../../types/enums.js";
8
+ import * as models from "../index.js";
8
9
 
9
10
  export const UpdateSubscriptionStatus = {
10
11
  Active: "active",
@@ -55,6 +56,10 @@ export type UpdateSubscriptionRequestBody = {
55
56
  * Payment term in days ("Net X") applied to subsequently generated invoices: invoice dueAt = invoice issue date + paymentTermDays. A non-zero value is only valid alongside bankTransferOnly=true. Set 0 for "due on issue". Already-issued invoices keep their snapshotted dueAt.
56
57
  */
57
58
  paymentTermDays?: number | undefined;
59
+ /**
60
+ * How the subscription follows new versions of its plan. `floating` follows the plan's default version: when the default changes, the subscription bills from the new default from its next billing period. `pinned` keeps the plan version that the subscription holds. A subscription created without a value is `floating`. A change to this value does not change a billing period that has already started.
61
+ */
62
+ versionPolicy?: models.SubscriptionVersionPolicy | undefined;
58
63
  };
59
64
 
60
65
  export type UpdateSubscriptionRequest = {
@@ -80,6 +85,7 @@ export type UpdateSubscriptionRequestBody$Outbound = {
80
85
  renewalReminderEnabled?: boolean | null | undefined;
81
86
  renewalReminderDays?: number | null | undefined;
82
87
  paymentTermDays?: number | undefined;
88
+ versionPolicy?: string | undefined;
83
89
  };
84
90
 
85
91
  /** @internal */
@@ -99,6 +105,7 @@ export const UpdateSubscriptionRequestBody$outboundSchema: z.ZodType<
99
105
  renewalReminderEnabled: z.nullable(z.boolean()).optional(),
100
106
  renewalReminderDays: z.nullable(z.number().int()).optional(),
101
107
  paymentTermDays: z.number().int().optional(),
108
+ versionPolicy: models.SubscriptionVersionPolicy$outboundSchema.optional(),
102
109
  });
103
110
 
104
111
  export function updateSubscriptionRequestBodyToJSON(
@@ -6,11 +6,11 @@ import * as z from "zod/v3";
6
6
  import { safeParse } from "../lib/schemas.js";
7
7
  import { ClosedEnum } from "../types/enums.js";
8
8
  import { Result as SafeParseResult } from "../types/fp.js";
9
- import {
10
- BillingSchedule,
11
- BillingSchedule$inboundSchema,
12
- } from "./billingschedule.js";
13
9
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
10
+ import {
11
+ OrderBillingSchedule,
12
+ OrderBillingSchedule$inboundSchema,
13
+ } from "./orderbillingschedule.js";
14
14
  import { OrderLineItem, OrderLineItem$inboundSchema } from "./orderlineitem.js";
15
15
 
16
16
  export const OrderObject = {
@@ -55,7 +55,7 @@ export type Order = {
55
55
  defaultPaymentTermDays: number;
56
56
  metadata: { [k: string]: any };
57
57
  lineItems: Array<OrderLineItem>;
58
- billingSchedules: Array<BillingSchedule>;
58
+ billingSchedules: Array<OrderBillingSchedule>;
59
59
  createdAt: Date;
60
60
  updatedAt: Date;
61
61
  };
@@ -102,7 +102,7 @@ export const Order$inboundSchema: z.ZodType<Order, z.ZodTypeDef, unknown> = z
102
102
  defaultPaymentTermDays: z.number().int(),
103
103
  metadata: z.record(z.any()),
104
104
  lineItems: z.array(OrderLineItem$inboundSchema),
105
- billingSchedules: z.array(BillingSchedule$inboundSchema),
105
+ billingSchedules: z.array(OrderBillingSchedule$inboundSchema),
106
106
  createdAt: z.string().datetime({ offset: true }).transform(v =>
107
107
  new Date(v)
108
108
  ),
@@ -0,0 +1,81 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../lib/schemas.js";
7
+ import { ClosedEnum } from "../types/enums.js";
8
+ import { Result as SafeParseResult } from "../types/fp.js";
9
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
10
+
11
+ export const OrderApprovalObject = {
12
+ Approval: "approval",
13
+ } as const;
14
+ export type OrderApprovalObject = ClosedEnum<typeof OrderApprovalObject>;
15
+
16
+ export const OrderApprovalDecision = {
17
+ Pending: "pending",
18
+ Approved: "approved",
19
+ Rejected: "rejected",
20
+ Cancelled: "cancelled",
21
+ } as const;
22
+ export type OrderApprovalDecision = ClosedEnum<typeof OrderApprovalDecision>;
23
+
24
+ export type OrderApproval = {
25
+ id: string;
26
+ object: OrderApprovalObject;
27
+ merchantId: string;
28
+ resourceType: string;
29
+ resourceId: string;
30
+ kind: string;
31
+ decision: OrderApprovalDecision;
32
+ requester: string;
33
+ reviewer?: string | null | undefined;
34
+ note?: string | null | undefined;
35
+ dataSnapshotHash: string;
36
+ decidedAt?: Date | null | undefined;
37
+ createdAt: Date;
38
+ };
39
+
40
+ /** @internal */
41
+ export const OrderApprovalObject$inboundSchema: z.ZodNativeEnum<
42
+ typeof OrderApprovalObject
43
+ > = z.nativeEnum(OrderApprovalObject);
44
+
45
+ /** @internal */
46
+ export const OrderApprovalDecision$inboundSchema: z.ZodNativeEnum<
47
+ typeof OrderApprovalDecision
48
+ > = z.nativeEnum(OrderApprovalDecision);
49
+
50
+ /** @internal */
51
+ export const OrderApproval$inboundSchema: z.ZodType<
52
+ OrderApproval,
53
+ z.ZodTypeDef,
54
+ unknown
55
+ > = z.object({
56
+ id: z.string(),
57
+ object: OrderApprovalObject$inboundSchema,
58
+ merchantId: z.string(),
59
+ resourceType: z.string(),
60
+ resourceId: z.string(),
61
+ kind: z.string(),
62
+ decision: OrderApprovalDecision$inboundSchema,
63
+ requester: z.string(),
64
+ reviewer: z.nullable(z.string()).optional(),
65
+ note: z.nullable(z.string()).optional(),
66
+ dataSnapshotHash: z.string(),
67
+ decidedAt: z.nullable(
68
+ z.string().datetime({ offset: true }).transform(v => new Date(v)),
69
+ ).optional(),
70
+ createdAt: z.string().datetime({ offset: true }).transform(v => new Date(v)),
71
+ });
72
+
73
+ export function orderApprovalFromJSON(
74
+ jsonString: string,
75
+ ): SafeParseResult<OrderApproval, SDKValidationError> {
76
+ return safeParse(
77
+ jsonString,
78
+ (x) => OrderApproval$inboundSchema.parse(JSON.parse(x)),
79
+ `Failed to parse 'OrderApproval' from JSON`,
80
+ );
81
+ }