@paygentic/sdk 0.9.15 → 0.9.17

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 (517) hide show
  1. package/README.md +34 -6
  2. package/dist/commonjs/funcs/invoicesV2ListProjectedInvoices.d.ts +18 -0
  3. package/dist/commonjs/funcs/invoicesV2ListProjectedInvoices.d.ts.map +1 -0
  4. package/dist/commonjs/funcs/invoicesV2ListProjectedInvoices.js +125 -0
  5. package/dist/commonjs/funcs/invoicesV2ListProjectedInvoices.js.map +1 -0
  6. package/dist/commonjs/funcs/invoicesV2RecordInvoicePayment.d.ts +27 -0
  7. package/dist/commonjs/funcs/invoicesV2RecordInvoicePayment.d.ts.map +1 -0
  8. package/dist/commonjs/funcs/invoicesV2RecordInvoicePayment.js +133 -0
  9. package/dist/commonjs/funcs/invoicesV2RecordInvoicePayment.js.map +1 -0
  10. package/dist/commonjs/funcs/invoicesV2RetryInvoicePayment.d.ts +40 -0
  11. package/dist/commonjs/funcs/invoicesV2RetryInvoicePayment.d.ts.map +1 -0
  12. package/dist/commonjs/funcs/invoicesV2RetryInvoicePayment.js +157 -0
  13. package/dist/commonjs/funcs/invoicesV2RetryInvoicePayment.js.map +1 -0
  14. package/dist/commonjs/funcs/merchantsReset.d.ts +22 -0
  15. package/dist/commonjs/funcs/merchantsReset.d.ts.map +1 -0
  16. package/dist/commonjs/funcs/merchantsReset.js +129 -0
  17. package/dist/commonjs/funcs/merchantsReset.js.map +1 -0
  18. package/dist/commonjs/funcs/profitabilityGetProfitability.d.ts +1 -1
  19. package/dist/commonjs/funcs/profitabilityGetProfitability.js +1 -1
  20. package/dist/commonjs/funcs/revenueGet.d.ts +1 -1
  21. package/dist/commonjs/funcs/revenueGet.js +1 -1
  22. package/dist/commonjs/funcs/subscriptionsMigrateSubscriptionVersion.d.ts +19 -0
  23. package/dist/commonjs/funcs/subscriptionsMigrateSubscriptionVersion.d.ts.map +1 -0
  24. package/dist/commonjs/funcs/subscriptionsMigrateSubscriptionVersion.js +127 -0
  25. package/dist/commonjs/funcs/subscriptionsMigrateSubscriptionVersion.js.map +1 -0
  26. package/dist/commonjs/funcs/webhooksDisable.d.ts +18 -0
  27. package/dist/commonjs/funcs/webhooksDisable.d.ts.map +1 -0
  28. package/dist/commonjs/funcs/webhooksDisable.js +122 -0
  29. package/dist/commonjs/funcs/webhooksDisable.js.map +1 -0
  30. package/dist/commonjs/funcs/webhooksEnable.d.ts +19 -0
  31. package/dist/commonjs/funcs/webhooksEnable.d.ts.map +1 -0
  32. package/dist/commonjs/funcs/webhooksEnable.js +122 -0
  33. package/dist/commonjs/funcs/webhooksEnable.js.map +1 -0
  34. package/dist/commonjs/funcs/webhooksGet.d.ts +19 -0
  35. package/dist/commonjs/funcs/webhooksGet.d.ts.map +1 -0
  36. package/dist/commonjs/funcs/webhooksGet.js +122 -0
  37. package/dist/commonjs/funcs/webhooksGet.js.map +1 -0
  38. package/dist/commonjs/funcs/webhooksGetPortal.d.ts +19 -0
  39. package/dist/commonjs/funcs/webhooksGetPortal.d.ts.map +1 -0
  40. package/dist/commonjs/funcs/webhooksGetPortal.js +122 -0
  41. package/dist/commonjs/funcs/webhooksGetPortal.js.map +1 -0
  42. package/dist/commonjs/funcs/webhooksUpdate.d.ts +19 -0
  43. package/dist/commonjs/funcs/webhooksUpdate.d.ts.map +1 -0
  44. package/dist/commonjs/funcs/webhooksUpdate.js +123 -0
  45. package/dist/commonjs/funcs/webhooksUpdate.js.map +1 -0
  46. package/dist/commonjs/lib/config.d.ts +2 -2
  47. package/dist/commonjs/lib/config.js +2 -2
  48. package/dist/commonjs/models/currencybreakdownentry.d.ts +1 -1
  49. package/dist/commonjs/models/elapsedperiodbilling.d.ts +16 -0
  50. package/dist/commonjs/models/elapsedperiodbilling.d.ts.map +1 -0
  51. package/dist/commonjs/models/elapsedperiodbilling.js +50 -0
  52. package/dist/commonjs/models/elapsedperiodbilling.js.map +1 -0
  53. package/dist/commonjs/models/errors/index.d.ts +2 -0
  54. package/dist/commonjs/models/errors/index.d.ts.map +1 -1
  55. package/dist/commonjs/models/errors/index.js +2 -0
  56. package/dist/commonjs/models/errors/index.js.map +1 -1
  57. package/dist/commonjs/models/errors/recordinvoicepayment.d.ts +55 -0
  58. package/dist/commonjs/models/errors/recordinvoicepayment.d.ts.map +1 -0
  59. package/dist/commonjs/models/errors/recordinvoicepayment.js +76 -0
  60. package/dist/commonjs/models/errors/recordinvoicepayment.js.map +1 -0
  61. package/dist/commonjs/models/errors/retrypaymentresponseerror.d.ts +63 -0
  62. package/dist/commonjs/models/errors/retrypaymentresponseerror.d.ts.map +1 -0
  63. package/dist/commonjs/models/errors/retrypaymentresponseerror.js +81 -0
  64. package/dist/commonjs/models/errors/retrypaymentresponseerror.js.map +1 -0
  65. package/dist/commonjs/models/grouptrendentry.d.ts +5 -1
  66. package/dist/commonjs/models/grouptrendentry.d.ts.map +1 -1
  67. package/dist/commonjs/models/grouptrendentry.js +1 -0
  68. package/dist/commonjs/models/grouptrendentry.js.map +1 -1
  69. package/dist/commonjs/models/hostedlinkpaymentresult.d.ts +28 -0
  70. package/dist/commonjs/models/hostedlinkpaymentresult.d.ts.map +1 -0
  71. package/dist/commonjs/models/hostedlinkpaymentresult.js +56 -0
  72. package/dist/commonjs/models/hostedlinkpaymentresult.js.map +1 -0
  73. package/dist/commonjs/models/index.d.ts +14 -0
  74. package/dist/commonjs/models/index.d.ts.map +1 -1
  75. package/dist/commonjs/models/index.js +14 -0
  76. package/dist/commonjs/models/index.js.map +1 -1
  77. package/dist/commonjs/models/invoice.d.ts +7 -6
  78. package/dist/commonjs/models/invoice.d.ts.map +1 -1
  79. package/dist/commonjs/models/invoice.js +3 -2
  80. package/dist/commonjs/models/invoice.js.map +1 -1
  81. package/dist/commonjs/models/invoicepaymentlinkerrorcode.d.ts +17 -0
  82. package/dist/commonjs/models/invoicepaymentlinkerrorcode.d.ts.map +1 -0
  83. package/dist/commonjs/models/invoicepaymentlinkerrorcode.js +51 -0
  84. package/dist/commonjs/models/invoicepaymentlinkerrorcode.js.map +1 -0
  85. package/dist/commonjs/models/invoicepaymentmethod.d.ts +16 -0
  86. package/dist/commonjs/models/invoicepaymentmethod.d.ts.map +1 -0
  87. package/dist/commonjs/models/invoicepaymentmethod.js +50 -0
  88. package/dist/commonjs/models/invoicepaymentmethod.js.map +1 -0
  89. package/dist/commonjs/models/invoicepaymentprovider.d.ts +16 -0
  90. package/dist/commonjs/models/invoicepaymentprovider.d.ts.map +1 -0
  91. package/dist/commonjs/models/invoicepaymentprovider.js +50 -0
  92. package/dist/commonjs/models/invoicepaymentprovider.js.map +1 -0
  93. package/dist/commonjs/models/merchantreset.d.ts +41 -0
  94. package/dist/commonjs/models/merchantreset.d.ts.map +1 -0
  95. package/dist/commonjs/models/merchantreset.js +68 -0
  96. package/dist/commonjs/models/merchantreset.js.map +1 -0
  97. package/dist/commonjs/models/migratesubscriptionversionrequest.d.ts +37 -0
  98. package/dist/commonjs/models/migratesubscriptionversionrequest.d.ts.map +1 -0
  99. package/dist/commonjs/models/migratesubscriptionversionrequest.js +60 -0
  100. package/dist/commonjs/models/migratesubscriptionversionrequest.js.map +1 -0
  101. package/dist/commonjs/models/migratesubscriptionversionresponse.d.ts +47 -0
  102. package/dist/commonjs/models/migratesubscriptionversionresponse.d.ts.map +1 -0
  103. package/dist/commonjs/models/migratesubscriptionversionresponse.js +73 -0
  104. package/dist/commonjs/models/migratesubscriptionversionresponse.js.map +1 -0
  105. package/dist/commonjs/models/operations/createplan.d.ts +5 -0
  106. package/dist/commonjs/models/operations/createplan.d.ts.map +1 -1
  107. package/dist/commonjs/models/operations/createplan.js +1 -0
  108. package/dist/commonjs/models/operations/createplan.js.map +1 -1
  109. package/dist/commonjs/models/operations/createsubscription.d.ts +5 -0
  110. package/dist/commonjs/models/operations/createsubscription.d.ts.map +1 -1
  111. package/dist/commonjs/models/operations/createsubscription.js +1 -0
  112. package/dist/commonjs/models/operations/createsubscription.js.map +1 -1
  113. package/dist/commonjs/models/operations/createwebhooks.d.ts +15 -0
  114. package/dist/commonjs/models/operations/createwebhooks.d.ts.map +1 -0
  115. package/dist/commonjs/models/operations/createwebhooks.js +49 -0
  116. package/dist/commonjs/models/operations/createwebhooks.js.map +1 -0
  117. package/dist/commonjs/models/operations/deletewebhooks.d.ts +15 -0
  118. package/dist/commonjs/models/operations/deletewebhooks.d.ts.map +1 -0
  119. package/dist/commonjs/models/operations/deletewebhooks.js +49 -0
  120. package/dist/commonjs/models/operations/deletewebhooks.js.map +1 -0
  121. package/dist/commonjs/models/operations/getwebhookportal.d.ts +15 -0
  122. package/dist/commonjs/models/operations/getwebhookportal.d.ts.map +1 -0
  123. package/dist/commonjs/models/operations/getwebhookportal.js +49 -0
  124. package/dist/commonjs/models/operations/getwebhookportal.js.map +1 -0
  125. package/dist/commonjs/models/operations/getwebhooks.d.ts +15 -0
  126. package/dist/commonjs/models/operations/getwebhooks.d.ts.map +1 -0
  127. package/dist/commonjs/models/operations/getwebhooks.js +49 -0
  128. package/dist/commonjs/models/operations/getwebhooks.js.map +1 -0
  129. package/dist/commonjs/models/operations/index.d.ts +10 -0
  130. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  131. package/dist/commonjs/models/operations/index.js +10 -0
  132. package/dist/commonjs/models/operations/index.js.map +1 -1
  133. package/dist/commonjs/models/operations/listprojectedinvoices.d.ts +59 -0
  134. package/dist/commonjs/models/operations/listprojectedinvoices.d.ts.map +1 -0
  135. package/dist/commonjs/models/operations/listprojectedinvoices.js +70 -0
  136. package/dist/commonjs/models/operations/listprojectedinvoices.js.map +1 -0
  137. package/dist/commonjs/models/operations/migratesubscriptionversion.d.ts +18 -0
  138. package/dist/commonjs/models/operations/migratesubscriptionversion.d.ts.map +1 -0
  139. package/dist/commonjs/models/operations/migratesubscriptionversion.js +56 -0
  140. package/dist/commonjs/models/operations/migratesubscriptionversion.js.map +1 -0
  141. package/dist/commonjs/models/operations/recordinvoicepayment.d.ts +45 -0
  142. package/dist/commonjs/models/operations/recordinvoicepayment.d.ts.map +1 -0
  143. package/dist/commonjs/models/operations/recordinvoicepayment.js +75 -0
  144. package/dist/commonjs/models/operations/recordinvoicepayment.js.map +1 -0
  145. package/dist/commonjs/models/operations/resetmerchant.d.ts +15 -0
  146. package/dist/commonjs/models/operations/resetmerchant.d.ts.map +1 -0
  147. package/dist/commonjs/models/operations/resetmerchant.js +56 -0
  148. package/dist/commonjs/models/operations/resetmerchant.js.map +1 -0
  149. package/dist/commonjs/models/operations/retryinvoicepayment.d.ts +30 -0
  150. package/dist/commonjs/models/operations/retryinvoicepayment.d.ts.map +1 -0
  151. package/dist/commonjs/models/operations/retryinvoicepayment.js +64 -0
  152. package/dist/commonjs/models/operations/retryinvoicepayment.js.map +1 -0
  153. package/dist/commonjs/models/operations/updateplan.d.ts +5 -0
  154. package/dist/commonjs/models/operations/updateplan.d.ts.map +1 -1
  155. package/dist/commonjs/models/operations/updateplan.js +1 -0
  156. package/dist/commonjs/models/operations/updateplan.js.map +1 -1
  157. package/dist/commonjs/models/operations/updatewebhooks.d.ts +30 -0
  158. package/dist/commonjs/models/operations/updatewebhooks.d.ts.map +1 -0
  159. package/dist/commonjs/models/operations/updatewebhooks.js +63 -0
  160. package/dist/commonjs/models/operations/updatewebhooks.js.map +1 -0
  161. package/dist/commonjs/models/outofbandpaymentresult.d.ts +15 -0
  162. package/dist/commonjs/models/outofbandpaymentresult.d.ts.map +1 -0
  163. package/dist/commonjs/models/outofbandpaymentresult.js +52 -0
  164. package/dist/commonjs/models/outofbandpaymentresult.js.map +1 -0
  165. package/dist/commonjs/models/plan.d.ts +5 -0
  166. package/dist/commonjs/models/plan.d.ts.map +1 -1
  167. package/dist/commonjs/models/plan.js +2 -0
  168. package/dist/commonjs/models/plan.js.map +1 -1
  169. package/dist/commonjs/models/profitabilityrow.d.ts +23 -4
  170. package/dist/commonjs/models/profitabilityrow.d.ts.map +1 -1
  171. package/dist/commonjs/models/profitabilityrow.js +13 -1
  172. package/dist/commonjs/models/profitabilityrow.js.map +1 -1
  173. package/dist/commonjs/models/profitabilitysummaryresponse.d.ts +1 -1
  174. package/dist/commonjs/models/retrypaymenterror.d.ts +28 -0
  175. package/dist/commonjs/models/retrypaymenterror.d.ts.map +1 -0
  176. package/dist/commonjs/models/retrypaymenterror.js +53 -0
  177. package/dist/commonjs/models/retrypaymenterror.js.map +1 -0
  178. package/dist/commonjs/models/retrypaymentresponse.d.ts +46 -0
  179. package/dist/commonjs/models/retrypaymentresponse.d.ts.map +1 -0
  180. package/dist/commonjs/models/retrypaymentresponse.js +63 -0
  181. package/dist/commonjs/models/retrypaymentresponse.js.map +1 -0
  182. package/dist/commonjs/models/revenuesummaryresponse.d.ts +1 -1
  183. package/dist/commonjs/models/revenuetrendbucket.d.ts +6 -2
  184. package/dist/commonjs/models/revenuetrendbucket.d.ts.map +1 -1
  185. package/dist/commonjs/models/revenuetrendbucket.js +1 -0
  186. package/dist/commonjs/models/revenuetrendbucket.js.map +1 -1
  187. package/dist/commonjs/models/subscription.d.ts +29 -0
  188. package/dist/commonjs/models/subscription.d.ts.map +1 -1
  189. package/dist/commonjs/models/subscription.js +14 -1
  190. package/dist/commonjs/models/subscription.js.map +1 -1
  191. package/dist/commonjs/models/subscriptionintervaladdop.d.ts +1 -1
  192. package/dist/commonjs/models/versiontransition.d.ts +58 -0
  193. package/dist/commonjs/models/versiontransition.d.ts.map +1 -0
  194. package/dist/commonjs/models/versiontransition.js +82 -0
  195. package/dist/commonjs/models/versiontransition.js.map +1 -0
  196. package/dist/commonjs/models/webhookportal.d.ts +34 -0
  197. package/dist/commonjs/models/webhookportal.d.ts.map +1 -0
  198. package/dist/commonjs/models/webhookportal.js +60 -0
  199. package/dist/commonjs/models/webhookportal.js.map +1 -0
  200. package/dist/commonjs/models/webhooks.d.ts +46 -0
  201. package/dist/commonjs/models/webhooks.d.ts.map +1 -0
  202. package/dist/commonjs/models/webhooks.js +63 -0
  203. package/dist/commonjs/models/webhooks.js.map +1 -0
  204. package/dist/commonjs/sdk/invoicesv2.d.ts +51 -0
  205. package/dist/commonjs/sdk/invoicesv2.d.ts.map +1 -1
  206. package/dist/commonjs/sdk/invoicesv2.js +60 -0
  207. package/dist/commonjs/sdk/invoicesv2.js.map +1 -1
  208. package/dist/commonjs/sdk/merchants.d.ts +16 -0
  209. package/dist/commonjs/sdk/merchants.d.ts.map +1 -0
  210. package/dist/commonjs/sdk/merchants.js +26 -0
  211. package/dist/commonjs/sdk/merchants.js.map +1 -0
  212. package/dist/commonjs/sdk/profitability.d.ts +1 -1
  213. package/dist/commonjs/sdk/profitability.js +1 -1
  214. package/dist/commonjs/sdk/revenue.d.ts +1 -1
  215. package/dist/commonjs/sdk/revenue.js +1 -1
  216. package/dist/commonjs/sdk/sdk.d.ts +6 -0
  217. package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
  218. package/dist/commonjs/sdk/sdk.js +8 -0
  219. package/dist/commonjs/sdk/sdk.js.map +1 -1
  220. package/dist/commonjs/sdk/subscriptions.d.ts +7 -0
  221. package/dist/commonjs/sdk/subscriptions.d.ts.map +1 -1
  222. package/dist/commonjs/sdk/subscriptions.js +10 -0
  223. package/dist/commonjs/sdk/subscriptions.js.map +1 -1
  224. package/dist/commonjs/sdk/webhooks.d.ts +41 -0
  225. package/dist/commonjs/sdk/webhooks.d.ts.map +1 -0
  226. package/dist/commonjs/sdk/webhooks.js +62 -0
  227. package/dist/commonjs/sdk/webhooks.js.map +1 -0
  228. package/dist/esm/funcs/invoicesV2ListProjectedInvoices.d.ts +18 -0
  229. package/dist/esm/funcs/invoicesV2ListProjectedInvoices.d.ts.map +1 -0
  230. package/dist/esm/funcs/invoicesV2ListProjectedInvoices.js +89 -0
  231. package/dist/esm/funcs/invoicesV2ListProjectedInvoices.js.map +1 -0
  232. package/dist/esm/funcs/invoicesV2RecordInvoicePayment.d.ts +27 -0
  233. package/dist/esm/funcs/invoicesV2RecordInvoicePayment.d.ts.map +1 -0
  234. package/dist/esm/funcs/invoicesV2RecordInvoicePayment.js +97 -0
  235. package/dist/esm/funcs/invoicesV2RecordInvoicePayment.js.map +1 -0
  236. package/dist/esm/funcs/invoicesV2RetryInvoicePayment.d.ts +40 -0
  237. package/dist/esm/funcs/invoicesV2RetryInvoicePayment.d.ts.map +1 -0
  238. package/dist/esm/funcs/invoicesV2RetryInvoicePayment.js +121 -0
  239. package/dist/esm/funcs/invoicesV2RetryInvoicePayment.js.map +1 -0
  240. package/dist/esm/funcs/merchantsReset.d.ts +22 -0
  241. package/dist/esm/funcs/merchantsReset.d.ts.map +1 -0
  242. package/dist/esm/funcs/merchantsReset.js +93 -0
  243. package/dist/esm/funcs/merchantsReset.js.map +1 -0
  244. package/dist/esm/funcs/profitabilityGetProfitability.d.ts +1 -1
  245. package/dist/esm/funcs/profitabilityGetProfitability.js +1 -1
  246. package/dist/esm/funcs/revenueGet.d.ts +1 -1
  247. package/dist/esm/funcs/revenueGet.js +1 -1
  248. package/dist/esm/funcs/subscriptionsMigrateSubscriptionVersion.d.ts +19 -0
  249. package/dist/esm/funcs/subscriptionsMigrateSubscriptionVersion.d.ts.map +1 -0
  250. package/dist/esm/funcs/subscriptionsMigrateSubscriptionVersion.js +91 -0
  251. package/dist/esm/funcs/subscriptionsMigrateSubscriptionVersion.js.map +1 -0
  252. package/dist/esm/funcs/webhooksDisable.d.ts +18 -0
  253. package/dist/esm/funcs/webhooksDisable.d.ts.map +1 -0
  254. package/dist/esm/funcs/webhooksDisable.js +86 -0
  255. package/dist/esm/funcs/webhooksDisable.js.map +1 -0
  256. package/dist/esm/funcs/webhooksEnable.d.ts +19 -0
  257. package/dist/esm/funcs/webhooksEnable.d.ts.map +1 -0
  258. package/dist/esm/funcs/webhooksEnable.js +86 -0
  259. package/dist/esm/funcs/webhooksEnable.js.map +1 -0
  260. package/dist/esm/funcs/webhooksGet.d.ts +19 -0
  261. package/dist/esm/funcs/webhooksGet.d.ts.map +1 -0
  262. package/dist/esm/funcs/webhooksGet.js +86 -0
  263. package/dist/esm/funcs/webhooksGet.js.map +1 -0
  264. package/dist/esm/funcs/webhooksGetPortal.d.ts +19 -0
  265. package/dist/esm/funcs/webhooksGetPortal.d.ts.map +1 -0
  266. package/dist/esm/funcs/webhooksGetPortal.js +86 -0
  267. package/dist/esm/funcs/webhooksGetPortal.js.map +1 -0
  268. package/dist/esm/funcs/webhooksUpdate.d.ts +19 -0
  269. package/dist/esm/funcs/webhooksUpdate.d.ts.map +1 -0
  270. package/dist/esm/funcs/webhooksUpdate.js +87 -0
  271. package/dist/esm/funcs/webhooksUpdate.js.map +1 -0
  272. package/dist/esm/lib/config.d.ts +2 -2
  273. package/dist/esm/lib/config.js +2 -2
  274. package/dist/esm/models/currencybreakdownentry.d.ts +1 -1
  275. package/dist/esm/models/elapsedperiodbilling.d.ts +16 -0
  276. package/dist/esm/models/elapsedperiodbilling.d.ts.map +1 -0
  277. package/dist/esm/models/elapsedperiodbilling.js +14 -0
  278. package/dist/esm/models/elapsedperiodbilling.js.map +1 -0
  279. package/dist/esm/models/errors/index.d.ts +2 -0
  280. package/dist/esm/models/errors/index.d.ts.map +1 -1
  281. package/dist/esm/models/errors/index.js +2 -0
  282. package/dist/esm/models/errors/index.js.map +1 -1
  283. package/dist/esm/models/errors/recordinvoicepayment.d.ts +55 -0
  284. package/dist/esm/models/errors/recordinvoicepayment.d.ts.map +1 -0
  285. package/dist/esm/models/errors/recordinvoicepayment.js +39 -0
  286. package/dist/esm/models/errors/recordinvoicepayment.js.map +1 -0
  287. package/dist/esm/models/errors/retrypaymentresponseerror.d.ts +63 -0
  288. package/dist/esm/models/errors/retrypaymentresponseerror.d.ts.map +1 -0
  289. package/dist/esm/models/errors/retrypaymentresponseerror.js +44 -0
  290. package/dist/esm/models/errors/retrypaymentresponseerror.js.map +1 -0
  291. package/dist/esm/models/grouptrendentry.d.ts +5 -1
  292. package/dist/esm/models/grouptrendentry.d.ts.map +1 -1
  293. package/dist/esm/models/grouptrendentry.js +1 -0
  294. package/dist/esm/models/grouptrendentry.js.map +1 -1
  295. package/dist/esm/models/hostedlinkpaymentresult.d.ts +28 -0
  296. package/dist/esm/models/hostedlinkpaymentresult.d.ts.map +1 -0
  297. package/dist/esm/models/hostedlinkpaymentresult.js +19 -0
  298. package/dist/esm/models/hostedlinkpaymentresult.js.map +1 -0
  299. package/dist/esm/models/index.d.ts +14 -0
  300. package/dist/esm/models/index.d.ts.map +1 -1
  301. package/dist/esm/models/index.js +14 -0
  302. package/dist/esm/models/index.js.map +1 -1
  303. package/dist/esm/models/invoice.d.ts +7 -6
  304. package/dist/esm/models/invoice.d.ts.map +1 -1
  305. package/dist/esm/models/invoice.js +3 -2
  306. package/dist/esm/models/invoice.js.map +1 -1
  307. package/dist/esm/models/invoicepaymentlinkerrorcode.d.ts +17 -0
  308. package/dist/esm/models/invoicepaymentlinkerrorcode.d.ts.map +1 -0
  309. package/dist/esm/models/invoicepaymentlinkerrorcode.js +15 -0
  310. package/dist/esm/models/invoicepaymentlinkerrorcode.js.map +1 -0
  311. package/dist/esm/models/invoicepaymentmethod.d.ts +16 -0
  312. package/dist/esm/models/invoicepaymentmethod.d.ts.map +1 -0
  313. package/dist/esm/models/invoicepaymentmethod.js +14 -0
  314. package/dist/esm/models/invoicepaymentmethod.js.map +1 -0
  315. package/dist/esm/models/invoicepaymentprovider.d.ts +16 -0
  316. package/dist/esm/models/invoicepaymentprovider.d.ts.map +1 -0
  317. package/dist/esm/models/invoicepaymentprovider.js +14 -0
  318. package/dist/esm/models/invoicepaymentprovider.js.map +1 -0
  319. package/dist/esm/models/merchantreset.d.ts +41 -0
  320. package/dist/esm/models/merchantreset.d.ts.map +1 -0
  321. package/dist/esm/models/merchantreset.js +29 -0
  322. package/dist/esm/models/merchantreset.js.map +1 -0
  323. package/dist/esm/models/migratesubscriptionversionrequest.d.ts +37 -0
  324. package/dist/esm/models/migratesubscriptionversionrequest.d.ts.map +1 -0
  325. package/dist/esm/models/migratesubscriptionversionrequest.js +23 -0
  326. package/dist/esm/models/migratesubscriptionversionrequest.js.map +1 -0
  327. package/dist/esm/models/migratesubscriptionversionresponse.d.ts +47 -0
  328. package/dist/esm/models/migratesubscriptionversionresponse.d.ts.map +1 -0
  329. package/dist/esm/models/migratesubscriptionversionresponse.js +34 -0
  330. package/dist/esm/models/migratesubscriptionversionresponse.js.map +1 -0
  331. package/dist/esm/models/operations/createplan.d.ts +5 -0
  332. package/dist/esm/models/operations/createplan.d.ts.map +1 -1
  333. package/dist/esm/models/operations/createplan.js +1 -0
  334. package/dist/esm/models/operations/createplan.js.map +1 -1
  335. package/dist/esm/models/operations/createsubscription.d.ts +5 -0
  336. package/dist/esm/models/operations/createsubscription.d.ts.map +1 -1
  337. package/dist/esm/models/operations/createsubscription.js +1 -0
  338. package/dist/esm/models/operations/createsubscription.js.map +1 -1
  339. package/dist/esm/models/operations/createwebhooks.d.ts +15 -0
  340. package/dist/esm/models/operations/createwebhooks.d.ts.map +1 -0
  341. package/dist/esm/models/operations/createwebhooks.js +12 -0
  342. package/dist/esm/models/operations/createwebhooks.js.map +1 -0
  343. package/dist/esm/models/operations/deletewebhooks.d.ts +15 -0
  344. package/dist/esm/models/operations/deletewebhooks.d.ts.map +1 -0
  345. package/dist/esm/models/operations/deletewebhooks.js +12 -0
  346. package/dist/esm/models/operations/deletewebhooks.js.map +1 -0
  347. package/dist/esm/models/operations/getwebhookportal.d.ts +15 -0
  348. package/dist/esm/models/operations/getwebhookportal.d.ts.map +1 -0
  349. package/dist/esm/models/operations/getwebhookportal.js +12 -0
  350. package/dist/esm/models/operations/getwebhookportal.js.map +1 -0
  351. package/dist/esm/models/operations/getwebhooks.d.ts +15 -0
  352. package/dist/esm/models/operations/getwebhooks.d.ts.map +1 -0
  353. package/dist/esm/models/operations/getwebhooks.js +12 -0
  354. package/dist/esm/models/operations/getwebhooks.js.map +1 -0
  355. package/dist/esm/models/operations/index.d.ts +10 -0
  356. package/dist/esm/models/operations/index.d.ts.map +1 -1
  357. package/dist/esm/models/operations/index.js +10 -0
  358. package/dist/esm/models/operations/index.js.map +1 -1
  359. package/dist/esm/models/operations/listprojectedinvoices.d.ts +59 -0
  360. package/dist/esm/models/operations/listprojectedinvoices.d.ts.map +1 -0
  361. package/dist/esm/models/operations/listprojectedinvoices.js +32 -0
  362. package/dist/esm/models/operations/listprojectedinvoices.js.map +1 -0
  363. package/dist/esm/models/operations/migratesubscriptionversion.d.ts +18 -0
  364. package/dist/esm/models/operations/migratesubscriptionversion.d.ts.map +1 -0
  365. package/dist/esm/models/operations/migratesubscriptionversion.js +19 -0
  366. package/dist/esm/models/operations/migratesubscriptionversion.js.map +1 -0
  367. package/dist/esm/models/operations/recordinvoicepayment.d.ts +45 -0
  368. package/dist/esm/models/operations/recordinvoicepayment.d.ts.map +1 -0
  369. package/dist/esm/models/operations/recordinvoicepayment.js +36 -0
  370. package/dist/esm/models/operations/recordinvoicepayment.js.map +1 -0
  371. package/dist/esm/models/operations/resetmerchant.d.ts +15 -0
  372. package/dist/esm/models/operations/resetmerchant.d.ts.map +1 -0
  373. package/dist/esm/models/operations/resetmerchant.js +19 -0
  374. package/dist/esm/models/operations/resetmerchant.js.map +1 -0
  375. package/dist/esm/models/operations/retryinvoicepayment.d.ts +30 -0
  376. package/dist/esm/models/operations/retryinvoicepayment.d.ts.map +1 -0
  377. package/dist/esm/models/operations/retryinvoicepayment.js +26 -0
  378. package/dist/esm/models/operations/retryinvoicepayment.js.map +1 -0
  379. package/dist/esm/models/operations/updateplan.d.ts +5 -0
  380. package/dist/esm/models/operations/updateplan.d.ts.map +1 -1
  381. package/dist/esm/models/operations/updateplan.js +1 -0
  382. package/dist/esm/models/operations/updateplan.js.map +1 -1
  383. package/dist/esm/models/operations/updatewebhooks.d.ts +30 -0
  384. package/dist/esm/models/operations/updatewebhooks.d.ts.map +1 -0
  385. package/dist/esm/models/operations/updatewebhooks.js +25 -0
  386. package/dist/esm/models/operations/updatewebhooks.js.map +1 -0
  387. package/dist/esm/models/outofbandpaymentresult.d.ts +15 -0
  388. package/dist/esm/models/outofbandpaymentresult.d.ts.map +1 -0
  389. package/dist/esm/models/outofbandpaymentresult.js +15 -0
  390. package/dist/esm/models/outofbandpaymentresult.js.map +1 -0
  391. package/dist/esm/models/plan.d.ts +5 -0
  392. package/dist/esm/models/plan.d.ts.map +1 -1
  393. package/dist/esm/models/plan.js +2 -0
  394. package/dist/esm/models/plan.js.map +1 -1
  395. package/dist/esm/models/profitabilityrow.d.ts +23 -4
  396. package/dist/esm/models/profitabilityrow.d.ts.map +1 -1
  397. package/dist/esm/models/profitabilityrow.js +12 -0
  398. package/dist/esm/models/profitabilityrow.js.map +1 -1
  399. package/dist/esm/models/profitabilitysummaryresponse.d.ts +1 -1
  400. package/dist/esm/models/retrypaymenterror.d.ts +28 -0
  401. package/dist/esm/models/retrypaymenterror.d.ts.map +1 -0
  402. package/dist/esm/models/retrypaymenterror.js +16 -0
  403. package/dist/esm/models/retrypaymenterror.js.map +1 -0
  404. package/dist/esm/models/retrypaymentresponse.d.ts +46 -0
  405. package/dist/esm/models/retrypaymentresponse.d.ts.map +1 -0
  406. package/dist/esm/models/retrypaymentresponse.js +26 -0
  407. package/dist/esm/models/retrypaymentresponse.js.map +1 -0
  408. package/dist/esm/models/revenuesummaryresponse.d.ts +1 -1
  409. package/dist/esm/models/revenuetrendbucket.d.ts +6 -2
  410. package/dist/esm/models/revenuetrendbucket.d.ts.map +1 -1
  411. package/dist/esm/models/revenuetrendbucket.js +1 -0
  412. package/dist/esm/models/revenuetrendbucket.js.map +1 -1
  413. package/dist/esm/models/subscription.d.ts +29 -0
  414. package/dist/esm/models/subscription.d.ts.map +1 -1
  415. package/dist/esm/models/subscription.js +13 -0
  416. package/dist/esm/models/subscription.js.map +1 -1
  417. package/dist/esm/models/subscriptionintervaladdop.d.ts +1 -1
  418. package/dist/esm/models/versiontransition.d.ts +58 -0
  419. package/dist/esm/models/versiontransition.d.ts.map +1 -0
  420. package/dist/esm/models/versiontransition.js +44 -0
  421. package/dist/esm/models/versiontransition.js.map +1 -0
  422. package/dist/esm/models/webhookportal.d.ts +34 -0
  423. package/dist/esm/models/webhookportal.d.ts.map +1 -0
  424. package/dist/esm/models/webhookportal.js +23 -0
  425. package/dist/esm/models/webhookportal.js.map +1 -0
  426. package/dist/esm/models/webhooks.d.ts +46 -0
  427. package/dist/esm/models/webhooks.d.ts.map +1 -0
  428. package/dist/esm/models/webhooks.js +26 -0
  429. package/dist/esm/models/webhooks.js.map +1 -0
  430. package/dist/esm/sdk/invoicesv2.d.ts +51 -0
  431. package/dist/esm/sdk/invoicesv2.d.ts.map +1 -1
  432. package/dist/esm/sdk/invoicesv2.js +60 -0
  433. package/dist/esm/sdk/invoicesv2.js.map +1 -1
  434. package/dist/esm/sdk/merchants.d.ts +16 -0
  435. package/dist/esm/sdk/merchants.d.ts.map +1 -0
  436. package/dist/esm/sdk/merchants.js +22 -0
  437. package/dist/esm/sdk/merchants.js.map +1 -0
  438. package/dist/esm/sdk/profitability.d.ts +1 -1
  439. package/dist/esm/sdk/profitability.js +1 -1
  440. package/dist/esm/sdk/revenue.d.ts +1 -1
  441. package/dist/esm/sdk/revenue.js +1 -1
  442. package/dist/esm/sdk/sdk.d.ts +6 -0
  443. package/dist/esm/sdk/sdk.d.ts.map +1 -1
  444. package/dist/esm/sdk/sdk.js +8 -0
  445. package/dist/esm/sdk/sdk.js.map +1 -1
  446. package/dist/esm/sdk/subscriptions.d.ts +7 -0
  447. package/dist/esm/sdk/subscriptions.d.ts.map +1 -1
  448. package/dist/esm/sdk/subscriptions.js +10 -0
  449. package/dist/esm/sdk/subscriptions.js.map +1 -1
  450. package/dist/esm/sdk/webhooks.d.ts +41 -0
  451. package/dist/esm/sdk/webhooks.d.ts.map +1 -0
  452. package/dist/esm/sdk/webhooks.js +58 -0
  453. package/dist/esm/sdk/webhooks.js.map +1 -0
  454. package/jsr.json +1 -1
  455. package/package.json +1 -1
  456. package/src/funcs/invoicesV2ListProjectedInvoices.ts +183 -0
  457. package/src/funcs/invoicesV2RecordInvoicePayment.ts +194 -0
  458. package/src/funcs/invoicesV2RetryInvoicePayment.ts +219 -0
  459. package/src/funcs/merchantsReset.ts +185 -0
  460. package/src/funcs/profitabilityGetProfitability.ts +1 -1
  461. package/src/funcs/revenueGet.ts +1 -1
  462. package/src/funcs/subscriptionsMigrateSubscriptionVersion.ts +186 -0
  463. package/src/funcs/webhooksDisable.ts +175 -0
  464. package/src/funcs/webhooksEnable.ts +179 -0
  465. package/src/funcs/webhooksGet.ts +175 -0
  466. package/src/funcs/webhooksGetPortal.ts +175 -0
  467. package/src/funcs/webhooksUpdate.ts +179 -0
  468. package/src/lib/config.ts +2 -2
  469. package/src/models/currencybreakdownentry.ts +1 -1
  470. package/src/models/elapsedperiodbilling.ts +23 -0
  471. package/src/models/errors/index.ts +2 -0
  472. package/src/models/errors/recordinvoicepayment.ts +86 -0
  473. package/src/models/errors/retrypaymentresponseerror.ts +102 -0
  474. package/src/models/grouptrendentry.ts +6 -1
  475. package/src/models/hostedlinkpaymentresult.ts +56 -0
  476. package/src/models/index.ts +14 -0
  477. package/src/models/invoice.ts +7 -6
  478. package/src/models/invoicepaymentlinkerrorcode.ts +26 -0
  479. package/src/models/invoicepaymentmethod.ts +23 -0
  480. package/src/models/invoicepaymentprovider.ts +23 -0
  481. package/src/models/merchantreset.ts +85 -0
  482. package/src/models/migratesubscriptionversionrequest.ts +62 -0
  483. package/src/models/migratesubscriptionversionresponse.ts +122 -0
  484. package/src/models/operations/createplan.ts +6 -0
  485. package/src/models/operations/createsubscription.ts +8 -0
  486. package/src/models/operations/createwebhooks.ts +34 -0
  487. package/src/models/operations/deletewebhooks.ts +34 -0
  488. package/src/models/operations/getwebhookportal.ts +34 -0
  489. package/src/models/operations/getwebhooks.ts +34 -0
  490. package/src/models/operations/index.ts +10 -0
  491. package/src/models/operations/listprojectedinvoices.ts +110 -0
  492. package/src/models/operations/migratesubscriptionversion.ts +47 -0
  493. package/src/models/operations/recordinvoicepayment.ts +112 -0
  494. package/src/models/operations/resetmerchant.ts +40 -0
  495. package/src/models/operations/retryinvoicepayment.ts +74 -0
  496. package/src/models/operations/updateplan.ts +6 -0
  497. package/src/models/operations/updatewebhooks.ts +71 -0
  498. package/src/models/outofbandpaymentresult.ts +37 -0
  499. package/src/models/plan.ts +9 -0
  500. package/src/models/profitabilityrow.ts +27 -4
  501. package/src/models/profitabilitysummaryresponse.ts +1 -1
  502. package/src/models/retrypaymenterror.ts +52 -0
  503. package/src/models/retrypaymentresponse.ts +80 -0
  504. package/src/models/revenuesummaryresponse.ts +1 -1
  505. package/src/models/revenuetrendbucket.ts +7 -2
  506. package/src/models/subscription.ts +45 -0
  507. package/src/models/subscriptionintervaladdop.ts +1 -1
  508. package/src/models/versiontransition.ts +104 -0
  509. package/src/models/webhookportal.ts +61 -0
  510. package/src/models/webhooks.ts +76 -0
  511. package/src/sdk/invoicesv2.ts +84 -0
  512. package/src/sdk/merchants.ts +31 -0
  513. package/src/sdk/profitability.ts +1 -1
  514. package/src/sdk/revenue.ts +1 -1
  515. package/src/sdk/sdk.ts +12 -0
  516. package/src/sdk/subscriptions.ts +18 -0
  517. package/src/sdk/webhooks.ts +100 -0
@@ -0,0 +1,82 @@
1
+ "use strict";
2
+ /*
3
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.VersionTransition$outboundSchema = exports.VersionTransition$inboundSchema = exports.Proration$outboundSchema = exports.Proration$inboundSchema = exports.EffectiveDate$outboundSchema = exports.EffectiveDate$inboundSchema = exports.Proration = exports.EffectiveDate = void 0;
40
+ exports.versionTransitionToJSON = versionTransitionToJSON;
41
+ exports.versionTransitionFromJSON = versionTransitionFromJSON;
42
+ const z = __importStar(require("zod/v3"));
43
+ const schemas_js_1 = require("../lib/schemas.js");
44
+ /**
45
+ * When the move takes effect.
46
+ */
47
+ exports.EffectiveDate = {
48
+ EndOfCurrentPeriod: "end_of_current_period",
49
+ Immediate: "immediate",
50
+ };
51
+ /**
52
+ * How the current period is split. Only `none` is supported.
53
+ */
54
+ exports.Proration = {
55
+ None: "none",
56
+ };
57
+ /** @internal */
58
+ exports.EffectiveDate$inboundSchema = z.nativeEnum(exports.EffectiveDate);
59
+ /** @internal */
60
+ exports.EffectiveDate$outboundSchema = exports.EffectiveDate$inboundSchema;
61
+ /** @internal */
62
+ exports.Proration$inboundSchema = z
63
+ .nativeEnum(exports.Proration);
64
+ /** @internal */
65
+ exports.Proration$outboundSchema = exports.Proration$inboundSchema;
66
+ /** @internal */
67
+ exports.VersionTransition$inboundSchema = z.object({
68
+ effectiveDate: exports.EffectiveDate$inboundSchema,
69
+ proration: exports.Proration$inboundSchema,
70
+ });
71
+ /** @internal */
72
+ exports.VersionTransition$outboundSchema = z.object({
73
+ effectiveDate: exports.EffectiveDate$outboundSchema,
74
+ proration: exports.Proration$outboundSchema,
75
+ });
76
+ function versionTransitionToJSON(versionTransition) {
77
+ return JSON.stringify(exports.VersionTransition$outboundSchema.parse(versionTransition));
78
+ }
79
+ function versionTransitionFromJSON(jsonString) {
80
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.VersionTransition$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'VersionTransition' from JSON`);
81
+ }
82
+ //# sourceMappingURL=versiontransition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"versiontransition.js","sourceRoot":"","sources":["../../../src/models/versiontransition.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsFH,0DAMC;AACD,8DAQC;AAnGD,0CAA4B;AAC5B,kDAA8C;AAK9C;;GAEG;AACU,QAAA,aAAa,GAAG;IAC3B,kBAAkB,EAAE,uBAAuB;IAC3C,SAAS,EAAE,WAAW;CACd,CAAC;AAMX;;GAEG;AACU,QAAA,SAAS,GAAG;IACvB,IAAI,EAAE,MAAM;CACJ,CAAC;AAoBX,gBAAgB;AACH,QAAA,2BAA2B,GAEpC,CAAC,CAAC,UAAU,CAAC,qBAAa,CAAC,CAAC;AAChC,gBAAgB;AACH,QAAA,4BAA4B,GAErC,mCAA2B,CAAC;AAEhC,gBAAgB;AACH,QAAA,uBAAuB,GAAsC,CAAC;KACxE,UAAU,CAAC,iBAAS,CAAC,CAAC;AACzB,gBAAgB;AACH,QAAA,wBAAwB,GACnC,+BAAuB,CAAC;AAE1B,gBAAgB;AACH,QAAA,+BAA+B,GAIxC,CAAC,CAAC,MAAM,CAAC;IACX,aAAa,EAAE,mCAA2B;IAC1C,SAAS,EAAE,+BAAuB;CACnC,CAAC,CAAC;AAOH,gBAAgB;AACH,QAAA,gCAAgC,GAIzC,CAAC,CAAC,MAAM,CAAC;IACX,aAAa,EAAE,oCAA4B;IAC3C,SAAS,EAAE,gCAAwB;CACpC,CAAC,CAAC;AAEH,SAAgB,uBAAuB,CACrC,iBAAoC;IAEpC,OAAO,IAAI,CAAC,SAAS,CACnB,wCAAgC,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAC1D,CAAC;AACJ,CAAC;AACD,SAAgB,yBAAyB,CACvC,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,uCAA+B,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC3D,+CAA+C,CAChD,CAAC;AACJ,CAAC"}
@@ -0,0 +1,34 @@
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
+ /**
6
+ * Object type identifier
7
+ */
8
+ export declare const WebhookPortalObject: {
9
+ readonly WebhookPortal: "webhookPortal";
10
+ };
11
+ /**
12
+ * Object type identifier
13
+ */
14
+ export type WebhookPortalObject = ClosedEnum<typeof WebhookPortalObject>;
15
+ export type WebhookPortal = {
16
+ /**
17
+ * Object type identifier
18
+ */
19
+ object: WebhookPortalObject;
20
+ /**
21
+ * When the portal link expires
22
+ */
23
+ expiresAt: Date;
24
+ /**
25
+ * Magic link URL to access the webhook portal
26
+ */
27
+ url: string;
28
+ };
29
+ /** @internal */
30
+ export declare const WebhookPortalObject$inboundSchema: z.ZodNativeEnum<typeof WebhookPortalObject>;
31
+ /** @internal */
32
+ export declare const WebhookPortal$inboundSchema: z.ZodType<WebhookPortal, z.ZodTypeDef, unknown>;
33
+ export declare function webhookPortalFromJSON(jsonString: string): SafeParseResult<WebhookPortal, SDKValidationError>;
34
+ //# sourceMappingURL=webhookportal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhookportal.d.ts","sourceRoot":"","sources":["../../../src/models/webhookportal.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;;GAEG;AACH,eAAO,MAAM,mBAAmB;;CAEtB,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEzE,MAAM,MAAM,aAAa,GAAG;IAC1B;;OAEG;IACH,MAAM,EAAE,mBAAmB,CAAC;IAC5B;;OAEG;IACH,SAAS,EAAE,IAAI,CAAC;IAChB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,iCAAiC,EAAE,CAAC,CAAC,aAAa,CAC7D,OAAO,mBAAmB,CACS,CAAC;AAEtC,gBAAgB;AAChB,eAAO,MAAM,2BAA2B,EAAE,CAAC,CAAC,OAAO,CACjD,aAAa,EACb,CAAC,CAAC,UAAU,EACZ,OAAO,CAKP,CAAC;AAEH,wBAAgB,qBAAqB,CACnC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,aAAa,EAAE,kBAAkB,CAAC,CAMpD"}
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ /*
3
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.WebhookPortal$inboundSchema = exports.WebhookPortalObject$inboundSchema = exports.WebhookPortalObject = void 0;
40
+ exports.webhookPortalFromJSON = webhookPortalFromJSON;
41
+ const z = __importStar(require("zod/v3"));
42
+ const schemas_js_1 = require("../lib/schemas.js");
43
+ /**
44
+ * Object type identifier
45
+ */
46
+ exports.WebhookPortalObject = {
47
+ WebhookPortal: "webhookPortal",
48
+ };
49
+ /** @internal */
50
+ exports.WebhookPortalObject$inboundSchema = z.nativeEnum(exports.WebhookPortalObject);
51
+ /** @internal */
52
+ exports.WebhookPortal$inboundSchema = z.object({
53
+ object: exports.WebhookPortalObject$inboundSchema,
54
+ expiresAt: z.string().datetime({ offset: true }).transform(v => new Date(v)),
55
+ url: z.string(),
56
+ });
57
+ function webhookPortalFromJSON(jsonString) {
58
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.WebhookPortal$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'WebhookPortal' from JSON`);
59
+ }
60
+ //# sourceMappingURL=webhookportal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhookportal.js","sourceRoot":"","sources":["../../../src/models/webhookportal.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkDH,sDAQC;AAxDD,0CAA4B;AAC5B,kDAA8C;AAK9C;;GAEG;AACU,QAAA,mBAAmB,GAAG;IACjC,aAAa,EAAE,eAAe;CACtB,CAAC;AAqBX,gBAAgB;AACH,QAAA,iCAAiC,GAE1C,CAAC,CAAC,UAAU,CAAC,2BAAmB,CAAC,CAAC;AAEtC,gBAAgB;AACH,QAAA,2BAA2B,GAIpC,CAAC,CAAC,MAAM,CAAC;IACX,MAAM,EAAE,yCAAiC;IACzC,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;IAC5E,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;CAChB,CAAC,CAAC;AAEH,SAAgB,qBAAqB,CACnC,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,mCAA2B,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACvD,2CAA2C,CAC5C,CAAC;AACJ,CAAC"}
@@ -0,0 +1,46 @@
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
+ /**
6
+ * Object type identifier
7
+ */
8
+ export declare const WebhooksObject: {
9
+ readonly Webhooks: "webhooks";
10
+ };
11
+ /**
12
+ * Object type identifier
13
+ */
14
+ export type WebhooksObject = ClosedEnum<typeof WebhooksObject>;
15
+ export type Webhooks = {
16
+ /**
17
+ * Object type identifier
18
+ */
19
+ object: WebhooksObject;
20
+ /**
21
+ * Svix application identifier
22
+ */
23
+ applicationId: string;
24
+ /**
25
+ * When webhooks were first enabled
26
+ */
27
+ createdAt: Date;
28
+ /**
29
+ * Whether webhooks are enabled
30
+ */
31
+ enabled: boolean;
32
+ /**
33
+ * Merchant identifier
34
+ */
35
+ merchantId: string;
36
+ /**
37
+ * When webhooks were last updated
38
+ */
39
+ updatedAt: Date;
40
+ };
41
+ /** @internal */
42
+ export declare const WebhooksObject$inboundSchema: z.ZodNativeEnum<typeof WebhooksObject>;
43
+ /** @internal */
44
+ export declare const Webhooks$inboundSchema: z.ZodType<Webhooks, z.ZodTypeDef, unknown>;
45
+ export declare function webhooksFromJSON(jsonString: string): SafeParseResult<Webhooks, SDKValidationError>;
46
+ //# sourceMappingURL=webhooks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhooks.d.ts","sourceRoot":"","sources":["../../../src/models/webhooks.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;;GAEG;AACH,eAAO,MAAM,cAAc;;CAEjB,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAE/D,MAAM,MAAM,QAAQ,GAAG;IACrB;;OAEG;IACH,MAAM,EAAE,cAAc,CAAC;IACvB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,SAAS,EAAE,IAAI,CAAC;IAChB;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,EAAE,IAAI,CAAC;CACjB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,4BAA4B,EAAE,CAAC,CAAC,aAAa,CACxD,OAAO,cAAc,CACS,CAAC;AAEjC,gBAAgB;AAChB,eAAO,MAAM,sBAAsB,EAAE,CAAC,CAAC,OAAO,CAC5C,QAAQ,EACR,CAAC,CAAC,UAAU,EACZ,OAAO,CAQP,CAAC;AAEH,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,QAAQ,EAAE,kBAAkB,CAAC,CAM/C"}
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ /*
3
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.Webhooks$inboundSchema = exports.WebhooksObject$inboundSchema = exports.WebhooksObject = void 0;
40
+ exports.webhooksFromJSON = webhooksFromJSON;
41
+ const z = __importStar(require("zod/v3"));
42
+ const schemas_js_1 = require("../lib/schemas.js");
43
+ /**
44
+ * Object type identifier
45
+ */
46
+ exports.WebhooksObject = {
47
+ Webhooks: "webhooks",
48
+ };
49
+ /** @internal */
50
+ exports.WebhooksObject$inboundSchema = z.nativeEnum(exports.WebhooksObject);
51
+ /** @internal */
52
+ exports.Webhooks$inboundSchema = z.object({
53
+ object: exports.WebhooksObject$inboundSchema,
54
+ applicationId: z.string(),
55
+ createdAt: z.string().datetime({ offset: true }).transform(v => new Date(v)),
56
+ enabled: z.boolean(),
57
+ merchantId: z.string(),
58
+ updatedAt: z.string().datetime({ offset: true }).transform(v => new Date(v)),
59
+ });
60
+ function webhooksFromJSON(jsonString) {
61
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Webhooks$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Webhooks' from JSON`);
62
+ }
63
+ //# sourceMappingURL=webhooks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhooks.js","sourceRoot":"","sources":["../../../src/models/webhooks.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiEH,4CAQC;AAvED,0CAA4B;AAC5B,kDAA8C;AAK9C;;GAEG;AACU,QAAA,cAAc,GAAG;IAC5B,QAAQ,EAAE,UAAU;CACZ,CAAC;AAiCX,gBAAgB;AACH,QAAA,4BAA4B,GAErC,CAAC,CAAC,UAAU,CAAC,sBAAc,CAAC,CAAC;AAEjC,gBAAgB;AACH,QAAA,sBAAsB,GAI/B,CAAC,CAAC,MAAM,CAAC;IACX,MAAM,EAAE,oCAA4B;IACpC,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;IACzB,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;IAC5E,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;IACpB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,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,gBAAgB,CAC9B,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,8BAAsB,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAClD,sCAAsC,CACvC,CAAC;AACJ,CAAC"}
@@ -23,6 +23,13 @@ export declare class InvoicesV2 extends ClientSDK {
23
23
  * Create a manual line item for a billing v1 subscription. Manual line items are ad-hoc charges or credits that flow through the same collection pipeline as auto-generated items. Exactly one of subscriptionId or invoiceId must be provided.
24
24
  */
25
25
  createLineItem(request: operations.CreateLineItemRequest, options?: RequestOptions): Promise<models.LineItem>;
26
+ /**
27
+ * List projected
28
+ *
29
+ * @remarks
30
+ * List the invoices a subscription will issue in a range of invoice moments, one projected invoice for each distinct invoice moment. Projected invoices are derived on each read and never stored. Each has status PROJECTED, and its id is stable between reads, but GET /v2/invoices/{id} returns 404 for it. Totals EXCLUDE usage: metered charges are not projected, and an invoice moment that has only metered charges is omitted. Tax and sequenceNumber are estimates. The range filters on the invoice moment (invoiceAt) in [from, to). A from before now is treated as now. to must be after from and at most one year after now; now is the subscription's test-clock time when it has a test clock. A terminated subscription returns an empty list. Each invoice carries its lines in lineItems. Authorization is the same as listing invoices.
31
+ */
32
+ listProjectedInvoices(request: operations.ListProjectedInvoicesRequest, options?: RequestOptions): Promise<operations.ListProjectedInvoicesResponse>;
26
33
  /**
27
34
  * Get
28
35
  *
@@ -44,6 +51,22 @@ export declare class InvoicesV2 extends ClientSDK {
44
51
  * Downloads the Paygentic-rendered invoice document. The caller must be authenticated and entitled to the invoice; the stored document is streamed back, so no storage URL is ever handed out. Returns 404 when the invoice's document is the tax provider's rather than ours — in that case the invoice resource reports pdfSource `tax_provider` and its pdfUrl points at the provider's link instead.
45
52
  */
46
53
  downloadInvoicePdf(request: operations.DownloadInvoicePdfRequest, options?: RequestOptions): Promise<ReadableStream<Uint8Array>>;
54
+ /**
55
+ * Settle Invoice Payment
56
+ *
57
+ * @remarks
58
+ * Settle an unpaid invoice in status `ISSUED` or `PAYMENT_FAILED`. The `method` field selects how.
59
+ *
60
+ * - `hosted_link`: create a new hosted payment link and email it to the customer. The invoice stays unpaid until the customer pays on the link. Each call replaces the previous link. A payment link expires after 30 days; to collect an invoice whose link has expired, call this method again.
61
+ * - `out_of_band`: record a payment that you collected outside Paygentic. The invoice changes to `PAID` immediately. A second call returns 409.
62
+ *
63
+ * For `hosted_link`, an invoice that does not exist returns 403, the same as an invoice of another merchant.
64
+ *
65
+ * Paygentic selects the payment provider from your connected payment account. The response reports the provider.
66
+ *
67
+ * **Warning:** each `hosted_link` call creates a new link and sends the customer a new email. Do not retry a `hosted_link` call after a timeout: first read the invoice to see if a new link exists.
68
+ */
69
+ recordInvoicePayment(request: operations.RecordInvoicePaymentRequest, options?: RequestOptions): Promise<operations.RecordInvoicePaymentResponse>;
47
70
  /**
48
71
  * Refund Invoice
49
72
  *
@@ -65,5 +88,33 @@ export declare class InvoicesV2 extends ClientSDK {
65
88
  * Void a previously-issued refund (credit note). Reverses the credit note in the tax provider and excludes it from revenue. Accessible to the owning merchant or platform operators.
66
89
  */
67
90
  voidInvoiceRefund(request: operations.VoidInvoiceRefundRequest, options?: RequestOptions): Promise<models.InvoiceRefund>;
91
+ /**
92
+ * Retry Payment
93
+ *
94
+ * @remarks
95
+ * Charge the customer's saved payment method again for an unpaid invoice.
96
+ *
97
+ * The invoice must be in status `ISSUED` or `PAYMENT_FAILED`, auto-charge must be on for its subscription, and the invoice must have a payment session. If not, the response is 400.
98
+ *
99
+ * The response status tells you the result. Only 200 means that the charge succeeded. Every other response from this operation that has a `retry_payment_result` body has `success: false`, and `error.code` gives the reason:
100
+ *
101
+ * | Status | `error.code` | Meaning |
102
+ * | --- | --- | --- |
103
+ * | 200 | — | The charge succeeded, the provider had already collected it, or no amount is unpaid. |
104
+ * | 202 | `processing` | The provider accepted the charge. It settles later (for example, a bank debit). |
105
+ * | 402 | a decline code, for example `card_declined`, `insufficient_funds`, `do_not_honor`, `authentication_required` | The provider declined the payment method. |
106
+ * | 409 | `concurrent_attempt` | Another payment attempt for this invoice is in progress. |
107
+ * | 409 | `PAYMENT_SESSION_EXPIRED` | The payment link expired (after 30 days). Create a new link with `POST /v2/invoices/{id}/payment` and `method: hosted_link`, then retry. If the customer also has no usable saved payment method, the response is 422 instead. |
108
+ * | 409 | another value, or no `code` | The payment session cannot be charged in its current state (for example `session_unusable`, `non_confirmable`, `PAYMENT_PROCESSING`, `PAYMENT_ALREADY_COMPLETED`). Read `error.message` for the cause. |
109
+ * | 422 | `no_payment_method` | The customer has no usable saved payment method. Send a payment link instead. |
110
+ * | 502 | `provider_unavailable` or none | The payment provider did not answer, or the provider failed the charge for a reason that is not known. Retry later. |
111
+ *
112
+ * A 500 response has the standard error body, not `retry_payment_result`. It is an internal error, and a retry does not fix it.
113
+ *
114
+ * An invoice that does not exist returns 403, the same as an invoice of another merchant.
115
+ *
116
+ * This operation is rate limited to one call each minute for each invoice.
117
+ */
118
+ retryInvoicePayment(request: operations.RetryInvoicePaymentRequest, options?: RequestOptions): Promise<models.RetryPaymentResponse>;
68
119
  }
69
120
  //# sourceMappingURL=invoicesv2.d.ts.map
@@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"}
@@ -12,6 +12,9 @@ const invoicesV2GetLineItems_js_1 = require("../funcs/invoicesV2GetLineItems.js"
12
12
  const invoicesV2List_js_1 = require("../funcs/invoicesV2List.js");
13
13
  const invoicesV2ListInvoiceRefunds_js_1 = require("../funcs/invoicesV2ListInvoiceRefunds.js");
14
14
  const invoicesV2ListLineItems_js_1 = require("../funcs/invoicesV2ListLineItems.js");
15
+ const invoicesV2ListProjectedInvoices_js_1 = require("../funcs/invoicesV2ListProjectedInvoices.js");
16
+ const invoicesV2RecordInvoicePayment_js_1 = require("../funcs/invoicesV2RecordInvoicePayment.js");
17
+ const invoicesV2RetryInvoicePayment_js_1 = require("../funcs/invoicesV2RetryInvoicePayment.js");
15
18
  const invoicesV2VoidInvoiceRefund_js_1 = require("../funcs/invoicesV2VoidInvoiceRefund.js");
16
19
  const sdks_js_1 = require("../lib/sdks.js");
17
20
  const fp_js_1 = require("../types/fp.js");
@@ -43,6 +46,15 @@ class InvoicesV2 extends sdks_js_1.ClientSDK {
43
46
  async createLineItem(request, options) {
44
47
  return (0, fp_js_1.unwrapAsync)((0, invoicesV2CreateLineItem_js_1.invoicesV2CreateLineItem)(this, request, options));
45
48
  }
49
+ /**
50
+ * List projected
51
+ *
52
+ * @remarks
53
+ * List the invoices a subscription will issue in a range of invoice moments, one projected invoice for each distinct invoice moment. Projected invoices are derived on each read and never stored. Each has status PROJECTED, and its id is stable between reads, but GET /v2/invoices/{id} returns 404 for it. Totals EXCLUDE usage: metered charges are not projected, and an invoice moment that has only metered charges is omitted. Tax and sequenceNumber are estimates. The range filters on the invoice moment (invoiceAt) in [from, to). A from before now is treated as now. to must be after from and at most one year after now; now is the subscription's test-clock time when it has a test clock. A terminated subscription returns an empty list. Each invoice carries its lines in lineItems. Authorization is the same as listing invoices.
54
+ */
55
+ async listProjectedInvoices(request, options) {
56
+ return (0, fp_js_1.unwrapAsync)((0, invoicesV2ListProjectedInvoices_js_1.invoicesV2ListProjectedInvoices)(this, request, options));
57
+ }
46
58
  /**
47
59
  * Get
48
60
  *
@@ -70,6 +82,24 @@ class InvoicesV2 extends sdks_js_1.ClientSDK {
70
82
  async downloadInvoicePdf(request, options) {
71
83
  return (0, fp_js_1.unwrapAsync)((0, invoicesV2DownloadInvoicePdf_js_1.invoicesV2DownloadInvoicePdf)(this, request, options));
72
84
  }
85
+ /**
86
+ * Settle Invoice Payment
87
+ *
88
+ * @remarks
89
+ * Settle an unpaid invoice in status `ISSUED` or `PAYMENT_FAILED`. The `method` field selects how.
90
+ *
91
+ * - `hosted_link`: create a new hosted payment link and email it to the customer. The invoice stays unpaid until the customer pays on the link. Each call replaces the previous link. A payment link expires after 30 days; to collect an invoice whose link has expired, call this method again.
92
+ * - `out_of_band`: record a payment that you collected outside Paygentic. The invoice changes to `PAID` immediately. A second call returns 409.
93
+ *
94
+ * For `hosted_link`, an invoice that does not exist returns 403, the same as an invoice of another merchant.
95
+ *
96
+ * Paygentic selects the payment provider from your connected payment account. The response reports the provider.
97
+ *
98
+ * **Warning:** each `hosted_link` call creates a new link and sends the customer a new email. Do not retry a `hosted_link` call after a timeout: first read the invoice to see if a new link exists.
99
+ */
100
+ async recordInvoicePayment(request, options) {
101
+ return (0, fp_js_1.unwrapAsync)((0, invoicesV2RecordInvoicePayment_js_1.invoicesV2RecordInvoicePayment)(this, request, options));
102
+ }
73
103
  /**
74
104
  * Refund Invoice
75
105
  *
@@ -97,6 +127,36 @@ class InvoicesV2 extends sdks_js_1.ClientSDK {
97
127
  async voidInvoiceRefund(request, options) {
98
128
  return (0, fp_js_1.unwrapAsync)((0, invoicesV2VoidInvoiceRefund_js_1.invoicesV2VoidInvoiceRefund)(this, request, options));
99
129
  }
130
+ /**
131
+ * Retry Payment
132
+ *
133
+ * @remarks
134
+ * Charge the customer's saved payment method again for an unpaid invoice.
135
+ *
136
+ * The invoice must be in status `ISSUED` or `PAYMENT_FAILED`, auto-charge must be on for its subscription, and the invoice must have a payment session. If not, the response is 400.
137
+ *
138
+ * The response status tells you the result. Only 200 means that the charge succeeded. Every other response from this operation that has a `retry_payment_result` body has `success: false`, and `error.code` gives the reason:
139
+ *
140
+ * | Status | `error.code` | Meaning |
141
+ * | --- | --- | --- |
142
+ * | 200 | — | The charge succeeded, the provider had already collected it, or no amount is unpaid. |
143
+ * | 202 | `processing` | The provider accepted the charge. It settles later (for example, a bank debit). |
144
+ * | 402 | a decline code, for example `card_declined`, `insufficient_funds`, `do_not_honor`, `authentication_required` | The provider declined the payment method. |
145
+ * | 409 | `concurrent_attempt` | Another payment attempt for this invoice is in progress. |
146
+ * | 409 | `PAYMENT_SESSION_EXPIRED` | The payment link expired (after 30 days). Create a new link with `POST /v2/invoices/{id}/payment` and `method: hosted_link`, then retry. If the customer also has no usable saved payment method, the response is 422 instead. |
147
+ * | 409 | another value, or no `code` | The payment session cannot be charged in its current state (for example `session_unusable`, `non_confirmable`, `PAYMENT_PROCESSING`, `PAYMENT_ALREADY_COMPLETED`). Read `error.message` for the cause. |
148
+ * | 422 | `no_payment_method` | The customer has no usable saved payment method. Send a payment link instead. |
149
+ * | 502 | `provider_unavailable` or none | The payment provider did not answer, or the provider failed the charge for a reason that is not known. Retry later. |
150
+ *
151
+ * A 500 response has the standard error body, not `retry_payment_result`. It is an internal error, and a retry does not fix it.
152
+ *
153
+ * An invoice that does not exist returns 403, the same as an invoice of another merchant.
154
+ *
155
+ * This operation is rate limited to one call each minute for each invoice.
156
+ */
157
+ async retryInvoicePayment(request, options) {
158
+ return (0, fp_js_1.unwrapAsync)((0, invoicesV2RetryInvoicePayment_js_1.invoicesV2RetryInvoicePayment)(this, request, options));
159
+ }
100
160
  }
101
161
  exports.InvoicesV2 = InvoicesV2;
102
162
  //# sourceMappingURL=invoicesv2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"invoicesv2.js","sourceRoot":"","sources":["../../../src/sdk/invoicesv2.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,gGAA0F;AAC1F,sFAAgF;AAChF,8FAAwF;AACxF,gEAA0D;AA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CAAC,kBAAkB,CACtB,OAA6C,EAC7C,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,8DAA4B,EAC7C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,iBAAiB,CACrB,OAA4C,EAC5C,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,4DAA2B,EAC5C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,KAAK,CAAC,mBAAmB,CACvB,OAA8C,EAC9C,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,gEAA6B,EAC9C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AA1OD,gCA0OC"}
@@ -0,0 +1,16 @@
1
+ import { ClientSDK, RequestOptions } from "../lib/sdks.js";
2
+ import * as operations from "../models/operations/index.js";
3
+ export declare class Merchants extends ClientSDK {
4
+ /**
5
+ * Reset a merchant's data
6
+ *
7
+ * @remarks
8
+ * With `scope: merchant`, deletes the merchant's customers and everything attached to them: subscriptions, invoices, line items, payments, entitlements, grants, orders, test clocks, usage events, invoice documents and, when tax is enabled, the documents in the merchant's Quaderno sandbox account. `keepCatalog: true` keeps the catalog (products, plans, prices, fees, features, billable metrics), and `keepCatalog: false` deletes it too; the merchant's configuration is always kept. With `scope: customer`, deletes one customer and what is attached to it; test clocks and the Quaderno account's documents are kept, since they belong to no single customer.
9
+ *
10
+ * A `204` means every delete is done or scheduled: usage events and Quaderno documents finish in the background, and usage events still being ingested while it runs can survive it. A `502` means a store outside Postgres failed; the customers are already out of the API, and calling again with the same body finishes the reset. Calling again is always safe. While a customer waits for that, its external id is free for a new customer to take; a retry then deletes usage events by customer id only.
11
+ *
12
+ * Not available in production.
13
+ */
14
+ reset(request: operations.ResetMerchantRequest, options?: RequestOptions): Promise<void>;
15
+ }
16
+ //# sourceMappingURL=merchants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"merchants.d.ts","sourceRoot":"","sources":["../../../src/sdk/merchants.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,qBAAa,SAAU,SAAQ,SAAS;IACtC;;;;;;;;;OASG;IACG,KAAK,CACT,OAAO,EAAE,UAAU,CAAC,oBAAoB,EACxC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,IAAI,CAAC;CAOjB"}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ /*
3
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Merchants = void 0;
7
+ const merchantsReset_js_1 = require("../funcs/merchantsReset.js");
8
+ const sdks_js_1 = require("../lib/sdks.js");
9
+ const fp_js_1 = require("../types/fp.js");
10
+ class Merchants extends sdks_js_1.ClientSDK {
11
+ /**
12
+ * Reset a merchant's data
13
+ *
14
+ * @remarks
15
+ * With `scope: merchant`, deletes the merchant's customers and everything attached to them: subscriptions, invoices, line items, payments, entitlements, grants, orders, test clocks, usage events, invoice documents and, when tax is enabled, the documents in the merchant's Quaderno sandbox account. `keepCatalog: true` keeps the catalog (products, plans, prices, fees, features, billable metrics), and `keepCatalog: false` deletes it too; the merchant's configuration is always kept. With `scope: customer`, deletes one customer and what is attached to it; test clocks and the Quaderno account's documents are kept, since they belong to no single customer.
16
+ *
17
+ * A `204` means every delete is done or scheduled: usage events and Quaderno documents finish in the background, and usage events still being ingested while it runs can survive it. A `502` means a store outside Postgres failed; the customers are already out of the API, and calling again with the same body finishes the reset. Calling again is always safe. While a customer waits for that, its external id is free for a new customer to take; a retry then deletes usage events by customer id only.
18
+ *
19
+ * Not available in production.
20
+ */
21
+ async reset(request, options) {
22
+ return (0, fp_js_1.unwrapAsync)((0, merchantsReset_js_1.merchantsReset)(this, request, options));
23
+ }
24
+ }
25
+ exports.Merchants = Merchants;
26
+ //# sourceMappingURL=merchants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"merchants.js","sourceRoot":"","sources":["../../../src/sdk/merchants.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,kEAA4D;AAC5D,4CAA2D;AAE3D,0CAA6C;AAE7C,MAAa,SAAU,SAAQ,mBAAS;IACtC;;;;;;;;;OASG;IACH,KAAK,CAAC,KAAK,CACT,OAAwC,EACxC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,kCAAc,EAC/B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AArBD,8BAqBC"}
@@ -6,7 +6,7 @@ export declare class Profitability extends ClientSDK {
6
6
  * Get profitability summary
7
7
  *
8
8
  * @remarks
9
- * Returns a per-customer profitability summary for a merchant over a date range. Each row aggregates revenue (from issued + paid invoices), cost (from metered cost discovery), profit, and margin. Customers are ranked by profit descending and capped at topN; the remainder is rolled into a single self-consistent 'Other' row whose revenue, cost, and profit reflect the same set of customers. Rows are inner-joined against the merchant's customer list, so orphaned meter subjects from deleted or unknown customers are dropped.
9
+ * Returns a per-customer profitability summary for a merchant over a date range. Each row aggregates revenue (invoices issued in the period, whatever their status since, less refunds, both excluding tax; the same figure /v0/revenue reports), cost (from metered cost discovery), profit, and margin. Customers are ranked by profit descending and capped at topN; the remainder is rolled into a single self-consistent 'Other' row whose revenue, cost, and profit reflect the same set of customers. Rows are joined against the merchant's customer list, so meter subjects that match no customer are dropped. Soft-deleted customers with revenue or cost in the period are folded into a single 'deleted' row, which always comes last, after 'Other', and takes no top-N slot.
10
10
  */
11
11
  getProfitability(request: operations.GetProfitabilityRequest, options?: RequestOptions): Promise<models.ProfitabilitySummaryResponse>;
12
12
  }
@@ -12,7 +12,7 @@ class Profitability extends sdks_js_1.ClientSDK {
12
12
  * Get profitability summary
13
13
  *
14
14
  * @remarks
15
- * Returns a per-customer profitability summary for a merchant over a date range. Each row aggregates revenue (from issued + paid invoices), cost (from metered cost discovery), profit, and margin. Customers are ranked by profit descending and capped at topN; the remainder is rolled into a single self-consistent 'Other' row whose revenue, cost, and profit reflect the same set of customers. Rows are inner-joined against the merchant's customer list, so orphaned meter subjects from deleted or unknown customers are dropped.
15
+ * Returns a per-customer profitability summary for a merchant over a date range. Each row aggregates revenue (invoices issued in the period, whatever their status since, less refunds, both excluding tax; the same figure /v0/revenue reports), cost (from metered cost discovery), profit, and margin. Customers are ranked by profit descending and capped at topN; the remainder is rolled into a single self-consistent 'Other' row whose revenue, cost, and profit reflect the same set of customers. Rows are joined against the merchant's customer list, so meter subjects that match no customer are dropped. Soft-deleted customers with revenue or cost in the period are folded into a single 'deleted' row, which always comes last, after 'Other', and takes no top-N slot.
16
16
  */
17
17
  async getProfitability(request, options) {
18
18
  return (0, fp_js_1.unwrapAsync)((0, profitabilityGetProfitability_js_1.profitabilityGetProfitability)(this, request, options));
@@ -6,7 +6,7 @@ export declare class Revenue extends ClientSDK {
6
6
  * Get revenue summary
7
7
  *
8
8
  * @remarks
9
- * Returns revenue summary with invoice and payment breakdowns (outstanding/paid/writtenOff), plus a time-series trend. Revenue is sourced from all issued invoices (v0 + v1) and completed payments.
9
+ * Returns revenue summary with invoice and payment breakdowns (outstanding/paid/writtenOff), plus a time-series trend. Revenue is what was billed in the period (by default, invoices issued in it; see periodBasis), whatever their status since, less refunds, both excluding tax; completed payments are reported under payments, never in revenue.
10
10
  */
11
11
  get(request: operations.GetRevenueRequest, options?: RequestOptions): Promise<models.RevenueSummaryResponse>;
12
12
  }
@@ -12,7 +12,7 @@ class Revenue extends sdks_js_1.ClientSDK {
12
12
  * Get revenue summary
13
13
  *
14
14
  * @remarks
15
- * Returns revenue summary with invoice and payment breakdowns (outstanding/paid/writtenOff), plus a time-series trend. Revenue is sourced from all issued invoices (v0 + v1) and completed payments.
15
+ * Returns revenue summary with invoice and payment breakdowns (outstanding/paid/writtenOff), plus a time-series trend. Revenue is what was billed in the period (by default, invoices issued in it; see periodBasis), whatever their status since, less refunds, both excluding tax; completed payments are reported under payments, never in revenue.
16
16
  */
17
17
  async get(request, options) {
18
18
  return (0, fp_js_1.unwrapAsync)((0, revenueGet_js_1.revenueGet)(this, request, options));
@@ -12,6 +12,7 @@ import { Fees } from "./fees.js";
12
12
  import { InvoicesV2 } from "./invoicesv2.js";
13
13
  import { Items } from "./items.js";
14
14
  import { MerchantIntegrations } from "./merchantintegrations.js";
15
+ import { Merchants } from "./merchants.js";
15
16
  import { Orders } from "./orders.js";
16
17
  import { Payments } from "./payments.js";
17
18
  import { PaymentSessions } from "./paymentsessions.js";
@@ -25,6 +26,7 @@ import { Sources } from "./sources.js";
25
26
  import { Subscriptions } from "./subscriptions.js";
26
27
  import { TestClocks } from "./testclocks.js";
27
28
  import { Users } from "./users.js";
29
+ import { Webhooks } from "./webhooks.js";
28
30
  export declare class Paygentic extends ClientSDK {
29
31
  private _billableMetrics?;
30
32
  get billableMetrics(): BillableMetrics;
@@ -64,6 +66,8 @@ export declare class Paygentic extends ClientSDK {
64
66
  get profitability(): Profitability;
65
67
  private _testClocks?;
66
68
  get testClocks(): TestClocks;
69
+ private _merchants?;
70
+ get merchants(): Merchants;
67
71
  private _externalReferences?;
68
72
  get externalReferences(): ExternalReferences;
69
73
  private _items?;
@@ -78,5 +82,7 @@ export declare class Paygentic extends ClientSDK {
78
82
  get merchantIntegrations(): MerchantIntegrations;
79
83
  private _approvals?;
80
84
  get approvals(): Approvals;
85
+ private _webhooks?;
86
+ get webhooks(): Webhooks;
81
87
  }
82
88
  //# sourceMappingURL=sdk.d.ts.map