modern-treasury 2.2.0 → 2.4.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 (373) hide show
  1. package/CHANGELOG.md +75 -0
  2. package/README.md +43 -15
  3. package/_shims/ReadableStream-node.d.ts +6 -0
  4. package/_shims/ReadableStream-node.d.ts.map +1 -0
  5. package/_shims/ReadableStream-node.js +14 -0
  6. package/_shims/ReadableStream-node.js.map +1 -0
  7. package/_shims/ReadableStream-node.mjs +3 -0
  8. package/_shims/ReadableStream-node.mjs.map +1 -0
  9. package/_shims/ReadableStream.d.ts +38 -0
  10. package/_shims/ReadableStream.js +5 -0
  11. package/_shims/ReadableStream.mjs +7 -0
  12. package/_shims/{agent.node.d.ts → agent-node.d.ts} +1 -1
  13. package/_shims/agent-node.d.ts.map +1 -0
  14. package/_shims/{agent.node.js → agent-node.js} +1 -1
  15. package/_shims/{agent.node.js.map → agent-node.js.map} +1 -1
  16. package/_shims/{agent.node.mjs → agent-node.mjs} +1 -1
  17. package/_shims/{agent.node.mjs.map → agent-node.mjs.map} +1 -1
  18. package/_shims/agent.d.ts +1 -1
  19. package/_shims/agent.js +1 -1
  20. package/_shims/agent.mjs +1 -1
  21. package/_shims/{fetch.node.d.ts → fetch-node.d.ts} +12 -1
  22. package/_shims/fetch.d.ts +9 -1
  23. package/_shims/{fileFromPath.node.d.ts → fileFromPath-node.d.ts} +2 -2
  24. package/_shims/{fileFromPath.node.d.ts.map → fileFromPath-node.d.ts.map} +1 -1
  25. package/_shims/{fileFromPath.node.js → fileFromPath-node.js} +1 -1
  26. package/_shims/{fileFromPath.node.js.map → fileFromPath-node.js.map} +1 -1
  27. package/_shims/{fileFromPath.node.mjs → fileFromPath-node.mjs} +1 -1
  28. package/_shims/{fileFromPath.node.mjs.map → fileFromPath-node.mjs.map} +1 -1
  29. package/_shims/fileFromPath.d.ts +2 -2
  30. package/_shims/fileFromPath.d.ts.map +1 -1
  31. package/_shims/fileFromPath.js +1 -1
  32. package/_shims/fileFromPath.mjs +1 -1
  33. package/_shims/form-data.js +17 -0
  34. package/_shims/form-data.mjs +20 -0
  35. package/_shims/{getMultipartRequestOptions.node.d.ts → getMultipartRequestOptions-node.d.ts} +2 -2
  36. package/_shims/getMultipartRequestOptions-node.d.ts.map +1 -0
  37. package/_shims/{getMultipartRequestOptions.node.js → getMultipartRequestOptions-node.js} +1 -1
  38. package/_shims/{getMultipartRequestOptions.node.js.map → getMultipartRequestOptions-node.js.map} +1 -1
  39. package/_shims/{getMultipartRequestOptions.node.mjs → getMultipartRequestOptions-node.mjs} +1 -1
  40. package/_shims/{getMultipartRequestOptions.node.mjs.map → getMultipartRequestOptions-node.mjs.map} +1 -1
  41. package/_shims/getMultipartRequestOptions.d.ts +1 -1
  42. package/_shims/getMultipartRequestOptions.d.ts.map +1 -1
  43. package/_shims/{node-readable.node.d.ts → node-readable-node.d.ts} +1 -1
  44. package/_shims/{node-readable.node.d.ts.map → node-readable-node.d.ts.map} +1 -1
  45. package/_shims/{node-readable.node.js → node-readable-node.js} +1 -1
  46. package/_shims/node-readable-node.js.map +1 -0
  47. package/_shims/{node-readable.node.mjs → node-readable-node.mjs} +1 -1
  48. package/_shims/node-readable-node.mjs.map +1 -0
  49. package/core.d.ts +91 -34
  50. package/core.d.ts.map +1 -1
  51. package/core.js +201 -70
  52. package/core.js.map +1 -1
  53. package/core.mjs +195 -70
  54. package/core.mjs.map +1 -1
  55. package/index.d.mts +19 -7
  56. package/index.d.ts +19 -7
  57. package/index.d.ts.map +1 -1
  58. package/index.js +23 -9
  59. package/index.js.map +1 -1
  60. package/index.mjs +23 -9
  61. package/index.mjs.map +1 -1
  62. package/package.json +32 -9
  63. package/pagination.d.ts +2 -2
  64. package/pagination.d.ts.map +1 -1
  65. package/pagination.js +5 -5
  66. package/pagination.js.map +1 -1
  67. package/pagination.mjs +5 -5
  68. package/pagination.mjs.map +1 -1
  69. package/resources/account-collection-flows.d.ts +8 -33
  70. package/resources/account-collection-flows.d.ts.map +1 -1
  71. package/resources/account-collection-flows.js +22 -17
  72. package/resources/account-collection-flows.js.map +1 -1
  73. package/resources/account-collection-flows.mjs +22 -17
  74. package/resources/account-collection-flows.mjs.map +1 -1
  75. package/resources/account-details.d.ts +8 -13
  76. package/resources/account-details.d.ts.map +1 -1
  77. package/resources/account-details.js +10 -4
  78. package/resources/account-details.js.map +1 -1
  79. package/resources/account-details.mjs +10 -4
  80. package/resources/account-details.mjs.map +1 -1
  81. package/resources/connections.d.ts +5 -2
  82. package/resources/connections.d.ts.map +1 -1
  83. package/resources/connections.js +3 -3
  84. package/resources/connections.js.map +1 -1
  85. package/resources/connections.mjs +3 -3
  86. package/resources/connections.mjs.map +1 -1
  87. package/resources/counterparties.d.ts +37 -51
  88. package/resources/counterparties.d.ts.map +1 -1
  89. package/resources/counterparties.js +17 -5
  90. package/resources/counterparties.js.map +1 -1
  91. package/resources/counterparties.mjs +17 -5
  92. package/resources/counterparties.mjs.map +1 -1
  93. package/resources/documents.d.ts +6 -17
  94. package/resources/documents.d.ts.map +1 -1
  95. package/resources/documents.js +13 -7
  96. package/resources/documents.js.map +1 -1
  97. package/resources/documents.mjs +13 -7
  98. package/resources/documents.mjs.map +1 -1
  99. package/resources/events.d.ts +3 -3
  100. package/resources/events.d.ts.map +1 -1
  101. package/resources/events.js +3 -3
  102. package/resources/events.mjs +3 -3
  103. package/resources/expected-payments.d.ts +30 -39
  104. package/resources/expected-payments.d.ts.map +1 -1
  105. package/resources/expected-payments.js +10 -4
  106. package/resources/expected-payments.js.map +1 -1
  107. package/resources/expected-payments.mjs +10 -4
  108. package/resources/expected-payments.mjs.map +1 -1
  109. package/resources/external-accounts.d.ts +27 -61
  110. package/resources/external-accounts.d.ts.map +1 -1
  111. package/resources/external-accounts.js +24 -6
  112. package/resources/external-accounts.js.map +1 -1
  113. package/resources/external-accounts.mjs +24 -6
  114. package/resources/external-accounts.mjs.map +1 -1
  115. package/resources/incoming-payment-details.d.ts +20 -21
  116. package/resources/incoming-payment-details.d.ts.map +1 -1
  117. package/resources/incoming-payment-details.js +10 -4
  118. package/resources/incoming-payment-details.js.map +1 -1
  119. package/resources/incoming-payment-details.mjs +10 -4
  120. package/resources/incoming-payment-details.mjs.map +1 -1
  121. package/resources/index.d.ts +0 -3
  122. package/resources/index.d.ts.map +1 -1
  123. package/resources/index.js.map +1 -1
  124. package/resources/index.mjs.map +1 -1
  125. package/resources/internal-accounts/balance-reports.d.ts +6 -3
  126. package/resources/internal-accounts/balance-reports.d.ts.map +1 -1
  127. package/resources/internal-accounts/balance-reports.js +3 -3
  128. package/resources/internal-accounts/balance-reports.js.map +1 -1
  129. package/resources/internal-accounts/balance-reports.mjs +3 -3
  130. package/resources/internal-accounts/balance-reports.mjs.map +1 -1
  131. package/resources/internal-accounts/internal-accounts.d.ts +16 -21
  132. package/resources/internal-accounts/internal-accounts.d.ts.map +1 -1
  133. package/resources/internal-accounts/internal-accounts.js +10 -4
  134. package/resources/internal-accounts/internal-accounts.js.map +1 -1
  135. package/resources/internal-accounts/internal-accounts.mjs +10 -4
  136. package/resources/internal-accounts/internal-accounts.mjs.map +1 -1
  137. package/resources/invoices/invoices.d.ts +67 -42
  138. package/resources/invoices/invoices.d.ts.map +1 -1
  139. package/resources/invoices/invoices.js +10 -4
  140. package/resources/invoices/invoices.js.map +1 -1
  141. package/resources/invoices/invoices.mjs +10 -4
  142. package/resources/invoices/invoices.mjs.map +1 -1
  143. package/resources/invoices/line-items.d.ts +32 -185
  144. package/resources/invoices/line-items.d.ts.map +1 -1
  145. package/resources/invoices/line-items.js +10 -4
  146. package/resources/invoices/line-items.js.map +1 -1
  147. package/resources/invoices/line-items.mjs +10 -4
  148. package/resources/invoices/line-items.mjs.map +1 -1
  149. package/resources/ledger-account-categories.d.ts +47 -87
  150. package/resources/ledger-account-categories.d.ts.map +1 -1
  151. package/resources/ledger-account-categories.js +21 -17
  152. package/resources/ledger-account-categories.js.map +1 -1
  153. package/resources/ledger-account-categories.mjs +21 -17
  154. package/resources/ledger-account-categories.mjs.map +1 -1
  155. package/resources/ledger-account-payouts.d.ts +33 -22
  156. package/resources/ledger-account-payouts.d.ts.map +1 -1
  157. package/resources/ledger-account-payouts.js +10 -4
  158. package/resources/ledger-account-payouts.js.map +1 -1
  159. package/resources/ledger-account-payouts.mjs +10 -4
  160. package/resources/ledger-account-payouts.mjs.map +1 -1
  161. package/resources/ledger-account-statements.d.ts +11 -16
  162. package/resources/ledger-account-statements.d.ts.map +1 -1
  163. package/resources/ledger-account-statements.js +8 -2
  164. package/resources/ledger-account-statements.js.map +1 -1
  165. package/resources/ledger-account-statements.mjs +8 -2
  166. package/resources/ledger-account-statements.mjs.map +1 -1
  167. package/resources/ledger-accounts.d.ts +30 -30
  168. package/resources/ledger-accounts.d.ts.map +1 -1
  169. package/resources/ledger-accounts.js +10 -4
  170. package/resources/ledger-accounts.js.map +1 -1
  171. package/resources/ledger-accounts.mjs +10 -4
  172. package/resources/ledger-accounts.mjs.map +1 -1
  173. package/resources/ledger-entries.d.ts +20 -6
  174. package/resources/ledger-entries.d.ts.map +1 -1
  175. package/resources/ledger-entries.js +3 -3
  176. package/resources/ledger-entries.js.map +1 -1
  177. package/resources/ledger-entries.mjs +3 -3
  178. package/resources/ledger-entries.mjs.map +1 -1
  179. package/resources/ledger-event-handlers.d.ts +12 -24
  180. package/resources/ledger-event-handlers.d.ts.map +1 -1
  181. package/resources/ledger-event-handlers.js +10 -4
  182. package/resources/ledger-event-handlers.js.map +1 -1
  183. package/resources/ledger-event-handlers.mjs +10 -4
  184. package/resources/ledger-event-handlers.mjs.map +1 -1
  185. package/resources/ledger-transactions/ledger-transactions.d.ts +48 -37
  186. package/resources/ledger-transactions/ledger-transactions.d.ts.map +1 -1
  187. package/resources/ledger-transactions/ledger-transactions.js +13 -7
  188. package/resources/ledger-transactions/ledger-transactions.js.map +1 -1
  189. package/resources/ledger-transactions/ledger-transactions.mjs +13 -7
  190. package/resources/ledger-transactions/ledger-transactions.mjs.map +1 -1
  191. package/resources/ledger-transactions/versions.d.ts +4 -2
  192. package/resources/ledger-transactions/versions.d.ts.map +1 -1
  193. package/resources/ledger-transactions/versions.js +3 -3
  194. package/resources/ledger-transactions/versions.js.map +1 -1
  195. package/resources/ledger-transactions/versions.mjs +3 -3
  196. package/resources/ledger-transactions/versions.mjs.map +1 -1
  197. package/resources/ledgerable-events.d.ts +13 -18
  198. package/resources/ledgerable-events.d.ts.map +1 -1
  199. package/resources/ledgerable-events.js +8 -2
  200. package/resources/ledgerable-events.js.map +1 -1
  201. package/resources/ledgerable-events.mjs +8 -2
  202. package/resources/ledgerable-events.mjs.map +1 -1
  203. package/resources/ledgers.d.ts +16 -20
  204. package/resources/ledgers.d.ts.map +1 -1
  205. package/resources/ledgers.js +10 -4
  206. package/resources/ledgers.js.map +1 -1
  207. package/resources/ledgers.mjs +10 -4
  208. package/resources/ledgers.mjs.map +1 -1
  209. package/resources/line-items.d.ts +5 -5
  210. package/resources/line-items.d.ts.map +1 -1
  211. package/resources/line-items.js +3 -3
  212. package/resources/line-items.mjs +3 -3
  213. package/resources/paper-items.d.ts +6 -3
  214. package/resources/paper-items.d.ts.map +1 -1
  215. package/resources/paper-items.js +3 -3
  216. package/resources/paper-items.js.map +1 -1
  217. package/resources/paper-items.mjs +3 -3
  218. package/resources/paper-items.mjs.map +1 -1
  219. package/resources/payment-flows.d.ts +18 -42
  220. package/resources/payment-flows.d.ts.map +1 -1
  221. package/resources/payment-flows.js +22 -17
  222. package/resources/payment-flows.js.map +1 -1
  223. package/resources/payment-flows.mjs +22 -17
  224. package/resources/payment-flows.mjs.map +1 -1
  225. package/resources/payment-orders/payment-orders.d.ts +172 -191
  226. package/resources/payment-orders/payment-orders.d.ts.map +1 -1
  227. package/resources/payment-orders/payment-orders.js +21 -11
  228. package/resources/payment-orders/payment-orders.js.map +1 -1
  229. package/resources/payment-orders/payment-orders.mjs +21 -11
  230. package/resources/payment-orders/payment-orders.mjs.map +1 -1
  231. package/resources/payment-orders/reversals.d.ts +21 -22
  232. package/resources/payment-orders/reversals.d.ts.map +1 -1
  233. package/resources/payment-orders/reversals.js +10 -4
  234. package/resources/payment-orders/reversals.js.map +1 -1
  235. package/resources/payment-orders/reversals.mjs +10 -4
  236. package/resources/payment-orders/reversals.mjs.map +1 -1
  237. package/resources/payment-references.d.ts +3 -3
  238. package/resources/payment-references.d.ts.map +1 -1
  239. package/resources/payment-references.js +3 -3
  240. package/resources/payment-references.mjs +3 -3
  241. package/resources/returns.d.ts +16 -19
  242. package/resources/returns.d.ts.map +1 -1
  243. package/resources/returns.js +10 -4
  244. package/resources/returns.js.map +1 -1
  245. package/resources/returns.mjs +10 -4
  246. package/resources/returns.mjs.map +1 -1
  247. package/resources/routing-details.d.ts +9 -15
  248. package/resources/routing-details.d.ts.map +1 -1
  249. package/resources/routing-details.js +10 -4
  250. package/resources/routing-details.js.map +1 -1
  251. package/resources/routing-details.mjs +10 -4
  252. package/resources/routing-details.mjs.map +1 -1
  253. package/resources/transactions/line-items.d.ts +5 -2
  254. package/resources/transactions/line-items.d.ts.map +1 -1
  255. package/resources/transactions/line-items.js +3 -3
  256. package/resources/transactions/line-items.js.map +1 -1
  257. package/resources/transactions/line-items.mjs +3 -3
  258. package/resources/transactions/line-items.mjs.map +1 -1
  259. package/resources/transactions/transactions.d.ts +8 -5
  260. package/resources/transactions/transactions.d.ts.map +1 -1
  261. package/resources/transactions/transactions.js +3 -3
  262. package/resources/transactions/transactions.js.map +1 -1
  263. package/resources/transactions/transactions.mjs +3 -3
  264. package/resources/transactions/transactions.mjs.map +1 -1
  265. package/resources/validations.d.ts +1 -1
  266. package/resources/validations.d.ts.map +1 -1
  267. package/resources/validations.js +1 -1
  268. package/resources/validations.mjs +1 -1
  269. package/resources/virtual-accounts.d.ts +19 -28
  270. package/resources/virtual-accounts.d.ts.map +1 -1
  271. package/resources/virtual-accounts.js +10 -4
  272. package/resources/virtual-accounts.js.map +1 -1
  273. package/resources/virtual-accounts.mjs +10 -4
  274. package/resources/virtual-accounts.mjs.map +1 -1
  275. package/resources/webhooks.js +2 -2
  276. package/resources/webhooks.mjs +2 -2
  277. package/src/_shims/ReadableStream-node.ts +6 -0
  278. package/src/_shims/ReadableStream.d.ts +38 -0
  279. package/src/_shims/ReadableStream.js +5 -0
  280. package/src/_shims/ReadableStream.mjs +7 -0
  281. package/src/_shims/agent.ts +1 -1
  282. package/src/_shims/{fetch.node.d.ts → fetch-node.d.ts} +20 -9
  283. package/src/_shims/fetch.d.ts +18 -10
  284. package/src/_shims/{fileFromPath.node.ts → fileFromPath-node.ts} +1 -1
  285. package/src/_shims/fileFromPath.ts +2 -2
  286. package/src/_shims/{formdata.node.d.ts → form-data-node.d.ts} +4 -4
  287. package/src/_shims/{formdata.d.ts → form-data.d.ts} +4 -4
  288. package/src/_shims/form-data.js +17 -0
  289. package/src/_shims/form-data.mjs +20 -0
  290. package/src/_shims/{getMultipartRequestOptions.node.ts → getMultipartRequestOptions-node.ts} +3 -3
  291. package/src/_shims/getMultipartRequestOptions.ts +3 -3
  292. package/src/core.ts +275 -97
  293. package/src/error.ts +1 -1
  294. package/src/index.ts +31 -18
  295. package/src/pagination.ts +6 -6
  296. package/src/resource.ts +1 -1
  297. package/src/resources/account-collection-flows.ts +29 -57
  298. package/src/resources/account-details.ts +22 -22
  299. package/src/resources/connections.ts +11 -8
  300. package/src/resources/counterparties.ts +61 -65
  301. package/src/resources/documents.ts +21 -30
  302. package/src/resources/events.ts +9 -9
  303. package/src/resources/expected-payments.ts +45 -49
  304. package/src/resources/external-accounts.ts +59 -78
  305. package/src/resources/incoming-payment-details.ts +38 -33
  306. package/src/resources/index.ts +39 -36
  307. package/src/resources/internal-accounts/balance-reports.ts +13 -10
  308. package/src/resources/internal-accounts/index.ts +2 -2
  309. package/src/resources/internal-accounts/internal-accounts.ts +35 -35
  310. package/src/resources/invoices/index.ts +2 -2
  311. package/src/resources/invoices/invoices.ts +91 -54
  312. package/src/resources/invoices/line-items.ts +46 -228
  313. package/src/resources/ledger-account-categories.ts +67 -111
  314. package/src/resources/ledger-account-payouts.ts +49 -30
  315. package/src/resources/ledger-account-statements.ts +21 -21
  316. package/src/resources/ledger-accounts.ts +46 -40
  317. package/src/resources/ledger-entries.ts +29 -13
  318. package/src/resources/ledger-event-handlers.ts +25 -35
  319. package/src/resources/ledger-transactions/index.ts +2 -2
  320. package/src/resources/ledger-transactions/ledger-transactions.ts +73 -53
  321. package/src/resources/ledger-transactions/versions.ts +10 -8
  322. package/src/resources/ledgerable-events.ts +23 -23
  323. package/src/resources/ledgers.ts +31 -29
  324. package/src/resources/line-items.ts +12 -12
  325. package/src/resources/paper-items.ts +13 -10
  326. package/src/resources/payment-flows.ts +39 -66
  327. package/src/resources/payment-orders/index.ts +2 -2
  328. package/src/resources/payment-orders/payment-orders.ts +204 -216
  329. package/src/resources/payment-orders/reversals.ts +36 -31
  330. package/src/resources/payment-references.ts +9 -9
  331. package/src/resources/returns.ts +30 -28
  332. package/src/resources/routing-details.ts +23 -24
  333. package/src/resources/top-level.ts +1 -1
  334. package/src/resources/transactions/index.ts +7 -2
  335. package/src/resources/transactions/line-items.ts +11 -8
  336. package/src/resources/transactions/transactions.ts +17 -14
  337. package/src/resources/validations.ts +4 -4
  338. package/src/resources/virtual-accounts.ts +35 -39
  339. package/src/resources/webhooks.ts +3 -3
  340. package/src/tsconfig.json +11 -0
  341. package/src/uploads.ts +6 -6
  342. package/src/version.ts +1 -1
  343. package/uploads.d.ts +1 -1
  344. package/uploads.d.ts.map +1 -1
  345. package/uploads.js +7 -7
  346. package/uploads.js.map +1 -1
  347. package/uploads.mjs +4 -4
  348. package/uploads.mjs.map +1 -1
  349. package/version.d.ts +1 -1
  350. package/version.js +1 -1
  351. package/version.mjs +1 -1
  352. package/_shims/agent.node.d.ts.map +0 -1
  353. package/_shims/formdata.js +0 -9
  354. package/_shims/formdata.mjs +0 -11
  355. package/_shims/getMultipartRequestOptions.node.d.ts.map +0 -1
  356. package/_shims/node-readable.node.js.map +0 -1
  357. package/_shims/node-readable.node.mjs.map +0 -1
  358. package/src/_shims/fetch.deno.ts +0 -23
  359. package/src/_shims/formdata.deno.ts +0 -16
  360. package/src/_shims/formdata.js +0 -9
  361. package/src/_shims/formdata.mjs +0 -11
  362. /package/_shims/{fetch.node.js → fetch-node.js} +0 -0
  363. /package/_shims/{fetch.node.mjs → fetch-node.mjs} +0 -0
  364. /package/_shims/{formdata.node.d.ts → form-data-node.d.ts} +0 -0
  365. /package/_shims/{formdata.node.js → form-data-node.js} +0 -0
  366. /package/_shims/{formdata.node.mjs → form-data-node.mjs} +0 -0
  367. /package/_shims/{formdata.d.ts → form-data.d.ts} +0 -0
  368. /package/src/_shims/{agent.node.ts → agent-node.ts} +0 -0
  369. /package/src/_shims/{fetch.node.js → fetch-node.js} +0 -0
  370. /package/src/_shims/{fetch.node.mjs → fetch-node.mjs} +0 -0
  371. /package/src/_shims/{formdata.node.js → form-data-node.js} +0 -0
  372. /package/src/_shims/{formdata.node.mjs → form-data-node.mjs} +0 -0
  373. /package/src/_shims/{node-readable.node.ts → node-readable-node.ts} +0 -0
@@ -12,14 +12,11 @@ export declare class PaymentOrders extends APIResource {
12
12
  /**
13
13
  * Create a new Payment Order
14
14
  */
15
- create(
16
- params: PaymentOrderCreateParams,
17
- options?: Core.RequestOptions,
18
- ): Promise<Core.APIResponse<PaymentOrder>>;
15
+ create(params: PaymentOrderCreateParams, options?: Core.RequestOptions): Core.APIPromise<PaymentOrder>;
19
16
  /**
20
17
  * Get details on a single payment order
21
18
  */
22
- retrieve(id: string, options?: Core.RequestOptions): Promise<Core.APIResponse<PaymentOrder>>;
19
+ retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise<PaymentOrder>;
23
20
  /**
24
21
  * Update a payment order
25
22
  */
@@ -27,20 +24,23 @@ export declare class PaymentOrders extends APIResource {
27
24
  id: string,
28
25
  body?: PaymentOrderUpdateParams,
29
26
  options?: Core.RequestOptions,
30
- ): Promise<Core.APIResponse<PaymentOrder>>;
31
- update(id: string, options?: Core.RequestOptions): Promise<Core.APIResponse<PaymentOrder>>;
27
+ ): Core.APIPromise<PaymentOrder>;
28
+ update(id: string, options?: Core.RequestOptions): Core.APIPromise<PaymentOrder>;
32
29
  /**
33
30
  * Get a list of all payment orders
34
31
  */
35
- list(query?: PaymentOrderListParams, options?: Core.RequestOptions): Core.PagePromise<PaymentOrdersPage>;
36
- list(options?: Core.RequestOptions): Core.PagePromise<PaymentOrdersPage>;
32
+ list(
33
+ query?: PaymentOrderListParams,
34
+ options?: Core.RequestOptions,
35
+ ): Core.PagePromise<PaymentOrdersPage, PaymentOrder>;
36
+ list(options?: Core.RequestOptions): Core.PagePromise<PaymentOrdersPage, PaymentOrder>;
37
37
  /**
38
38
  * Create a new payment order asynchronously
39
39
  */
40
40
  createAsync(
41
41
  params: PaymentOrderCreateAsyncParams,
42
42
  options?: Core.RequestOptions,
43
- ): Promise<Core.APIResponse<Shared.AsyncResponse>>;
43
+ ): Core.APIPromise<Shared.AsyncResponse>;
44
44
  }
45
45
  export declare class PaymentOrdersPage extends Page<PaymentOrder> {}
46
46
  type _PaymentOrdersPage = PaymentOrdersPage;
@@ -382,201 +382,184 @@ export type PaymentOrderType =
382
382
  | 'wire';
383
383
  export interface PaymentOrderCreateParams {
384
384
  /**
385
- * Body param: Value in specified currency's smallest unit. e.g. $10 would be
386
- * represented as 1000 (cents). For RTP, the maximum amount allowed by the network
387
- * is $100,000.
385
+ * Value in specified currency's smallest unit. e.g. $10 would be represented as
386
+ * 1000 (cents). For RTP, the maximum amount allowed by the network is $100,000.
388
387
  */
389
388
  amount: number;
390
389
  /**
391
- * Body param: One of `credit`, `debit`. Describes the direction money is flowing
392
- * in the transaction. A `credit` moves money from your account to someone else's.
393
- * A `debit` pulls money from someone else's account to your own. Note that wire,
390
+ * One of `credit`, `debit`. Describes the direction money is flowing in the
391
+ * transaction. A `credit` moves money from your account to someone else's. A
392
+ * `debit` pulls money from someone else's account to your own. Note that wire,
394
393
  * rtp, and check payments will always be `credit`.
395
394
  */
396
395
  direction: 'credit' | 'debit';
397
396
  /**
398
- * Body param: The ID of one of your organization's internal accounts.
397
+ * The ID of one of your organization's internal accounts.
399
398
  */
400
399
  originating_account_id: string;
401
400
  /**
402
- * Body param: One of `ach`, `eft`, `wire`, `check`, `sen`, `book`, `rtp`, `sepa`,
403
- * `bacs`, `au_becs`, `interac`, `signet`, `provexchange`.
401
+ * One of `ach`, `eft`, `wire`, `check`, `sen`, `book`, `rtp`, `sepa`, `bacs`,
402
+ * `au_becs`, `interac`, `signet`, `provexchange`.
404
403
  */
405
404
  type: PaymentOrderType;
406
- /**
407
- * Body param:
408
- */
409
405
  accounting?: PaymentOrderCreateParams.Accounting;
410
406
  /**
411
- * Body param: The ID of one of your accounting categories. Note that these will
412
- * only be accessible if your accounting system has been connected.
407
+ * The ID of one of your accounting categories. Note that these will only be
408
+ * accessible if your accounting system has been connected.
413
409
  */
414
410
  accounting_category_id?: string | null;
415
411
  /**
416
- * Body param: The ID of one of your accounting ledger classes. Note that these
417
- * will only be accessible if your accounting system has been connected.
412
+ * The ID of one of your accounting ledger classes. Note that these will only be
413
+ * accessible if your accounting system has been connected.
418
414
  */
419
415
  accounting_ledger_class_id?: string | null;
420
416
  /**
421
- * Body param: The party that will pay the fees for the payment order. Only applies
422
- * to wire payment orders. Can be one of shared, sender, or receiver, which
423
- * correspond respectively with the SWIFT 71A values `SHA`, `OUR`, `BEN`.
417
+ * The party that will pay the fees for the payment order. Only applies to wire
418
+ * payment orders. Can be one of shared, sender, or receiver, which correspond
419
+ * respectively with the SWIFT 71A values `SHA`, `OUR`, `BEN`.
424
420
  */
425
421
  charge_bearer?: 'shared' | 'sender' | 'receiver' | null;
426
422
  /**
427
- * Body param: Defaults to the currency of the originating account.
423
+ * Defaults to the currency of the originating account.
428
424
  */
429
425
  currency?: Shared.Currency | null;
430
426
  /**
431
- * Body param: An optional description for internal use.
427
+ * An optional description for internal use.
432
428
  */
433
429
  description?: string | null;
434
430
  /**
435
- * Body param: An array of documents to be attached to the payment order. Note that
436
- * if you attach documents, the request's content type must be
437
- * `multipart/form-data`.
431
+ * An array of documents to be attached to the payment order. Note that if you
432
+ * attach documents, the request's content type must be `multipart/form-data`.
438
433
  */
439
434
  documents?: Array<PaymentOrderCreateParams.Document>;
440
435
  /**
441
- * Body param: Date transactions are to be posted to the participants' account.
442
- * Defaults to the current business day or the next business day if the current day
443
- * is a bank holiday or weekend. Format: yyyy-mm-dd.
436
+ * Date transactions are to be posted to the participants' account. Defaults to the
437
+ * current business day or the next business day if the current day is a bank
438
+ * holiday or weekend. Format: yyyy-mm-dd.
444
439
  */
445
440
  effective_date?: string;
446
441
  /**
447
- * Body param: RFP payments require an expires_at. This value must be past the
448
- * effective_date.
442
+ * RFP payments require an expires_at. This value must be past the effective_date.
449
443
  */
450
444
  expires_at?: string | null;
451
445
  /**
452
- * Body param: A payment type to fallback to if the original type is not valid for
453
- * the receiving account. Currently, this only supports falling back from RTP to
454
- * ACH (type=rtp and fallback_type=ach)
446
+ * A payment type to fallback to if the original type is not valid for the
447
+ * receiving account. Currently, this only supports falling back from RTP to ACH
448
+ * (type=rtp and fallback_type=ach)
455
449
  */
456
450
  fallback_type?: 'ach';
457
451
  /**
458
- * Body param: If present, indicates a specific foreign exchange contract number
459
- * that has been generated by your financial institution.
452
+ * If present, indicates a specific foreign exchange contract number that has been
453
+ * generated by your financial institution.
460
454
  */
461
455
  foreign_exchange_contract?: string | null;
462
456
  /**
463
- * Body param: Indicates the type of FX transfer to initiate, can be either
457
+ * Indicates the type of FX transfer to initiate, can be either
464
458
  * `variable_to_fixed`, `fixed_to_variable`, or `null` if the payment order
465
459
  * currency matches the originating account currency.
466
460
  */
467
461
  foreign_exchange_indicator?: 'fixed_to_variable' | 'variable_to_fixed' | null;
468
462
  /**
469
- * Body param: Specifies a ledger transaction object that will be created with the
470
- * payment order. If the ledger transaction cannot be created, then the payment
471
- * order creation will fail. The resulting ledger transaction will mirror the
472
- * status of the payment order.
463
+ * Specifies a ledger transaction object that will be created with the payment
464
+ * order. If the ledger transaction cannot be created, then the payment order
465
+ * creation will fail. The resulting ledger transaction will mirror the status of
466
+ * the payment order.
473
467
  */
474
468
  ledger_transaction?: PaymentOrderCreateParams.LedgerTransaction;
475
469
  /**
476
- * Body param: An array of line items that must sum up to the amount of the payment
477
- * order.
470
+ * An array of line items that must sum up to the amount of the payment order.
478
471
  */
479
472
  line_items?: Array<PaymentOrderCreateParams.LineItem>;
480
473
  /**
481
- * Body param: Additional data represented as key-value pairs. Both the key and
482
- * value must be strings.
474
+ * Additional data represented as key-value pairs. Both the key and value must be
475
+ * strings.
483
476
  */
484
477
  metadata?: Record<string, string>;
485
478
  /**
486
- * Body param: A boolean to determine if NSF Protection is enabled for this payment
487
- * order. Note that this setting must also be turned on in your organization
488
- * settings page.
479
+ * A boolean to determine if NSF Protection is enabled for this payment order. Note
480
+ * that this setting must also be turned on in your organization settings page.
489
481
  */
490
482
  nsf_protected?: boolean;
491
483
  /**
492
- * Body param: If present, this will replace your default company name on
493
- * receiver's bank statement. This field can only be used for ACH payments
494
- * currently. For ACH, only the first 16 characters of this string will be used.
495
- * Any additional characters will be truncated.
484
+ * If present, this will replace your default company name on receiver's bank
485
+ * statement. This field can only be used for ACH payments currently. For ACH, only
486
+ * the first 16 characters of this string will be used. Any additional characters
487
+ * will be truncated.
496
488
  */
497
489
  originating_party_name?: string | null;
498
490
  /**
499
- * Body param: Either `normal` or `high`. For ACH and EFT payments, `high`
500
- * represents a same-day ACH or EFT transfer, respectively. For check payments,
501
- * `high` can mean an overnight check rather than standard mail.
491
+ * Either `normal` or `high`. For ACH and EFT payments, `high` represents a
492
+ * same-day ACH or EFT transfer, respectively. For check payments, `high` can mean
493
+ * an overnight check rather than standard mail.
502
494
  */
503
495
  priority?: 'high' | 'normal';
504
496
  /**
505
- * Body param: For `wire`, this is usually the purpose which is transmitted via the
497
+ * For `wire`, this is usually the purpose which is transmitted via the
506
498
  * "InstrForDbtrAgt" field in the ISO20022 file. If you are using Currencycloud,
507
499
  * this is the `payment.purpose_code` field. For `eft`, this field is the 3 digit
508
500
  * CPA Code that will be attached to the payment.
509
501
  */
510
502
  purpose?: string | null;
511
503
  /**
512
- * Body param: Either `receiving_account` or `receiving_account_id` must be
513
- * present. When using `receiving_account_id`, you may pass the id of an external
514
- * account or an internal account.
504
+ * Either `receiving_account` or `receiving_account_id` must be present. When using
505
+ * `receiving_account_id`, you may pass the id of an external account or an
506
+ * internal account.
515
507
  */
516
508
  receiving_account?: PaymentOrderCreateParams.ReceivingAccount;
517
509
  /**
518
- * Body param: Either `receiving_account` or `receiving_account_id` must be
519
- * present. When using `receiving_account_id`, you may pass the id of an external
520
- * account or an internal account.
510
+ * Either `receiving_account` or `receiving_account_id` must be present. When using
511
+ * `receiving_account_id`, you may pass the id of an external account or an
512
+ * internal account.
521
513
  */
522
514
  receiving_account_id?: string;
523
515
  /**
524
- * Body param: For `ach`, this field will be passed through on an addenda record.
525
- * For `wire` payments the field will be passed through as the "Originator to
526
- * Beneficiary Information", also known as OBI or Fedwire tag 6000.
516
+ * For `ach`, this field will be passed through on an addenda record. For `wire`
517
+ * payments the field will be passed through as the "Originator to Beneficiary
518
+ * Information", also known as OBI or Fedwire tag 6000.
527
519
  */
528
520
  remittance_information?: string | null;
529
521
  /**
530
- * Body param: Send an email to the counterparty when the payment order is sent to
531
- * the bank. If `null`, `send_remittance_advice` on the Counterparty is used.
522
+ * Send an email to the counterparty when the payment order is sent to the bank. If
523
+ * `null`, `send_remittance_advice` on the Counterparty is used.
532
524
  */
533
525
  send_remittance_advice?: boolean | null;
534
526
  /**
535
- * Body param: An optional descriptor which will appear in the receiver's
536
- * statement. For `check` payments this field will be used as the memo line. For
537
- * `ach` the maximum length is 10 characters. Note that for ACH payments, the name
538
- * on your bank account will be included automatically by the bank, so you can use
539
- * the characters for other useful information. For `eft` the maximum length is 15
527
+ * An optional descriptor which will appear in the receiver's statement. For
528
+ * `check` payments this field will be used as the memo line. For `ach` the maximum
529
+ * length is 10 characters. Note that for ACH payments, the name on your bank
530
+ * account will be included automatically by the bank, so you can use the
531
+ * characters for other useful information. For `eft` the maximum length is 15
540
532
  * characters.
541
533
  */
542
534
  statement_descriptor?: string | null;
543
535
  /**
544
- * Body param: An additional layer of classification for the type of payment order
545
- * you are doing. This field is only used for `ach` payment orders currently. For
546
- * `ach` payment orders, the `subtype` represents the SEC code. We currently
547
- * support `CCD`, `PPD`, `IAT`, `CTX`, `WEB`, `CIE`, and `TEL`.
536
+ * An additional layer of classification for the type of payment order you are
537
+ * doing. This field is only used for `ach` payment orders currently. For `ach`
538
+ * payment orders, the `subtype` represents the SEC code. We currently support
539
+ * `CCD`, `PPD`, `IAT`, `CTX`, `WEB`, `CIE`, and `TEL`.
548
540
  */
549
541
  subtype?: PaymentOrderSubtype | null;
550
542
  /**
551
- * Body param: A flag that determines whether a payment order should go through
552
- * transaction monitoring.
543
+ * A flag that determines whether a payment order should go through transaction
544
+ * monitoring.
553
545
  */
554
546
  transaction_monitoring_enabled?: boolean;
555
547
  /**
556
- * Body param: Identifier of the ultimate originator of the payment order.
548
+ * Identifier of the ultimate originator of the payment order.
557
549
  */
558
550
  ultimate_originating_party_identifier?: string | null;
559
551
  /**
560
- * Body param: Name of the ultimate originator of the payment order.
552
+ * Name of the ultimate originator of the payment order.
561
553
  */
562
554
  ultimate_originating_party_name?: string | null;
563
555
  /**
564
- * Body param: Identifier of the ultimate funds recipient.
556
+ * Identifier of the ultimate funds recipient.
565
557
  */
566
558
  ultimate_receiving_party_identifier?: string | null;
567
559
  /**
568
- * Body param: Name of the ultimate funds recipient.
560
+ * Name of the ultimate funds recipient.
569
561
  */
570
562
  ultimate_receiving_party_name?: string | null;
571
- /**
572
- * Header param:
573
- */
574
- 'Content-Type'?: 'application/json' | 'multipart/form-data';
575
- /**
576
- * Header param: This key should be something unique, preferably something like an
577
- * UUID.
578
- */
579
- 'Idempotency-Key'?: string;
580
563
  }
581
564
  export declare namespace PaymentOrderCreateParams {
582
565
  interface Accounting {
@@ -622,11 +605,6 @@ export declare namespace PaymentOrderCreateParams {
622
605
  * the payment order.
623
606
  */
624
607
  interface LedgerTransaction {
625
- /**
626
- * The timestamp (ISO8601 format) at which the ledger transaction happened for
627
- * reporting purposes.
628
- */
629
- effective_at: string;
630
608
  /**
631
609
  * An array of ledger entry objects.
632
610
  */
@@ -635,6 +613,11 @@ export declare namespace PaymentOrderCreateParams {
635
613
  * An optional description for internal use.
636
614
  */
637
615
  description?: string | null;
616
+ /**
617
+ * The timestamp (ISO8601 format) at which the ledger transaction happened for
618
+ * reporting purposes.
619
+ */
620
+ effective_at?: string;
638
621
  /**
639
622
  * The date (YYYY-MM-DD) on which the ledger transaction happened for reporting
640
623
  * purposes.
@@ -707,6 +690,11 @@ export declare namespace PaymentOrderCreateParams {
707
690
  * Locking for more details.
708
691
  */
709
692
  lock_version?: number | null;
693
+ /**
694
+ * Additional data represented as key-value pairs. Both the key and value must be
695
+ * strings.
696
+ */
697
+ metadata?: Record<string, string>;
710
698
  /**
711
699
  * Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
712
700
  * account’s pending balance. If any of these conditions would be false after the
@@ -1370,191 +1358,179 @@ export interface PaymentOrderListParams extends PageParams {
1370
1358
  }
1371
1359
  export interface PaymentOrderCreateAsyncParams {
1372
1360
  /**
1373
- * Body param: Value in specified currency's smallest unit. e.g. $10 would be
1374
- * represented as 1000 (cents). For RTP, the maximum amount allowed by the network
1375
- * is $100,000.
1361
+ * Value in specified currency's smallest unit. e.g. $10 would be represented as
1362
+ * 1000 (cents). For RTP, the maximum amount allowed by the network is $100,000.
1376
1363
  */
1377
1364
  amount: number;
1378
1365
  /**
1379
- * Body param: One of `credit`, `debit`. Describes the direction money is flowing
1380
- * in the transaction. A `credit` moves money from your account to someone else's.
1381
- * A `debit` pulls money from someone else's account to your own. Note that wire,
1366
+ * One of `credit`, `debit`. Describes the direction money is flowing in the
1367
+ * transaction. A `credit` moves money from your account to someone else's. A
1368
+ * `debit` pulls money from someone else's account to your own. Note that wire,
1382
1369
  * rtp, and check payments will always be `credit`.
1383
1370
  */
1384
1371
  direction: 'credit' | 'debit';
1385
1372
  /**
1386
- * Body param: The ID of one of your organization's internal accounts.
1373
+ * The ID of one of your organization's internal accounts.
1387
1374
  */
1388
1375
  originating_account_id: string;
1389
1376
  /**
1390
- * Body param: One of `ach`, `eft`, `wire`, `check`, `sen`, `book`, `rtp`, `sepa`,
1391
- * `bacs`, `au_becs`, `interac`, `signet`, `provexchange`.
1377
+ * One of `ach`, `eft`, `wire`, `check`, `sen`, `book`, `rtp`, `sepa`, `bacs`,
1378
+ * `au_becs`, `interac`, `signet`, `provexchange`.
1392
1379
  */
1393
1380
  type: PaymentOrderType;
1394
- /**
1395
- * Body param:
1396
- */
1397
1381
  accounting?: PaymentOrderCreateAsyncParams.Accounting;
1398
1382
  /**
1399
- * Body param: The ID of one of your accounting categories. Note that these will
1400
- * only be accessible if your accounting system has been connected.
1383
+ * The ID of one of your accounting categories. Note that these will only be
1384
+ * accessible if your accounting system has been connected.
1401
1385
  */
1402
1386
  accounting_category_id?: string | null;
1403
1387
  /**
1404
- * Body param: The ID of one of your accounting ledger classes. Note that these
1405
- * will only be accessible if your accounting system has been connected.
1388
+ * The ID of one of your accounting ledger classes. Note that these will only be
1389
+ * accessible if your accounting system has been connected.
1406
1390
  */
1407
1391
  accounting_ledger_class_id?: string | null;
1408
1392
  /**
1409
- * Body param: The party that will pay the fees for the payment order. Only applies
1410
- * to wire payment orders. Can be one of shared, sender, or receiver, which
1411
- * correspond respectively with the SWIFT 71A values `SHA`, `OUR`, `BEN`.
1393
+ * The party that will pay the fees for the payment order. Only applies to wire
1394
+ * payment orders. Can be one of shared, sender, or receiver, which correspond
1395
+ * respectively with the SWIFT 71A values `SHA`, `OUR`, `BEN`.
1412
1396
  */
1413
1397
  charge_bearer?: 'shared' | 'sender' | 'receiver' | null;
1414
1398
  /**
1415
- * Body param: Defaults to the currency of the originating account.
1399
+ * Defaults to the currency of the originating account.
1416
1400
  */
1417
1401
  currency?: Shared.Currency | null;
1418
1402
  /**
1419
- * Body param: An optional description for internal use.
1403
+ * An optional description for internal use.
1420
1404
  */
1421
1405
  description?: string | null;
1422
1406
  /**
1423
- * Body param: Date transactions are to be posted to the participants' account.
1424
- * Defaults to the current business day or the next business day if the current day
1425
- * is a bank holiday or weekend. Format: yyyy-mm-dd.
1407
+ * Date transactions are to be posted to the participants' account. Defaults to the
1408
+ * current business day or the next business day if the current day is a bank
1409
+ * holiday or weekend. Format: yyyy-mm-dd.
1426
1410
  */
1427
1411
  effective_date?: string;
1428
1412
  /**
1429
- * Body param: RFP payments require an expires_at. This value must be past the
1430
- * effective_date.
1413
+ * RFP payments require an expires_at. This value must be past the effective_date.
1431
1414
  */
1432
1415
  expires_at?: string | null;
1433
1416
  /**
1434
- * Body param: A payment type to fallback to if the original type is not valid for
1435
- * the receiving account. Currently, this only supports falling back from RTP to
1436
- * ACH (type=rtp and fallback_type=ach)
1417
+ * A payment type to fallback to if the original type is not valid for the
1418
+ * receiving account. Currently, this only supports falling back from RTP to ACH
1419
+ * (type=rtp and fallback_type=ach)
1437
1420
  */
1438
1421
  fallback_type?: 'ach';
1439
1422
  /**
1440
- * Body param: If present, indicates a specific foreign exchange contract number
1441
- * that has been generated by your financial institution.
1423
+ * If present, indicates a specific foreign exchange contract number that has been
1424
+ * generated by your financial institution.
1442
1425
  */
1443
1426
  foreign_exchange_contract?: string | null;
1444
1427
  /**
1445
- * Body param: Indicates the type of FX transfer to initiate, can be either
1428
+ * Indicates the type of FX transfer to initiate, can be either
1446
1429
  * `variable_to_fixed`, `fixed_to_variable`, or `null` if the payment order
1447
1430
  * currency matches the originating account currency.
1448
1431
  */
1449
1432
  foreign_exchange_indicator?: 'fixed_to_variable' | 'variable_to_fixed' | null;
1450
1433
  /**
1451
- * Body param: Specifies a ledger transaction object that will be created with the
1452
- * payment order. If the ledger transaction cannot be created, then the payment
1453
- * order creation will fail. The resulting ledger transaction will mirror the
1454
- * status of the payment order.
1434
+ * Specifies a ledger transaction object that will be created with the payment
1435
+ * order. If the ledger transaction cannot be created, then the payment order
1436
+ * creation will fail. The resulting ledger transaction will mirror the status of
1437
+ * the payment order.
1455
1438
  */
1456
1439
  ledger_transaction?: PaymentOrderCreateAsyncParams.LedgerTransaction;
1457
1440
  /**
1458
- * Body param: An array of line items that must sum up to the amount of the payment
1459
- * order.
1441
+ * An array of line items that must sum up to the amount of the payment order.
1460
1442
  */
1461
1443
  line_items?: Array<PaymentOrderCreateAsyncParams.LineItem>;
1462
1444
  /**
1463
- * Body param: Additional data represented as key-value pairs. Both the key and
1464
- * value must be strings.
1445
+ * Additional data represented as key-value pairs. Both the key and value must be
1446
+ * strings.
1465
1447
  */
1466
1448
  metadata?: Record<string, string>;
1467
1449
  /**
1468
- * Body param: A boolean to determine if NSF Protection is enabled for this payment
1469
- * order. Note that this setting must also be turned on in your organization
1470
- * settings page.
1450
+ * A boolean to determine if NSF Protection is enabled for this payment order. Note
1451
+ * that this setting must also be turned on in your organization settings page.
1471
1452
  */
1472
1453
  nsf_protected?: boolean;
1473
1454
  /**
1474
- * Body param: If present, this will replace your default company name on
1475
- * receiver's bank statement. This field can only be used for ACH payments
1476
- * currently. For ACH, only the first 16 characters of this string will be used.
1477
- * Any additional characters will be truncated.
1455
+ * If present, this will replace your default company name on receiver's bank
1456
+ * statement. This field can only be used for ACH payments currently. For ACH, only
1457
+ * the first 16 characters of this string will be used. Any additional characters
1458
+ * will be truncated.
1478
1459
  */
1479
1460
  originating_party_name?: string | null;
1480
1461
  /**
1481
- * Body param: Either `normal` or `high`. For ACH and EFT payments, `high`
1482
- * represents a same-day ACH or EFT transfer, respectively. For check payments,
1483
- * `high` can mean an overnight check rather than standard mail.
1462
+ * Either `normal` or `high`. For ACH and EFT payments, `high` represents a
1463
+ * same-day ACH or EFT transfer, respectively. For check payments, `high` can mean
1464
+ * an overnight check rather than standard mail.
1484
1465
  */
1485
1466
  priority?: 'high' | 'normal';
1486
1467
  /**
1487
- * Body param: For `wire`, this is usually the purpose which is transmitted via the
1468
+ * For `wire`, this is usually the purpose which is transmitted via the
1488
1469
  * "InstrForDbtrAgt" field in the ISO20022 file. If you are using Currencycloud,
1489
1470
  * this is the `payment.purpose_code` field. For `eft`, this field is the 3 digit
1490
1471
  * CPA Code that will be attached to the payment.
1491
1472
  */
1492
1473
  purpose?: string | null;
1493
1474
  /**
1494
- * Body param: Either `receiving_account` or `receiving_account_id` must be
1495
- * present. When using `receiving_account_id`, you may pass the id of an external
1496
- * account or an internal account.
1475
+ * Either `receiving_account` or `receiving_account_id` must be present. When using
1476
+ * `receiving_account_id`, you may pass the id of an external account or an
1477
+ * internal account.
1497
1478
  */
1498
1479
  receiving_account?: PaymentOrderCreateAsyncParams.ReceivingAccount;
1499
1480
  /**
1500
- * Body param: Either `receiving_account` or `receiving_account_id` must be
1501
- * present. When using `receiving_account_id`, you may pass the id of an external
1502
- * account or an internal account.
1481
+ * Either `receiving_account` or `receiving_account_id` must be present. When using
1482
+ * `receiving_account_id`, you may pass the id of an external account or an
1483
+ * internal account.
1503
1484
  */
1504
1485
  receiving_account_id?: string;
1505
1486
  /**
1506
- * Body param: For `ach`, this field will be passed through on an addenda record.
1507
- * For `wire` payments the field will be passed through as the "Originator to
1508
- * Beneficiary Information", also known as OBI or Fedwire tag 6000.
1487
+ * For `ach`, this field will be passed through on an addenda record. For `wire`
1488
+ * payments the field will be passed through as the "Originator to Beneficiary
1489
+ * Information", also known as OBI or Fedwire tag 6000.
1509
1490
  */
1510
1491
  remittance_information?: string | null;
1511
1492
  /**
1512
- * Body param: Send an email to the counterparty when the payment order is sent to
1513
- * the bank. If `null`, `send_remittance_advice` on the Counterparty is used.
1493
+ * Send an email to the counterparty when the payment order is sent to the bank. If
1494
+ * `null`, `send_remittance_advice` on the Counterparty is used.
1514
1495
  */
1515
1496
  send_remittance_advice?: boolean | null;
1516
1497
  /**
1517
- * Body param: An optional descriptor which will appear in the receiver's
1518
- * statement. For `check` payments this field will be used as the memo line. For
1519
- * `ach` the maximum length is 10 characters. Note that for ACH payments, the name
1520
- * on your bank account will be included automatically by the bank, so you can use
1521
- * the characters for other useful information. For `eft` the maximum length is 15
1498
+ * An optional descriptor which will appear in the receiver's statement. For
1499
+ * `check` payments this field will be used as the memo line. For `ach` the maximum
1500
+ * length is 10 characters. Note that for ACH payments, the name on your bank
1501
+ * account will be included automatically by the bank, so you can use the
1502
+ * characters for other useful information. For `eft` the maximum length is 15
1522
1503
  * characters.
1523
1504
  */
1524
1505
  statement_descriptor?: string | null;
1525
1506
  /**
1526
- * Body param: An additional layer of classification for the type of payment order
1527
- * you are doing. This field is only used for `ach` payment orders currently. For
1528
- * `ach` payment orders, the `subtype` represents the SEC code. We currently
1529
- * support `CCD`, `PPD`, `IAT`, `CTX`, `WEB`, `CIE`, and `TEL`.
1507
+ * An additional layer of classification for the type of payment order you are
1508
+ * doing. This field is only used for `ach` payment orders currently. For `ach`
1509
+ * payment orders, the `subtype` represents the SEC code. We currently support
1510
+ * `CCD`, `PPD`, `IAT`, `CTX`, `WEB`, `CIE`, and `TEL`.
1530
1511
  */
1531
1512
  subtype?: PaymentOrderSubtype | null;
1532
1513
  /**
1533
- * Body param: A flag that determines whether a payment order should go through
1534
- * transaction monitoring.
1514
+ * A flag that determines whether a payment order should go through transaction
1515
+ * monitoring.
1535
1516
  */
1536
1517
  transaction_monitoring_enabled?: boolean;
1537
1518
  /**
1538
- * Body param: Identifier of the ultimate originator of the payment order.
1519
+ * Identifier of the ultimate originator of the payment order.
1539
1520
  */
1540
1521
  ultimate_originating_party_identifier?: string | null;
1541
1522
  /**
1542
- * Body param: Name of the ultimate originator of the payment order.
1523
+ * Name of the ultimate originator of the payment order.
1543
1524
  */
1544
1525
  ultimate_originating_party_name?: string | null;
1545
1526
  /**
1546
- * Body param: Identifier of the ultimate funds recipient.
1527
+ * Identifier of the ultimate funds recipient.
1547
1528
  */
1548
1529
  ultimate_receiving_party_identifier?: string | null;
1549
1530
  /**
1550
- * Body param: Name of the ultimate funds recipient.
1531
+ * Name of the ultimate funds recipient.
1551
1532
  */
1552
1533
  ultimate_receiving_party_name?: string | null;
1553
- /**
1554
- * Header param: This key should be something unique, preferably something like an
1555
- * UUID.
1556
- */
1557
- 'Idempotency-Key'?: string;
1558
1534
  }
1559
1535
  export declare namespace PaymentOrderCreateAsyncParams {
1560
1536
  interface Accounting {
@@ -1577,11 +1553,6 @@ export declare namespace PaymentOrderCreateAsyncParams {
1577
1553
  * the payment order.
1578
1554
  */
1579
1555
  interface LedgerTransaction {
1580
- /**
1581
- * The timestamp (ISO8601 format) at which the ledger transaction happened for
1582
- * reporting purposes.
1583
- */
1584
- effective_at: string;
1585
1556
  /**
1586
1557
  * An array of ledger entry objects.
1587
1558
  */
@@ -1590,6 +1561,11 @@ export declare namespace PaymentOrderCreateAsyncParams {
1590
1561
  * An optional description for internal use.
1591
1562
  */
1592
1563
  description?: string | null;
1564
+ /**
1565
+ * The timestamp (ISO8601 format) at which the ledger transaction happened for
1566
+ * reporting purposes.
1567
+ */
1568
+ effective_at?: string;
1593
1569
  /**
1594
1570
  * The date (YYYY-MM-DD) on which the ledger transaction happened for reporting
1595
1571
  * purposes.
@@ -1662,6 +1638,11 @@ export declare namespace PaymentOrderCreateAsyncParams {
1662
1638
  * Locking for more details.
1663
1639
  */
1664
1640
  lock_version?: number | null;
1641
+ /**
1642
+ * Additional data represented as key-value pairs. Both the key and value must be
1643
+ * strings.
1644
+ */
1645
+ metadata?: Record<string, string>;
1665
1646
  /**
1666
1647
  * Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
1667
1648
  * account’s pending balance. If any of these conditions would be false after the