increase 0.1.0

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 (425) hide show
  1. package/.eslintrc.js +10 -0
  2. package/.prettierrc +6 -0
  3. package/.stats.yml +1 -0
  4. package/LICENSE +201 -0
  5. package/README.md +211 -0
  6. package/api.md +477 -0
  7. package/bin/check-test-server +50 -0
  8. package/build +12 -0
  9. package/check-version.ts +15 -0
  10. package/core.ts +908 -0
  11. package/dist/cjs/check-version.d.ts +1 -0
  12. package/dist/cjs/check-version.js +21 -0
  13. package/dist/cjs/check-version.js.map +1 -0
  14. package/dist/cjs/core.d.ts +262 -0
  15. package/dist/cjs/core.js +978 -0
  16. package/dist/cjs/core.js.map +1 -0
  17. package/dist/cjs/fetch-polyfill.d.ts +5 -0
  18. package/dist/cjs/fetch-polyfill.js +55 -0
  19. package/dist/cjs/fetch-polyfill.js.map +1 -0
  20. package/dist/cjs/index.d.ts +201 -0
  21. package/dist/cjs/index.js +180 -0
  22. package/dist/cjs/index.js.map +1 -0
  23. package/dist/cjs/pagination.d.ts +28 -0
  24. package/dist/cjs/pagination.js +30 -0
  25. package/dist/cjs/pagination.js.map +1 -0
  26. package/dist/cjs/resource.d.ts +11 -0
  27. package/dist/cjs/resource.js +17 -0
  28. package/dist/cjs/resource.js.map +1 -0
  29. package/dist/cjs/resources/account-numbers.d.ts +103 -0
  30. package/dist/cjs/resources/account-numbers.js +37 -0
  31. package/dist/cjs/resources/account-numbers.js.map +1 -0
  32. package/dist/cjs/resources/account-statements.d.ts +99 -0
  33. package/dist/cjs/resources/account-statements.js +25 -0
  34. package/dist/cjs/resources/account-statements.js.map +1 -0
  35. package/dist/cjs/resources/account-transfers.d.ts +189 -0
  36. package/dist/cjs/resources/account-transfers.js +43 -0
  37. package/dist/cjs/resources/account-transfers.js.map +1 -0
  38. package/dist/cjs/resources/accounts.d.ts +133 -0
  39. package/dist/cjs/resources/accounts.js +43 -0
  40. package/dist/cjs/resources/accounts.js.map +1 -0
  41. package/dist/cjs/resources/ach-prenotifications.d.ts +188 -0
  42. package/dist/cjs/resources/ach-prenotifications.js +35 -0
  43. package/dist/cjs/resources/ach-prenotifications.js.map +1 -0
  44. package/dist/cjs/resources/ach-transfers.d.ts +375 -0
  45. package/dist/cjs/resources/ach-transfers.js +43 -0
  46. package/dist/cjs/resources/ach-transfers.js.map +1 -0
  47. package/dist/cjs/resources/card-disputes.d.ts +143 -0
  48. package/dist/cjs/resources/card-disputes.js +31 -0
  49. package/dist/cjs/resources/card-disputes.js.map +1 -0
  50. package/dist/cjs/resources/card-profiles.d.ts +183 -0
  51. package/dist/cjs/resources/card-profiles.js +31 -0
  52. package/dist/cjs/resources/card-profiles.js.map +1 -0
  53. package/dist/cjs/resources/cards.d.ts +316 -0
  54. package/dist/cjs/resources/cards.js +43 -0
  55. package/dist/cjs/resources/cards.js.map +1 -0
  56. package/dist/cjs/resources/check-deposits.d.ts +241 -0
  57. package/dist/cjs/resources/check-deposits.js +31 -0
  58. package/dist/cjs/resources/check-deposits.js.map +1 -0
  59. package/dist/cjs/resources/check-transfers.d.ts +331 -0
  60. package/dist/cjs/resources/check-transfers.js +49 -0
  61. package/dist/cjs/resources/check-transfers.js.map +1 -0
  62. package/dist/cjs/resources/declined-transactions.d.ts +424 -0
  63. package/dist/cjs/resources/declined-transactions.js +29 -0
  64. package/dist/cjs/resources/declined-transactions.js.map +1 -0
  65. package/dist/cjs/resources/digital-wallet-tokens.d.ts +85 -0
  66. package/dist/cjs/resources/digital-wallet-tokens.js +29 -0
  67. package/dist/cjs/resources/digital-wallet-tokens.js.map +1 -0
  68. package/dist/cjs/resources/documents.d.ts +87 -0
  69. package/dist/cjs/resources/documents.js +25 -0
  70. package/dist/cjs/resources/documents.js.map +1 -0
  71. package/dist/cjs/resources/entities/entities.d.ts +1383 -0
  72. package/dist/cjs/resources/entities/entities.js +36 -0
  73. package/dist/cjs/resources/entities/entities.js.map +1 -0
  74. package/dist/cjs/resources/entities/index.d.ts +2 -0
  75. package/dist/cjs/resources/entities/index.js +12 -0
  76. package/dist/cjs/resources/entities/index.js.map +1 -0
  77. package/dist/cjs/resources/entities/supplemental-documents.d.ts +19 -0
  78. package/dist/cjs/resources/entities/supplemental-documents.js +15 -0
  79. package/dist/cjs/resources/entities/supplemental-documents.js.map +1 -0
  80. package/dist/cjs/resources/event-subscriptions.d.ts +196 -0
  81. package/dist/cjs/resources/event-subscriptions.js +37 -0
  82. package/dist/cjs/resources/event-subscriptions.js.map +1 -0
  83. package/dist/cjs/resources/events.d.ts +183 -0
  84. package/dist/cjs/resources/events.js +25 -0
  85. package/dist/cjs/resources/events.js.map +1 -0
  86. package/dist/cjs/resources/external-accounts.d.ts +121 -0
  87. package/dist/cjs/resources/external-accounts.js +37 -0
  88. package/dist/cjs/resources/external-accounts.js.map +1 -0
  89. package/dist/cjs/resources/files.d.ts +148 -0
  90. package/dist/cjs/resources/files.js +34 -0
  91. package/dist/cjs/resources/files.js.map +1 -0
  92. package/dist/cjs/resources/groups.d.ts +37 -0
  93. package/dist/cjs/resources/groups.js +15 -0
  94. package/dist/cjs/resources/groups.js.map +1 -0
  95. package/dist/cjs/resources/inbound-ach-transfer-returns.d.ts +106 -0
  96. package/dist/cjs/resources/inbound-ach-transfer-returns.js +35 -0
  97. package/dist/cjs/resources/inbound-ach-transfer-returns.js.map +1 -0
  98. package/dist/cjs/resources/inbound-wire-drawdown-requests.d.ts +124 -0
  99. package/dist/cjs/resources/inbound-wire-drawdown-requests.js +29 -0
  100. package/dist/cjs/resources/inbound-wire-drawdown-requests.js.map +1 -0
  101. package/dist/cjs/resources/index.d.ts +163 -0
  102. package/dist/cjs/resources/index.js +478 -0
  103. package/dist/cjs/resources/index.js.map +1 -0
  104. package/dist/cjs/resources/limits.d.ts +105 -0
  105. package/dist/cjs/resources/limits.js +37 -0
  106. package/dist/cjs/resources/limits.js.map +1 -0
  107. package/dist/cjs/resources/oauth-connections.d.ts +50 -0
  108. package/dist/cjs/resources/oauth-connections.js +25 -0
  109. package/dist/cjs/resources/oauth-connections.js.map +1 -0
  110. package/dist/cjs/resources/pending-transactions.d.ts +397 -0
  111. package/dist/cjs/resources/pending-transactions.js +29 -0
  112. package/dist/cjs/resources/pending-transactions.js.map +1 -0
  113. package/dist/cjs/resources/real-time-decisions.d.ts +289 -0
  114. package/dist/cjs/resources/real-time-decisions.js +21 -0
  115. package/dist/cjs/resources/real-time-decisions.js.map +1 -0
  116. package/dist/cjs/resources/routing-numbers.d.ts +49 -0
  117. package/dist/cjs/resources/routing-numbers.js +21 -0
  118. package/dist/cjs/resources/routing-numbers.js.map +1 -0
  119. package/dist/cjs/resources/shared.d.ts +15 -0
  120. package/dist/cjs/resources/shared.js +4 -0
  121. package/dist/cjs/resources/shared.js.map +1 -0
  122. package/dist/cjs/resources/simulations/account-statements.d.ts +19 -0
  123. package/dist/cjs/resources/simulations/account-statements.js +16 -0
  124. package/dist/cjs/resources/simulations/account-statements.js.map +1 -0
  125. package/dist/cjs/resources/simulations/account-transfers.d.ts +15 -0
  126. package/dist/cjs/resources/simulations/account-transfers.js +18 -0
  127. package/dist/cjs/resources/simulations/account-transfers.js.map +1 -0
  128. package/dist/cjs/resources/simulations/ach-transfers.d.ts +1488 -0
  129. package/dist/cjs/resources/simulations/ach-transfers.js +39 -0
  130. package/dist/cjs/resources/simulations/ach-transfers.js.map +1 -0
  131. package/dist/cjs/resources/simulations/card-disputes.d.ts +26 -0
  132. package/dist/cjs/resources/simulations/card-disputes.js +18 -0
  133. package/dist/cjs/resources/simulations/card-disputes.js.map +1 -0
  134. package/dist/cjs/resources/simulations/card-refunds.d.ts +20 -0
  135. package/dist/cjs/resources/simulations/card-refunds.js +16 -0
  136. package/dist/cjs/resources/simulations/card-refunds.js.map +1 -0
  137. package/dist/cjs/resources/simulations/cards.d.ts +793 -0
  138. package/dist/cjs/resources/simulations/cards.js +31 -0
  139. package/dist/cjs/resources/simulations/cards.js.map +1 -0
  140. package/dist/cjs/resources/simulations/check-deposits.d.ts +30 -0
  141. package/dist/cjs/resources/simulations/check-deposits.js +31 -0
  142. package/dist/cjs/resources/simulations/check-deposits.js.map +1 -0
  143. package/dist/cjs/resources/simulations/check-transfers.d.ts +22 -0
  144. package/dist/cjs/resources/simulations/check-transfers.js +24 -0
  145. package/dist/cjs/resources/simulations/check-transfers.js.map +1 -0
  146. package/dist/cjs/resources/simulations/digital-wallet-token-requests.d.ts +43 -0
  147. package/dist/cjs/resources/simulations/digital-wallet-token-requests.js +16 -0
  148. package/dist/cjs/resources/simulations/digital-wallet-token-requests.js.map +1 -0
  149. package/dist/cjs/resources/simulations/documents.d.ts +18 -0
  150. package/dist/cjs/resources/simulations/documents.js +15 -0
  151. package/dist/cjs/resources/simulations/documents.js.map +1 -0
  152. package/dist/cjs/resources/simulations/inbound-wire-drawdown-requests.d.ts +101 -0
  153. package/dist/cjs/resources/simulations/inbound-wire-drawdown-requests.js +16 -0
  154. package/dist/cjs/resources/simulations/inbound-wire-drawdown-requests.js.map +1 -0
  155. package/dist/cjs/resources/simulations/index.d.ts +20 -0
  156. package/dist/cjs/resources/simulations/index.js +4 -0
  157. package/dist/cjs/resources/simulations/index.js.map +1 -0
  158. package/dist/cjs/resources/simulations/real-time-payments-transfers.d.ts +1431 -0
  159. package/dist/cjs/resources/simulations/real-time-payments-transfers.js +16 -0
  160. package/dist/cjs/resources/simulations/real-time-payments-transfers.js.map +1 -0
  161. package/dist/cjs/resources/simulations/simulations.d.ts +29 -0
  162. package/dist/cjs/resources/simulations/simulations.js +44 -0
  163. package/dist/cjs/resources/simulations/simulations.js.map +1 -0
  164. package/dist/cjs/resources/simulations/wire-transfers.d.ts +1104 -0
  165. package/dist/cjs/resources/simulations/wire-transfers.js +15 -0
  166. package/dist/cjs/resources/simulations/wire-transfers.js.map +1 -0
  167. package/dist/cjs/resources/transactions.d.ts +1101 -0
  168. package/dist/cjs/resources/transactions.js +25 -0
  169. package/dist/cjs/resources/transactions.js.map +1 -0
  170. package/dist/cjs/resources/wire-drawdown-requests.d.ts +148 -0
  171. package/dist/cjs/resources/wire-drawdown-requests.js +35 -0
  172. package/dist/cjs/resources/wire-drawdown-requests.js.map +1 -0
  173. package/dist/cjs/resources/wire-transfers.d.ts +310 -0
  174. package/dist/cjs/resources/wire-transfers.js +60 -0
  175. package/dist/cjs/resources/wire-transfers.js.map +1 -0
  176. package/dist/cjs/tests/api-resources/account-numbers.test.d.ts +1 -0
  177. package/dist/cjs/tests/api-resources/account-numbers.test.js +104 -0
  178. package/dist/cjs/tests/api-resources/account-numbers.test.js.map +1 -0
  179. package/dist/cjs/tests/api-resources/account-statements.test.d.ts +1 -0
  180. package/dist/cjs/tests/api-resources/account-statements.test.js +101 -0
  181. package/dist/cjs/tests/api-resources/account-statements.test.js.map +1 -0
  182. package/dist/cjs/tests/api-resources/account-transfers.test.d.ts +1 -0
  183. package/dist/cjs/tests/api-resources/account-transfers.test.js +146 -0
  184. package/dist/cjs/tests/api-resources/account-transfers.test.js.map +1 -0
  185. package/dist/cjs/tests/api-resources/accounts.test.d.ts +1 -0
  186. package/dist/cjs/tests/api-resources/accounts.test.js +119 -0
  187. package/dist/cjs/tests/api-resources/accounts.test.js.map +1 -0
  188. package/dist/cjs/tests/api-resources/ach-prenotifications.test.d.ts +1 -0
  189. package/dist/cjs/tests/api-resources/ach-prenotifications.test.js +125 -0
  190. package/dist/cjs/tests/api-resources/ach-prenotifications.test.js.map +1 -0
  191. package/dist/cjs/tests/api-resources/ach-transfers.test.d.ts +1 -0
  192. package/dist/cjs/tests/api-resources/ach-transfers.test.js +159 -0
  193. package/dist/cjs/tests/api-resources/ach-transfers.test.js.map +1 -0
  194. package/dist/cjs/tests/api-resources/card-disputes.test.d.ts +1 -0
  195. package/dist/cjs/tests/api-resources/card-disputes.test.js +108 -0
  196. package/dist/cjs/tests/api-resources/card-disputes.test.js.map +1 -0
  197. package/dist/cjs/tests/api-resources/card-profiles.test.d.ts +1 -0
  198. package/dist/cjs/tests/api-resources/card-profiles.test.js +97 -0
  199. package/dist/cjs/tests/api-resources/card-profiles.test.js.map +1 -0
  200. package/dist/cjs/tests/api-resources/cards.test.d.ts +1 -0
  201. package/dist/cjs/tests/api-resources/cards.test.js +138 -0
  202. package/dist/cjs/tests/api-resources/cards.test.js.map +1 -0
  203. package/dist/cjs/tests/api-resources/check-deposits.test.d.ts +1 -0
  204. package/dist/cjs/tests/api-resources/check-deposits.test.js +113 -0
  205. package/dist/cjs/tests/api-resources/check-deposits.test.js.map +1 -0
  206. package/dist/cjs/tests/api-resources/check-transfers.test.d.ts +1 -0
  207. package/dist/cjs/tests/api-resources/check-transfers.test.js +172 -0
  208. package/dist/cjs/tests/api-resources/check-transfers.test.js.map +1 -0
  209. package/dist/cjs/tests/api-resources/declined-transactions.test.d.ts +1 -0
  210. package/dist/cjs/tests/api-resources/declined-transactions.test.js +105 -0
  211. package/dist/cjs/tests/api-resources/declined-transactions.test.js.map +1 -0
  212. package/dist/cjs/tests/api-resources/digital-wallet-tokens.test.d.ts +1 -0
  213. package/dist/cjs/tests/api-resources/digital-wallet-tokens.test.js +103 -0
  214. package/dist/cjs/tests/api-resources/digital-wallet-tokens.test.js.map +1 -0
  215. package/dist/cjs/tests/api-resources/documents.test.d.ts +1 -0
  216. package/dist/cjs/tests/api-resources/documents.test.js +101 -0
  217. package/dist/cjs/tests/api-resources/documents.test.js.map +1 -0
  218. package/dist/cjs/tests/api-resources/entities/entities.test.d.ts +1 -0
  219. package/dist/cjs/tests/api-resources/entities/entities.test.js +280 -0
  220. package/dist/cjs/tests/api-resources/entities/entities.test.js.map +1 -0
  221. package/dist/cjs/tests/api-resources/entities/supplemental-documents.test.d.ts +1 -0
  222. package/dist/cjs/tests/api-resources/entities/supplemental-documents.test.js +49 -0
  223. package/dist/cjs/tests/api-resources/entities/supplemental-documents.test.js.map +1 -0
  224. package/dist/cjs/tests/api-resources/event-subscriptions.test.d.ts +1 -0
  225. package/dist/cjs/tests/api-resources/event-subscriptions.test.js +109 -0
  226. package/dist/cjs/tests/api-resources/event-subscriptions.test.js.map +1 -0
  227. package/dist/cjs/tests/api-resources/events.test.d.ts +1 -0
  228. package/dist/cjs/tests/api-resources/events.test.js +101 -0
  229. package/dist/cjs/tests/api-resources/events.test.js.map +1 -0
  230. package/dist/cjs/tests/api-resources/external-accounts.test.d.ts +1 -0
  231. package/dist/cjs/tests/api-resources/external-accounts.test.js +113 -0
  232. package/dist/cjs/tests/api-resources/external-accounts.test.js.map +1 -0
  233. package/dist/cjs/tests/api-resources/files.test.d.ts +1 -0
  234. package/dist/cjs/tests/api-resources/files.test.js +117 -0
  235. package/dist/cjs/tests/api-resources/files.test.js.map +1 -0
  236. package/dist/cjs/tests/api-resources/groups.test.d.ts +1 -0
  237. package/dist/cjs/tests/api-resources/groups.test.js +54 -0
  238. package/dist/cjs/tests/api-resources/groups.test.js.map +1 -0
  239. package/dist/cjs/tests/api-resources/inbound-ach-transfer-returns.test.d.ts +1 -0
  240. package/dist/cjs/tests/api-resources/inbound-ach-transfer-returns.test.js +90 -0
  241. package/dist/cjs/tests/api-resources/inbound-ach-transfer-returns.test.js.map +1 -0
  242. package/dist/cjs/tests/api-resources/inbound-wire-drawdown-requests.test.d.ts +1 -0
  243. package/dist/cjs/tests/api-resources/inbound-wire-drawdown-requests.test.js +83 -0
  244. package/dist/cjs/tests/api-resources/inbound-wire-drawdown-requests.test.js.map +1 -0
  245. package/dist/cjs/tests/api-resources/limits.test.d.ts +1 -0
  246. package/dist/cjs/tests/api-resources/limits.test.js +100 -0
  247. package/dist/cjs/tests/api-resources/limits.test.js.map +1 -0
  248. package/dist/cjs/tests/api-resources/oauth-connections.test.d.ts +1 -0
  249. package/dist/cjs/tests/api-resources/oauth-connections.test.js +78 -0
  250. package/dist/cjs/tests/api-resources/oauth-connections.test.js.map +1 -0
  251. package/dist/cjs/tests/api-resources/pending-transactions.test.d.ts +1 -0
  252. package/dist/cjs/tests/api-resources/pending-transactions.test.js +97 -0
  253. package/dist/cjs/tests/api-resources/pending-transactions.test.js.map +1 -0
  254. package/dist/cjs/tests/api-resources/real-time-decisions.test.d.ts +1 -0
  255. package/dist/cjs/tests/api-resources/real-time-decisions.test.js +71 -0
  256. package/dist/cjs/tests/api-resources/real-time-decisions.test.js.map +1 -0
  257. package/dist/cjs/tests/api-resources/routing-numbers.test.d.ts +1 -0
  258. package/dist/cjs/tests/api-resources/routing-numbers.test.js +55 -0
  259. package/dist/cjs/tests/api-resources/routing-numbers.test.js.map +1 -0
  260. package/dist/cjs/tests/api-resources/simulations/account-statements.test.d.ts +1 -0
  261. package/dist/cjs/tests/api-resources/simulations/account-statements.test.js +49 -0
  262. package/dist/cjs/tests/api-resources/simulations/account-statements.test.js.map +1 -0
  263. package/dist/cjs/tests/api-resources/simulations/account-transfers.test.d.ts +1 -0
  264. package/dist/cjs/tests/api-resources/simulations/account-transfers.test.js +60 -0
  265. package/dist/cjs/tests/api-resources/simulations/account-transfers.test.js.map +1 -0
  266. package/dist/cjs/tests/api-resources/simulations/ach-transfers.test.d.ts +1 -0
  267. package/dist/cjs/tests/api-resources/simulations/ach-transfers.test.js +92 -0
  268. package/dist/cjs/tests/api-resources/simulations/ach-transfers.test.js.map +1 -0
  269. package/dist/cjs/tests/api-resources/simulations/card-disputes.test.d.ts +1 -0
  270. package/dist/cjs/tests/api-resources/simulations/card-disputes.test.js +56 -0
  271. package/dist/cjs/tests/api-resources/simulations/card-disputes.test.js.map +1 -0
  272. package/dist/cjs/tests/api-resources/simulations/card-refunds.test.d.ts +1 -0
  273. package/dist/cjs/tests/api-resources/simulations/card-refunds.test.js +49 -0
  274. package/dist/cjs/tests/api-resources/simulations/card-refunds.test.js.map +1 -0
  275. package/dist/cjs/tests/api-resources/simulations/cards.test.d.ts +1 -0
  276. package/dist/cjs/tests/api-resources/simulations/cards.test.js +70 -0
  277. package/dist/cjs/tests/api-resources/simulations/cards.test.js.map +1 -0
  278. package/dist/cjs/tests/api-resources/simulations/check-deposits.test.d.ts +1 -0
  279. package/dist/cjs/tests/api-resources/simulations/check-deposits.test.js +86 -0
  280. package/dist/cjs/tests/api-resources/simulations/check-deposits.test.js.map +1 -0
  281. package/dist/cjs/tests/api-resources/simulations/check-transfers.test.d.ts +1 -0
  282. package/dist/cjs/tests/api-resources/simulations/check-transfers.test.js +73 -0
  283. package/dist/cjs/tests/api-resources/simulations/check-transfers.test.js.map +1 -0
  284. package/dist/cjs/tests/api-resources/simulations/digital-wallet-token-requests.test.d.ts +1 -0
  285. package/dist/cjs/tests/api-resources/simulations/digital-wallet-token-requests.test.js +49 -0
  286. package/dist/cjs/tests/api-resources/simulations/digital-wallet-token-requests.test.js.map +1 -0
  287. package/dist/cjs/tests/api-resources/simulations/documents.test.d.ts +1 -0
  288. package/dist/cjs/tests/api-resources/simulations/documents.test.js +49 -0
  289. package/dist/cjs/tests/api-resources/simulations/documents.test.js.map +1 -0
  290. package/dist/cjs/tests/api-resources/simulations/inbound-wire-drawdown-requests.test.d.ts +1 -0
  291. package/dist/cjs/tests/api-resources/simulations/inbound-wire-drawdown-requests.test.js +81 -0
  292. package/dist/cjs/tests/api-resources/simulations/inbound-wire-drawdown-requests.test.js.map +1 -0
  293. package/dist/cjs/tests/api-resources/simulations/real-time-payments-transfers.test.d.ts +1 -0
  294. package/dist/cjs/tests/api-resources/simulations/real-time-payments-transfers.test.js +62 -0
  295. package/dist/cjs/tests/api-resources/simulations/real-time-payments-transfers.test.js.map +1 -0
  296. package/dist/cjs/tests/api-resources/simulations/wire-transfers.test.d.ts +1 -0
  297. package/dist/cjs/tests/api-resources/simulations/wire-transfers.test.js +70 -0
  298. package/dist/cjs/tests/api-resources/simulations/wire-transfers.test.js.map +1 -0
  299. package/dist/cjs/tests/api-resources/transactions.test.d.ts +1 -0
  300. package/dist/cjs/tests/api-resources/transactions.test.js +109 -0
  301. package/dist/cjs/tests/api-resources/transactions.test.js.map +1 -0
  302. package/dist/cjs/tests/api-resources/wire-drawdown-requests.test.d.ts +1 -0
  303. package/dist/cjs/tests/api-resources/wire-drawdown-requests.test.js +110 -0
  304. package/dist/cjs/tests/api-resources/wire-drawdown-requests.test.js.map +1 -0
  305. package/dist/cjs/tests/api-resources/wire-transfers.test.d.ts +1 -0
  306. package/dist/cjs/tests/api-resources/wire-transfers.test.js +184 -0
  307. package/dist/cjs/tests/api-resources/wire-transfers.test.js.map +1 -0
  308. package/dist/cjs/tests/form.test.d.ts +1 -0
  309. package/dist/cjs/tests/form.test.js +60 -0
  310. package/dist/cjs/tests/form.test.js.map +1 -0
  311. package/dist/cjs/tests/index.test.d.ts +1 -0
  312. package/dist/cjs/tests/index.test.js +44 -0
  313. package/dist/cjs/tests/index.test.js.map +1 -0
  314. package/dist/cjs/tests/responses.test.d.ts +1 -0
  315. package/dist/cjs/tests/responses.test.js +59 -0
  316. package/dist/cjs/tests/responses.test.js.map +1 -0
  317. package/dist/cjs/version.d.ts +1 -0
  318. package/dist/cjs/version.js +5 -0
  319. package/dist/cjs/version.js.map +1 -0
  320. package/fetch-polyfill.ts +69 -0
  321. package/index.ts +276 -0
  322. package/jest.config.js +8 -0
  323. package/package.json +47 -0
  324. package/pagination.ts +58 -0
  325. package/resource.ts +24 -0
  326. package/resources/account-numbers.ts +141 -0
  327. package/resources/account-statements.ts +132 -0
  328. package/resources/account-transfers.ts +244 -0
  329. package/resources/accounts.ts +179 -0
  330. package/resources/ach-prenotifications.ts +242 -0
  331. package/resources/ach-transfers.ts +465 -0
  332. package/resources/card-disputes.ts +187 -0
  333. package/resources/card-profiles.ts +236 -0
  334. package/resources/cards.ts +398 -0
  335. package/resources/check-deposits.ts +303 -0
  336. package/resources/check-transfers.ts +422 -0
  337. package/resources/declined-transactions.ts +547 -0
  338. package/resources/digital-wallet-tokens.ts +115 -0
  339. package/resources/documents.ts +119 -0
  340. package/resources/entities/entities.ts +1668 -0
  341. package/resources/entities/index.ts +4 -0
  342. package/resources/entities/supplemental-documents.ts +25 -0
  343. package/resources/event-subscriptions.ts +232 -0
  344. package/resources/events.ts +215 -0
  345. package/resources/external-accounts.ts +162 -0
  346. package/resources/files.ts +188 -0
  347. package/resources/groups.ts +47 -0
  348. package/resources/inbound-ach-transfer-returns.ts +142 -0
  349. package/resources/inbound-wire-drawdown-requests.ts +168 -0
  350. package/resources/index.ts +165 -0
  351. package/resources/limits.ts +144 -0
  352. package/resources/oauth-connections.ts +74 -0
  353. package/resources/pending-transactions.ts +491 -0
  354. package/resources/real-time-decisions.ts +345 -0
  355. package/resources/routing-numbers.ts +62 -0
  356. package/resources/shared.ts +17 -0
  357. package/resources/simulations/account-statements.ts +25 -0
  358. package/resources/simulations/account-transfers.ts +20 -0
  359. package/resources/simulations/ach-transfers.ts +1873 -0
  360. package/resources/simulations/card-disputes.ts +33 -0
  361. package/resources/simulations/card-refunds.ts +26 -0
  362. package/resources/simulations/cards.ts +979 -0
  363. package/resources/simulations/check-deposits.ts +41 -0
  364. package/resources/simulations/check-transfers.ts +30 -0
  365. package/resources/simulations/digital-wallet-token-requests.ts +52 -0
  366. package/resources/simulations/documents.ts +24 -0
  367. package/resources/simulations/inbound-wire-drawdown-requests.ts +126 -0
  368. package/resources/simulations/index.ts +22 -0
  369. package/resources/simulations/real-time-payments-transfers.ts +1809 -0
  370. package/resources/simulations/simulations.ts +32 -0
  371. package/resources/simulations/wire-transfers.ts +1391 -0
  372. package/resources/transactions.ts +1393 -0
  373. package/resources/wire-drawdown-requests.ts +195 -0
  374. package/resources/wire-transfers.ts +399 -0
  375. package/tests/api-resources/account-numbers.test.ts +67 -0
  376. package/tests/api-resources/account-statements.test.ts +64 -0
  377. package/tests/api-resources/account-transfers.test.ts +109 -0
  378. package/tests/api-resources/accounts.test.ts +82 -0
  379. package/tests/api-resources/ach-prenotifications.test.ts +86 -0
  380. package/tests/api-resources/ach-transfers.test.ts +120 -0
  381. package/tests/api-resources/card-disputes.test.ts +71 -0
  382. package/tests/api-resources/card-profiles.test.ts +60 -0
  383. package/tests/api-resources/cards.test.ts +101 -0
  384. package/tests/api-resources/check-deposits.test.ts +74 -0
  385. package/tests/api-resources/check-transfers.test.ts +135 -0
  386. package/tests/api-resources/declined-transactions.test.ts +68 -0
  387. package/tests/api-resources/digital-wallet-tokens.test.ts +64 -0
  388. package/tests/api-resources/documents.test.ts +64 -0
  389. package/tests/api-resources/entities/entities.test.ts +243 -0
  390. package/tests/api-resources/entities/supplemental-documents.test.ts +12 -0
  391. package/tests/api-resources/event-subscriptions.test.ts +69 -0
  392. package/tests/api-resources/events.test.ts +64 -0
  393. package/tests/api-resources/external-accounts.test.ts +76 -0
  394. package/tests/api-resources/files.test.ts +81 -0
  395. package/tests/api-resources/groups.test.ts +17 -0
  396. package/tests/api-resources/inbound-ach-transfer-returns.test.ts +53 -0
  397. package/tests/api-resources/inbound-wire-drawdown-requests.test.ts +46 -0
  398. package/tests/api-resources/limits.test.ts +63 -0
  399. package/tests/api-resources/oauth-connections.test.ts +41 -0
  400. package/tests/api-resources/pending-transactions.test.ts +58 -0
  401. package/tests/api-resources/real-time-decisions.test.ts +34 -0
  402. package/tests/api-resources/routing-numbers.test.ts +18 -0
  403. package/tests/api-resources/simulations/account-statements.test.ts +12 -0
  404. package/tests/api-resources/simulations/account-transfers.test.ts +23 -0
  405. package/tests/api-resources/simulations/ach-transfers.test.ts +52 -0
  406. package/tests/api-resources/simulations/card-disputes.test.ts +19 -0
  407. package/tests/api-resources/simulations/card-refunds.test.ts +12 -0
  408. package/tests/api-resources/simulations/cards.test.ts +33 -0
  409. package/tests/api-resources/simulations/check-deposits.test.ts +49 -0
  410. package/tests/api-resources/simulations/check-transfers.test.ts +34 -0
  411. package/tests/api-resources/simulations/digital-wallet-token-requests.test.ts +12 -0
  412. package/tests/api-resources/simulations/documents.test.ts +12 -0
  413. package/tests/api-resources/simulations/inbound-wire-drawdown-requests.test.ts +44 -0
  414. package/tests/api-resources/simulations/real-time-payments-transfers.test.ts +25 -0
  415. package/tests/api-resources/simulations/wire-transfers.test.ts +33 -0
  416. package/tests/api-resources/transactions.test.ts +70 -0
  417. package/tests/api-resources/wire-drawdown-requests.test.ts +73 -0
  418. package/tests/api-resources/wire-transfers.test.ts +147 -0
  419. package/tests/form.test.ts +27 -0
  420. package/tests/index.test.ts +47 -0
  421. package/tests/responses.test.ts +25 -0
  422. package/tsconfig.cjs.json +8 -0
  423. package/tsconfig.json +37 -0
  424. package/typings/digest-fetch/index.d.ts +33 -0
  425. package/version.ts +1 -0
@@ -0,0 +1,979 @@
1
+ // File generated from our OpenAPI spec by Stainless.
2
+
3
+ import * as Core from '~/core';
4
+ import { APIResource } from '~/resource';
5
+ import * as Transactions from '~/resources/transactions';
6
+ import * as Shared from '~/resources/shared';
7
+
8
+ export class Cards extends APIResource {
9
+ /**
10
+ * Simulates a purchase authorization on a [Card](#cards). Depending on the balance
11
+ * available to the card and the `amount` submitted, the authorization activity
12
+ * will result in a [Pending Transaction](#pending-transactions) of type
13
+ * `card_authorization` or a [Declined Transaction](#declined-transactions) of type
14
+ * `card_decline`. You can pass either a Card id or a
15
+ * [Digital Wallet Token](#digital-wallet-tokens) id to simulate the two different
16
+ * ways purchases can be made.
17
+ */
18
+ authorize(
19
+ body: CardAuthorizeParams,
20
+ options?: Core.RequestOptions,
21
+ ): Promise<Core.APIResponse<CardAuthorizationSimulation>> {
22
+ return this.post('/simulations/card_authorizations', { body, ...options });
23
+ }
24
+
25
+ /**
26
+ * Simulates the settlement of an authorization by a card acquirer. After a card
27
+ * authorization is created, the merchant will eventually send a settlement. This
28
+ * simulates that event, which may occur many days after the purchase in
29
+ * production. The amount settled can be different from the amount originally
30
+ * authorized, for example, when adding a tip to a restaurant bill.
31
+ */
32
+ settlement(
33
+ body: CardSettlementParams,
34
+ options?: Core.RequestOptions,
35
+ ): Promise<Core.APIResponse<Transactions.Transaction>> {
36
+ return this.post('/simulations/card_settlements', { body, ...options });
37
+ }
38
+ }
39
+
40
+ /**
41
+ * The results of a Card Authorization simulation.
42
+ */
43
+ export interface CardAuthorizationSimulation {
44
+ /**
45
+ * If the authorization attempt fails, this will contain the resulting
46
+ * [Declined Transaction](#declined-transactions) object. The Declined
47
+ * Transaction's `source` will be of `category: card_decline`.
48
+ */
49
+ declined_transaction: CardAuthorizationSimulation.DeclinedTransaction | null;
50
+
51
+ /**
52
+ * If the authorization attempt succeeds, this will contain the resulting Pending
53
+ * Transaction object. The Pending Transaction's `source` will be of
54
+ * `category: card_authorization`.
55
+ */
56
+ pending_transaction: CardAuthorizationSimulation.PendingTransaction | null;
57
+
58
+ /**
59
+ * A constant representing the object's type. For this resource it will always be
60
+ * `inbound_card_authorization_simulation_result`.
61
+ */
62
+ type: 'inbound_card_authorization_simulation_result';
63
+ }
64
+
65
+ export namespace CardAuthorizationSimulation {
66
+ export interface PendingTransaction {
67
+ /**
68
+ * The identifier for the account this Pending Transaction belongs to.
69
+ */
70
+ account_id: string;
71
+
72
+ /**
73
+ * The Pending Transaction amount in the minor unit of its currency. For dollars,
74
+ * for example, this is cents.
75
+ */
76
+ amount: number;
77
+
78
+ /**
79
+ * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date on which the Pending
80
+ * Transaction occured.
81
+ */
82
+ created_at: string;
83
+
84
+ /**
85
+ * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the Pending
86
+ * Transaction's currency. This will match the currency on the Pending
87
+ * Transcation's Account.
88
+ */
89
+ currency: 'CAD' | 'CHF' | 'EUR' | 'GBP' | 'JPY' | 'USD';
90
+
91
+ /**
92
+ * For a Pending Transaction related to a transfer, this is the description you
93
+ * provide. For a Pending Transaction related to a payment, this is the description
94
+ * the vendor provides.
95
+ */
96
+ description: string;
97
+
98
+ /**
99
+ * The Pending Transaction identifier.
100
+ */
101
+ id: string;
102
+
103
+ /**
104
+ * The identifier for the route this Pending Transaction came through. Routes are
105
+ * things like cards and ACH details.
106
+ */
107
+ route_id: string | null;
108
+
109
+ /**
110
+ * The type of the route this Pending Transaction came through.
111
+ */
112
+ route_type: string | null;
113
+
114
+ /**
115
+ * This is an object giving more details on the network-level event that caused the
116
+ * Pending Transaction. For example, for a card transaction this lists the
117
+ * merchant's industry and location.
118
+ */
119
+ source: PendingTransaction.Source;
120
+
121
+ /**
122
+ * Whether the Pending Transaction has been confirmed and has an associated
123
+ * Transaction.
124
+ */
125
+ status: 'pending' | 'complete';
126
+
127
+ /**
128
+ * A constant representing the object's type. For this resource it will always be
129
+ * `pending_transaction`.
130
+ */
131
+ type: 'pending_transaction';
132
+ }
133
+
134
+ export namespace PendingTransaction {
135
+ export interface Source {
136
+ /**
137
+ * A Account Transfer Instruction object. This field will be present in the JSON
138
+ * response if and only if `category` is equal to `account_transfer_instruction`.
139
+ */
140
+ account_transfer_instruction: Source.AccountTransferInstruction | null;
141
+
142
+ /**
143
+ * A ACH Transfer Instruction object. This field will be present in the JSON
144
+ * response if and only if `category` is equal to `ach_transfer_instruction`.
145
+ */
146
+ ach_transfer_instruction: Source.ACHTransferInstruction | null;
147
+
148
+ /**
149
+ * A Card Authorization object. This field will be present in the JSON response if
150
+ * and only if `category` is equal to `card_authorization`.
151
+ */
152
+ card_authorization: Source.CardAuthorization | null;
153
+
154
+ /**
155
+ * A Deprecated Card Authorization object. This field will be present in the JSON
156
+ * response if and only if `category` is equal to `card_route_authorization`.
157
+ */
158
+ card_route_authorization: Source.CardRouteAuthorization | null;
159
+
160
+ /**
161
+ * The type of transaction that took place. We may add additional possible values
162
+ * for this enum over time; your application should be able to handle such
163
+ * additions gracefully.
164
+ */
165
+ category:
166
+ | 'account_transfer_instruction'
167
+ | 'ach_transfer_instruction'
168
+ | 'card_authorization'
169
+ | 'check_deposit_instruction'
170
+ | 'check_transfer_instruction'
171
+ | 'inbound_funds_hold'
172
+ | 'card_route_authorization'
173
+ | 'real_time_payments_transfer_instruction'
174
+ | 'wire_drawdown_payment_instruction'
175
+ | 'wire_transfer_instruction'
176
+ | 'other';
177
+
178
+ /**
179
+ * A Check Deposit Instruction object. This field will be present in the JSON
180
+ * response if and only if `category` is equal to `check_deposit_instruction`.
181
+ */
182
+ check_deposit_instruction: Source.CheckDepositInstruction | null;
183
+
184
+ /**
185
+ * A Check Transfer Instruction object. This field will be present in the JSON
186
+ * response if and only if `category` is equal to `check_transfer_instruction`.
187
+ */
188
+ check_transfer_instruction: Source.CheckTransferInstruction | null;
189
+
190
+ /**
191
+ * A Inbound Funds Hold object. This field will be present in the JSON response if
192
+ * and only if `category` is equal to `inbound_funds_hold`.
193
+ */
194
+ inbound_funds_hold: Source.InboundFundsHold | null;
195
+
196
+ /**
197
+ * A Wire Drawdown Payment Instruction object. This field will be present in the
198
+ * JSON response if and only if `category` is equal to
199
+ * `wire_drawdown_payment_instruction`.
200
+ */
201
+ wire_drawdown_payment_instruction: Source.WireDrawdownPaymentInstruction | null;
202
+
203
+ /**
204
+ * A Wire Transfer Instruction object. This field will be present in the JSON
205
+ * response if and only if `category` is equal to `wire_transfer_instruction`.
206
+ */
207
+ wire_transfer_instruction: Source.WireTransferInstruction | null;
208
+ }
209
+
210
+ export namespace Source {
211
+ export interface AccountTransferInstruction {
212
+ /**
213
+ * The pending amount in the minor unit of the transaction's currency. For dollars,
214
+ * for example, this is cents.
215
+ */
216
+ amount: number;
217
+
218
+ /**
219
+ * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the destination
220
+ * account currency.
221
+ */
222
+ currency: 'CAD' | 'CHF' | 'EUR' | 'GBP' | 'JPY' | 'USD';
223
+
224
+ /**
225
+ * The identifier of the Account Transfer that led to this Pending Transaction.
226
+ */
227
+ transfer_id: string;
228
+ }
229
+
230
+ export interface ACHTransferInstruction {
231
+ /**
232
+ * The pending amount in the minor unit of the transaction's currency. For dollars,
233
+ * for example, this is cents.
234
+ */
235
+ amount: number;
236
+
237
+ /**
238
+ * The identifier of the ACH Transfer that led to this Pending Transaction.
239
+ */
240
+ transfer_id: string;
241
+ }
242
+
243
+ export interface CardAuthorization {
244
+ /**
245
+ * The pending amount in the minor unit of the transaction's currency. For dollars,
246
+ * for example, this is cents.
247
+ */
248
+ amount: number;
249
+
250
+ /**
251
+ * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the
252
+ * transaction's currency.
253
+ */
254
+ currency: 'CAD' | 'CHF' | 'EUR' | 'GBP' | 'JPY' | 'USD';
255
+
256
+ /**
257
+ * If the authorization was made via a Digital Wallet Token (such as an Apple Pay
258
+ * purchase), the identifier of the token that was used.
259
+ */
260
+ digital_wallet_token_id: string | null;
261
+
262
+ /**
263
+ * The merchant identifier (commonly abbreviated as MID) of the merchant the card
264
+ * is transacting with.
265
+ */
266
+ merchant_acceptor_id: string;
267
+
268
+ /**
269
+ * The Merchant Category Code (commonly abbreviated as MCC) of the merchant the
270
+ * card is transacting with.
271
+ */
272
+ merchant_category_code: string | null;
273
+
274
+ /**
275
+ * The city the merchant resides in.
276
+ */
277
+ merchant_city: string | null;
278
+
279
+ /**
280
+ * The country the merchant resides in.
281
+ */
282
+ merchant_country: string | null;
283
+
284
+ /**
285
+ * The merchant descriptor of the merchant the card is transacting with.
286
+ */
287
+ merchant_descriptor: string;
288
+
289
+ /**
290
+ * The payment network used to process this card authorization
291
+ */
292
+ network: 'visa';
293
+
294
+ /**
295
+ * Fields specific to the `network`
296
+ */
297
+ network_details: CardAuthorization.NetworkDetails;
298
+
299
+ /**
300
+ * The identifier of the Real-Time Decision sent to approve or decline this
301
+ * transaction.
302
+ */
303
+ real_time_decision_id: string | null;
304
+ }
305
+
306
+ export namespace CardAuthorization {
307
+ export interface NetworkDetails {
308
+ /**
309
+ * Fields specific to the `visa` network
310
+ */
311
+ visa: NetworkDetails.Visa;
312
+ }
313
+
314
+ export namespace NetworkDetails {
315
+ export interface Visa {
316
+ /**
317
+ * For electronic commerce transactions, this identifies the level of security used
318
+ * in obtaining the customer's payment credential. For mail or telephone order
319
+ * transactions, identifies the type of mail or telephone order.
320
+ */
321
+ electronic_commerce_indicator:
322
+ | 'mail_phone_order'
323
+ | 'recurring'
324
+ | 'installment'
325
+ | 'unknown_mail_phone_order'
326
+ | 'secure_electronic_commerce'
327
+ | 'non_authenticated_security_transaction_at_3ds_capable_merchant'
328
+ | 'non_authenticated_security_transaction'
329
+ | 'non_secure_transaction'
330
+ | null;
331
+
332
+ /**
333
+ * The method used to enter the cardholder's primary account number and card
334
+ * expiration date
335
+ */
336
+ point_of_service_entry_mode: Shared.PointOfServiceEntryMode;
337
+ }
338
+ }
339
+ }
340
+
341
+ export interface CheckDepositInstruction {
342
+ /**
343
+ * The pending amount in the minor unit of the transaction's currency. For dollars,
344
+ * for example, this is cents.
345
+ */
346
+ amount: number;
347
+
348
+ /**
349
+ * The identifier of the File containing the image of the back of the check that
350
+ * was deposited.
351
+ */
352
+ back_image_file_id: string | null;
353
+
354
+ /**
355
+ * The identifier of the Check Deposit.
356
+ */
357
+ check_deposit_id: string | null;
358
+
359
+ /**
360
+ * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the
361
+ * transaction's currency.
362
+ */
363
+ currency: 'CAD' | 'CHF' | 'EUR' | 'GBP' | 'JPY' | 'USD';
364
+
365
+ /**
366
+ * The identifier of the File containing the image of the front of the check that
367
+ * was deposited.
368
+ */
369
+ front_image_file_id: string;
370
+ }
371
+
372
+ export interface CheckTransferInstruction {
373
+ /**
374
+ * The pending amount in the minor unit of the transaction's currency. For dollars,
375
+ * for example, this is cents.
376
+ */
377
+ amount: number;
378
+
379
+ /**
380
+ * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the check's
381
+ * currency.
382
+ */
383
+ currency: 'CAD' | 'CHF' | 'EUR' | 'GBP' | 'JPY' | 'USD';
384
+
385
+ /**
386
+ * The identifier of the Check Transfer that led to this Pending Transaction.
387
+ */
388
+ transfer_id: string;
389
+ }
390
+
391
+ export interface InboundFundsHold {
392
+ /**
393
+ * The held amount in the minor unit of the account's currency. For dollars, for
394
+ * example, this is cents.
395
+ */
396
+ amount: number;
397
+
398
+ /**
399
+ * When the hold will be released automatically. Certain conditions may cause it to
400
+ * be released before this time.
401
+ */
402
+ automatically_releases_at: string;
403
+
404
+ /**
405
+ * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the hold's
406
+ * currency.
407
+ */
408
+ currency: 'CAD' | 'CHF' | 'EUR' | 'GBP' | 'JPY' | 'USD';
409
+
410
+ /**
411
+ * The ID of the Transaction for which funds were held.
412
+ */
413
+ held_transaction_id: string | null;
414
+
415
+ /**
416
+ * When the hold was released (if it has been released).
417
+ */
418
+ released_at: string | null;
419
+
420
+ /**
421
+ * The status of the hold.
422
+ */
423
+ status: 'held' | 'complete';
424
+ }
425
+
426
+ export interface CardRouteAuthorization {
427
+ /**
428
+ * The pending amount in the minor unit of the transaction's currency. For dollars,
429
+ * for example, this is cents.
430
+ */
431
+ amount: number;
432
+
433
+ /**
434
+ * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the
435
+ * transaction's currency.
436
+ */
437
+ currency: 'CAD' | 'CHF' | 'EUR' | 'GBP' | 'JPY' | 'USD';
438
+
439
+ merchant_acceptor_id: string;
440
+
441
+ merchant_category_code: string;
442
+
443
+ merchant_city: string | null;
444
+
445
+ merchant_country: string;
446
+
447
+ merchant_descriptor: string;
448
+
449
+ merchant_state: string | null;
450
+ }
451
+
452
+ export interface WireDrawdownPaymentInstruction {
453
+ account_number: string;
454
+
455
+ /**
456
+ * The pending amount in the minor unit of the transaction's currency. For dollars,
457
+ * for example, this is cents.
458
+ */
459
+ amount: number;
460
+
461
+ message_to_recipient: string;
462
+
463
+ routing_number: string;
464
+ }
465
+
466
+ export interface WireTransferInstruction {
467
+ account_number: string;
468
+
469
+ /**
470
+ * The pending amount in the minor unit of the transaction's currency. For dollars,
471
+ * for example, this is cents.
472
+ */
473
+ amount: number;
474
+
475
+ message_to_recipient: string;
476
+
477
+ routing_number: string;
478
+
479
+ transfer_id: string;
480
+ }
481
+ }
482
+ }
483
+
484
+ export interface DeclinedTransaction {
485
+ /**
486
+ * The identifier for the Account the Declined Transaction belongs to.
487
+ */
488
+ account_id: string;
489
+
490
+ /**
491
+ * The Declined Transaction amount in the minor unit of its currency. For dollars,
492
+ * for example, this is cents.
493
+ */
494
+ amount: number;
495
+
496
+ /**
497
+ * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date on which the
498
+ * Transaction occured.
499
+ */
500
+ created_at: string;
501
+
502
+ /**
503
+ * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the Declined
504
+ * Transaction's currency. This will match the currency on the Declined
505
+ * Transcation's Account.
506
+ */
507
+ currency: 'CAD' | 'CHF' | 'EUR' | 'GBP' | 'JPY' | 'USD';
508
+
509
+ /**
510
+ * This is the description the vendor provides.
511
+ */
512
+ description: string;
513
+
514
+ /**
515
+ * The Declined Transaction identifier.
516
+ */
517
+ id: string;
518
+
519
+ /**
520
+ * The identifier for the route this Declined Transaction came through. Routes are
521
+ * things like cards and ACH details.
522
+ */
523
+ route_id: string | null;
524
+
525
+ /**
526
+ * The type of the route this Declined Transaction came through.
527
+ */
528
+ route_type: string | null;
529
+
530
+ /**
531
+ * This is an object giving more details on the network-level event that caused the
532
+ * Declined Transaction. For example, for a card transaction this lists the
533
+ * merchant's industry and location. Note that for backwards compatibility reasons,
534
+ * additional undocumented keys may appear in this object. These should be treated
535
+ * as deprecated and will be removed in the future.
536
+ */
537
+ source: DeclinedTransaction.Source;
538
+
539
+ /**
540
+ * A constant representing the object's type. For this resource it will always be
541
+ * `declined_transaction`.
542
+ */
543
+ type: 'declined_transaction';
544
+ }
545
+
546
+ export namespace DeclinedTransaction {
547
+ export interface Source {
548
+ /**
549
+ * A ACH Decline object. This field will be present in the JSON response if and
550
+ * only if `category` is equal to `ach_decline`.
551
+ */
552
+ ach_decline: Source.ACHDecline | null;
553
+
554
+ /**
555
+ * A Card Decline object. This field will be present in the JSON response if and
556
+ * only if `category` is equal to `card_decline`.
557
+ */
558
+ card_decline: Source.CardDecline | null;
559
+
560
+ /**
561
+ * A Deprecated Card Decline object. This field will be present in the JSON
562
+ * response if and only if `category` is equal to `card_route_decline`.
563
+ */
564
+ card_route_decline: Source.CardRouteDecline | null;
565
+
566
+ /**
567
+ * The type of decline that took place. We may add additional possible values for
568
+ * this enum over time; your application should be able to handle such additions
569
+ * gracefully.
570
+ */
571
+ category:
572
+ | 'ach_decline'
573
+ | 'card_decline'
574
+ | 'check_decline'
575
+ | 'inbound_real_time_payments_transfer_decline'
576
+ | 'international_ach_decline'
577
+ | 'card_route_decline'
578
+ | 'other';
579
+
580
+ /**
581
+ * A Check Decline object. This field will be present in the JSON response if and
582
+ * only if `category` is equal to `check_decline`.
583
+ */
584
+ check_decline: Source.CheckDecline | null;
585
+
586
+ /**
587
+ * A Inbound Real Time Payments Transfer Decline object. This field will be present
588
+ * in the JSON response if and only if `category` is equal to
589
+ * `inbound_real_time_payments_transfer_decline`.
590
+ */
591
+ inbound_real_time_payments_transfer_decline: Source.InboundRealTimePaymentsTransferDecline | null;
592
+
593
+ /**
594
+ * A International ACH Decline object. This field will be present in the JSON
595
+ * response if and only if `category` is equal to `international_ach_decline`.
596
+ */
597
+ international_ach_decline: Source.InternationalACHDecline | null;
598
+ }
599
+
600
+ export namespace Source {
601
+ export interface ACHDecline {
602
+ /**
603
+ * The declined amount in the minor unit of the destination account currency. For
604
+ * dollars, for example, this is cents.
605
+ */
606
+ amount: number;
607
+
608
+ originator_company_descriptive_date: string | null;
609
+
610
+ originator_company_discretionary_data: string | null;
611
+
612
+ originator_company_id: string;
613
+
614
+ originator_company_name: string;
615
+
616
+ /**
617
+ * Why the ACH transfer was declined.
618
+ */
619
+ reason:
620
+ | 'ach_route_canceled'
621
+ | 'ach_route_disabled'
622
+ | 'breaches_limit'
623
+ | 'credit_entry_refused_by_receiver'
624
+ | 'duplicate_return'
625
+ | 'entity_not_active'
626
+ | 'transaction_not_allowed'
627
+ | 'group_locked'
628
+ | 'insufficient_funds'
629
+ | 'no_ach_route'
630
+ | 'originator_request';
631
+
632
+ receiver_id_number: string | null;
633
+
634
+ receiver_name: string | null;
635
+
636
+ trace_number: string;
637
+ }
638
+
639
+ export interface CardDecline {
640
+ /**
641
+ * The declined amount in the minor unit of the destination account currency. For
642
+ * dollars, for example, this is cents.
643
+ */
644
+ amount: number;
645
+
646
+ /**
647
+ * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the destination
648
+ * account currency.
649
+ */
650
+ currency: 'CAD' | 'CHF' | 'EUR' | 'GBP' | 'JPY' | 'USD';
651
+
652
+ /**
653
+ * If the authorization was attempted using a Digital Wallet Token (such as an
654
+ * Apple Pay purchase), the identifier of the token that was used.
655
+ */
656
+ digital_wallet_token_id: string | null;
657
+
658
+ /**
659
+ * The merchant identifier (commonly abbreviated as MID) of the merchant the card
660
+ * is transacting with.
661
+ */
662
+ merchant_acceptor_id: string;
663
+
664
+ /**
665
+ * The Merchant Category Code (commonly abbreviated as MCC) of the merchant the
666
+ * card is transacting with.
667
+ */
668
+ merchant_category_code: string | null;
669
+
670
+ /**
671
+ * The city the merchant resides in.
672
+ */
673
+ merchant_city: string | null;
674
+
675
+ /**
676
+ * The country the merchant resides in.
677
+ */
678
+ merchant_country: string | null;
679
+
680
+ /**
681
+ * The merchant descriptor of the merchant the card is transacting with.
682
+ */
683
+ merchant_descriptor: string;
684
+
685
+ /**
686
+ * The state the merchant resides in.
687
+ */
688
+ merchant_state: string | null;
689
+
690
+ /**
691
+ * The payment network used to process this card authorization
692
+ */
693
+ network: 'visa';
694
+
695
+ /**
696
+ * Fields specific to the `network`
697
+ */
698
+ network_details: CardDecline.NetworkDetails;
699
+
700
+ /**
701
+ * The identifier of the Real-Time Decision sent to approve or decline this
702
+ * transaction.
703
+ */
704
+ real_time_decision_id: string | null;
705
+
706
+ /**
707
+ * Why the transaction was declined.
708
+ */
709
+ reason:
710
+ | 'card_not_active'
711
+ | 'entity_not_active'
712
+ | 'group_locked'
713
+ | 'insufficient_funds'
714
+ | 'cvv2_mismatch'
715
+ | 'transaction_not_allowed'
716
+ | 'breaches_limit'
717
+ | 'webhook_declined'
718
+ | 'webhook_timed_out'
719
+ | 'declined_by_stand_in_processing';
720
+ }
721
+
722
+ export namespace CardDecline {
723
+ export interface NetworkDetails {
724
+ /**
725
+ * Fields specific to the `visa` network
726
+ */
727
+ visa: NetworkDetails.Visa;
728
+ }
729
+
730
+ export namespace NetworkDetails {
731
+ export interface Visa {
732
+ /**
733
+ * For electronic commerce transactions, this identifies the level of security used
734
+ * in obtaining the customer's payment credential. For mail or telephone order
735
+ * transactions, identifies the type of mail or telephone order.
736
+ */
737
+ electronic_commerce_indicator:
738
+ | 'mail_phone_order'
739
+ | 'recurring'
740
+ | 'installment'
741
+ | 'unknown_mail_phone_order'
742
+ | 'secure_electronic_commerce'
743
+ | 'non_authenticated_security_transaction_at_3ds_capable_merchant'
744
+ | 'non_authenticated_security_transaction'
745
+ | 'non_secure_transaction'
746
+ | null;
747
+
748
+ /**
749
+ * The method used to enter the cardholder's primary account number and card
750
+ * expiration date
751
+ */
752
+ point_of_service_entry_mode: Shared.PointOfServiceEntryMode;
753
+ }
754
+ }
755
+ }
756
+
757
+ export interface CheckDecline {
758
+ /**
759
+ * The declined amount in the minor unit of the destination account currency. For
760
+ * dollars, for example, this is cents.
761
+ */
762
+ amount: number;
763
+
764
+ auxiliary_on_us: string | null;
765
+
766
+ /**
767
+ * Why the check was declined.
768
+ */
769
+ reason:
770
+ | 'ach_route_canceled'
771
+ | 'ach_route_disabled'
772
+ | 'breaches_limit'
773
+ | 'entity_not_active'
774
+ | 'group_locked'
775
+ | 'insufficient_funds'
776
+ | 'unable_to_locate_account'
777
+ | 'unable_to_process'
778
+ | 'refer_to_image'
779
+ | 'stop_payment_requested'
780
+ | 'returned';
781
+ }
782
+
783
+ export interface InboundRealTimePaymentsTransferDecline {
784
+ /**
785
+ * The declined amount in the minor unit of the destination account currency. For
786
+ * dollars, for example, this is cents.
787
+ */
788
+ amount: number;
789
+
790
+ /**
791
+ * The name the sender of the transfer specified as the recipient of the transfer.
792
+ */
793
+ creditor_name: string;
794
+
795
+ /**
796
+ * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code of the declined
797
+ * transfer's currency. This will always be "USD" for a Real Time Payments
798
+ * transfer.
799
+ */
800
+ currency: 'CAD' | 'CHF' | 'EUR' | 'GBP' | 'JPY' | 'USD';
801
+
802
+ /**
803
+ * The account number of the account that sent the transfer.
804
+ */
805
+ debtor_account_number: string;
806
+
807
+ /**
808
+ * The name provided by the sender of the transfer.
809
+ */
810
+ debtor_name: string;
811
+
812
+ /**
813
+ * The routing number of the account that sent the transfer.
814
+ */
815
+ debtor_routing_number: string;
816
+
817
+ /**
818
+ * Why the transfer was declined.
819
+ */
820
+ reason:
821
+ | 'account_number_canceled'
822
+ | 'account_number_disabled'
823
+ | 'group_locked'
824
+ | 'entity_not_active'
825
+ | 'real_time_payments_not_enabled';
826
+
827
+ /**
828
+ * Additional information included with the transfer.
829
+ */
830
+ remittance_information: string | null;
831
+
832
+ /**
833
+ * The Real Time Payments network identification of the declined transfer.
834
+ */
835
+ transaction_identification: string;
836
+ }
837
+
838
+ export interface InternationalACHDecline {
839
+ /**
840
+ * The declined amount in the minor unit of the destination account currency. For
841
+ * dollars, for example, this is cents.
842
+ */
843
+ amount: number;
844
+
845
+ destination_country_code: string;
846
+
847
+ destination_currency_code: string;
848
+
849
+ foreign_exchange_indicator: string;
850
+
851
+ foreign_exchange_reference: string | null;
852
+
853
+ foreign_exchange_reference_indicator: string;
854
+
855
+ foreign_payment_amount: number;
856
+
857
+ foreign_trace_number: string | null;
858
+
859
+ international_transaction_type_code: string;
860
+
861
+ originating_currency_code: string;
862
+
863
+ originating_depository_financial_institution_branch_country: string;
864
+
865
+ originating_depository_financial_institution_id: string;
866
+
867
+ originating_depository_financial_institution_id_qualifier: string;
868
+
869
+ originating_depository_financial_institution_name: string;
870
+
871
+ originator_city: string;
872
+
873
+ originator_company_entry_description: string;
874
+
875
+ originator_country: string;
876
+
877
+ originator_identification: string;
878
+
879
+ originator_name: string;
880
+
881
+ originator_postal_code: string | null;
882
+
883
+ originator_state_or_province: string | null;
884
+
885
+ originator_street_address: string;
886
+
887
+ payment_related_information: string | null;
888
+
889
+ payment_related_information2: string | null;
890
+
891
+ receiver_city: string;
892
+
893
+ receiver_country: string;
894
+
895
+ receiver_identification_number: string | null;
896
+
897
+ receiver_postal_code: string | null;
898
+
899
+ receiver_state_or_province: string | null;
900
+
901
+ receiver_street_address: string;
902
+
903
+ receiving_company_or_individual_name: string;
904
+
905
+ receiving_depository_financial_institution_country: string;
906
+
907
+ receiving_depository_financial_institution_id: string;
908
+
909
+ receiving_depository_financial_institution_id_qualifier: string;
910
+
911
+ receiving_depository_financial_institution_name: string;
912
+
913
+ trace_number: string;
914
+ }
915
+
916
+ export interface CardRouteDecline {
917
+ /**
918
+ * The declined amount in the minor unit of the destination account currency. For
919
+ * dollars, for example, this is cents.
920
+ */
921
+ amount: number;
922
+
923
+ /**
924
+ * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the destination
925
+ * account currency.
926
+ */
927
+ currency: 'CAD' | 'CHF' | 'EUR' | 'GBP' | 'JPY' | 'USD';
928
+
929
+ merchant_acceptor_id: string;
930
+
931
+ merchant_category_code: string | null;
932
+
933
+ merchant_city: string | null;
934
+
935
+ merchant_country: string;
936
+
937
+ merchant_descriptor: string;
938
+
939
+ merchant_state: string | null;
940
+ }
941
+ }
942
+ }
943
+ }
944
+
945
+ export interface CardAuthorizeParams {
946
+ /**
947
+ * The authorization amount in cents.
948
+ */
949
+ amount: number;
950
+
951
+ /**
952
+ * The identifier of the Card to be authorized.
953
+ */
954
+ card_id?: string;
955
+
956
+ /**
957
+ * The identifier of the Digital Wallet Token to be authorized.
958
+ */
959
+ digital_wallet_token_id?: string;
960
+ }
961
+
962
+ export interface CardSettlementParams {
963
+ /**
964
+ * The identifier of the Card to create a settlement on.
965
+ */
966
+ card_id: string;
967
+
968
+ /**
969
+ * The identifier of the Pending Transaction for the Card Authorization you wish to
970
+ * settle.
971
+ */
972
+ pending_transaction_id: string;
973
+
974
+ /**
975
+ * The amount to be settled. This defaults to the amount of the Pending Transaction
976
+ * being settled.
977
+ */
978
+ amount?: number;
979
+ }