@paygentic/sdk 0.9.12 → 0.9.13

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 (389) hide show
  1. package/dist/commonjs/funcs/approvalsCreateApproval.d.ts +1 -1
  2. package/dist/commonjs/funcs/approvalsCreateApproval.d.ts.map +1 -1
  3. package/dist/commonjs/funcs/approvalsCreateApproval.js +1 -1
  4. package/dist/commonjs/funcs/approvalsCreateApproval.js.map +1 -1
  5. package/dist/commonjs/funcs/approvalsGetApproval.d.ts +1 -1
  6. package/dist/commonjs/funcs/approvalsGetApproval.d.ts.map +1 -1
  7. package/dist/commonjs/funcs/approvalsGetApproval.js +1 -1
  8. package/dist/commonjs/funcs/approvalsGetApproval.js.map +1 -1
  9. package/dist/commonjs/funcs/approvalsUpdateApproval.d.ts +1 -1
  10. package/dist/commonjs/funcs/approvalsUpdateApproval.d.ts.map +1 -1
  11. package/dist/commonjs/funcs/approvalsUpdateApproval.js +1 -1
  12. package/dist/commonjs/funcs/approvalsUpdateApproval.js.map +1 -1
  13. package/dist/commonjs/funcs/billingSchedulesCreateBillingSchedule.d.ts +1 -1
  14. package/dist/commonjs/funcs/billingSchedulesCreateBillingSchedule.d.ts.map +1 -1
  15. package/dist/commonjs/funcs/billingSchedulesCreateBillingSchedule.js +1 -1
  16. package/dist/commonjs/funcs/billingSchedulesCreateBillingSchedule.js.map +1 -1
  17. package/dist/commonjs/funcs/billingSchedulesGetBillingSchedule.d.ts +1 -1
  18. package/dist/commonjs/funcs/billingSchedulesGetBillingSchedule.d.ts.map +1 -1
  19. package/dist/commonjs/funcs/billingSchedulesGetBillingSchedule.js +1 -1
  20. package/dist/commonjs/funcs/billingSchedulesGetBillingSchedule.js.map +1 -1
  21. package/dist/commonjs/funcs/billingSchedulesUpdateBillingSchedule.d.ts +1 -1
  22. package/dist/commonjs/funcs/billingSchedulesUpdateBillingSchedule.d.ts.map +1 -1
  23. package/dist/commonjs/funcs/billingSchedulesUpdateBillingSchedule.js +1 -1
  24. package/dist/commonjs/funcs/billingSchedulesUpdateBillingSchedule.js.map +1 -1
  25. package/dist/commonjs/funcs/customersCreateCustomerPaymentMethod.d.ts +1 -1
  26. package/dist/commonjs/funcs/customersCreateCustomerPaymentMethod.d.ts.map +1 -1
  27. package/dist/commonjs/funcs/customersCreateCustomerPaymentMethod.js +1 -1
  28. package/dist/commonjs/funcs/customersCreateCustomerPaymentMethod.js.map +1 -1
  29. package/dist/commonjs/funcs/ordersCreateOrderApproval.d.ts +1 -1
  30. package/dist/commonjs/funcs/ordersCreateOrderApproval.d.ts.map +1 -1
  31. package/dist/commonjs/funcs/ordersCreateOrderApproval.js +1 -1
  32. package/dist/commonjs/funcs/ordersCreateOrderApproval.js.map +1 -1
  33. package/dist/commonjs/funcs/plansMintPlanVersion.d.ts +1 -1
  34. package/dist/commonjs/funcs/plansMintPlanVersion.js +1 -1
  35. package/dist/commonjs/funcs/pricesCreate.d.ts +1 -1
  36. package/dist/commonjs/funcs/pricesCreate.d.ts.map +1 -1
  37. package/dist/commonjs/funcs/pricesCreate.js +1 -1
  38. package/dist/commonjs/funcs/pricesCreate.js.map +1 -1
  39. package/dist/commonjs/funcs/pricesGet.d.ts +1 -1
  40. package/dist/commonjs/funcs/pricesGet.d.ts.map +1 -1
  41. package/dist/commonjs/funcs/pricesGet.js +1 -1
  42. package/dist/commonjs/funcs/pricesGet.js.map +1 -1
  43. package/dist/commonjs/funcs/pricesUpdate.d.ts +1 -1
  44. package/dist/commonjs/funcs/pricesUpdate.d.ts.map +1 -1
  45. package/dist/commonjs/funcs/pricesUpdate.js +1 -1
  46. package/dist/commonjs/funcs/pricesUpdate.js.map +1 -1
  47. package/dist/commonjs/lib/config.d.ts +2 -2
  48. package/dist/commonjs/lib/config.js +2 -2
  49. package/dist/commonjs/models/approval.d.ts +17 -2
  50. package/dist/commonjs/models/approval.d.ts.map +1 -1
  51. package/dist/commonjs/models/approval.js +16 -3
  52. package/dist/commonjs/models/approval.js.map +1 -1
  53. package/dist/commonjs/models/approvallist.d.ts +2 -2
  54. package/dist/commonjs/models/approvallist.d.ts.map +1 -1
  55. package/dist/commonjs/models/approvallist.js +2 -2
  56. package/dist/commonjs/models/approvallist.js.map +1 -1
  57. package/dist/commonjs/models/billingschedule.d.ts +6 -4
  58. package/dist/commonjs/models/billingschedule.d.ts.map +1 -1
  59. package/dist/commonjs/models/billingschedule.js +3 -1
  60. package/dist/commonjs/models/billingschedule.js.map +1 -1
  61. package/dist/commonjs/models/customerpaymentsession.d.ts +53 -0
  62. package/dist/commonjs/models/customerpaymentsession.d.ts.map +1 -0
  63. package/dist/commonjs/models/{schemaspaymentsession.js → customerpaymentsession.js} +25 -24
  64. package/dist/commonjs/models/customerpaymentsession.js.map +1 -0
  65. package/dist/commonjs/models/index.d.ts +8 -4
  66. package/dist/commonjs/models/index.d.ts.map +1 -1
  67. package/dist/commonjs/models/index.js +8 -4
  68. package/dist/commonjs/models/index.js.map +1 -1
  69. package/dist/commonjs/models/item.d.ts +3 -0
  70. package/dist/commonjs/models/item.d.ts.map +1 -1
  71. package/dist/commonjs/models/item.js.map +1 -1
  72. package/dist/commonjs/models/mintplanlineinput.d.ts +23 -0
  73. package/dist/commonjs/models/mintplanlineinput.d.ts.map +1 -0
  74. package/dist/commonjs/models/mintplanlineinput.js +50 -0
  75. package/dist/commonjs/models/mintplanlineinput.js.map +1 -0
  76. package/dist/commonjs/models/mintplanlineref.d.ts +12 -0
  77. package/dist/commonjs/models/mintplanlineref.d.ts.map +1 -0
  78. package/dist/commonjs/models/mintplanlineref.js +48 -0
  79. package/dist/commonjs/models/mintplanlineref.js.map +1 -0
  80. package/dist/commonjs/models/mintplanversionrequest.d.ts +8 -30
  81. package/dist/commonjs/models/mintplanversionrequest.d.ts.map +1 -1
  82. package/dist/commonjs/models/mintplanversionrequest.js +4 -13
  83. package/dist/commonjs/models/mintplanversionrequest.js.map +1 -1
  84. package/dist/commonjs/models/operations/createexternalreference.d.ts +3 -0
  85. package/dist/commonjs/models/operations/createexternalreference.d.ts.map +1 -1
  86. package/dist/commonjs/models/operations/createexternalreference.js.map +1 -1
  87. package/dist/commonjs/models/operations/createitem.d.ts +3 -0
  88. package/dist/commonjs/models/operations/createitem.d.ts.map +1 -1
  89. package/dist/commonjs/models/operations/createitem.js.map +1 -1
  90. package/dist/commonjs/models/operations/createplan.d.ts +3 -3
  91. package/dist/commonjs/models/operations/createplan.d.ts.map +1 -1
  92. package/dist/commonjs/models/operations/createplan.js +1 -1
  93. package/dist/commonjs/models/operations/createplan.js.map +1 -1
  94. package/dist/commonjs/models/operations/listbillingschedules.d.ts +1 -1
  95. package/dist/commonjs/models/operations/listbillingschedules.d.ts.map +1 -1
  96. package/dist/commonjs/models/operations/listbillingschedules.js +1 -1
  97. package/dist/commonjs/models/operations/listbillingschedules.js.map +1 -1
  98. package/dist/commonjs/models/operations/listpaymentsessions.d.ts +1 -1
  99. package/dist/commonjs/models/operations/listpaymentsessions.d.ts.map +1 -1
  100. package/dist/commonjs/models/operations/listpaymentsessions.js +1 -1
  101. package/dist/commonjs/models/operations/listpaymentsessions.js.map +1 -1
  102. package/dist/commonjs/models/operations/listprices.d.ts +1 -1
  103. package/dist/commonjs/models/operations/listprices.d.ts.map +1 -1
  104. package/dist/commonjs/models/operations/listprices.js +1 -1
  105. package/dist/commonjs/models/operations/listprices.js.map +1 -1
  106. package/dist/commonjs/models/order.d.ts +2 -2
  107. package/dist/commonjs/models/order.d.ts.map +1 -1
  108. package/dist/commonjs/models/order.js +2 -2
  109. package/dist/commonjs/models/order.js.map +1 -1
  110. package/dist/commonjs/models/orderapproval.d.ts +38 -0
  111. package/dist/commonjs/models/orderapproval.d.ts.map +1 -0
  112. package/dist/commonjs/models/{schemasapproval.js → orderapproval.js} +14 -27
  113. package/dist/commonjs/models/orderapproval.js.map +1 -0
  114. package/dist/commonjs/models/orderbillingschedule.d.ts +72 -0
  115. package/dist/commonjs/models/orderbillingschedule.d.ts.map +1 -0
  116. package/dist/commonjs/models/{schemasbillingschedule.js → orderbillingschedule.js} +22 -24
  117. package/dist/commonjs/models/orderbillingschedule.js.map +1 -0
  118. package/dist/commonjs/models/paymentsession.d.ts +41 -18
  119. package/dist/commonjs/models/paymentsession.d.ts.map +1 -1
  120. package/dist/commonjs/models/paymentsession.js +13 -14
  121. package/dist/commonjs/models/paymentsession.js.map +1 -1
  122. package/dist/commonjs/models/plan.d.ts +2 -2
  123. package/dist/commonjs/models/plan.d.ts.map +1 -1
  124. package/dist/commonjs/models/plan.js +2 -2
  125. package/dist/commonjs/models/plan.js.map +1 -1
  126. package/dist/commonjs/models/planlineinput.d.ts +23 -0
  127. package/dist/commonjs/models/planlineinput.d.ts.map +1 -0
  128. package/dist/commonjs/models/planlineinput.js +50 -0
  129. package/dist/commonjs/models/planlineinput.js.map +1 -0
  130. package/dist/commonjs/models/planlineref.d.ts +12 -0
  131. package/dist/commonjs/models/planlineref.d.ts.map +1 -0
  132. package/dist/commonjs/models/planlineref.js +48 -0
  133. package/dist/commonjs/models/planlineref.js.map +1 -0
  134. package/dist/{esm/models/schemasprice.d.ts → commonjs/models/planprice.d.ts} +55 -37
  135. package/dist/commonjs/models/planprice.d.ts.map +1 -0
  136. package/dist/commonjs/models/{schemasprice.js → planprice.js} +39 -22
  137. package/dist/commonjs/models/planprice.js.map +1 -0
  138. package/dist/commonjs/models/planversionpriceslot.d.ts +5 -1
  139. package/dist/commonjs/models/planversionpriceslot.d.ts.map +1 -1
  140. package/dist/commonjs/models/planversionpriceslot.js +1 -0
  141. package/dist/commonjs/models/planversionpriceslot.js.map +1 -1
  142. package/dist/commonjs/models/price.d.ts +25 -43
  143. package/dist/commonjs/models/price.d.ts.map +1 -1
  144. package/dist/commonjs/models/price.js +11 -29
  145. package/dist/commonjs/models/price.js.map +1 -1
  146. package/dist/commonjs/sdk/approvals.d.ts +3 -3
  147. package/dist/commonjs/sdk/approvals.d.ts.map +1 -1
  148. package/dist/commonjs/sdk/billingschedules.d.ts +3 -3
  149. package/dist/commonjs/sdk/billingschedules.d.ts.map +1 -1
  150. package/dist/commonjs/sdk/customers.d.ts +1 -1
  151. package/dist/commonjs/sdk/customers.d.ts.map +1 -1
  152. package/dist/commonjs/sdk/orders.d.ts +1 -1
  153. package/dist/commonjs/sdk/orders.d.ts.map +1 -1
  154. package/dist/commonjs/sdk/plans.d.ts +1 -1
  155. package/dist/commonjs/sdk/plans.js +1 -1
  156. package/dist/commonjs/sdk/prices.d.ts +3 -3
  157. package/dist/commonjs/sdk/prices.d.ts.map +1 -1
  158. package/dist/esm/funcs/approvalsCreateApproval.d.ts +1 -1
  159. package/dist/esm/funcs/approvalsCreateApproval.d.ts.map +1 -1
  160. package/dist/esm/funcs/approvalsCreateApproval.js +1 -1
  161. package/dist/esm/funcs/approvalsCreateApproval.js.map +1 -1
  162. package/dist/esm/funcs/approvalsGetApproval.d.ts +1 -1
  163. package/dist/esm/funcs/approvalsGetApproval.d.ts.map +1 -1
  164. package/dist/esm/funcs/approvalsGetApproval.js +1 -1
  165. package/dist/esm/funcs/approvalsGetApproval.js.map +1 -1
  166. package/dist/esm/funcs/approvalsUpdateApproval.d.ts +1 -1
  167. package/dist/esm/funcs/approvalsUpdateApproval.d.ts.map +1 -1
  168. package/dist/esm/funcs/approvalsUpdateApproval.js +1 -1
  169. package/dist/esm/funcs/approvalsUpdateApproval.js.map +1 -1
  170. package/dist/esm/funcs/billingSchedulesCreateBillingSchedule.d.ts +1 -1
  171. package/dist/esm/funcs/billingSchedulesCreateBillingSchedule.d.ts.map +1 -1
  172. package/dist/esm/funcs/billingSchedulesCreateBillingSchedule.js +1 -1
  173. package/dist/esm/funcs/billingSchedulesCreateBillingSchedule.js.map +1 -1
  174. package/dist/esm/funcs/billingSchedulesGetBillingSchedule.d.ts +1 -1
  175. package/dist/esm/funcs/billingSchedulesGetBillingSchedule.d.ts.map +1 -1
  176. package/dist/esm/funcs/billingSchedulesGetBillingSchedule.js +1 -1
  177. package/dist/esm/funcs/billingSchedulesGetBillingSchedule.js.map +1 -1
  178. package/dist/esm/funcs/billingSchedulesUpdateBillingSchedule.d.ts +1 -1
  179. package/dist/esm/funcs/billingSchedulesUpdateBillingSchedule.d.ts.map +1 -1
  180. package/dist/esm/funcs/billingSchedulesUpdateBillingSchedule.js +1 -1
  181. package/dist/esm/funcs/billingSchedulesUpdateBillingSchedule.js.map +1 -1
  182. package/dist/esm/funcs/customersCreateCustomerPaymentMethod.d.ts +1 -1
  183. package/dist/esm/funcs/customersCreateCustomerPaymentMethod.d.ts.map +1 -1
  184. package/dist/esm/funcs/customersCreateCustomerPaymentMethod.js +1 -1
  185. package/dist/esm/funcs/customersCreateCustomerPaymentMethod.js.map +1 -1
  186. package/dist/esm/funcs/ordersCreateOrderApproval.d.ts +1 -1
  187. package/dist/esm/funcs/ordersCreateOrderApproval.d.ts.map +1 -1
  188. package/dist/esm/funcs/ordersCreateOrderApproval.js +1 -1
  189. package/dist/esm/funcs/ordersCreateOrderApproval.js.map +1 -1
  190. package/dist/esm/funcs/plansMintPlanVersion.d.ts +1 -1
  191. package/dist/esm/funcs/plansMintPlanVersion.js +1 -1
  192. package/dist/esm/funcs/pricesCreate.d.ts +1 -1
  193. package/dist/esm/funcs/pricesCreate.d.ts.map +1 -1
  194. package/dist/esm/funcs/pricesCreate.js +1 -1
  195. package/dist/esm/funcs/pricesCreate.js.map +1 -1
  196. package/dist/esm/funcs/pricesGet.d.ts +1 -1
  197. package/dist/esm/funcs/pricesGet.d.ts.map +1 -1
  198. package/dist/esm/funcs/pricesGet.js +1 -1
  199. package/dist/esm/funcs/pricesGet.js.map +1 -1
  200. package/dist/esm/funcs/pricesUpdate.d.ts +1 -1
  201. package/dist/esm/funcs/pricesUpdate.d.ts.map +1 -1
  202. package/dist/esm/funcs/pricesUpdate.js +1 -1
  203. package/dist/esm/funcs/pricesUpdate.js.map +1 -1
  204. package/dist/esm/lib/config.d.ts +2 -2
  205. package/dist/esm/lib/config.js +2 -2
  206. package/dist/esm/models/approval.d.ts +17 -2
  207. package/dist/esm/models/approval.d.ts.map +1 -1
  208. package/dist/esm/models/approval.js +15 -2
  209. package/dist/esm/models/approval.js.map +1 -1
  210. package/dist/esm/models/approvallist.d.ts +2 -2
  211. package/dist/esm/models/approvallist.d.ts.map +1 -1
  212. package/dist/esm/models/approvallist.js +2 -2
  213. package/dist/esm/models/approvallist.js.map +1 -1
  214. package/dist/esm/models/billingschedule.d.ts +6 -4
  215. package/dist/esm/models/billingschedule.d.ts.map +1 -1
  216. package/dist/esm/models/billingschedule.js +3 -1
  217. package/dist/esm/models/billingschedule.js.map +1 -1
  218. package/dist/esm/models/customerpaymentsession.d.ts +53 -0
  219. package/dist/esm/models/customerpaymentsession.d.ts.map +1 -0
  220. package/dist/esm/models/customerpaymentsession.js +44 -0
  221. package/dist/esm/models/customerpaymentsession.js.map +1 -0
  222. package/dist/esm/models/index.d.ts +8 -4
  223. package/dist/esm/models/index.d.ts.map +1 -1
  224. package/dist/esm/models/index.js +8 -4
  225. package/dist/esm/models/index.js.map +1 -1
  226. package/dist/esm/models/item.d.ts +3 -0
  227. package/dist/esm/models/item.d.ts.map +1 -1
  228. package/dist/esm/models/item.js.map +1 -1
  229. package/dist/esm/models/mintplanlineinput.d.ts +23 -0
  230. package/dist/esm/models/mintplanlineinput.d.ts.map +1 -0
  231. package/dist/esm/models/mintplanlineinput.js +13 -0
  232. package/dist/esm/models/mintplanlineinput.js.map +1 -0
  233. package/dist/esm/models/mintplanlineref.d.ts +12 -0
  234. package/dist/esm/models/mintplanlineref.d.ts.map +1 -0
  235. package/dist/esm/models/mintplanlineref.js +11 -0
  236. package/dist/esm/models/mintplanlineref.js.map +1 -0
  237. package/dist/esm/models/mintplanversionrequest.d.ts +8 -30
  238. package/dist/esm/models/mintplanversionrequest.d.ts.map +1 -1
  239. package/dist/esm/models/mintplanversionrequest.js +3 -11
  240. package/dist/esm/models/mintplanversionrequest.js.map +1 -1
  241. package/dist/esm/models/operations/createexternalreference.d.ts +3 -0
  242. package/dist/esm/models/operations/createexternalreference.d.ts.map +1 -1
  243. package/dist/esm/models/operations/createexternalreference.js.map +1 -1
  244. package/dist/esm/models/operations/createitem.d.ts +3 -0
  245. package/dist/esm/models/operations/createitem.d.ts.map +1 -1
  246. package/dist/esm/models/operations/createitem.js.map +1 -1
  247. package/dist/esm/models/operations/createplan.d.ts +3 -3
  248. package/dist/esm/models/operations/createplan.d.ts.map +1 -1
  249. package/dist/esm/models/operations/createplan.js +1 -1
  250. package/dist/esm/models/operations/createplan.js.map +1 -1
  251. package/dist/esm/models/operations/listbillingschedules.d.ts +1 -1
  252. package/dist/esm/models/operations/listbillingschedules.d.ts.map +1 -1
  253. package/dist/esm/models/operations/listbillingschedules.js +1 -1
  254. package/dist/esm/models/operations/listbillingschedules.js.map +1 -1
  255. package/dist/esm/models/operations/listpaymentsessions.d.ts +1 -1
  256. package/dist/esm/models/operations/listpaymentsessions.d.ts.map +1 -1
  257. package/dist/esm/models/operations/listpaymentsessions.js +1 -1
  258. package/dist/esm/models/operations/listpaymentsessions.js.map +1 -1
  259. package/dist/esm/models/operations/listprices.d.ts +1 -1
  260. package/dist/esm/models/operations/listprices.d.ts.map +1 -1
  261. package/dist/esm/models/operations/listprices.js +1 -1
  262. package/dist/esm/models/operations/listprices.js.map +1 -1
  263. package/dist/esm/models/order.d.ts +2 -2
  264. package/dist/esm/models/order.d.ts.map +1 -1
  265. package/dist/esm/models/order.js +2 -2
  266. package/dist/esm/models/order.js.map +1 -1
  267. package/dist/esm/models/orderapproval.d.ts +38 -0
  268. package/dist/esm/models/orderapproval.d.ts.map +1 -0
  269. package/dist/esm/models/orderapproval.js +38 -0
  270. package/dist/esm/models/orderapproval.js.map +1 -0
  271. package/dist/esm/models/orderbillingschedule.d.ts +72 -0
  272. package/dist/esm/models/orderbillingschedule.d.ts.map +1 -0
  273. package/dist/esm/models/orderbillingschedule.js +64 -0
  274. package/dist/esm/models/orderbillingschedule.js.map +1 -0
  275. package/dist/esm/models/paymentsession.d.ts +41 -18
  276. package/dist/esm/models/paymentsession.d.ts.map +1 -1
  277. package/dist/esm/models/paymentsession.js +12 -13
  278. package/dist/esm/models/paymentsession.js.map +1 -1
  279. package/dist/esm/models/plan.d.ts +2 -2
  280. package/dist/esm/models/plan.d.ts.map +1 -1
  281. package/dist/esm/models/plan.js +2 -2
  282. package/dist/esm/models/plan.js.map +1 -1
  283. package/dist/esm/models/planlineinput.d.ts +23 -0
  284. package/dist/esm/models/planlineinput.d.ts.map +1 -0
  285. package/dist/esm/models/planlineinput.js +13 -0
  286. package/dist/esm/models/planlineinput.js.map +1 -0
  287. package/dist/esm/models/planlineref.d.ts +12 -0
  288. package/dist/esm/models/planlineref.d.ts.map +1 -0
  289. package/dist/esm/models/planlineref.js +11 -0
  290. package/dist/esm/models/planlineref.js.map +1 -0
  291. package/dist/{commonjs/models/schemasprice.d.ts → esm/models/planprice.d.ts} +55 -37
  292. package/dist/esm/models/planprice.d.ts.map +1 -0
  293. package/dist/esm/models/planprice.js +65 -0
  294. package/dist/esm/models/planprice.js.map +1 -0
  295. package/dist/esm/models/planversionpriceslot.d.ts +5 -1
  296. package/dist/esm/models/planversionpriceslot.d.ts.map +1 -1
  297. package/dist/esm/models/planversionpriceslot.js +1 -0
  298. package/dist/esm/models/planversionpriceslot.js.map +1 -1
  299. package/dist/esm/models/price.d.ts +25 -43
  300. package/dist/esm/models/price.d.ts.map +1 -1
  301. package/dist/esm/models/price.js +10 -28
  302. package/dist/esm/models/price.js.map +1 -1
  303. package/dist/esm/sdk/approvals.d.ts +3 -3
  304. package/dist/esm/sdk/approvals.d.ts.map +1 -1
  305. package/dist/esm/sdk/billingschedules.d.ts +3 -3
  306. package/dist/esm/sdk/billingschedules.d.ts.map +1 -1
  307. package/dist/esm/sdk/customers.d.ts +1 -1
  308. package/dist/esm/sdk/customers.d.ts.map +1 -1
  309. package/dist/esm/sdk/orders.d.ts +1 -1
  310. package/dist/esm/sdk/orders.d.ts.map +1 -1
  311. package/dist/esm/sdk/plans.d.ts +1 -1
  312. package/dist/esm/sdk/plans.js +1 -1
  313. package/dist/esm/sdk/prices.d.ts +3 -3
  314. package/dist/esm/sdk/prices.d.ts.map +1 -1
  315. package/jsr.json +1 -1
  316. package/package.json +1 -1
  317. package/src/funcs/approvalsCreateApproval.ts +4 -4
  318. package/src/funcs/approvalsGetApproval.ts +4 -4
  319. package/src/funcs/approvalsUpdateApproval.ts +4 -4
  320. package/src/funcs/billingSchedulesCreateBillingSchedule.ts +4 -4
  321. package/src/funcs/billingSchedulesGetBillingSchedule.ts +4 -4
  322. package/src/funcs/billingSchedulesUpdateBillingSchedule.ts +4 -4
  323. package/src/funcs/customersCreateCustomerPaymentMethod.ts +4 -4
  324. package/src/funcs/ordersCreateOrderApproval.ts +4 -4
  325. package/src/funcs/plansMintPlanVersion.ts +1 -1
  326. package/src/funcs/pricesCreate.ts +4 -4
  327. package/src/funcs/pricesGet.ts +4 -4
  328. package/src/funcs/pricesUpdate.ts +4 -4
  329. package/src/lib/config.ts +2 -2
  330. package/src/models/approval.ts +26 -4
  331. package/src/models/approvallist.ts +3 -6
  332. package/src/models/billingschedule.ts +13 -5
  333. package/src/models/customerpaymentsession.ts +100 -0
  334. package/src/models/index.ts +8 -4
  335. package/src/models/item.ts +3 -0
  336. package/src/models/mintplanlineinput.ts +43 -0
  337. package/src/models/mintplanlineref.ts +31 -0
  338. package/src/models/mintplanversionrequest.ts +14 -46
  339. package/src/models/operations/createexternalreference.ts +3 -0
  340. package/src/models/operations/createitem.ts +3 -0
  341. package/src/models/operations/createplan.ts +4 -4
  342. package/src/models/operations/listbillingschedules.ts +2 -2
  343. package/src/models/operations/listpaymentsessions.ts +2 -2
  344. package/src/models/operations/listprices.ts +2 -2
  345. package/src/models/order.ts +6 -6
  346. package/src/models/orderapproval.ts +81 -0
  347. package/src/models/orderbillingschedule.ts +138 -0
  348. package/src/models/paymentsession.ts +49 -26
  349. package/src/models/plan.ts +3 -3
  350. package/src/models/planlineinput.ts +39 -0
  351. package/src/models/planlineref.ts +29 -0
  352. package/src/models/{schemasprice.ts → planprice.ts} +80 -58
  353. package/src/models/planversionpriceslot.ts +6 -1
  354. package/src/models/price.ts +35 -58
  355. package/src/sdk/approvals.ts +3 -3
  356. package/src/sdk/billingschedules.ts +3 -3
  357. package/src/sdk/customers.ts +1 -1
  358. package/src/sdk/orders.ts +1 -1
  359. package/src/sdk/plans.ts +1 -1
  360. package/src/sdk/prices.ts +3 -3
  361. package/dist/commonjs/models/schemasapproval.d.ts +0 -53
  362. package/dist/commonjs/models/schemasapproval.d.ts.map +0 -1
  363. package/dist/commonjs/models/schemasapproval.js.map +0 -1
  364. package/dist/commonjs/models/schemasbillingschedule.d.ts +0 -74
  365. package/dist/commonjs/models/schemasbillingschedule.d.ts.map +0 -1
  366. package/dist/commonjs/models/schemasbillingschedule.js.map +0 -1
  367. package/dist/commonjs/models/schemaspaymentsession.d.ts +0 -76
  368. package/dist/commonjs/models/schemaspaymentsession.d.ts.map +0 -1
  369. package/dist/commonjs/models/schemaspaymentsession.js.map +0 -1
  370. package/dist/commonjs/models/schemasprice.d.ts.map +0 -1
  371. package/dist/commonjs/models/schemasprice.js.map +0 -1
  372. package/dist/esm/models/schemasapproval.d.ts +0 -53
  373. package/dist/esm/models/schemasapproval.d.ts.map +0 -1
  374. package/dist/esm/models/schemasapproval.js +0 -51
  375. package/dist/esm/models/schemasapproval.js.map +0 -1
  376. package/dist/esm/models/schemasbillingschedule.d.ts +0 -74
  377. package/dist/esm/models/schemasbillingschedule.d.ts.map +0 -1
  378. package/dist/esm/models/schemasbillingschedule.js +0 -66
  379. package/dist/esm/models/schemasbillingschedule.js.map +0 -1
  380. package/dist/esm/models/schemaspaymentsession.d.ts +0 -76
  381. package/dist/esm/models/schemaspaymentsession.d.ts.map +0 -1
  382. package/dist/esm/models/schemaspaymentsession.js +0 -43
  383. package/dist/esm/models/schemaspaymentsession.js.map +0 -1
  384. package/dist/esm/models/schemasprice.d.ts.map +0 -1
  385. package/dist/esm/models/schemasprice.js +0 -48
  386. package/dist/esm/models/schemasprice.js.map +0 -1
  387. package/src/models/schemasapproval.ts +0 -108
  388. package/src/models/schemasbillingschedule.ts +0 -148
  389. package/src/models/schemaspaymentsession.ts +0 -123
@@ -0,0 +1,39 @@
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 a plan: the price it bills, and the key that names it.
9
+ */
10
+ export type PlanLineInput = {
11
+ /**
12
+ * Unique identifier for a price
13
+ */
14
+ priceId: string;
15
+ /**
16
+ * The name you give one line of a plan, for example `platform_fee`. It starts with a lowercase letter or a digit, contains only lowercase letters, digits, hyphens and underscores, and is at most 64 characters. A key names one line for the life of the plan: every version that keeps the line carries the same key, and a key that you drop from one version and supply again on a later version says that the line resumed. Keys are compared exactly, so `Platform_Fee` is not accepted.
17
+ */
18
+ key?: string | undefined;
19
+ };
20
+
21
+ /** @internal */
22
+ export type PlanLineInput$Outbound = {
23
+ priceId: string;
24
+ key?: string | undefined;
25
+ };
26
+
27
+ /** @internal */
28
+ export const PlanLineInput$outboundSchema: z.ZodType<
29
+ PlanLineInput$Outbound,
30
+ z.ZodTypeDef,
31
+ PlanLineInput
32
+ > = z.object({
33
+ priceId: z.string(),
34
+ key: z.string().optional(),
35
+ });
36
+
37
+ export function planLineInputToJSON(planLineInput: PlanLineInput): string {
38
+ return JSON.stringify(PlanLineInput$outboundSchema.parse(planLineInput));
39
+ }
@@ -0,0 +1,29 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import {
7
+ PlanLineInput,
8
+ PlanLineInput$Outbound,
9
+ PlanLineInput$outboundSchema,
10
+ } from "./planlineinput.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 PlanLineRef = PlanLineInput | string;
16
+
17
+ /** @internal */
18
+ export type PlanLineRef$Outbound = PlanLineInput$Outbound | string;
19
+
20
+ /** @internal */
21
+ export const PlanLineRef$outboundSchema: z.ZodType<
22
+ PlanLineRef$Outbound,
23
+ z.ZodTypeDef,
24
+ PlanLineRef
25
+ > = z.union([PlanLineInput$outboundSchema, z.string()]);
26
+
27
+ export function planLineRefToJSON(planLineRef: PlanLineRef): string {
28
+ return JSON.stringify(PlanLineRef$outboundSchema.parse(planLineRef));
29
+ }
@@ -8,65 +8,66 @@ import { ClosedEnum } from "../types/enums.js";
8
8
  import { Result as SafeParseResult } from "../types/fp.js";
9
9
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
10
10
  import { PriceFeature, PriceFeature$inboundSchema } from "./pricefeature.js";
11
- import { PriceModel, PriceModel$inboundSchema } from "./pricemodel.js";
12
- import {
13
- PriceProperties,
14
- PriceProperties$inboundSchema,
15
- } from "./priceproperties.js";
16
11
  import { PriceTax, PriceTax$inboundSchema } from "./pricetax.js";
17
- import { RateType, RateType$inboundSchema } from "./ratetype.js";
18
12
 
19
- export const SchemasPriceObject = {
13
+ export const PlanPriceObject = {
20
14
  Price: "price",
21
15
  } as const;
22
- export type SchemasPriceObject = ClosedEnum<typeof SchemasPriceObject>;
16
+ export type PlanPriceObject = ClosedEnum<typeof PlanPriceObject>;
23
17
 
24
- export const SchemasPricePaymentTerm = {
18
+ export const PlanPriceModel = {
19
+ Standard: "standard",
20
+ Dynamic: "dynamic",
21
+ Volume: "volume",
22
+ Percentage: "percentage",
23
+ } as const;
24
+ export type PlanPriceModel = ClosedEnum<typeof PlanPriceModel>;
25
+
26
+ export const PlanPricePaymentTerm = {
25
27
  InArrears: "in_arrears",
26
28
  InAdvance: "in_advance",
27
29
  } as const;
28
- export type SchemasPricePaymentTerm = ClosedEnum<
29
- typeof SchemasPricePaymentTerm
30
- >;
30
+ export type PlanPricePaymentTerm = ClosedEnum<typeof PlanPricePaymentTerm>;
31
+
32
+ /**
33
+ * What properties.unitPrice is denominated in. 'amount' (the default) is an amount of the invoice currency for each unit metered, so the quantity is the multiplier. 'proportion' is the reverse: a dimensionless share of a currency-denominated quantity, so '0.02' is 2% and the invoice prints '2.00%'. Presentation only. Requires a standard metered price in real currency.
34
+ */
35
+ export const PlanPriceRateType = {
36
+ Amount: "amount",
37
+ Proportion: "proportion",
38
+ } as const;
39
+ /**
40
+ * What properties.unitPrice is denominated in. 'amount' (the default) is an amount of the invoice currency for each unit metered, so the quantity is the multiplier. 'proportion' is the reverse: a dimensionless share of a currency-denominated quantity, so '0.02' is 2% and the invoice prints '2.00%'. Presentation only. Requires a standard metered price in real currency.
41
+ */
42
+ export type PlanPriceRateType = ClosedEnum<typeof PlanPriceRateType>;
31
43
 
32
- export type SchemasPrice = {
44
+ export type PlanPrice = {
33
45
  /**
34
46
  * Unique identifier for a price
35
47
  */
36
48
  id: string;
37
- object: SchemasPriceObject;
49
+ object: PlanPriceObject;
38
50
  /**
39
- * Unique identifier for a billable metric
51
+ * Unique identifier for an organization
40
52
  */
53
+ merchantId: string;
41
54
  billableMetricId?: string | undefined;
42
55
  /**
43
- * The unique identifier for the fee referred to by this price. Present when price is linked to a fee.
56
+ * The unique identifier for the fee referred to by this price
44
57
  */
45
58
  feeId?: string | undefined;
46
59
  /**
47
- * Unique identifier for a pricing unit
48
- */
49
- pricingUnitId?: string | undefined;
50
- /**
51
- * Unique identifier for an organization
52
- */
53
- merchantId: string;
54
- /**
55
- * ISO 8601 duration. 'P0D' for one-time, 'P1M' for monthly, 'P1Y' for yearly. Required for fees, optional for billable metrics. Defaults to plan's billingCadence if not specified.
60
+ * ISO 8601 duration for billing frequency (e.g., P1M for monthly)
56
61
  */
57
62
  billingCadence?: string | null | undefined;
58
63
  createdAt: Date;
64
+ currency?: string | undefined;
65
+ description?: string | undefined;
59
66
  invoiceDisplayName: string;
60
- /**
61
- * Presentation only. Prices sharing this value, within one billing period, print as a single row on the rendered invoice PDF and are described by this string. Every member still bills its own line item on the ledger, this API and the compliance document. The combined row's rate is derived from the members' own rates. Requires the 'standard' pricing model. Sample values: 'Cross Border Fees', 'FX Fees'
62
- */
63
- invoiceDisplayGroup?: string | null | undefined;
64
- /**
65
- * Pricing model of a price as returned by the API. Includes the legacy models ('dynamic', 'percentage') retained for existing prices; 'standard' and 'volume' can be created (see PriceModelInput).
66
- */
67
- model?: PriceModel | undefined;
68
- paymentTerm: SchemasPricePaymentTerm;
69
- properties: PriceProperties;
67
+ model: PlanPriceModel;
68
+ paymentTerm: PlanPricePaymentTerm;
69
+ properties: { [k: string]: any };
70
+ unitAmount?: string | undefined;
70
71
  updatedAt: Date;
71
72
  /**
72
73
  * Features associated with this price
@@ -83,61 +84,82 @@ export type SchemasPrice = {
83
84
  /**
84
85
  * What properties.unitPrice is denominated in. 'amount' (the default) is an amount of the invoice currency for each unit metered, so the quantity is the multiplier. 'proportion' is the reverse: a dimensionless share of a currency-denominated quantity, so '0.02' is 2% and the invoice prints '2.00%'. Presentation only. Requires a standard metered price in real currency.
85
86
  */
86
- rateType?: RateType | undefined;
87
+ rateType: PlanPriceRateType;
88
+ /**
89
+ * Presentation only. Prices sharing this value, within one billing period, print as a single row on the rendered invoice PDF and are described by this string. Every member still bills its own line item on the ledger, this API and the compliance document. The combined row's rate is derived from the members' own rates. Requires the 'standard' pricing model. Sample values: 'Cross Border Fees', 'FX Fees'
90
+ */
91
+ invoiceDisplayGroup?: string | null | undefined;
92
+ /**
93
+ * Unique identifier for a pricing unit
94
+ */
95
+ pricingUnitId?: string | undefined;
87
96
  /**
88
97
  * A price's tax declaration. Optional on write — a price that declares nothing is `IN_SCOPE`, and is billed and taxed exactly as it was before this object existed. Always present on read. Replaced as a whole on update: send the object to change it, omit it to leave it alone.
89
98
  */
90
99
  tax: PriceTax;
91
100
  /**
92
- * Quantity for invoice line items. Total per period = quantity × unitPrice. Only supported for fee prices; metered prices derive quantity from usage. Defaults to 1.
101
+ * Quantity used when generating invoice line items for this price. Total per period = quantity × unitPrice. Only supported for fee prices; metered prices derive quantity from usage. Defaults to 1.
93
102
  */
94
103
  quantity: number;
95
104
  };
96
105
 
97
106
  /** @internal */
98
- export const SchemasPriceObject$inboundSchema: z.ZodNativeEnum<
99
- typeof SchemasPriceObject
100
- > = z.nativeEnum(SchemasPriceObject);
107
+ export const PlanPriceObject$inboundSchema: z.ZodNativeEnum<
108
+ typeof PlanPriceObject
109
+ > = z.nativeEnum(PlanPriceObject);
101
110
 
102
111
  /** @internal */
103
- export const SchemasPricePaymentTerm$inboundSchema: z.ZodNativeEnum<
104
- typeof SchemasPricePaymentTerm
105
- > = z.nativeEnum(SchemasPricePaymentTerm);
112
+ export const PlanPriceModel$inboundSchema: z.ZodNativeEnum<
113
+ typeof PlanPriceModel
114
+ > = z.nativeEnum(PlanPriceModel);
106
115
 
107
116
  /** @internal */
108
- export const SchemasPrice$inboundSchema: z.ZodType<
109
- SchemasPrice,
117
+ export const PlanPricePaymentTerm$inboundSchema: z.ZodNativeEnum<
118
+ typeof PlanPricePaymentTerm
119
+ > = z.nativeEnum(PlanPricePaymentTerm);
120
+
121
+ /** @internal */
122
+ export const PlanPriceRateType$inboundSchema: z.ZodNativeEnum<
123
+ typeof PlanPriceRateType
124
+ > = z.nativeEnum(PlanPriceRateType);
125
+
126
+ /** @internal */
127
+ export const PlanPrice$inboundSchema: z.ZodType<
128
+ PlanPrice,
110
129
  z.ZodTypeDef,
111
130
  unknown
112
131
  > = z.object({
113
132
  id: z.string(),
114
- object: SchemasPriceObject$inboundSchema.default("price"),
133
+ object: PlanPriceObject$inboundSchema.default("price"),
134
+ merchantId: z.string(),
115
135
  billableMetricId: z.string().optional(),
116
136
  feeId: z.string().optional(),
117
- pricingUnitId: z.string().optional(),
118
- merchantId: z.string(),
119
137
  billingCadence: z.nullable(z.string()).optional(),
120
138
  createdAt: z.string().datetime({ offset: true }).transform(v => new Date(v)),
139
+ currency: z.string().optional(),
140
+ description: z.string().optional(),
121
141
  invoiceDisplayName: z.string(),
122
- invoiceDisplayGroup: z.nullable(z.string()).optional(),
123
- model: PriceModel$inboundSchema.optional(),
124
- paymentTerm: SchemasPricePaymentTerm$inboundSchema,
125
- properties: PriceProperties$inboundSchema,
142
+ model: PlanPriceModel$inboundSchema,
143
+ paymentTerm: PlanPricePaymentTerm$inboundSchema,
144
+ properties: z.record(z.any()),
145
+ unitAmount: z.string().optional(),
126
146
  updatedAt: z.string().datetime({ offset: true }).transform(v => new Date(v)),
127
147
  features: z.array(PriceFeature$inboundSchema).optional(),
128
148
  grantDiscountEnabled: z.boolean().default(false),
129
149
  isObligation: z.boolean().default(false),
130
- rateType: RateType$inboundSchema.optional(),
150
+ rateType: PlanPriceRateType$inboundSchema.default("amount"),
151
+ invoiceDisplayGroup: z.nullable(z.string()).optional(),
152
+ pricingUnitId: z.string().optional(),
131
153
  tax: PriceTax$inboundSchema,
132
- quantity: z.number().int(),
154
+ quantity: z.number().int().default(1),
133
155
  });
134
156
 
135
- export function schemasPriceFromJSON(
157
+ export function planPriceFromJSON(
136
158
  jsonString: string,
137
- ): SafeParseResult<SchemasPrice, SDKValidationError> {
159
+ ): SafeParseResult<PlanPrice, SDKValidationError> {
138
160
  return safeParse(
139
161
  jsonString,
140
- (x) => SchemasPrice$inboundSchema.parse(JSON.parse(x)),
141
- `Failed to parse 'SchemasPrice' from JSON`,
162
+ (x) => PlanPrice$inboundSchema.parse(JSON.parse(x)),
163
+ `Failed to parse 'PlanPrice' from JSON`,
142
164
  );
143
165
  }
@@ -50,7 +50,7 @@ export type PlanVersionPriceSlotRateType = ClosedEnum<
50
50
  >;
51
51
 
52
52
  /**
53
- * One price slot on a plan version. Every `Price` field is present, plus `priceDeleted` layered on top.
53
+ * One price slot on a plan version. Every `Price` field is present, plus `key` and `priceDeleted` layered on top.
54
54
  */
55
55
  export type PlanVersionPriceSlot = {
56
56
  /**
@@ -112,6 +112,10 @@ export type PlanVersionPriceSlot = {
112
112
  * Quantity used when generating invoice line items for this price. Total per period = quantity × unitPrice. Only supported for fee prices; metered prices derive quantity from usage. Defaults to 1.
113
113
  */
114
114
  quantity: number;
115
+ /**
116
+ * The name of this line. Send it as the `key` of a subscription price-interval operation to address this line. A line created before keys could be supplied carries a generated key, which does not match the format that this API accepts for new keys.
117
+ */
118
+ key: string;
115
119
  /**
116
120
  * True when the underlying price this slot references has been soft-deleted.
117
121
  */
@@ -167,6 +171,7 @@ export const PlanVersionPriceSlot$inboundSchema: z.ZodType<
167
171
  pricingUnitId: z.string().optional(),
168
172
  tax: PriceTax$inboundSchema,
169
173
  quantity: z.number().int().default(1),
174
+ key: z.string(),
170
175
  priceDeleted: z.boolean(),
171
176
  });
172
177
 
@@ -8,39 +8,25 @@ import { ClosedEnum } from "../types/enums.js";
8
8
  import { Result as SafeParseResult } from "../types/fp.js";
9
9
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
10
10
  import { PriceFeature, PriceFeature$inboundSchema } from "./pricefeature.js";
11
+ import { PriceModel, PriceModel$inboundSchema } from "./pricemodel.js";
12
+ import {
13
+ PriceProperties,
14
+ PriceProperties$inboundSchema,
15
+ } from "./priceproperties.js";
11
16
  import { PriceTax, PriceTax$inboundSchema } from "./pricetax.js";
17
+ import { RateType, RateType$inboundSchema } from "./ratetype.js";
12
18
 
13
19
  export const PriceObject = {
14
20
  Price: "price",
15
21
  } as const;
16
22
  export type PriceObject = ClosedEnum<typeof PriceObject>;
17
23
 
18
- export const PriceModel1 = {
19
- Standard: "standard",
20
- Dynamic: "dynamic",
21
- Volume: "volume",
22
- Percentage: "percentage",
23
- } as const;
24
- export type PriceModel1 = ClosedEnum<typeof PriceModel1>;
25
-
26
24
  export const PricePaymentTerm = {
27
25
  InArrears: "in_arrears",
28
26
  InAdvance: "in_advance",
29
27
  } as const;
30
28
  export type PricePaymentTerm = ClosedEnum<typeof PricePaymentTerm>;
31
29
 
32
- /**
33
- * What properties.unitPrice is denominated in. 'amount' (the default) is an amount of the invoice currency for each unit metered, so the quantity is the multiplier. 'proportion' is the reverse: a dimensionless share of a currency-denominated quantity, so '0.02' is 2% and the invoice prints '2.00%'. Presentation only. Requires a standard metered price in real currency.
34
- */
35
- export const PriceRateType = {
36
- Amount: "amount",
37
- Proportion: "proportion",
38
- } as const;
39
- /**
40
- * What properties.unitPrice is denominated in. 'amount' (the default) is an amount of the invoice currency for each unit metered, so the quantity is the multiplier. 'proportion' is the reverse: a dimensionless share of a currency-denominated quantity, so '0.02' is 2% and the invoice prints '2.00%'. Presentation only. Requires a standard metered price in real currency.
41
- */
42
- export type PriceRateType = ClosedEnum<typeof PriceRateType>;
43
-
44
30
  export type Price = {
45
31
  /**
46
32
  * Unique identifier for a price
@@ -48,26 +34,37 @@ export type Price = {
48
34
  id: string;
49
35
  object: PriceObject;
50
36
  /**
51
- * Unique identifier for an organization
37
+ * Unique identifier for a billable metric
52
38
  */
53
- merchantId: string;
54
39
  billableMetricId?: string | undefined;
55
40
  /**
56
- * The unique identifier for the fee referred to by this price
41
+ * The unique identifier for the fee referred to by this price. Present when price is linked to a fee.
57
42
  */
58
43
  feeId?: string | undefined;
59
44
  /**
60
- * ISO 8601 duration for billing frequency (e.g., P1M for monthly)
45
+ * Unique identifier for a pricing unit
46
+ */
47
+ pricingUnitId?: string | undefined;
48
+ /**
49
+ * Unique identifier for an organization
50
+ */
51
+ merchantId: string;
52
+ /**
53
+ * ISO 8601 duration. 'P0D' for one-time, 'P1M' for monthly, 'P1Y' for yearly. Required for fees, optional for billable metrics. Defaults to plan's billingCadence if not specified.
61
54
  */
62
55
  billingCadence?: string | null | undefined;
63
56
  createdAt: Date;
64
- currency?: string | undefined;
65
- description?: string | undefined;
66
57
  invoiceDisplayName: string;
67
- model: PriceModel1;
58
+ /**
59
+ * Presentation only. Prices sharing this value, within one billing period, print as a single row on the rendered invoice PDF and are described by this string. Every member still bills its own line item on the ledger, this API and the compliance document. The combined row's rate is derived from the members' own rates. Requires the 'standard' pricing model. Sample values: 'Cross Border Fees', 'FX Fees'
60
+ */
61
+ invoiceDisplayGroup?: string | null | undefined;
62
+ /**
63
+ * Pricing model of a price as returned by the API. Includes the legacy models ('dynamic', 'percentage') retained for existing prices; 'standard' and 'volume' can be created (see PriceModelInput).
64
+ */
65
+ model?: PriceModel | undefined;
68
66
  paymentTerm: PricePaymentTerm;
69
- properties: { [k: string]: any };
70
- unitAmount?: string | undefined;
67
+ properties: PriceProperties;
71
68
  updatedAt: Date;
72
69
  /**
73
70
  * Features associated with this price
@@ -84,21 +81,13 @@ export type Price = {
84
81
  /**
85
82
  * What properties.unitPrice is denominated in. 'amount' (the default) is an amount of the invoice currency for each unit metered, so the quantity is the multiplier. 'proportion' is the reverse: a dimensionless share of a currency-denominated quantity, so '0.02' is 2% and the invoice prints '2.00%'. Presentation only. Requires a standard metered price in real currency.
86
83
  */
87
- rateType: PriceRateType;
88
- /**
89
- * Presentation only. Prices sharing this value, within one billing period, print as a single row on the rendered invoice PDF and are described by this string. Every member still bills its own line item on the ledger, this API and the compliance document. The combined row's rate is derived from the members' own rates. Requires the 'standard' pricing model. Sample values: 'Cross Border Fees', 'FX Fees'
90
- */
91
- invoiceDisplayGroup?: string | null | undefined;
92
- /**
93
- * Unique identifier for a pricing unit
94
- */
95
- pricingUnitId?: string | undefined;
84
+ rateType?: RateType | undefined;
96
85
  /**
97
86
  * A price's tax declaration. Optional on write — a price that declares nothing is `IN_SCOPE`, and is billed and taxed exactly as it was before this object existed. Always present on read. Replaced as a whole on update: send the object to change it, omit it to leave it alone.
98
87
  */
99
88
  tax: PriceTax;
100
89
  /**
101
- * Quantity used when generating invoice line items for this price. Total per period = quantity × unitPrice. Only supported for fee prices; metered prices derive quantity from usage. Defaults to 1.
90
+ * Quantity for invoice line items. Total per period = quantity × unitPrice. Only supported for fee prices; metered prices derive quantity from usage. Defaults to 1.
102
91
  */
103
92
  quantity: number;
104
93
  };
@@ -107,50 +96,38 @@ export type Price = {
107
96
  export const PriceObject$inboundSchema: z.ZodNativeEnum<typeof PriceObject> = z
108
97
  .nativeEnum(PriceObject);
109
98
 
110
- /** @internal */
111
- export const PriceModel1$inboundSchema: z.ZodNativeEnum<typeof PriceModel1> = z
112
- .nativeEnum(PriceModel1);
113
-
114
99
  /** @internal */
115
100
  export const PricePaymentTerm$inboundSchema: z.ZodNativeEnum<
116
101
  typeof PricePaymentTerm
117
102
  > = z.nativeEnum(PricePaymentTerm);
118
103
 
119
- /** @internal */
120
- export const PriceRateType$inboundSchema: z.ZodNativeEnum<
121
- typeof PriceRateType
122
- > = z.nativeEnum(PriceRateType);
123
-
124
104
  /** @internal */
125
105
  export const Price$inboundSchema: z.ZodType<Price, z.ZodTypeDef, unknown> = z
126
106
  .object({
127
107
  id: z.string(),
128
108
  object: PriceObject$inboundSchema.default("price"),
129
- merchantId: z.string(),
130
109
  billableMetricId: z.string().optional(),
131
110
  feeId: z.string().optional(),
111
+ pricingUnitId: z.string().optional(),
112
+ merchantId: z.string(),
132
113
  billingCadence: z.nullable(z.string()).optional(),
133
114
  createdAt: z.string().datetime({ offset: true }).transform(v =>
134
115
  new Date(v)
135
116
  ),
136
- currency: z.string().optional(),
137
- description: z.string().optional(),
138
117
  invoiceDisplayName: z.string(),
139
- model: PriceModel1$inboundSchema,
118
+ invoiceDisplayGroup: z.nullable(z.string()).optional(),
119
+ model: PriceModel$inboundSchema.optional(),
140
120
  paymentTerm: PricePaymentTerm$inboundSchema,
141
- properties: z.record(z.any()),
142
- unitAmount: z.string().optional(),
121
+ properties: PriceProperties$inboundSchema,
143
122
  updatedAt: z.string().datetime({ offset: true }).transform(v =>
144
123
  new Date(v)
145
124
  ),
146
125
  features: z.array(PriceFeature$inboundSchema).optional(),
147
126
  grantDiscountEnabled: z.boolean().default(false),
148
127
  isObligation: z.boolean().default(false),
149
- rateType: PriceRateType$inboundSchema.default("amount"),
150
- invoiceDisplayGroup: z.nullable(z.string()).optional(),
151
- pricingUnitId: z.string().optional(),
128
+ rateType: RateType$inboundSchema.optional(),
152
129
  tax: PriceTax$inboundSchema,
153
- quantity: z.number().int().default(1),
130
+ quantity: z.number().int(),
154
131
  });
155
132
 
156
133
  export function priceFromJSON(
@@ -18,7 +18,7 @@ export class Approvals extends ClientSDK {
18
18
  async createApproval(
19
19
  request: models.CreateApprovalRequest,
20
20
  options?: RequestOptions,
21
- ): Promise<models.SchemasApproval> {
21
+ ): Promise<models.Approval> {
22
22
  return unwrapAsync(approvalsCreateApproval(
23
23
  this,
24
24
  request,
@@ -46,7 +46,7 @@ export class Approvals extends ClientSDK {
46
46
  async getApproval(
47
47
  request: operations.GetApprovalRequest,
48
48
  options?: RequestOptions,
49
- ): Promise<models.SchemasApproval> {
49
+ ): Promise<models.Approval> {
50
50
  return unwrapAsync(approvalsGetApproval(
51
51
  this,
52
52
  request,
@@ -60,7 +60,7 @@ export class Approvals extends ClientSDK {
60
60
  async updateApproval(
61
61
  request: operations.UpdateApprovalRequest,
62
62
  options?: RequestOptions,
63
- ): Promise<models.SchemasApproval> {
63
+ ): Promise<models.Approval> {
64
64
  return unwrapAsync(approvalsUpdateApproval(
65
65
  this,
66
66
  request,
@@ -37,7 +37,7 @@ export class BillingSchedules extends ClientSDK {
37
37
  async createBillingSchedule(
38
38
  request: models.CreateBillingScheduleRequest,
39
39
  options?: RequestOptions,
40
- ): Promise<models.SchemasBillingSchedule> {
40
+ ): Promise<models.BillingSchedule> {
41
41
  return unwrapAsync(billingSchedulesCreateBillingSchedule(
42
42
  this,
43
43
  request,
@@ -51,7 +51,7 @@ export class BillingSchedules extends ClientSDK {
51
51
  async getBillingSchedule(
52
52
  request: operations.GetBillingScheduleRequest,
53
53
  options?: RequestOptions,
54
- ): Promise<models.SchemasBillingSchedule> {
54
+ ): Promise<models.BillingSchedule> {
55
55
  return unwrapAsync(billingSchedulesGetBillingSchedule(
56
56
  this,
57
57
  request,
@@ -65,7 +65,7 @@ export class BillingSchedules extends ClientSDK {
65
65
  async updateBillingSchedule(
66
66
  request: operations.UpdateBillingScheduleRequest,
67
67
  options?: RequestOptions,
68
- ): Promise<models.SchemasBillingSchedule> {
68
+ ): Promise<models.BillingSchedule> {
69
69
  return unwrapAsync(billingSchedulesUpdateBillingSchedule(
70
70
  this,
71
71
  request,
@@ -114,7 +114,7 @@ export class Customers extends ClientSDK {
114
114
  async createCustomerPaymentMethod(
115
115
  request: operations.CreateCustomerPaymentMethodRequest,
116
116
  options?: RequestOptions,
117
- ): Promise<models.PaymentSession> {
117
+ ): Promise<models.CustomerPaymentSession> {
118
118
  return unwrapAsync(customersCreateCustomerPaymentMethod(
119
119
  this,
120
120
  request,
package/src/sdk/orders.ts CHANGED
@@ -138,7 +138,7 @@ export class Orders extends ClientSDK {
138
138
  async createOrderApproval(
139
139
  request: operations.CreateOrderApprovalRequest,
140
140
  options?: RequestOptions,
141
- ): Promise<models.Approval> {
141
+ ): Promise<models.OrderApproval> {
142
142
  return unwrapAsync(ordersCreateOrderApproval(
143
143
  this,
144
144
  request,
package/src/sdk/plans.ts CHANGED
@@ -111,7 +111,7 @@ export class Plans extends ClientSDK {
111
111
  * Mint a plan version
112
112
  *
113
113
  * @remarks
114
- * Mint a new plan version from a price diff and make it the version the plan bills from, in one step. The diff references existing prices by id: create prices beforehand with POST /prices, then add, remove, or replace them here. To return to an earlier price set, make that version the default with a PATCH on the version.
114
+ * Mint a new plan version from the price set it is to hold, and make it the version the plan bills from, in one step. The request names the complete set, not a change to it: create prices beforehand with POST /prices, then list every price the new version holds. The change against the current version follows from the keys — a key on both sides with a different price ID replaces that line, a key only in the request adds a line, and a key the current version holds and the request omits removes that line. To return to an earlier price set, make that version the default with a PATCH on the version.
115
115
  */
116
116
  async mintPlanVersion(
117
117
  request: operations.MintPlanVersionRequest,
package/src/sdk/prices.ts CHANGED
@@ -19,7 +19,7 @@ export class Prices extends ClientSDK {
19
19
  async create(
20
20
  request: operations.CreatePriceRequest,
21
21
  options?: RequestOptions,
22
- ): Promise<models.SchemasPrice> {
22
+ ): Promise<models.Price> {
23
23
  return unwrapAsync(pricesCreate(
24
24
  this,
25
25
  request,
@@ -47,7 +47,7 @@ export class Prices extends ClientSDK {
47
47
  async get(
48
48
  request: operations.GetPriceRequest,
49
49
  options?: RequestOptions,
50
- ): Promise<models.SchemasPrice> {
50
+ ): Promise<models.Price> {
51
51
  return unwrapAsync(pricesGet(
52
52
  this,
53
53
  request,
@@ -61,7 +61,7 @@ export class Prices extends ClientSDK {
61
61
  async update(
62
62
  request: operations.UpdatePriceRequest,
63
63
  options?: RequestOptions,
64
- ): Promise<models.SchemasPrice> {
64
+ ): Promise<models.Price> {
65
65
  return unwrapAsync(pricesUpdate(
66
66
  this,
67
67
  request,
@@ -1,53 +0,0 @@
1
- import * as z from "zod/v3";
2
- import { ClosedEnum } from "../types/enums.js";
3
- import { Result as SafeParseResult } from "../types/fp.js";
4
- import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
- export declare const SchemasApprovalObject: {
6
- readonly Approval: "approval";
7
- };
8
- export type SchemasApprovalObject = ClosedEnum<typeof SchemasApprovalObject>;
9
- export declare const SchemasApprovalResourceType: {
10
- readonly Order: "order";
11
- readonly Invoice: "invoice";
12
- };
13
- export type SchemasApprovalResourceType = ClosedEnum<typeof SchemasApprovalResourceType>;
14
- export declare const SchemasApprovalKind: {
15
- readonly DataReview: "data_review";
16
- readonly FinancialReview: "financial_review";
17
- readonly Push: "push";
18
- };
19
- export type SchemasApprovalKind = ClosedEnum<typeof SchemasApprovalKind>;
20
- export declare const SchemasApprovalDecision: {
21
- readonly Pending: "pending";
22
- readonly Approved: "approved";
23
- readonly Rejected: "rejected";
24
- readonly Cancelled: "cancelled";
25
- };
26
- export type SchemasApprovalDecision = ClosedEnum<typeof SchemasApprovalDecision>;
27
- export type SchemasApproval = {
28
- id: string;
29
- object: SchemasApprovalObject;
30
- merchantId: string;
31
- resourceType: SchemasApprovalResourceType;
32
- resourceId: string;
33
- kind: SchemasApprovalKind;
34
- decision: SchemasApprovalDecision;
35
- requester: string;
36
- reviewer?: string | null | undefined;
37
- note?: string | null | undefined;
38
- dataSnapshotHash: string;
39
- decidedAt?: Date | null | undefined;
40
- createdAt: Date;
41
- };
42
- /** @internal */
43
- export declare const SchemasApprovalObject$inboundSchema: z.ZodNativeEnum<typeof SchemasApprovalObject>;
44
- /** @internal */
45
- export declare const SchemasApprovalResourceType$inboundSchema: z.ZodNativeEnum<typeof SchemasApprovalResourceType>;
46
- /** @internal */
47
- export declare const SchemasApprovalKind$inboundSchema: z.ZodNativeEnum<typeof SchemasApprovalKind>;
48
- /** @internal */
49
- export declare const SchemasApprovalDecision$inboundSchema: z.ZodNativeEnum<typeof SchemasApprovalDecision>;
50
- /** @internal */
51
- export declare const SchemasApproval$inboundSchema: z.ZodType<SchemasApproval, z.ZodTypeDef, unknown>;
52
- export declare function schemasApprovalFromJSON(jsonString: string): SafeParseResult<SchemasApproval, SDKValidationError>;
53
- //# sourceMappingURL=schemasapproval.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"schemasapproval.d.ts","sourceRoot":"","sources":["../../../src/models/schemasapproval.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE,eAAO,MAAM,qBAAqB;;CAExB,CAAC;AACX,MAAM,MAAM,qBAAqB,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAE7E,eAAO,MAAM,2BAA2B;;;CAG9B,CAAC;AACX,MAAM,MAAM,2BAA2B,GAAG,UAAU,CAClD,OAAO,2BAA2B,CACnC,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;CAItB,CAAC;AACX,MAAM,MAAM,mBAAmB,GAAG,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEzE,eAAO,MAAM,uBAAuB;;;;;CAK1B,CAAC;AACX,MAAM,MAAM,uBAAuB,GAAG,UAAU,CAC9C,OAAO,uBAAuB,CAC/B,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,qBAAqB,CAAC;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,2BAA2B,CAAC;IAC1C,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,mBAAmB,CAAC;IAC1B,QAAQ,EAAE,uBAAuB,CAAC;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACrC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACjC,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;IACpC,SAAS,EAAE,IAAI,CAAC;CACjB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,mCAAmC,EAAE,CAAC,CAAC,aAAa,CAC/D,OAAO,qBAAqB,CACS,CAAC;AAExC,gBAAgB;AAChB,eAAO,MAAM,yCAAyC,EAAE,CAAC,CAAC,aAAa,CACrE,OAAO,2BAA2B,CACS,CAAC;AAE9C,gBAAgB;AAChB,eAAO,MAAM,iCAAiC,EAAE,CAAC,CAAC,aAAa,CAC7D,OAAO,mBAAmB,CACS,CAAC;AAEtC,gBAAgB;AAChB,eAAO,MAAM,qCAAqC,EAAE,CAAC,CAAC,aAAa,CACjE,OAAO,uBAAuB,CACS,CAAC;AAE1C,gBAAgB;AAChB,eAAO,MAAM,6BAA6B,EAAE,CAAC,CAAC,OAAO,CACnD,eAAe,EACf,CAAC,CAAC,UAAU,EACZ,OAAO,CAiBP,CAAC;AAEH,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,eAAe,EAAE,kBAAkB,CAAC,CAMtD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"schemasapproval.js","sourceRoot":"","sources":["../../../src/models/schemasapproval.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiGH,0DAQC;AAvGD,0CAA4B;AAC5B,kDAA8C;AAKjC,QAAA,qBAAqB,GAAG;IACnC,QAAQ,EAAE,UAAU;CACZ,CAAC;AAGE,QAAA,2BAA2B,GAAG;IACzC,KAAK,EAAE,OAAO;IACd,OAAO,EAAE,SAAS;CACV,CAAC;AAKE,QAAA,mBAAmB,GAAG;IACjC,UAAU,EAAE,aAAa;IACzB,eAAe,EAAE,kBAAkB;IACnC,IAAI,EAAE,MAAM;CACJ,CAAC;AAGE,QAAA,uBAAuB,GAAG;IACrC,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,WAAW;CACd,CAAC;AAqBX,gBAAgB;AACH,QAAA,mCAAmC,GAE5C,CAAC,CAAC,UAAU,CAAC,6BAAqB,CAAC,CAAC;AAExC,gBAAgB;AACH,QAAA,yCAAyC,GAElD,CAAC,CAAC,UAAU,CAAC,mCAA2B,CAAC,CAAC;AAE9C,gBAAgB;AACH,QAAA,iCAAiC,GAE1C,CAAC,CAAC,UAAU,CAAC,2BAAmB,CAAC,CAAC;AAEtC,gBAAgB;AACH,QAAA,qCAAqC,GAE9C,CAAC,CAAC,UAAU,CAAC,+BAAuB,CAAC,CAAC;AAE1C,gBAAgB;AACH,QAAA,6BAA6B,GAItC,CAAC,CAAC,MAAM,CAAC;IACX,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,MAAM,EAAE,2CAAmC;IAC3C,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,YAAY,EAAE,iDAAyC;IACvD,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,IAAI,EAAE,yCAAiC;IACvC,QAAQ,EAAE,6CAAqC;IAC/C,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC3C,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACvC,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE;IAC5B,SAAS,EAAE,CAAC,CAAC,QAAQ,CACnB,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAClE,CAAC,QAAQ,EAAE;IACZ,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC;CAC7E,CAAC,CAAC;AAEH,SAAgB,uBAAuB,CACrC,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,qCAA6B,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACzD,6CAA6C,CAC9C,CAAC;AACJ,CAAC"}