@payabli/sdk-node 0.0.117 → 0.0.126

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 (363) hide show
  1. package/README.md +25 -13
  2. package/dist/cjs/BaseClient.d.ts +7 -7
  3. package/dist/cjs/BaseClient.js +3 -1
  4. package/dist/cjs/Client.d.ts +1 -2
  5. package/dist/cjs/api/errors/BadRequestError.js +5 -1
  6. package/dist/cjs/api/errors/ConflictError.js +5 -1
  7. package/dist/cjs/api/errors/ForbiddenError.js +5 -1
  8. package/dist/cjs/api/errors/InternalServerError.js +5 -1
  9. package/dist/cjs/api/errors/ServiceUnavailableError.js +5 -1
  10. package/dist/cjs/api/errors/UnauthorizedError.js +5 -1
  11. package/dist/cjs/api/resources/bill/client/Client.d.ts +1 -2
  12. package/dist/cjs/api/resources/bill/types/BillResponseData.d.ts +2 -1
  13. package/dist/cjs/api/resources/boarding/client/Client.d.ts +1 -2
  14. package/dist/cjs/api/resources/chargeBacks/client/Client.d.ts +1 -2
  15. package/dist/cjs/api/resources/checkCapture/client/Client.d.ts +1 -2
  16. package/dist/cjs/api/resources/cloud/client/Client.d.ts +1 -2
  17. package/dist/cjs/api/resources/customer/client/Client.d.ts +1 -2
  18. package/dist/cjs/api/resources/export/client/Client.d.ts +1 -7
  19. package/dist/cjs/api/resources/export/client/Client.js +5 -21
  20. package/dist/cjs/api/resources/hostedPaymentPages/client/Client.d.ts +1 -2
  21. package/dist/cjs/api/resources/import/client/Client.d.ts +1 -7
  22. package/dist/cjs/api/resources/import/client/Client.js +5 -21
  23. package/dist/cjs/api/resources/index.d.ts +3 -0
  24. package/dist/cjs/api/resources/index.js +4 -1
  25. package/dist/cjs/api/resources/invoice/client/Client.d.ts +6 -5
  26. package/dist/cjs/api/resources/invoice/client/Client.js +5 -3
  27. package/dist/cjs/api/resources/invoice/client/requests/AddInvoiceRequest.d.ts +5 -3
  28. package/dist/cjs/api/resources/lineItem/client/Client.d.ts +1 -7
  29. package/dist/cjs/api/resources/lineItem/client/Client.js +5 -21
  30. package/dist/cjs/api/resources/moneyIn/client/Client.d.ts +248 -4
  31. package/dist/cjs/api/resources/moneyIn/client/Client.js +518 -2
  32. package/dist/cjs/api/resources/moneyIn/client/requests/RequestPaymentAuthorizeV2.d.ts +31 -0
  33. package/dist/cjs/api/resources/moneyIn/client/requests/RequestPaymentV2.d.ts +99 -0
  34. package/dist/cjs/api/resources/moneyIn/client/requests/index.d.ts +2 -0
  35. package/dist/cjs/api/resources/moneyIn/errors/CaptureError.js +5 -1
  36. package/dist/cjs/api/resources/moneyIn/errors/InvalidTransStatusError.js +5 -1
  37. package/dist/cjs/api/resources/moneyIn/types/AuthResponseResponseData.d.ts +2 -2
  38. package/dist/cjs/api/resources/moneyIn/types/CaptureResponseData.d.ts +2 -2
  39. package/dist/cjs/api/resources/moneyIn/types/GetPaidResponseData.d.ts +3 -3
  40. package/dist/cjs/api/resources/moneyIn/types/ResponseDataRefunds.d.ts +2 -2
  41. package/dist/cjs/api/resources/moneyIn/types/TransactionDetailResponseData.d.ts +7 -3
  42. package/dist/cjs/api/resources/moneyIn/types/ValidateResponseData.d.ts +2 -2
  43. package/dist/cjs/api/resources/moneyIn/types/VoidResponseData.d.ts +2 -2
  44. package/dist/cjs/api/resources/moneyOut/client/Client.d.ts +1 -2
  45. package/dist/cjs/api/resources/moneyOutTypes/types/AuthCapturePayoutResponse.d.ts +2 -2
  46. package/dist/cjs/api/resources/notification/client/Client.d.ts +14 -7
  47. package/dist/cjs/api/resources/notification/client/Client.js +18 -21
  48. package/dist/cjs/api/resources/notificationlogs/client/Client.d.ts +1 -7
  49. package/dist/cjs/api/resources/notificationlogs/client/Client.js +5 -21
  50. package/dist/cjs/api/resources/ocr/client/Client.d.ts +1 -7
  51. package/dist/cjs/api/resources/ocr/client/Client.js +5 -21
  52. package/dist/cjs/api/resources/organization/client/Client.d.ts +1 -7
  53. package/dist/cjs/api/resources/organization/client/Client.js +5 -21
  54. package/dist/cjs/api/resources/paymentLink/client/Client.d.ts +4 -10
  55. package/dist/cjs/api/resources/paymentLink/client/Client.js +8 -24
  56. package/dist/cjs/api/resources/paymentLink/client/requests/PayLinkDataBill.d.ts +1 -1
  57. package/dist/cjs/api/resources/paymentLink/client/requests/PayLinkDataInvoice.d.ts +1 -1
  58. package/dist/cjs/api/resources/paymentLink/client/requests/PayLinkDataOut.d.ts +1 -1
  59. package/dist/cjs/api/resources/paymentLink/types/PaymentPageRequestBody.d.ts +2 -2
  60. package/dist/cjs/api/resources/paymentMethodDomain/client/Client.d.ts +1 -7
  61. package/dist/cjs/api/resources/paymentMethodDomain/client/Client.js +5 -21
  62. package/dist/cjs/api/resources/paypoint/client/Client.d.ts +1 -7
  63. package/dist/cjs/api/resources/paypoint/client/Client.js +5 -21
  64. package/dist/cjs/api/resources/query/client/Client.d.ts +1 -7
  65. package/dist/cjs/api/resources/query/client/Client.js +5 -21
  66. package/dist/cjs/api/resources/queryTypes/types/QueryBatchesDetailResponse.d.ts +158 -0
  67. package/dist/cjs/api/resources/statistic/client/Client.d.ts +1 -7
  68. package/dist/cjs/api/resources/statistic/client/Client.js +5 -21
  69. package/dist/cjs/api/resources/subscription/client/Client.d.ts +1 -7
  70. package/dist/cjs/api/resources/subscription/client/Client.js +5 -21
  71. package/dist/cjs/api/resources/templates/client/Client.d.ts +1 -7
  72. package/dist/cjs/api/resources/templates/client/Client.js +5 -21
  73. package/dist/cjs/api/resources/tokenStorage/client/Client.d.ts +52 -7
  74. package/dist/cjs/api/resources/tokenStorage/client/Client.js +56 -21
  75. package/dist/cjs/api/resources/tokenStorage/client/requests/AddMethodRequest.d.ts +23 -0
  76. package/dist/cjs/api/resources/tokenStorage/client/requests/GetMethodRequest.d.ts +6 -0
  77. package/dist/cjs/api/resources/tokenStorage/client/requests/UpdateMethodRequest.d.ts +22 -0
  78. package/dist/cjs/api/resources/tokenStorage/types/GetMethodResponse.d.ts +101 -1
  79. package/dist/cjs/api/resources/tokenStorage/types/RequestTokenStorage.d.ts +1 -0
  80. package/dist/cjs/api/resources/tokenStorage/types/VendorDataRequest.d.ts +9 -0
  81. package/dist/cjs/api/resources/tokenStorage/types/VendorDataRequest.js +3 -0
  82. package/dist/cjs/api/resources/tokenStorage/types/index.d.ts +1 -0
  83. package/dist/cjs/api/resources/tokenStorage/types/index.js +1 -0
  84. package/dist/cjs/api/resources/user/client/Client.d.ts +1 -7
  85. package/dist/cjs/api/resources/user/client/Client.js +5 -21
  86. package/dist/cjs/api/resources/v2MoneyInTypes/errors/BadRequestAuthResponseErrorV2.d.ts +6 -0
  87. package/dist/cjs/api/resources/v2MoneyInTypes/errors/BadRequestAuthResponseErrorV2.js +54 -0
  88. package/dist/cjs/api/resources/v2MoneyInTypes/errors/BadRequestCaptureResponseErrorV2.d.ts +6 -0
  89. package/dist/cjs/api/resources/v2MoneyInTypes/errors/BadRequestCaptureResponseErrorV2.js +54 -0
  90. package/dist/cjs/api/resources/v2MoneyInTypes/errors/BadRequestRefundResponseErrorV2.d.ts +6 -0
  91. package/dist/cjs/api/resources/v2MoneyInTypes/errors/BadRequestRefundResponseErrorV2.js +54 -0
  92. package/dist/cjs/api/resources/v2MoneyInTypes/errors/BadRequestVoidResponseErrorV2.d.ts +6 -0
  93. package/dist/cjs/api/resources/v2MoneyInTypes/errors/BadRequestVoidResponseErrorV2.js +54 -0
  94. package/dist/cjs/api/resources/v2MoneyInTypes/errors/DeclinedAuthResponseErrorV2.d.ts +6 -0
  95. package/dist/cjs/api/resources/v2MoneyInTypes/errors/DeclinedAuthResponseErrorV2.js +54 -0
  96. package/dist/cjs/api/resources/v2MoneyInTypes/errors/DeclinedCaptureResponseErrorV2.d.ts +6 -0
  97. package/dist/cjs/api/resources/v2MoneyInTypes/errors/DeclinedCaptureResponseErrorV2.js +54 -0
  98. package/dist/cjs/api/resources/v2MoneyInTypes/errors/DeclinedRefundResponseErrorV2.d.ts +6 -0
  99. package/dist/cjs/api/resources/v2MoneyInTypes/errors/DeclinedRefundResponseErrorV2.js +54 -0
  100. package/dist/cjs/api/resources/v2MoneyInTypes/errors/DeclinedVoidResponseErrorV2.d.ts +6 -0
  101. package/dist/cjs/api/resources/v2MoneyInTypes/errors/DeclinedVoidResponseErrorV2.js +54 -0
  102. package/dist/cjs/api/resources/v2MoneyInTypes/errors/InternalServerResponseErrorV2.d.ts +6 -0
  103. package/dist/cjs/api/resources/v2MoneyInTypes/errors/InternalServerResponseErrorV2.js +54 -0
  104. package/dist/cjs/api/resources/v2MoneyInTypes/errors/index.d.ts +9 -0
  105. package/dist/cjs/api/resources/v2MoneyInTypes/errors/index.js +25 -0
  106. package/dist/cjs/api/resources/v2MoneyInTypes/index.d.ts +2 -0
  107. package/dist/cjs/api/resources/v2MoneyInTypes/index.js +18 -0
  108. package/dist/cjs/api/resources/v2MoneyInTypes/types/V2BadRequestError.d.ts +22 -0
  109. package/dist/cjs/api/resources/v2MoneyInTypes/types/V2BadRequestError.js +3 -0
  110. package/dist/cjs/api/resources/v2MoneyInTypes/types/V2BadRequestErrorDetail.d.ts +9 -0
  111. package/dist/cjs/api/resources/v2MoneyInTypes/types/V2BadRequestErrorDetail.js +3 -0
  112. package/dist/cjs/api/resources/v2MoneyInTypes/types/V2DeclinedTransactionResponseWrapper.d.ts +761 -0
  113. package/dist/cjs/api/resources/v2MoneyInTypes/types/V2DeclinedTransactionResponseWrapper.js +3 -0
  114. package/dist/cjs/api/resources/v2MoneyInTypes/types/V2InternalServerError.d.ts +21 -0
  115. package/dist/cjs/api/resources/v2MoneyInTypes/types/V2InternalServerError.js +3 -0
  116. package/dist/cjs/api/resources/v2MoneyInTypes/types/V2ResponseAction.d.ts +4 -0
  117. package/dist/cjs/api/resources/v2MoneyInTypes/types/V2ResponseAction.js +3 -0
  118. package/dist/cjs/api/resources/v2MoneyInTypes/types/V2ResponseCode.d.ts +4 -0
  119. package/dist/cjs/api/resources/v2MoneyInTypes/types/V2ResponseCode.js +3 -0
  120. package/dist/cjs/api/resources/v2MoneyInTypes/types/V2ResponseExplanation.d.ts +4 -0
  121. package/dist/cjs/api/resources/v2MoneyInTypes/types/V2ResponseExplanation.js +3 -0
  122. package/dist/cjs/api/resources/v2MoneyInTypes/types/V2ResponseReason.d.ts +4 -0
  123. package/dist/cjs/api/resources/v2MoneyInTypes/types/V2ResponseReason.js +3 -0
  124. package/dist/cjs/api/resources/v2MoneyInTypes/types/V2TransactionDetailResponseData.d.ts +65 -0
  125. package/dist/cjs/api/resources/v2MoneyInTypes/types/V2TransactionDetailResponseData.js +3 -0
  126. package/dist/cjs/api/resources/v2MoneyInTypes/types/V2TransactionDetails.d.ts +1003 -0
  127. package/dist/cjs/api/resources/v2MoneyInTypes/types/V2TransactionDetails.js +3 -0
  128. package/dist/cjs/api/resources/v2MoneyInTypes/types/V2TransactionResponseWrapper.d.ts +13 -0
  129. package/dist/cjs/api/resources/v2MoneyInTypes/types/V2TransactionResponseWrapper.js +3 -0
  130. package/dist/cjs/api/resources/v2MoneyInTypes/types/index.d.ts +11 -0
  131. package/dist/cjs/api/resources/v2MoneyInTypes/types/index.js +27 -0
  132. package/dist/cjs/api/resources/vendor/client/Client.d.ts +1 -7
  133. package/dist/cjs/api/resources/vendor/client/Client.js +5 -21
  134. package/dist/cjs/api/resources/wallet/client/Client.d.ts +1 -7
  135. package/dist/cjs/api/resources/wallet/client/Client.js +5 -21
  136. package/dist/cjs/api/types/ApplicationData.d.ts +1 -0
  137. package/dist/cjs/api/types/ApplicationDataManaged.d.ts +1 -0
  138. package/dist/cjs/api/types/ApplicationDataOdp.d.ts +1 -0
  139. package/dist/cjs/api/types/ApplicationDataPayIn.d.ts +1 -0
  140. package/dist/cjs/api/types/{Avsresponsetext.d.ts → AvsResponse.d.ts} +1 -1
  141. package/dist/cjs/api/types/AvsResponse.js +3 -0
  142. package/dist/{esm/api/types/Avsresponsetext.d.mts → cjs/api/types/AvsResponseText.d.ts} +1 -1
  143. package/dist/cjs/api/types/AvsResponseText.js +3 -0
  144. package/dist/cjs/api/types/CustomerVaultId.d.ts +1 -0
  145. package/dist/cjs/api/types/CustomerVaultId.js +3 -0
  146. package/dist/cjs/api/types/{Cvvresponsetext.d.ts → CvvResponse.d.ts} +1 -1
  147. package/dist/cjs/api/types/CvvResponse.js +3 -0
  148. package/dist/{esm/api/types/Cvvresponsetext.d.mts → cjs/api/types/CvvResponseText.d.ts} +1 -1
  149. package/dist/cjs/api/types/CvvResponseText.js +3 -0
  150. package/dist/cjs/api/types/EmvAuthResponseData.d.ts +4 -0
  151. package/dist/cjs/api/types/EmvAuthResponseData.js +3 -0
  152. package/dist/cjs/api/types/Frequency.d.ts +1 -1
  153. package/dist/cjs/api/types/Frequency.js +1 -1
  154. package/dist/cjs/api/types/FrequencyList.d.ts +1 -1
  155. package/dist/cjs/api/types/MaxTicket.d.ts +4 -0
  156. package/dist/cjs/api/types/MaxTicket.js +3 -0
  157. package/dist/cjs/api/types/MinTicket.d.ts +4 -0
  158. package/dist/cjs/api/types/MinTicket.js +3 -0
  159. package/dist/cjs/api/types/OnCreate.d.ts +4 -0
  160. package/dist/cjs/api/types/OnCreate.js +3 -0
  161. package/dist/cjs/api/types/PayabliApiResponse0.d.ts +2 -2
  162. package/dist/cjs/api/types/PayabliApiResponse0000.d.ts +2 -2
  163. package/dist/cjs/api/types/PayabliCredentialsPascal.d.ts +3 -2
  164. package/dist/cjs/api/types/PayorDataResponse.d.ts +1 -1
  165. package/dist/cjs/api/types/QueryResponseData.d.ts +41 -10
  166. package/dist/cjs/api/types/QueryResponseSettlements.d.ts +134 -0
  167. package/dist/cjs/api/types/QuerySubscriptionResponse.d.ts +1 -1
  168. package/dist/cjs/api/types/QueryTransactionPayorData.d.ts +1 -1
  169. package/dist/cjs/api/types/ResultCodeText.d.ts +4 -0
  170. package/dist/cjs/api/types/ResultCodeText.js +3 -0
  171. package/dist/cjs/api/types/ResultCodev2.d.ts +4 -0
  172. package/dist/cjs/api/types/ResultCodev2.js +3 -0
  173. package/dist/cjs/api/types/index.d.ts +11 -2
  174. package/dist/cjs/api/types/index.js +11 -2
  175. package/dist/cjs/auth/HeaderAuthProvider.d.ts +4 -2
  176. package/dist/cjs/errors/PayabliError.js +5 -1
  177. package/dist/cjs/errors/PayabliTimeoutError.js +5 -1
  178. package/dist/cjs/version.d.ts +1 -0
  179. package/dist/cjs/version.js +4 -0
  180. package/dist/esm/BaseClient.d.mts +7 -7
  181. package/dist/esm/BaseClient.mjs +3 -1
  182. package/dist/esm/Client.d.mts +1 -2
  183. package/dist/esm/api/errors/BadRequestError.mjs +5 -1
  184. package/dist/esm/api/errors/ConflictError.mjs +5 -1
  185. package/dist/esm/api/errors/ForbiddenError.mjs +5 -1
  186. package/dist/esm/api/errors/InternalServerError.mjs +5 -1
  187. package/dist/esm/api/errors/ServiceUnavailableError.mjs +5 -1
  188. package/dist/esm/api/errors/UnauthorizedError.mjs +5 -1
  189. package/dist/esm/api/resources/bill/client/Client.d.mts +1 -2
  190. package/dist/esm/api/resources/bill/types/BillResponseData.d.mts +2 -1
  191. package/dist/esm/api/resources/boarding/client/Client.d.mts +1 -2
  192. package/dist/esm/api/resources/chargeBacks/client/Client.d.mts +1 -2
  193. package/dist/esm/api/resources/checkCapture/client/Client.d.mts +1 -2
  194. package/dist/esm/api/resources/cloud/client/Client.d.mts +1 -2
  195. package/dist/esm/api/resources/customer/client/Client.d.mts +1 -2
  196. package/dist/esm/api/resources/export/client/Client.d.mts +1 -7
  197. package/dist/esm/api/resources/export/client/Client.mjs +5 -21
  198. package/dist/esm/api/resources/hostedPaymentPages/client/Client.d.mts +1 -2
  199. package/dist/esm/api/resources/import/client/Client.d.mts +1 -7
  200. package/dist/esm/api/resources/import/client/Client.mjs +5 -21
  201. package/dist/esm/api/resources/index.d.mts +3 -0
  202. package/dist/esm/api/resources/index.mjs +3 -0
  203. package/dist/esm/api/resources/invoice/client/Client.d.mts +6 -5
  204. package/dist/esm/api/resources/invoice/client/Client.mjs +5 -3
  205. package/dist/esm/api/resources/invoice/client/requests/AddInvoiceRequest.d.mts +5 -3
  206. package/dist/esm/api/resources/lineItem/client/Client.d.mts +1 -7
  207. package/dist/esm/api/resources/lineItem/client/Client.mjs +5 -21
  208. package/dist/esm/api/resources/moneyIn/client/Client.d.mts +248 -4
  209. package/dist/esm/api/resources/moneyIn/client/Client.mjs +518 -2
  210. package/dist/esm/api/resources/moneyIn/client/requests/RequestPaymentAuthorizeV2.d.mts +31 -0
  211. package/dist/esm/api/resources/moneyIn/client/requests/RequestPaymentV2.d.mts +99 -0
  212. package/dist/esm/api/resources/moneyIn/client/requests/index.d.mts +2 -0
  213. package/dist/esm/api/resources/moneyIn/errors/CaptureError.mjs +5 -1
  214. package/dist/esm/api/resources/moneyIn/errors/InvalidTransStatusError.mjs +5 -1
  215. package/dist/esm/api/resources/moneyIn/types/AuthResponseResponseData.d.mts +2 -2
  216. package/dist/esm/api/resources/moneyIn/types/CaptureResponseData.d.mts +2 -2
  217. package/dist/esm/api/resources/moneyIn/types/GetPaidResponseData.d.mts +3 -3
  218. package/dist/esm/api/resources/moneyIn/types/ResponseDataRefunds.d.mts +2 -2
  219. package/dist/esm/api/resources/moneyIn/types/TransactionDetailResponseData.d.mts +7 -3
  220. package/dist/esm/api/resources/moneyIn/types/ValidateResponseData.d.mts +2 -2
  221. package/dist/esm/api/resources/moneyIn/types/VoidResponseData.d.mts +2 -2
  222. package/dist/esm/api/resources/moneyOut/client/Client.d.mts +1 -2
  223. package/dist/esm/api/resources/moneyOutTypes/types/AuthCapturePayoutResponse.d.mts +2 -2
  224. package/dist/esm/api/resources/notification/client/Client.d.mts +14 -7
  225. package/dist/esm/api/resources/notification/client/Client.mjs +18 -21
  226. package/dist/esm/api/resources/notificationlogs/client/Client.d.mts +1 -7
  227. package/dist/esm/api/resources/notificationlogs/client/Client.mjs +5 -21
  228. package/dist/esm/api/resources/ocr/client/Client.d.mts +1 -7
  229. package/dist/esm/api/resources/ocr/client/Client.mjs +5 -21
  230. package/dist/esm/api/resources/organization/client/Client.d.mts +1 -7
  231. package/dist/esm/api/resources/organization/client/Client.mjs +5 -21
  232. package/dist/esm/api/resources/paymentLink/client/Client.d.mts +4 -10
  233. package/dist/esm/api/resources/paymentLink/client/Client.mjs +8 -24
  234. package/dist/esm/api/resources/paymentLink/client/requests/PayLinkDataBill.d.mts +1 -1
  235. package/dist/esm/api/resources/paymentLink/client/requests/PayLinkDataInvoice.d.mts +1 -1
  236. package/dist/esm/api/resources/paymentLink/client/requests/PayLinkDataOut.d.mts +1 -1
  237. package/dist/esm/api/resources/paymentLink/types/PaymentPageRequestBody.d.mts +2 -2
  238. package/dist/esm/api/resources/paymentMethodDomain/client/Client.d.mts +1 -7
  239. package/dist/esm/api/resources/paymentMethodDomain/client/Client.mjs +5 -21
  240. package/dist/esm/api/resources/paypoint/client/Client.d.mts +1 -7
  241. package/dist/esm/api/resources/paypoint/client/Client.mjs +5 -21
  242. package/dist/esm/api/resources/query/client/Client.d.mts +1 -7
  243. package/dist/esm/api/resources/query/client/Client.mjs +5 -21
  244. package/dist/esm/api/resources/queryTypes/types/QueryBatchesDetailResponse.d.mts +158 -0
  245. package/dist/esm/api/resources/statistic/client/Client.d.mts +1 -7
  246. package/dist/esm/api/resources/statistic/client/Client.mjs +5 -21
  247. package/dist/esm/api/resources/subscription/client/Client.d.mts +1 -7
  248. package/dist/esm/api/resources/subscription/client/Client.mjs +5 -21
  249. package/dist/esm/api/resources/templates/client/Client.d.mts +1 -7
  250. package/dist/esm/api/resources/templates/client/Client.mjs +5 -21
  251. package/dist/esm/api/resources/tokenStorage/client/Client.d.mts +52 -7
  252. package/dist/esm/api/resources/tokenStorage/client/Client.mjs +56 -21
  253. package/dist/esm/api/resources/tokenStorage/client/requests/AddMethodRequest.d.mts +23 -0
  254. package/dist/esm/api/resources/tokenStorage/client/requests/GetMethodRequest.d.mts +6 -0
  255. package/dist/esm/api/resources/tokenStorage/client/requests/UpdateMethodRequest.d.mts +22 -0
  256. package/dist/esm/api/resources/tokenStorage/types/GetMethodResponse.d.mts +101 -1
  257. package/dist/esm/api/resources/tokenStorage/types/RequestTokenStorage.d.mts +1 -0
  258. package/dist/esm/api/resources/tokenStorage/types/VendorDataRequest.d.mts +9 -0
  259. package/dist/esm/api/resources/tokenStorage/types/VendorDataRequest.mjs +2 -0
  260. package/dist/esm/api/resources/tokenStorage/types/index.d.mts +1 -0
  261. package/dist/esm/api/resources/tokenStorage/types/index.mjs +1 -0
  262. package/dist/esm/api/resources/user/client/Client.d.mts +1 -7
  263. package/dist/esm/api/resources/user/client/Client.mjs +5 -21
  264. package/dist/esm/api/resources/v2MoneyInTypes/errors/BadRequestAuthResponseErrorV2.d.mts +6 -0
  265. package/dist/esm/api/resources/v2MoneyInTypes/errors/BadRequestAuthResponseErrorV2.mjs +17 -0
  266. package/dist/esm/api/resources/v2MoneyInTypes/errors/BadRequestCaptureResponseErrorV2.d.mts +6 -0
  267. package/dist/esm/api/resources/v2MoneyInTypes/errors/BadRequestCaptureResponseErrorV2.mjs +17 -0
  268. package/dist/esm/api/resources/v2MoneyInTypes/errors/BadRequestRefundResponseErrorV2.d.mts +6 -0
  269. package/dist/esm/api/resources/v2MoneyInTypes/errors/BadRequestRefundResponseErrorV2.mjs +17 -0
  270. package/dist/esm/api/resources/v2MoneyInTypes/errors/BadRequestVoidResponseErrorV2.d.mts +6 -0
  271. package/dist/esm/api/resources/v2MoneyInTypes/errors/BadRequestVoidResponseErrorV2.mjs +17 -0
  272. package/dist/esm/api/resources/v2MoneyInTypes/errors/DeclinedAuthResponseErrorV2.d.mts +6 -0
  273. package/dist/esm/api/resources/v2MoneyInTypes/errors/DeclinedAuthResponseErrorV2.mjs +17 -0
  274. package/dist/esm/api/resources/v2MoneyInTypes/errors/DeclinedCaptureResponseErrorV2.d.mts +6 -0
  275. package/dist/esm/api/resources/v2MoneyInTypes/errors/DeclinedCaptureResponseErrorV2.mjs +17 -0
  276. package/dist/esm/api/resources/v2MoneyInTypes/errors/DeclinedRefundResponseErrorV2.d.mts +6 -0
  277. package/dist/esm/api/resources/v2MoneyInTypes/errors/DeclinedRefundResponseErrorV2.mjs +17 -0
  278. package/dist/esm/api/resources/v2MoneyInTypes/errors/DeclinedVoidResponseErrorV2.d.mts +6 -0
  279. package/dist/esm/api/resources/v2MoneyInTypes/errors/DeclinedVoidResponseErrorV2.mjs +17 -0
  280. package/dist/esm/api/resources/v2MoneyInTypes/errors/InternalServerResponseErrorV2.d.mts +6 -0
  281. package/dist/esm/api/resources/v2MoneyInTypes/errors/InternalServerResponseErrorV2.mjs +17 -0
  282. package/dist/esm/api/resources/v2MoneyInTypes/errors/index.d.mts +9 -0
  283. package/dist/esm/api/resources/v2MoneyInTypes/errors/index.mjs +9 -0
  284. package/dist/esm/api/resources/v2MoneyInTypes/index.d.mts +2 -0
  285. package/dist/esm/api/resources/v2MoneyInTypes/index.mjs +2 -0
  286. package/dist/esm/api/resources/v2MoneyInTypes/types/V2BadRequestError.d.mts +22 -0
  287. package/dist/esm/api/resources/v2MoneyInTypes/types/V2BadRequestError.mjs +2 -0
  288. package/dist/esm/api/resources/v2MoneyInTypes/types/V2BadRequestErrorDetail.d.mts +9 -0
  289. package/dist/esm/api/resources/v2MoneyInTypes/types/V2BadRequestErrorDetail.mjs +2 -0
  290. package/dist/esm/api/resources/v2MoneyInTypes/types/V2DeclinedTransactionResponseWrapper.d.mts +761 -0
  291. package/dist/esm/api/resources/v2MoneyInTypes/types/V2DeclinedTransactionResponseWrapper.mjs +2 -0
  292. package/dist/esm/api/resources/v2MoneyInTypes/types/V2InternalServerError.d.mts +21 -0
  293. package/dist/esm/api/resources/v2MoneyInTypes/types/V2InternalServerError.mjs +2 -0
  294. package/dist/esm/api/resources/v2MoneyInTypes/types/V2ResponseAction.d.mts +4 -0
  295. package/dist/esm/api/resources/v2MoneyInTypes/types/V2ResponseAction.mjs +2 -0
  296. package/dist/esm/api/resources/v2MoneyInTypes/types/V2ResponseCode.d.mts +4 -0
  297. package/dist/esm/api/resources/v2MoneyInTypes/types/V2ResponseCode.mjs +2 -0
  298. package/dist/esm/api/resources/v2MoneyInTypes/types/V2ResponseExplanation.d.mts +4 -0
  299. package/dist/esm/api/resources/v2MoneyInTypes/types/V2ResponseExplanation.mjs +2 -0
  300. package/dist/esm/api/resources/v2MoneyInTypes/types/V2ResponseReason.d.mts +4 -0
  301. package/dist/esm/api/resources/v2MoneyInTypes/types/V2ResponseReason.mjs +2 -0
  302. package/dist/esm/api/resources/v2MoneyInTypes/types/V2TransactionDetailResponseData.d.mts +65 -0
  303. package/dist/esm/api/resources/v2MoneyInTypes/types/V2TransactionDetailResponseData.mjs +2 -0
  304. package/dist/esm/api/resources/v2MoneyInTypes/types/V2TransactionDetails.d.mts +1003 -0
  305. package/dist/esm/api/resources/v2MoneyInTypes/types/V2TransactionDetails.mjs +2 -0
  306. package/dist/esm/api/resources/v2MoneyInTypes/types/V2TransactionResponseWrapper.d.mts +13 -0
  307. package/dist/esm/api/resources/v2MoneyInTypes/types/V2TransactionResponseWrapper.mjs +2 -0
  308. package/dist/esm/api/resources/v2MoneyInTypes/types/index.d.mts +11 -0
  309. package/dist/esm/api/resources/v2MoneyInTypes/types/index.mjs +11 -0
  310. package/dist/esm/api/resources/vendor/client/Client.d.mts +1 -7
  311. package/dist/esm/api/resources/vendor/client/Client.mjs +5 -21
  312. package/dist/esm/api/resources/wallet/client/Client.d.mts +1 -7
  313. package/dist/esm/api/resources/wallet/client/Client.mjs +5 -21
  314. package/dist/esm/api/types/ApplicationData.d.mts +1 -0
  315. package/dist/esm/api/types/ApplicationDataManaged.d.mts +1 -0
  316. package/dist/esm/api/types/ApplicationDataOdp.d.mts +1 -0
  317. package/dist/esm/api/types/ApplicationDataPayIn.d.mts +1 -0
  318. package/dist/esm/api/types/AvsResponse.d.mts +4 -0
  319. package/dist/esm/api/types/AvsResponse.mjs +2 -0
  320. package/dist/esm/api/types/AvsResponseText.d.mts +4 -0
  321. package/dist/esm/api/types/AvsResponseText.mjs +2 -0
  322. package/dist/esm/api/types/CustomerVaultId.d.mts +1 -0
  323. package/dist/esm/api/types/CustomerVaultId.mjs +2 -0
  324. package/dist/esm/api/types/CvvResponse.d.mts +4 -0
  325. package/dist/esm/api/types/CvvResponse.mjs +2 -0
  326. package/dist/esm/api/types/CvvResponseText.d.mts +4 -0
  327. package/dist/esm/api/types/CvvResponseText.mjs +2 -0
  328. package/dist/esm/api/types/EmvAuthResponseData.d.mts +4 -0
  329. package/dist/esm/api/types/EmvAuthResponseData.mjs +2 -0
  330. package/dist/esm/api/types/Frequency.d.mts +1 -1
  331. package/dist/esm/api/types/Frequency.mjs +1 -1
  332. package/dist/esm/api/types/FrequencyList.d.mts +1 -1
  333. package/dist/esm/api/types/MaxTicket.d.mts +4 -0
  334. package/dist/esm/api/types/MaxTicket.mjs +2 -0
  335. package/dist/esm/api/types/MinTicket.d.mts +4 -0
  336. package/dist/esm/api/types/MinTicket.mjs +2 -0
  337. package/dist/esm/api/types/OnCreate.d.mts +4 -0
  338. package/dist/esm/api/types/OnCreate.mjs +2 -0
  339. package/dist/esm/api/types/PayabliApiResponse0.d.mts +2 -2
  340. package/dist/esm/api/types/PayabliApiResponse0000.d.mts +2 -2
  341. package/dist/esm/api/types/PayabliCredentialsPascal.d.mts +3 -2
  342. package/dist/esm/api/types/PayorDataResponse.d.mts +1 -1
  343. package/dist/esm/api/types/QueryResponseData.d.mts +41 -10
  344. package/dist/esm/api/types/QueryResponseSettlements.d.mts +134 -0
  345. package/dist/esm/api/types/QuerySubscriptionResponse.d.mts +1 -1
  346. package/dist/esm/api/types/QueryTransactionPayorData.d.mts +1 -1
  347. package/dist/esm/api/types/ResultCodeText.d.mts +4 -0
  348. package/dist/esm/api/types/ResultCodeText.mjs +2 -0
  349. package/dist/esm/api/types/ResultCodev2.d.mts +4 -0
  350. package/dist/esm/api/types/ResultCodev2.mjs +2 -0
  351. package/dist/esm/api/types/index.d.mts +11 -2
  352. package/dist/esm/api/types/index.mjs +11 -2
  353. package/dist/esm/auth/HeaderAuthProvider.d.mts +4 -2
  354. package/dist/esm/errors/PayabliError.mjs +5 -1
  355. package/dist/esm/errors/PayabliTimeoutError.mjs +5 -1
  356. package/dist/esm/version.d.mts +1 -0
  357. package/dist/esm/version.mjs +1 -0
  358. package/package.json +7 -4
  359. package/reference.md +475 -8
  360. /package/dist/cjs/api/{types/Avsresponsetext.js → resources/moneyIn/client/requests/RequestPaymentAuthorizeV2.js} +0 -0
  361. /package/dist/cjs/api/{types/Cvvresponsetext.js → resources/moneyIn/client/requests/RequestPaymentV2.js} +0 -0
  362. /package/dist/esm/api/{types/Avsresponsetext.mjs → resources/moneyIn/client/requests/RequestPaymentAuthorizeV2.mjs} +0 -0
  363. /package/dist/esm/api/{types/Cvvresponsetext.mjs → resources/moneyIn/client/requests/RequestPaymentV2.mjs} +0 -0
@@ -32,8 +32,10 @@ export class MoneyInClient {
32
32
  }
33
33
  /**
34
34
  * Authorize a card transaction. This returns an authorization code and reserves funds for the merchant. Authorized transactions aren't flagged for settlement until [captured](/api-reference/moneyin/capture-an-authorized-transaction).
35
- *
36
- * **Note**: Only card transactions can be authorized. This endpoint can't be used for ACH transactions.
35
+ * Only card transactions can be authorized. This endpoint can't be used for ACH transactions.
36
+ * <Tip>
37
+ * Consider migrating to the [v2 Authorize endpoint](/developers/api-reference/moneyinV2/authorize-a-transaction) to take advantage of unified response codes and improved response consistency.
38
+ * </Tip>
37
39
  *
38
40
  * @param {Payabli.RequestPaymentAuthorize} request
39
41
  * @param {MoneyInClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -186,6 +188,10 @@ export class MoneyInClient {
186
188
  *
187
189
  * You can use this endpoint to capture both full and partial amounts of the original authorized transaction. See [Capture an authorized transaction](/developers/developer-guides/pay-in-auth-and-capture) for more information about this endpoint.
188
190
  *
191
+ * <Tip>
192
+ * Consider migrating to the [v2 Capture endpoint](/developers/api-reference/moneyinV2/capture-an-authorized-transaction) to take advantage of unified response codes and improved response consistency.
193
+ * </Tip>
194
+ *
189
195
  * @param {string} transId - ReferenceId for the transaction (PaymentId).
190
196
  * @param {Payabli.CaptureRequest} request
191
197
  * @param {MoneyInClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -438,6 +444,10 @@ export class MoneyInClient {
438
444
  /**
439
445
  * Make a single transaction. This method authorizes and captures a payment in one step.
440
446
  *
447
+ * <Tip>
448
+ * Consider migrating to the [v2 Make a transaction endpoint](/developers/api-reference/moneyinV2/make-a-transaction) to take advantage of unified response codes and improved response consistency.
449
+ * </Tip>
450
+ *
441
451
  * @param {Payabli.RequestPayment} request
442
452
  * @param {MoneyInClient.RequestOptions} requestOptions - Request-specific configuration.
443
453
  *
@@ -726,6 +736,10 @@ export class MoneyInClient {
726
736
  /**
727
737
  * Refund a transaction that has settled and send money back to the account holder. If a transaction hasn't been settled, void it instead.
728
738
  *
739
+ * <Tip>
740
+ * Consider migrating to the [v2 Refund endpoint](/developers/api-reference/moneyinV2/refund-a-settled-transaction) to take advantage of unified response codes and improved response consistency.
741
+ * </Tip>
742
+ *
729
743
  * @param {string} transId - ReferenceId for the transaction (PaymentId).
730
744
  * @param {number} amount -
731
745
  * Amount to refund from original transaction, minus any service fees charged on the original transaction.
@@ -1089,6 +1103,10 @@ export class MoneyInClient {
1089
1103
  /**
1090
1104
  * Cancel a transaction that hasn't been settled yet. Voiding non-captured authorizations prevents future captures. If a transaction has been settled, refund it instead.
1091
1105
  *
1106
+ * <Tip>
1107
+ * Consider migrating to the [v2 Void endpoint](/developers/api-reference/moneyinV2/void-a-transaction) to take advantage of unified response codes and improved response consistency.
1108
+ * </Tip>
1109
+ *
1092
1110
  * @param {string} transId - ReferenceId for the transaction (PaymentId).
1093
1111
  * @param {MoneyInClient.RequestOptions} requestOptions - Request-specific configuration.
1094
1112
  *
@@ -1143,4 +1161,502 @@ export class MoneyInClient {
1143
1161
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/MoneyIn/void/{transId}");
1144
1162
  });
1145
1163
  }
1164
+ /**
1165
+ * Make a single transaction. This method authorizes and captures a payment in one step. This is the v2 version of the `api/MoneyIn/getpaid` endpoint, and returns the unified response format. See [Pay In unified response codes reference](/developers/references/pay-in-unified-response-codes) for more information.
1166
+ *
1167
+ * @param {Payabli.RequestPaymentV2} request
1168
+ * @param {MoneyInClient.RequestOptions} requestOptions - Request-specific configuration.
1169
+ *
1170
+ * @throws {@link Payabli.BadRequestAuthResponseErrorV2}
1171
+ * @throws {@link Payabli.UnauthorizedError}
1172
+ * @throws {@link Payabli.DeclinedAuthResponseErrorV2}
1173
+ * @throws {@link Payabli.InternalServerResponseErrorV2}
1174
+ *
1175
+ * @example
1176
+ * await client.moneyIn.getpaidv2({
1177
+ * body: {
1178
+ * customerData: {
1179
+ * customerId: 4440
1180
+ * },
1181
+ * entryPoint: "f743aed24a",
1182
+ * ipaddress: "255.255.255.255",
1183
+ * paymentDetails: {
1184
+ * serviceFee: 0,
1185
+ * totalAmount: 100
1186
+ * },
1187
+ * paymentMethod: {
1188
+ * cardcvv: "999",
1189
+ * cardexp: "02/27",
1190
+ * cardHolder: "John Cassian",
1191
+ * cardnumber: "4111111111111111",
1192
+ * cardzip: "12345",
1193
+ * initiator: "payor",
1194
+ * method: "card"
1195
+ * }
1196
+ * }
1197
+ * })
1198
+ *
1199
+ * @example
1200
+ * await client.moneyIn.getpaidv2({
1201
+ * body: {
1202
+ * customerData: {
1203
+ * customerId: 4440
1204
+ * },
1205
+ * entryPoint: "f743aed24a",
1206
+ * ipaddress: "255.255.255.255",
1207
+ * paymentDetails: {
1208
+ * serviceFee: 0,
1209
+ * totalAmount: 100
1210
+ * },
1211
+ * paymentMethod: {
1212
+ * initiator: "payor",
1213
+ * method: "card",
1214
+ * storedMethodId: "1ec55af9-7b5a-4ff0-81ed-c12d2f95e135-4440",
1215
+ * storedMethodUsageType: "unscheduled"
1216
+ * }
1217
+ * }
1218
+ * })
1219
+ *
1220
+ * @example
1221
+ * await client.moneyIn.getpaidv2({
1222
+ * body: {
1223
+ * customerData: {
1224
+ * customerId: 4440
1225
+ * },
1226
+ * entryPoint: "f743aed24a",
1227
+ * ipaddress: "255.255.255.255",
1228
+ * paymentDetails: {
1229
+ * serviceFee: 0,
1230
+ * totalAmount: 100
1231
+ * },
1232
+ * paymentMethod: {
1233
+ * achAccount: "123123123",
1234
+ * achAccountType: "Checking",
1235
+ * achCode: "WEB",
1236
+ * achHolder: "John Cassian",
1237
+ * achHolderType: "personal",
1238
+ * achRouting: "123123123",
1239
+ * method: "ach"
1240
+ * }
1241
+ * }
1242
+ * })
1243
+ *
1244
+ * @example
1245
+ * await client.moneyIn.getpaidv2({
1246
+ * body: {
1247
+ * customerData: {
1248
+ * customerId: 4440
1249
+ * },
1250
+ * entryPoint: "f743aed24a",
1251
+ * ipaddress: "255.255.255.255",
1252
+ * paymentDetails: {
1253
+ * serviceFee: 0,
1254
+ * totalAmount: 100
1255
+ * },
1256
+ * paymentMethod: {
1257
+ * device: "6c361c7d-674c-44cc-b790-382b75d1xxx",
1258
+ * method: "cloud",
1259
+ * saveIfSuccess: true
1260
+ * }
1261
+ * }
1262
+ * })
1263
+ */
1264
+ getpaidv2(request, requestOptions) {
1265
+ return core.HttpResponsePromise.fromPromise(this.__getpaidv2(request, requestOptions));
1266
+ }
1267
+ __getpaidv2(request, requestOptions) {
1268
+ return __awaiter(this, void 0, void 0, function* () {
1269
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
1270
+ const { achValidation, forceCustomerCreation, idempotencyKey, validationCode, body: _body } = request;
1271
+ const _queryParams = {};
1272
+ if (achValidation != null) {
1273
+ _queryParams.achValidation = achValidation.toString();
1274
+ }
1275
+ if (forceCustomerCreation != null) {
1276
+ _queryParams.forceCustomerCreation = forceCustomerCreation.toString();
1277
+ }
1278
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
1279
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
1280
+ idempotencyKey: idempotencyKey != null ? idempotencyKey : undefined,
1281
+ validationCode: validationCode != null ? validationCode : undefined,
1282
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1283
+ const _response = yield core.fetcher({
1284
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PayabliEnvironment.Sandbox, "v2/MoneyIn/getpaid"),
1285
+ method: "POST",
1286
+ headers: _headers,
1287
+ contentType: "application/json",
1288
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
1289
+ requestType: "json",
1290
+ body: _body,
1291
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
1292
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
1293
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1294
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
1295
+ logging: this._options.logging,
1296
+ });
1297
+ if (_response.ok) {
1298
+ return { data: _response.body, rawResponse: _response.rawResponse };
1299
+ }
1300
+ if (_response.error.reason === "status-code") {
1301
+ switch (_response.error.statusCode) {
1302
+ case 400:
1303
+ throw new Payabli.BadRequestAuthResponseErrorV2(_response.error.body, _response.rawResponse);
1304
+ case 401:
1305
+ throw new Payabli.UnauthorizedError(_response.error.body, _response.rawResponse);
1306
+ case 402:
1307
+ throw new Payabli.DeclinedAuthResponseErrorV2(_response.error.body, _response.rawResponse);
1308
+ case 500:
1309
+ throw new Payabli.InternalServerResponseErrorV2(_response.error.body, _response.rawResponse);
1310
+ default:
1311
+ throw new errors.PayabliError({
1312
+ statusCode: _response.error.statusCode,
1313
+ body: _response.error.body,
1314
+ rawResponse: _response.rawResponse,
1315
+ });
1316
+ }
1317
+ }
1318
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v2/MoneyIn/getpaid");
1319
+ });
1320
+ }
1321
+ /**
1322
+ * Authorize a card transaction. This returns an authorization code and reserves funds for the merchant. Authorized transactions aren't flagged for settlement until captured. This is the v2 version of the `api/MoneyIn/authorize` endpoint, and returns the unified response format. See [Pay In unified response codes reference](/developers/references/pay-in-unified-response-codes) for more information.
1323
+ *
1324
+ * **Note**: Only card transactions can be authorized. This endpoint can't be used for ACH transactions.
1325
+ *
1326
+ * @param {Payabli.RequestPaymentAuthorizeV2} request
1327
+ * @param {MoneyInClient.RequestOptions} requestOptions - Request-specific configuration.
1328
+ *
1329
+ * @throws {@link Payabli.BadRequestAuthResponseErrorV2}
1330
+ * @throws {@link Payabli.UnauthorizedError}
1331
+ * @throws {@link Payabli.DeclinedAuthResponseErrorV2}
1332
+ * @throws {@link Payabli.InternalServerResponseErrorV2}
1333
+ *
1334
+ * @example
1335
+ * await client.moneyIn.authorizev2({
1336
+ * body: {
1337
+ * customerData: {
1338
+ * customerId: 4440
1339
+ * },
1340
+ * entryPoint: "f743aed24a",
1341
+ * ipaddress: "255.255.255.255",
1342
+ * paymentDetails: {
1343
+ * serviceFee: 0,
1344
+ * totalAmount: 100
1345
+ * },
1346
+ * paymentMethod: {
1347
+ * cardcvv: "999",
1348
+ * cardexp: "02/27",
1349
+ * cardHolder: "John Cassian",
1350
+ * cardnumber: "4111111111111111",
1351
+ * cardzip: "12345",
1352
+ * initiator: "payor",
1353
+ * method: "card"
1354
+ * }
1355
+ * }
1356
+ * })
1357
+ */
1358
+ authorizev2(request, requestOptions) {
1359
+ return core.HttpResponsePromise.fromPromise(this.__authorizev2(request, requestOptions));
1360
+ }
1361
+ __authorizev2(request, requestOptions) {
1362
+ return __awaiter(this, void 0, void 0, function* () {
1363
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
1364
+ const { forceCustomerCreation, idempotencyKey, body: _body } = request;
1365
+ const _queryParams = {};
1366
+ if (forceCustomerCreation != null) {
1367
+ _queryParams.forceCustomerCreation = forceCustomerCreation.toString();
1368
+ }
1369
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
1370
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ idempotencyKey: idempotencyKey != null ? idempotencyKey : undefined }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1371
+ const _response = yield core.fetcher({
1372
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PayabliEnvironment.Sandbox, "v2/MoneyIn/authorize"),
1373
+ method: "POST",
1374
+ headers: _headers,
1375
+ contentType: "application/json",
1376
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
1377
+ requestType: "json",
1378
+ body: _body,
1379
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
1380
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
1381
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1382
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
1383
+ logging: this._options.logging,
1384
+ });
1385
+ if (_response.ok) {
1386
+ return { data: _response.body, rawResponse: _response.rawResponse };
1387
+ }
1388
+ if (_response.error.reason === "status-code") {
1389
+ switch (_response.error.statusCode) {
1390
+ case 400:
1391
+ throw new Payabli.BadRequestAuthResponseErrorV2(_response.error.body, _response.rawResponse);
1392
+ case 401:
1393
+ throw new Payabli.UnauthorizedError(_response.error.body, _response.rawResponse);
1394
+ case 402:
1395
+ throw new Payabli.DeclinedAuthResponseErrorV2(_response.error.body, _response.rawResponse);
1396
+ case 500:
1397
+ throw new Payabli.InternalServerResponseErrorV2(_response.error.body, _response.rawResponse);
1398
+ default:
1399
+ throw new errors.PayabliError({
1400
+ statusCode: _response.error.statusCode,
1401
+ body: _response.error.body,
1402
+ rawResponse: _response.rawResponse,
1403
+ });
1404
+ }
1405
+ }
1406
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v2/MoneyIn/authorize");
1407
+ });
1408
+ }
1409
+ /**
1410
+ * Capture an authorized transaction to complete the transaction and move funds from the customer to merchant account. This is the v2 version of the `api/MoneyIn/capture/{transId}` endpoint, and returns the unified response format. See [Pay In unified response codes reference](/developers/references/pay-in-unified-response-codes) for more information.
1411
+ *
1412
+ * @param {string} transId - ReferenceId for the transaction (PaymentId).
1413
+ * @param {Payabli.CaptureRequest} request
1414
+ * @param {MoneyInClient.RequestOptions} requestOptions - Request-specific configuration.
1415
+ *
1416
+ * @throws {@link Payabli.BadRequestCaptureResponseErrorV2}
1417
+ * @throws {@link Payabli.UnauthorizedError}
1418
+ * @throws {@link Payabli.DeclinedCaptureResponseErrorV2}
1419
+ * @throws {@link Payabli.InternalServerResponseErrorV2}
1420
+ *
1421
+ * @example
1422
+ * await client.moneyIn.capturev2("10-7d9cd67d-2d5d-4cd7-a1b7-72b8b201ec13", {
1423
+ * paymentDetails: {
1424
+ * totalAmount: 105,
1425
+ * serviceFee: 5
1426
+ * }
1427
+ * })
1428
+ *
1429
+ * @example
1430
+ * await client.moneyIn.capturev2("10-7d9cd67d-2d5d-4cd7-a1b7-72b8b201ec13", {
1431
+ * paymentDetails: {
1432
+ * totalAmount: 89,
1433
+ * serviceFee: 4
1434
+ * }
1435
+ * })
1436
+ */
1437
+ capturev2(transId, request, requestOptions) {
1438
+ return core.HttpResponsePromise.fromPromise(this.__capturev2(transId, request, requestOptions));
1439
+ }
1440
+ __capturev2(transId, request, requestOptions) {
1441
+ return __awaiter(this, void 0, void 0, function* () {
1442
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
1443
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
1444
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1445
+ const _response = yield core.fetcher({
1446
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PayabliEnvironment.Sandbox, `v2/MoneyIn/capture/${core.url.encodePathParam(transId)}`),
1447
+ method: "POST",
1448
+ headers: _headers,
1449
+ contentType: "application/json",
1450
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1451
+ requestType: "json",
1452
+ body: request,
1453
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
1454
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
1455
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1456
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
1457
+ logging: this._options.logging,
1458
+ });
1459
+ if (_response.ok) {
1460
+ return { data: _response.body, rawResponse: _response.rawResponse };
1461
+ }
1462
+ if (_response.error.reason === "status-code") {
1463
+ switch (_response.error.statusCode) {
1464
+ case 400:
1465
+ throw new Payabli.BadRequestCaptureResponseErrorV2(_response.error.body, _response.rawResponse);
1466
+ case 401:
1467
+ throw new Payabli.UnauthorizedError(_response.error.body, _response.rawResponse);
1468
+ case 402:
1469
+ throw new Payabli.DeclinedCaptureResponseErrorV2(_response.error.body, _response.rawResponse);
1470
+ case 500:
1471
+ throw new Payabli.InternalServerResponseErrorV2(_response.error.body, _response.rawResponse);
1472
+ default:
1473
+ throw new errors.PayabliError({
1474
+ statusCode: _response.error.statusCode,
1475
+ body: _response.error.body,
1476
+ rawResponse: _response.rawResponse,
1477
+ });
1478
+ }
1479
+ }
1480
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v2/MoneyIn/capture/{transId}");
1481
+ });
1482
+ }
1483
+ /**
1484
+ * Give a full refund for a transaction that has settled and send money back to the account holder. To perform a partial refund, see [Partially refund a transaction](developers/api-reference/moneyinV2/partial-refund-a-settled-transaction).
1485
+ *
1486
+ * This is the v2 version of the refund endpoint, and returns the unified response format. See [Pay In unified response codes reference](/developers/references/pay-in-unified-response-codes) for more information.
1487
+ *
1488
+ * @param {string} transId - ReferenceId for the transaction (PaymentId).
1489
+ * @param {MoneyInClient.RequestOptions} requestOptions - Request-specific configuration.
1490
+ *
1491
+ * @throws {@link Payabli.BadRequestRefundResponseErrorV2}
1492
+ * @throws {@link Payabli.UnauthorizedError}
1493
+ * @throws {@link Payabli.DeclinedRefundResponseErrorV2}
1494
+ * @throws {@link Payabli.InternalServerResponseErrorV2}
1495
+ *
1496
+ * @example
1497
+ * await client.moneyIn.refundv2("10-3ffa27df-b171-44e0-b251-e95fbfc7a723")
1498
+ */
1499
+ refundv2(transId, requestOptions) {
1500
+ return core.HttpResponsePromise.fromPromise(this.__refundv2(transId, requestOptions));
1501
+ }
1502
+ __refundv2(transId, requestOptions) {
1503
+ return __awaiter(this, void 0, void 0, function* () {
1504
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
1505
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
1506
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1507
+ const _response = yield core.fetcher({
1508
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PayabliEnvironment.Sandbox, `v2/MoneyIn/refund/${core.url.encodePathParam(transId)}`),
1509
+ method: "POST",
1510
+ headers: _headers,
1511
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1512
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
1513
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
1514
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1515
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
1516
+ logging: this._options.logging,
1517
+ });
1518
+ if (_response.ok) {
1519
+ return { data: _response.body, rawResponse: _response.rawResponse };
1520
+ }
1521
+ if (_response.error.reason === "status-code") {
1522
+ switch (_response.error.statusCode) {
1523
+ case 400:
1524
+ throw new Payabli.BadRequestRefundResponseErrorV2(_response.error.body, _response.rawResponse);
1525
+ case 401:
1526
+ throw new Payabli.UnauthorizedError(_response.error.body, _response.rawResponse);
1527
+ case 402:
1528
+ throw new Payabli.DeclinedRefundResponseErrorV2(_response.error.body, _response.rawResponse);
1529
+ case 500:
1530
+ throw new Payabli.InternalServerResponseErrorV2(_response.error.body, _response.rawResponse);
1531
+ default:
1532
+ throw new errors.PayabliError({
1533
+ statusCode: _response.error.statusCode,
1534
+ body: _response.error.body,
1535
+ rawResponse: _response.rawResponse,
1536
+ });
1537
+ }
1538
+ }
1539
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v2/MoneyIn/refund/{transId}");
1540
+ });
1541
+ }
1542
+ /**
1543
+ * Refund a transaction that has settled and send money back to the account holder. If `amount` is omitted or set to 0, performs a full refund. When a non-zero `amount` is provided, this endpoint performs a partial refund.
1544
+ *
1545
+ * This is the v2 version of the refund endpoint, and returns the unified response format. See [Pay In unified response codes reference](/developers/references/pay-in-unified-response-codes) for more information.
1546
+ *
1547
+ * @param {string} transId - ReferenceId for the transaction (PaymentId).
1548
+ * @param {number} amount - Amount to refund from original transaction, minus any service fees charged on the original transaction. If omitted or set to 0, performs a full refund.
1549
+ * @param {MoneyInClient.RequestOptions} requestOptions - Request-specific configuration.
1550
+ *
1551
+ * @throws {@link Payabli.BadRequestRefundResponseErrorV2}
1552
+ * @throws {@link Payabli.UnauthorizedError}
1553
+ * @throws {@link Payabli.DeclinedRefundResponseErrorV2}
1554
+ * @throws {@link Payabli.InternalServerResponseErrorV2}
1555
+ *
1556
+ * @example
1557
+ * await client.moneyIn.refundv2Amount("10-3ffa27df-b171-44e0-b251-e95fbfc7a723", 0)
1558
+ *
1559
+ * @example
1560
+ * await client.moneyIn.refundv2Amount("10-3ffa27df-b171-44e0-b251-e95fbfc7a723", 100.99)
1561
+ */
1562
+ refundv2Amount(transId, amount, requestOptions) {
1563
+ return core.HttpResponsePromise.fromPromise(this.__refundv2Amount(transId, amount, requestOptions));
1564
+ }
1565
+ __refundv2Amount(transId, amount, requestOptions) {
1566
+ return __awaiter(this, void 0, void 0, function* () {
1567
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
1568
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
1569
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1570
+ const _response = yield core.fetcher({
1571
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PayabliEnvironment.Sandbox, `v2/MoneyIn/refund/${core.url.encodePathParam(transId)}/${core.url.encodePathParam(amount)}`),
1572
+ method: "POST",
1573
+ headers: _headers,
1574
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1575
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
1576
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
1577
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1578
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
1579
+ logging: this._options.logging,
1580
+ });
1581
+ if (_response.ok) {
1582
+ return { data: _response.body, rawResponse: _response.rawResponse };
1583
+ }
1584
+ if (_response.error.reason === "status-code") {
1585
+ switch (_response.error.statusCode) {
1586
+ case 400:
1587
+ throw new Payabli.BadRequestRefundResponseErrorV2(_response.error.body, _response.rawResponse);
1588
+ case 401:
1589
+ throw new Payabli.UnauthorizedError(_response.error.body, _response.rawResponse);
1590
+ case 402:
1591
+ throw new Payabli.DeclinedRefundResponseErrorV2(_response.error.body, _response.rawResponse);
1592
+ case 500:
1593
+ throw new Payabli.InternalServerResponseErrorV2(_response.error.body, _response.rawResponse);
1594
+ default:
1595
+ throw new errors.PayabliError({
1596
+ statusCode: _response.error.statusCode,
1597
+ body: _response.error.body,
1598
+ rawResponse: _response.rawResponse,
1599
+ });
1600
+ }
1601
+ }
1602
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v2/MoneyIn/refund/{transId}/{amount}");
1603
+ });
1604
+ }
1605
+ /**
1606
+ * Cancel a transaction that hasn't been settled yet. Voiding non-captured authorizations prevents future captures. This is the v2 version of the `api/MoneyIn/void/{transId}` endpoint, and returns the unified response format. See [Pay In unified response codes reference](/developers/references/pay-in-unified-response-codes) for more information.
1607
+ *
1608
+ * @param {string} transId - ReferenceId for the transaction (PaymentId).
1609
+ * @param {MoneyInClient.RequestOptions} requestOptions - Request-specific configuration.
1610
+ *
1611
+ * @throws {@link Payabli.BadRequestVoidResponseErrorV2}
1612
+ * @throws {@link Payabli.UnauthorizedError}
1613
+ * @throws {@link Payabli.DeclinedVoidResponseErrorV2}
1614
+ * @throws {@link Payabli.InternalServerResponseErrorV2}
1615
+ *
1616
+ * @example
1617
+ * await client.moneyIn.voidv2("10-3ffa27df-b171-44e0-b251-e95fbfc7a723")
1618
+ */
1619
+ voidv2(transId, requestOptions) {
1620
+ return core.HttpResponsePromise.fromPromise(this.__voidv2(transId, requestOptions));
1621
+ }
1622
+ __voidv2(transId, requestOptions) {
1623
+ return __awaiter(this, void 0, void 0, function* () {
1624
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
1625
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
1626
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1627
+ const _response = yield core.fetcher({
1628
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PayabliEnvironment.Sandbox, `v2/MoneyIn/void/${core.url.encodePathParam(transId)}`),
1629
+ method: "POST",
1630
+ headers: _headers,
1631
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1632
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
1633
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
1634
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1635
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
1636
+ logging: this._options.logging,
1637
+ });
1638
+ if (_response.ok) {
1639
+ return { data: _response.body, rawResponse: _response.rawResponse };
1640
+ }
1641
+ if (_response.error.reason === "status-code") {
1642
+ switch (_response.error.statusCode) {
1643
+ case 400:
1644
+ throw new Payabli.BadRequestVoidResponseErrorV2(_response.error.body, _response.rawResponse);
1645
+ case 401:
1646
+ throw new Payabli.UnauthorizedError(_response.error.body, _response.rawResponse);
1647
+ case 402:
1648
+ throw new Payabli.DeclinedVoidResponseErrorV2(_response.error.body, _response.rawResponse);
1649
+ case 500:
1650
+ throw new Payabli.InternalServerResponseErrorV2(_response.error.body, _response.rawResponse);
1651
+ default:
1652
+ throw new errors.PayabliError({
1653
+ statusCode: _response.error.statusCode,
1654
+ body: _response.error.body,
1655
+ rawResponse: _response.rawResponse,
1656
+ });
1657
+ }
1658
+ }
1659
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v2/MoneyIn/void/{transId}");
1660
+ });
1661
+ }
1146
1662
  }
@@ -0,0 +1,31 @@
1
+ import type * as Payabli from "../../../../index.mjs";
2
+ /**
3
+ * @example
4
+ * {
5
+ * body: {
6
+ * customerData: {
7
+ * customerId: 4440
8
+ * },
9
+ * entryPoint: "f743aed24a",
10
+ * ipaddress: "255.255.255.255",
11
+ * paymentDetails: {
12
+ * serviceFee: 0,
13
+ * totalAmount: 100
14
+ * },
15
+ * paymentMethod: {
16
+ * cardcvv: "999",
17
+ * cardexp: "02/27",
18
+ * cardHolder: "John Cassian",
19
+ * cardnumber: "4111111111111111",
20
+ * cardzip: "12345",
21
+ * initiator: "payor",
22
+ * method: "card"
23
+ * }
24
+ * }
25
+ * }
26
+ */
27
+ export interface RequestPaymentAuthorizeV2 {
28
+ forceCustomerCreation?: Payabli.ForceCustomerCreation | undefined;
29
+ idempotencyKey?: Payabli.IdempotencyKey;
30
+ body: Payabli.TransRequestBody;
31
+ }