modern_treasury 0.0.0 → 0.1.0.pre.alpha.16

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 (827) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +168 -0
  3. data/lib/modern_treasury/base_client.rb +457 -0
  4. data/lib/modern_treasury/base_model.rb +1211 -0
  5. data/lib/modern_treasury/base_page.rb +59 -0
  6. data/lib/modern_treasury/client.rb +250 -0
  7. data/lib/modern_treasury/errors.rb +183 -0
  8. data/lib/modern_treasury/extern.rb +7 -0
  9. data/lib/modern_treasury/models/account_collection_flow.rb +199 -0
  10. data/lib/modern_treasury/models/account_collection_flow_create_params.rb +72 -0
  11. data/lib/modern_treasury/models/account_collection_flow_list_params.rb +85 -0
  12. data/lib/modern_treasury/models/account_collection_flow_retrieve_params.rb +18 -0
  13. data/lib/modern_treasury/models/account_collection_flow_update_params.rb +40 -0
  14. data/lib/modern_treasury/models/account_detail.rb +113 -0
  15. data/lib/modern_treasury/models/account_detail_create_params.rb +79 -0
  16. data/lib/modern_treasury/models/account_detail_delete_params.rb +42 -0
  17. data/lib/modern_treasury/models/account_detail_list_params.rb +40 -0
  18. data/lib/modern_treasury/models/account_detail_retrieve_params.rb +30 -0
  19. data/lib/modern_treasury/models/accounts_type.rb +18 -0
  20. data/lib/modern_treasury/models/async_response.rb +25 -0
  21. data/lib/modern_treasury/models/bank_settings.rb +97 -0
  22. data/lib/modern_treasury/models/bulk_request.rb +159 -0
  23. data/lib/modern_treasury/models/bulk_request_create_params.rb +4128 -0
  24. data/lib/modern_treasury/models/bulk_request_list_params.rb +137 -0
  25. data/lib/modern_treasury/models/bulk_request_retrieve_params.rb +18 -0
  26. data/lib/modern_treasury/models/bulk_result.rb +272 -0
  27. data/lib/modern_treasury/models/bulk_result_list_params.rb +151 -0
  28. data/lib/modern_treasury/models/bulk_result_retrieve_params.rb +18 -0
  29. data/lib/modern_treasury/models/client_ping_params.rb +18 -0
  30. data/lib/modern_treasury/models/connection.rb +85 -0
  31. data/lib/modern_treasury/models/connection_legal_entity.rb +109 -0
  32. data/lib/modern_treasury/models/connection_legal_entity_create_params.rb +1024 -0
  33. data/lib/modern_treasury/models/connection_legal_entity_list_params.rb +89 -0
  34. data/lib/modern_treasury/models/connection_legal_entity_retrieve_params.rb +18 -0
  35. data/lib/modern_treasury/models/connection_legal_entity_update_params.rb +42 -0
  36. data/lib/modern_treasury/models/connection_list_params.rb +56 -0
  37. data/lib/modern_treasury/models/counterparty.rb +561 -0
  38. data/lib/modern_treasury/models/counterparty_collect_account_params.rb +110 -0
  39. data/lib/modern_treasury/models/counterparty_collect_account_response.rb +38 -0
  40. data/lib/modern_treasury/models/counterparty_create_params.rb +1737 -0
  41. data/lib/modern_treasury/models/counterparty_delete_params.rb +18 -0
  42. data/lib/modern_treasury/models/counterparty_list_params.rb +117 -0
  43. data/lib/modern_treasury/models/counterparty_retrieve_params.rb +18 -0
  44. data/lib/modern_treasury/models/counterparty_update_params.rb +93 -0
  45. data/lib/modern_treasury/models/currency.rb +206 -0
  46. data/lib/modern_treasury/models/document.rb +247 -0
  47. data/lib/modern_treasury/models/document_create_params.rb +71 -0
  48. data/lib/modern_treasury/models/document_list_params.rb +84 -0
  49. data/lib/modern_treasury/models/document_retrieve_params.rb +18 -0
  50. data/lib/modern_treasury/models/event.rb +94 -0
  51. data/lib/modern_treasury/models/event_list_params.rb +98 -0
  52. data/lib/modern_treasury/models/event_retrieve_params.rb +18 -0
  53. data/lib/modern_treasury/models/expected_payment.rb +285 -0
  54. data/lib/modern_treasury/models/expected_payment_create_params.rb +537 -0
  55. data/lib/modern_treasury/models/expected_payment_delete_params.rb +18 -0
  56. data/lib/modern_treasury/models/expected_payment_list_params.rb +199 -0
  57. data/lib/modern_treasury/models/expected_payment_retrieve_params.rb +18 -0
  58. data/lib/modern_treasury/models/expected_payment_type.rb +48 -0
  59. data/lib/modern_treasury/models/expected_payment_update_params.rb +207 -0
  60. data/lib/modern_treasury/models/external_account.rb +389 -0
  61. data/lib/modern_treasury/models/external_account_complete_verification_params.rb +28 -0
  62. data/lib/modern_treasury/models/external_account_create_params.rb +570 -0
  63. data/lib/modern_treasury/models/external_account_delete_params.rb +18 -0
  64. data/lib/modern_treasury/models/external_account_list_params.rb +78 -0
  65. data/lib/modern_treasury/models/external_account_retrieve_params.rb +18 -0
  66. data/lib/modern_treasury/models/external_account_type.rb +25 -0
  67. data/lib/modern_treasury/models/external_account_update_params.rb +159 -0
  68. data/lib/modern_treasury/models/external_account_verify_params.rb +151 -0
  69. data/lib/modern_treasury/models/external_account_verify_response.rb +186 -0
  70. data/lib/modern_treasury/models/foreign_exchange_quote.rb +180 -0
  71. data/lib/modern_treasury/models/foreign_exchange_quote_create_params.rb +89 -0
  72. data/lib/modern_treasury/models/foreign_exchange_quote_list_params.rb +127 -0
  73. data/lib/modern_treasury/models/foreign_exchange_quote_retrieve_params.rb +18 -0
  74. data/lib/modern_treasury/models/incoming_payment_detail.rb +320 -0
  75. data/lib/modern_treasury/models/incoming_payment_detail_create_async_params.rb +141 -0
  76. data/lib/modern_treasury/models/incoming_payment_detail_list_params.rb +170 -0
  77. data/lib/modern_treasury/models/incoming_payment_detail_retrieve_params.rb +18 -0
  78. data/lib/modern_treasury/models/incoming_payment_detail_update_params.rb +30 -0
  79. data/lib/modern_treasury/models/internal_account.rb +299 -0
  80. data/lib/modern_treasury/models/internal_account_create_params.rb +186 -0
  81. data/lib/modern_treasury/models/internal_account_list_params.rb +157 -0
  82. data/lib/modern_treasury/models/internal_account_retrieve_params.rb +18 -0
  83. data/lib/modern_treasury/models/internal_account_update_params.rb +84 -0
  84. data/lib/modern_treasury/models/internal_accounts/balance_report.rb +260 -0
  85. data/lib/modern_treasury/models/internal_accounts/balance_report_create_params.rb +135 -0
  86. data/lib/modern_treasury/models/internal_accounts/balance_report_delete_params.rb +26 -0
  87. data/lib/modern_treasury/models/internal_accounts/balance_report_list_params.rb +77 -0
  88. data/lib/modern_treasury/models/internal_accounts/balance_report_retrieve_params.rb +26 -0
  89. data/lib/modern_treasury/models/invoice.rb +624 -0
  90. data/lib/modern_treasury/models/invoice_add_payment_order_params.rb +24 -0
  91. data/lib/modern_treasury/models/invoice_create_params.rb +649 -0
  92. data/lib/modern_treasury/models/invoice_list_params.rb +163 -0
  93. data/lib/modern_treasury/models/invoice_retrieve_params.rb +18 -0
  94. data/lib/modern_treasury/models/invoice_update_params.rb +665 -0
  95. data/lib/modern_treasury/models/invoices/invoice_line_item.rb +130 -0
  96. data/lib/modern_treasury/models/invoices/line_item_create_params.rb +108 -0
  97. data/lib/modern_treasury/models/invoices/line_item_delete_params.rb +26 -0
  98. data/lib/modern_treasury/models/invoices/line_item_list_params.rb +36 -0
  99. data/lib/modern_treasury/models/invoices/line_item_retrieve_params.rb +26 -0
  100. data/lib/modern_treasury/models/invoices/line_item_update_params.rb +123 -0
  101. data/lib/modern_treasury/models/ledger.rb +73 -0
  102. data/lib/modern_treasury/models/ledger_account.rb +351 -0
  103. data/lib/modern_treasury/models/ledger_account_balance_monitor.rb +337 -0
  104. data/lib/modern_treasury/models/ledger_account_balance_monitor_create_params.rb +92 -0
  105. data/lib/modern_treasury/models/ledger_account_balance_monitor_delete_params.rb +18 -0
  106. data/lib/modern_treasury/models/ledger_account_balance_monitor_list_params.rb +70 -0
  107. data/lib/modern_treasury/models/ledger_account_balance_monitor_retrieve_params.rb +18 -0
  108. data/lib/modern_treasury/models/ledger_account_balance_monitor_update_params.rb +41 -0
  109. data/lib/modern_treasury/models/ledger_account_category.rb +282 -0
  110. data/lib/modern_treasury/models/ledger_account_category_add_ledger_account_params.rb +24 -0
  111. data/lib/modern_treasury/models/ledger_account_category_add_nested_category_params.rb +24 -0
  112. data/lib/modern_treasury/models/ledger_account_category_create_params.rb +97 -0
  113. data/lib/modern_treasury/models/ledger_account_category_delete_params.rb +18 -0
  114. data/lib/modern_treasury/models/ledger_account_category_list_params.rb +162 -0
  115. data/lib/modern_treasury/models/ledger_account_category_remove_ledger_account_params.rb +24 -0
  116. data/lib/modern_treasury/models/ledger_account_category_remove_nested_category_params.rb +24 -0
  117. data/lib/modern_treasury/models/ledger_account_category_retrieve_params.rb +63 -0
  118. data/lib/modern_treasury/models/ledger_account_category_update_params.rb +48 -0
  119. data/lib/modern_treasury/models/ledger_account_create_params.rb +142 -0
  120. data/lib/modern_treasury/models/ledger_account_delete_params.rb +18 -0
  121. data/lib/modern_treasury/models/ledger_account_list_params.rb +467 -0
  122. data/lib/modern_treasury/models/ledger_account_retrieve_params.rb +108 -0
  123. data/lib/modern_treasury/models/ledger_account_settlement.rb +175 -0
  124. data/lib/modern_treasury/models/ledger_account_settlement_create_params.rb +117 -0
  125. data/lib/modern_treasury/models/ledger_account_settlement_list_params.rb +140 -0
  126. data/lib/modern_treasury/models/ledger_account_settlement_retrieve_params.rb +18 -0
  127. data/lib/modern_treasury/models/ledger_account_settlement_update_params.rb +64 -0
  128. data/lib/modern_treasury/models/ledger_account_settlements/account_entry_delete_params.rb +28 -0
  129. data/lib/modern_treasury/models/ledger_account_settlements/account_entry_update_params.rb +28 -0
  130. data/lib/modern_treasury/models/ledger_account_statement_create_params.rb +71 -0
  131. data/lib/modern_treasury/models/ledger_account_statement_create_response.rb +488 -0
  132. data/lib/modern_treasury/models/ledger_account_statement_retrieve_params.rb +18 -0
  133. data/lib/modern_treasury/models/ledger_account_statement_retrieve_response.rb +488 -0
  134. data/lib/modern_treasury/models/ledger_account_update_params.rb +48 -0
  135. data/lib/modern_treasury/models/ledger_create_params.rb +44 -0
  136. data/lib/modern_treasury/models/ledger_delete_params.rb +18 -0
  137. data/lib/modern_treasury/models/ledger_entry.rb +346 -0
  138. data/lib/modern_treasury/models/ledger_entry_list_params.rb +347 -0
  139. data/lib/modern_treasury/models/ledger_entry_retrieve_params.rb +30 -0
  140. data/lib/modern_treasury/models/ledger_entry_update_params.rb +30 -0
  141. data/lib/modern_treasury/models/ledger_event_handler.rb +218 -0
  142. data/lib/modern_treasury/models/ledger_event_handler_create_params.rb +185 -0
  143. data/lib/modern_treasury/models/ledger_event_handler_delete_params.rb +18 -0
  144. data/lib/modern_treasury/models/ledger_event_handler_list_params.rb +70 -0
  145. data/lib/modern_treasury/models/ledger_event_handler_retrieve_params.rb +18 -0
  146. data/lib/modern_treasury/models/ledger_event_handler_variable.rb +58 -0
  147. data/lib/modern_treasury/models/ledger_list_params.rb +72 -0
  148. data/lib/modern_treasury/models/ledger_retrieve_params.rb +18 -0
  149. data/lib/modern_treasury/models/ledger_transaction.rb +213 -0
  150. data/lib/modern_treasury/models/ledger_transaction_create_params.rb +272 -0
  151. data/lib/modern_treasury/models/ledger_transaction_create_partial_post_params.rb +127 -0
  152. data/lib/modern_treasury/models/ledger_transaction_create_reversal_params.rb +146 -0
  153. data/lib/modern_treasury/models/ledger_transaction_list_params.rb +339 -0
  154. data/lib/modern_treasury/models/ledger_transaction_retrieve_params.rb +18 -0
  155. data/lib/modern_treasury/models/ledger_transaction_update_params.rb +250 -0
  156. data/lib/modern_treasury/models/ledger_transactions/ledger_transaction_version.rb +555 -0
  157. data/lib/modern_treasury/models/ledger_transactions/version_list_params.rb +96 -0
  158. data/lib/modern_treasury/models/ledger_update_params.rb +48 -0
  159. data/lib/modern_treasury/models/ledgerable_event.rb +96 -0
  160. data/lib/modern_treasury/models/ledgerable_event_create_params.rb +51 -0
  161. data/lib/modern_treasury/models/ledgerable_event_retrieve_params.rb +18 -0
  162. data/lib/modern_treasury/models/legal_entity.rb +544 -0
  163. data/lib/modern_treasury/models/legal_entity_association.rb +655 -0
  164. data/lib/modern_treasury/models/legal_entity_association_create_params.rb +531 -0
  165. data/lib/modern_treasury/models/legal_entity_create_params.rb +964 -0
  166. data/lib/modern_treasury/models/legal_entity_list_params.rb +90 -0
  167. data/lib/modern_treasury/models/legal_entity_retrieve_params.rb +18 -0
  168. data/lib/modern_treasury/models/legal_entity_update_params.rb +417 -0
  169. data/lib/modern_treasury/models/line_item.rb +161 -0
  170. data/lib/modern_treasury/models/line_item_list_params.rb +53 -0
  171. data/lib/modern_treasury/models/line_item_retrieve_params.rb +43 -0
  172. data/lib/modern_treasury/models/line_item_update_params.rb +55 -0
  173. data/lib/modern_treasury/models/paper_item.rb +175 -0
  174. data/lib/modern_treasury/models/paper_item_list_params.rb +78 -0
  175. data/lib/modern_treasury/models/paper_item_retrieve_params.rb +18 -0
  176. data/lib/modern_treasury/models/payment_flow.rb +293 -0
  177. data/lib/modern_treasury/models/payment_flow_create_params.rb +95 -0
  178. data/lib/modern_treasury/models/payment_flow_list_params.rb +107 -0
  179. data/lib/modern_treasury/models/payment_flow_retrieve_params.rb +18 -0
  180. data/lib/modern_treasury/models/payment_flow_update_params.rb +40 -0
  181. data/lib/modern_treasury/models/payment_order.rb +824 -0
  182. data/lib/modern_treasury/models/payment_order_create_async_params.rb +1387 -0
  183. data/lib/modern_treasury/models/payment_order_create_params.rb +1460 -0
  184. data/lib/modern_treasury/models/payment_order_list_params.rb +299 -0
  185. data/lib/modern_treasury/models/payment_order_retrieve_params.rb +18 -0
  186. data/lib/modern_treasury/models/payment_order_subtype.rb +49 -0
  187. data/lib/modern_treasury/models/payment_order_type.rb +49 -0
  188. data/lib/modern_treasury/models/payment_order_update_params.rb +1146 -0
  189. data/lib/modern_treasury/models/payment_orders/reversal.rb +139 -0
  190. data/lib/modern_treasury/models/payment_orders/reversal_create_params.rb +340 -0
  191. data/lib/modern_treasury/models/payment_orders/reversal_list_params.rb +36 -0
  192. data/lib/modern_treasury/models/payment_orders/reversal_retrieve_params.rb +26 -0
  193. data/lib/modern_treasury/models/payment_reference.rb +189 -0
  194. data/lib/modern_treasury/models/payment_reference_list_params.rb +96 -0
  195. data/lib/modern_treasury/models/payment_reference_retireve_params.rb +18 -0
  196. data/lib/modern_treasury/models/payment_reference_retrieve_params.rb +18 -0
  197. data/lib/modern_treasury/models/ping_response.rb +19 -0
  198. data/lib/modern_treasury/models/reconciliation_rule.rb +163 -0
  199. data/lib/modern_treasury/models/return_create_params.rb +154 -0
  200. data/lib/modern_treasury/models/return_list_params.rb +110 -0
  201. data/lib/modern_treasury/models/return_object.rb +485 -0
  202. data/lib/modern_treasury/models/return_retrieve_params.rb +18 -0
  203. data/lib/modern_treasury/models/routing_detail.rb +276 -0
  204. data/lib/modern_treasury/models/routing_detail_create_params.rb +141 -0
  205. data/lib/modern_treasury/models/routing_detail_delete_params.rb +42 -0
  206. data/lib/modern_treasury/models/routing_detail_list_params.rb +40 -0
  207. data/lib/modern_treasury/models/routing_detail_retrieve_params.rb +30 -0
  208. data/lib/modern_treasury/models/routing_number_lookup_request.rb +211 -0
  209. data/lib/modern_treasury/models/transaction.rb +383 -0
  210. data/lib/modern_treasury/models/transaction_create_params.rb +163 -0
  211. data/lib/modern_treasury/models/transaction_delete_params.rb +18 -0
  212. data/lib/modern_treasury/models/transaction_direction.rb +18 -0
  213. data/lib/modern_treasury/models/transaction_list_params.rb +186 -0
  214. data/lib/modern_treasury/models/transaction_retrieve_params.rb +18 -0
  215. data/lib/modern_treasury/models/transaction_update_params.rb +30 -0
  216. data/lib/modern_treasury/models/transactions/line_item_create_params.rb +42 -0
  217. data/lib/modern_treasury/models/transactions/line_item_delete_params.rb +20 -0
  218. data/lib/modern_treasury/models/transactions/line_item_list_params.rb +75 -0
  219. data/lib/modern_treasury/models/transactions/line_item_retrieve_params.rb +20 -0
  220. data/lib/modern_treasury/models/transactions/transaction_line_item.rb +182 -0
  221. data/lib/modern_treasury/models/validation_validate_routing_number_params.rb +72 -0
  222. data/lib/modern_treasury/models/virtual_account.rb +148 -0
  223. data/lib/modern_treasury/models/virtual_account_create_params.rb +444 -0
  224. data/lib/modern_treasury/models/virtual_account_delete_params.rb +18 -0
  225. data/lib/modern_treasury/models/virtual_account_list_params.rb +77 -0
  226. data/lib/modern_treasury/models/virtual_account_retrieve_params.rb +18 -0
  227. data/lib/modern_treasury/models/virtual_account_update_params.rb +55 -0
  228. data/lib/modern_treasury/models/wealth_and_employment_details.rb +324 -0
  229. data/lib/modern_treasury/page.rb +92 -0
  230. data/lib/modern_treasury/pooled_net_requester.rb +180 -0
  231. data/lib/modern_treasury/request_options.rb +108 -0
  232. data/lib/modern_treasury/resources/account_collection_flows.rb +108 -0
  233. data/lib/modern_treasury/resources/account_details.rb +136 -0
  234. data/lib/modern_treasury/resources/bulk_requests.rb +91 -0
  235. data/lib/modern_treasury/resources/bulk_results.rb +66 -0
  236. data/lib/modern_treasury/resources/connection_legal_entities.rb +105 -0
  237. data/lib/modern_treasury/resources/connections.rb +39 -0
  238. data/lib/modern_treasury/resources/counterparties.rb +203 -0
  239. data/lib/modern_treasury/resources/documents.rb +86 -0
  240. data/lib/modern_treasury/resources/events.rb +63 -0
  241. data/lib/modern_treasury/resources/expected_payments.rb +227 -0
  242. data/lib/modern_treasury/resources/external_accounts.rb +222 -0
  243. data/lib/modern_treasury/resources/foreign_exchange_quotes.rb +101 -0
  244. data/lib/modern_treasury/resources/incoming_payment_details.rb +133 -0
  245. data/lib/modern_treasury/resources/internal_accounts/balance_reports.rb +128 -0
  246. data/lib/modern_treasury/resources/internal_accounts.rb +140 -0
  247. data/lib/modern_treasury/resources/invoices/line_items.rb +177 -0
  248. data/lib/modern_treasury/resources/invoices.rb +286 -0
  249. data/lib/modern_treasury/resources/ledger_account_balance_monitors.rb +132 -0
  250. data/lib/modern_treasury/resources/ledger_account_categories.rb +266 -0
  251. data/lib/modern_treasury/resources/ledger_account_settlements/account_entries.rb +62 -0
  252. data/lib/modern_treasury/resources/ledger_account_settlements.rb +152 -0
  253. data/lib/modern_treasury/resources/ledger_account_statements.rb +62 -0
  254. data/lib/modern_treasury/resources/ledger_accounts.rb +189 -0
  255. data/lib/modern_treasury/resources/ledger_entries.rb +137 -0
  256. data/lib/modern_treasury/resources/ledger_event_handlers.rb +114 -0
  257. data/lib/modern_treasury/resources/ledger_transactions/versions.rb +50 -0
  258. data/lib/modern_treasury/resources/ledger_transactions.rb +262 -0
  259. data/lib/modern_treasury/resources/ledgerable_events.rb +57 -0
  260. data/lib/modern_treasury/resources/ledgers.rb +134 -0
  261. data/lib/modern_treasury/resources/legal_entities.rb +193 -0
  262. data/lib/modern_treasury/resources/legal_entity_associations.rb +43 -0
  263. data/lib/modern_treasury/resources/line_items.rb +109 -0
  264. data/lib/modern_treasury/resources/paper_items.rb +60 -0
  265. data/lib/modern_treasury/resources/payment_flows.rb +123 -0
  266. data/lib/modern_treasury/resources/payment_orders/reversals.rb +95 -0
  267. data/lib/modern_treasury/resources/payment_orders.rb +517 -0
  268. data/lib/modern_treasury/resources/payment_references.rb +66 -0
  269. data/lib/modern_treasury/resources/returns.rb +98 -0
  270. data/lib/modern_treasury/resources/routing_details.rb +140 -0
  271. data/lib/modern_treasury/resources/transactions/line_items.rb +104 -0
  272. data/lib/modern_treasury/resources/transactions.rb +174 -0
  273. data/lib/modern_treasury/resources/validations.rb +38 -0
  274. data/lib/modern_treasury/resources/virtual_accounts.rb +152 -0
  275. data/lib/modern_treasury/util.rb +728 -0
  276. data/lib/modern_treasury/version.rb +5 -0
  277. data/lib/modern_treasury.rb +310 -0
  278. data/manifest.yaml +14 -0
  279. data/rbi/lib/modern_treasury/base_client.rbi +197 -0
  280. data/rbi/lib/modern_treasury/base_model.rbi +645 -0
  281. data/rbi/lib/modern_treasury/base_page.rbi +36 -0
  282. data/rbi/lib/modern_treasury/client.rbi +174 -0
  283. data/rbi/lib/modern_treasury/errors.rbi +144 -0
  284. data/rbi/lib/modern_treasury/extern.rbi +7 -0
  285. data/rbi/lib/modern_treasury/models/account_collection_flow.rbi +203 -0
  286. data/rbi/lib/modern_treasury/models/account_collection_flow_create_params.rbi +114 -0
  287. data/rbi/lib/modern_treasury/models/account_collection_flow_list_params.rbi +83 -0
  288. data/rbi/lib/modern_treasury/models/account_collection_flow_retrieve_params.rbi +21 -0
  289. data/rbi/lib/modern_treasury/models/account_collection_flow_update_params.rbi +57 -0
  290. data/rbi/lib/modern_treasury/models/account_detail.rbi +115 -0
  291. data/rbi/lib/modern_treasury/models/account_detail_create_params.rbi +107 -0
  292. data/rbi/lib/modern_treasury/models/account_detail_delete_params.rbi +56 -0
  293. data/rbi/lib/modern_treasury/models/account_detail_list_params.rbi +48 -0
  294. data/rbi/lib/modern_treasury/models/account_detail_retrieve_params.rbi +40 -0
  295. data/rbi/lib/modern_treasury/models/accounts_type.rbi +19 -0
  296. data/rbi/lib/modern_treasury/models/async_response.rbi +21 -0
  297. data/rbi/lib/modern_treasury/models/bank_settings.rbi +96 -0
  298. data/rbi/lib/modern_treasury/models/bulk_request.rbi +162 -0
  299. data/rbi/lib/modern_treasury/models/bulk_request_create_params.rbi +6311 -0
  300. data/rbi/lib/modern_treasury/models/bulk_request_list_params.rbi +146 -0
  301. data/rbi/lib/modern_treasury/models/bulk_request_retrieve_params.rbi +21 -0
  302. data/rbi/lib/modern_treasury/models/bulk_result.rbi +286 -0
  303. data/rbi/lib/modern_treasury/models/bulk_result_list_params.rbi +157 -0
  304. data/rbi/lib/modern_treasury/models/bulk_result_retrieve_params.rbi +21 -0
  305. data/rbi/lib/modern_treasury/models/client_ping_params.rbi +21 -0
  306. data/rbi/lib/modern_treasury/models/connection.rbi +85 -0
  307. data/rbi/lib/modern_treasury/models/connection_legal_entity.rbi +110 -0
  308. data/rbi/lib/modern_treasury/models/connection_legal_entity_create_params.rbi +1752 -0
  309. data/rbi/lib/modern_treasury/models/connection_legal_entity_list_params.rbi +94 -0
  310. data/rbi/lib/modern_treasury/models/connection_legal_entity_retrieve_params.rbi +21 -0
  311. data/rbi/lib/modern_treasury/models/connection_legal_entity_update_params.rbi +58 -0
  312. data/rbi/lib/modern_treasury/models/connection_list_params.rbi +61 -0
  313. data/rbi/lib/modern_treasury/models/counterparty.rbi +607 -0
  314. data/rbi/lib/modern_treasury/models/counterparty_collect_account_params.rbi +161 -0
  315. data/rbi/lib/modern_treasury/models/counterparty_collect_account_response.rbi +31 -0
  316. data/rbi/lib/modern_treasury/models/counterparty_create_params.rbi +2867 -0
  317. data/rbi/lib/modern_treasury/models/counterparty_delete_params.rbi +21 -0
  318. data/rbi/lib/modern_treasury/models/counterparty_list_params.rbi +111 -0
  319. data/rbi/lib/modern_treasury/models/counterparty_retrieve_params.rbi +21 -0
  320. data/rbi/lib/modern_treasury/models/counterparty_update_params.rbi +91 -0
  321. data/rbi/lib/modern_treasury/models/currency.rbi +207 -0
  322. data/rbi/lib/modern_treasury/models/document.rbi +243 -0
  323. data/rbi/lib/modern_treasury/models/document_create_params.rbi +95 -0
  324. data/rbi/lib/modern_treasury/models/document_list_params.rbi +105 -0
  325. data/rbi/lib/modern_treasury/models/document_retrieve_params.rbi +21 -0
  326. data/rbi/lib/modern_treasury/models/event.rbi +82 -0
  327. data/rbi/lib/modern_treasury/models/event_list_params.rbi +94 -0
  328. data/rbi/lib/modern_treasury/models/event_retrieve_params.rbi +21 -0
  329. data/rbi/lib/modern_treasury/models/expected_payment.rbi +272 -0
  330. data/rbi/lib/modern_treasury/models/expected_payment_create_params.rbi +616 -0
  331. data/rbi/lib/modern_treasury/models/expected_payment_delete_params.rbi +21 -0
  332. data/rbi/lib/modern_treasury/models/expected_payment_list_params.rbi +197 -0
  333. data/rbi/lib/modern_treasury/models/expected_payment_retrieve_params.rbi +21 -0
  334. data/rbi/lib/modern_treasury/models/expected_payment_type.rbi +49 -0
  335. data/rbi/lib/modern_treasury/models/expected_payment_update_params.rbi +201 -0
  336. data/rbi/lib/modern_treasury/models/external_account.rbi +410 -0
  337. data/rbi/lib/modern_treasury/models/external_account_complete_verification_params.rbi +30 -0
  338. data/rbi/lib/modern_treasury/models/external_account_create_params.rbi +959 -0
  339. data/rbi/lib/modern_treasury/models/external_account_delete_params.rbi +21 -0
  340. data/rbi/lib/modern_treasury/models/external_account_list_params.rbi +78 -0
  341. data/rbi/lib/modern_treasury/models/external_account_retrieve_params.rbi +21 -0
  342. data/rbi/lib/modern_treasury/models/external_account_type.rbi +26 -0
  343. data/rbi/lib/modern_treasury/models/external_account_update_params.rbi +170 -0
  344. data/rbi/lib/modern_treasury/models/external_account_verify_params.rbi +167 -0
  345. data/rbi/lib/modern_treasury/models/external_account_verify_response.rbi +395 -0
  346. data/rbi/lib/modern_treasury/models/foreign_exchange_quote.rbi +188 -0
  347. data/rbi/lib/modern_treasury/models/foreign_exchange_quote_create_params.rbi +88 -0
  348. data/rbi/lib/modern_treasury/models/foreign_exchange_quote_list_params.rbi +119 -0
  349. data/rbi/lib/modern_treasury/models/foreign_exchange_quote_retrieve_params.rbi +21 -0
  350. data/rbi/lib/modern_treasury/models/incoming_payment_detail.rbi +427 -0
  351. data/rbi/lib/modern_treasury/models/incoming_payment_detail_create_async_params.rbi +153 -0
  352. data/rbi/lib/modern_treasury/models/incoming_payment_detail_list_params.rbi +170 -0
  353. data/rbi/lib/modern_treasury/models/incoming_payment_detail_retrieve_params.rbi +21 -0
  354. data/rbi/lib/modern_treasury/models/incoming_payment_detail_update_params.rbi +34 -0
  355. data/rbi/lib/modern_treasury/models/internal_account.rbi +302 -0
  356. data/rbi/lib/modern_treasury/models/internal_account_create_params.rbi +193 -0
  357. data/rbi/lib/modern_treasury/models/internal_account_list_params.rbi +158 -0
  358. data/rbi/lib/modern_treasury/models/internal_account_retrieve_params.rbi +21 -0
  359. data/rbi/lib/modern_treasury/models/internal_account_update_params.rbi +83 -0
  360. data/rbi/lib/modern_treasury/models/internal_accounts/balance_report.rbi +311 -0
  361. data/rbi/lib/modern_treasury/models/internal_accounts/balance_report_create_params.rbi +235 -0
  362. data/rbi/lib/modern_treasury/models/internal_accounts/balance_report_delete_params.rbi +31 -0
  363. data/rbi/lib/modern_treasury/models/internal_accounts/balance_report_list_params.rbi +119 -0
  364. data/rbi/lib/modern_treasury/models/internal_accounts/balance_report_retrieve_params.rbi +31 -0
  365. data/rbi/lib/modern_treasury/models/invoice.rbi +648 -0
  366. data/rbi/lib/modern_treasury/models/invoice_add_payment_order_params.rbi +30 -0
  367. data/rbi/lib/modern_treasury/models/invoice_create_params.rbi +707 -0
  368. data/rbi/lib/modern_treasury/models/invoice_list_params.rbi +154 -0
  369. data/rbi/lib/modern_treasury/models/invoice_retrieve_params.rbi +21 -0
  370. data/rbi/lib/modern_treasury/models/invoice_update_params.rbi +719 -0
  371. data/rbi/lib/modern_treasury/models/invoices/invoice_line_item.rbi +126 -0
  372. data/rbi/lib/modern_treasury/models/invoices/line_item_create_params.rbi +105 -0
  373. data/rbi/lib/modern_treasury/models/invoices/line_item_delete_params.rbi +29 -0
  374. data/rbi/lib/modern_treasury/models/invoices/line_item_list_params.rbi +45 -0
  375. data/rbi/lib/modern_treasury/models/invoices/line_item_retrieve_params.rbi +29 -0
  376. data/rbi/lib/modern_treasury/models/invoices/line_item_update_params.rbi +117 -0
  377. data/rbi/lib/modern_treasury/models/ledger.rbi +76 -0
  378. data/rbi/lib/modern_treasury/models/ledger_account.rbi +401 -0
  379. data/rbi/lib/modern_treasury/models/ledger_account_balance_monitor.rbi +447 -0
  380. data/rbi/lib/modern_treasury/models/ledger_account_balance_monitor_create_params.rbi +103 -0
  381. data/rbi/lib/modern_treasury/models/ledger_account_balance_monitor_delete_params.rbi +21 -0
  382. data/rbi/lib/modern_treasury/models/ledger_account_balance_monitor_list_params.rbi +73 -0
  383. data/rbi/lib/modern_treasury/models/ledger_account_balance_monitor_retrieve_params.rbi +21 -0
  384. data/rbi/lib/modern_treasury/models/ledger_account_balance_monitor_update_params.rbi +49 -0
  385. data/rbi/lib/modern_treasury/models/ledger_account_category.rbi +354 -0
  386. data/rbi/lib/modern_treasury/models/ledger_account_category_add_ledger_account_params.rbi +30 -0
  387. data/rbi/lib/modern_treasury/models/ledger_account_category_add_nested_category_params.rbi +30 -0
  388. data/rbi/lib/modern_treasury/models/ledger_account_category_create_params.rbi +96 -0
  389. data/rbi/lib/modern_treasury/models/ledger_account_category_delete_params.rbi +21 -0
  390. data/rbi/lib/modern_treasury/models/ledger_account_category_list_params.rbi +154 -0
  391. data/rbi/lib/modern_treasury/models/ledger_account_category_remove_ledger_account_params.rbi +30 -0
  392. data/rbi/lib/modern_treasury/models/ledger_account_category_remove_nested_category_params.rbi +30 -0
  393. data/rbi/lib/modern_treasury/models/ledger_account_category_retrieve_params.rbi +77 -0
  394. data/rbi/lib/modern_treasury/models/ledger_account_category_update_params.rbi +55 -0
  395. data/rbi/lib/modern_treasury/models/ledger_account_create_params.rbi +146 -0
  396. data/rbi/lib/modern_treasury/models/ledger_account_delete_params.rbi +21 -0
  397. data/rbi/lib/modern_treasury/models/ledger_account_list_params.rbi +454 -0
  398. data/rbi/lib/modern_treasury/models/ledger_account_retrieve_params.rbi +121 -0
  399. data/rbi/lib/modern_treasury/models/ledger_account_settlement.rbi +169 -0
  400. data/rbi/lib/modern_treasury/models/ledger_account_settlement_create_params.rbi +123 -0
  401. data/rbi/lib/modern_treasury/models/ledger_account_settlement_list_params.rbi +130 -0
  402. data/rbi/lib/modern_treasury/models/ledger_account_settlement_retrieve_params.rbi +21 -0
  403. data/rbi/lib/modern_treasury/models/ledger_account_settlement_update_params.rbi +79 -0
  404. data/rbi/lib/modern_treasury/models/ledger_account_settlements/account_entry_delete_params.rbi +39 -0
  405. data/rbi/lib/modern_treasury/models/ledger_account_settlements/account_entry_update_params.rbi +37 -0
  406. data/rbi/lib/modern_treasury/models/ledger_account_statement_create_params.rbi +74 -0
  407. data/rbi/lib/modern_treasury/models/ledger_account_statement_create_response.rbi +638 -0
  408. data/rbi/lib/modern_treasury/models/ledger_account_statement_retrieve_params.rbi +21 -0
  409. data/rbi/lib/modern_treasury/models/ledger_account_statement_retrieve_response.rbi +638 -0
  410. data/rbi/lib/modern_treasury/models/ledger_account_update_params.rbi +55 -0
  411. data/rbi/lib/modern_treasury/models/ledger_create_params.rbi +52 -0
  412. data/rbi/lib/modern_treasury/models/ledger_delete_params.rbi +21 -0
  413. data/rbi/lib/modern_treasury/models/ledger_entry.rbi +415 -0
  414. data/rbi/lib/modern_treasury/models/ledger_entry_list_params.rbi +342 -0
  415. data/rbi/lib/modern_treasury/models/ledger_entry_retrieve_params.rbi +32 -0
  416. data/rbi/lib/modern_treasury/models/ledger_entry_update_params.rbi +34 -0
  417. data/rbi/lib/modern_treasury/models/ledger_event_handler.rbi +231 -0
  418. data/rbi/lib/modern_treasury/models/ledger_event_handler_create_params.rbi +210 -0
  419. data/rbi/lib/modern_treasury/models/ledger_event_handler_delete_params.rbi +21 -0
  420. data/rbi/lib/modern_treasury/models/ledger_event_handler_list_params.rbi +73 -0
  421. data/rbi/lib/modern_treasury/models/ledger_event_handler_retrieve_params.rbi +21 -0
  422. data/rbi/lib/modern_treasury/models/ledger_event_handler_variable.rbi +59 -0
  423. data/rbi/lib/modern_treasury/models/ledger_list_params.rbi +75 -0
  424. data/rbi/lib/modern_treasury/models/ledger_retrieve_params.rbi +21 -0
  425. data/rbi/lib/modern_treasury/models/ledger_transaction.rbi +208 -0
  426. data/rbi/lib/modern_treasury/models/ledger_transaction_create_params.rbi +286 -0
  427. data/rbi/lib/modern_treasury/models/ledger_transaction_create_partial_post_params.rbi +171 -0
  428. data/rbi/lib/modern_treasury/models/ledger_transaction_create_reversal_params.rbi +191 -0
  429. data/rbi/lib/modern_treasury/models/ledger_transaction_list_params.rbi +360 -0
  430. data/rbi/lib/modern_treasury/models/ledger_transaction_retrieve_params.rbi +21 -0
  431. data/rbi/lib/modern_treasury/models/ledger_transaction_update_params.rbi +272 -0
  432. data/rbi/lib/modern_treasury/models/ledger_transactions/ledger_transaction_version.rbi +731 -0
  433. data/rbi/lib/modern_treasury/models/ledger_transactions/version_list_params.rbi +94 -0
  434. data/rbi/lib/modern_treasury/models/ledger_update_params.rbi +55 -0
  435. data/rbi/lib/modern_treasury/models/ledgerable_event.rbi +94 -0
  436. data/rbi/lib/modern_treasury/models/ledgerable_event_create_params.rbi +58 -0
  437. data/rbi/lib/modern_treasury/models/ledgerable_event_retrieve_params.rbi +21 -0
  438. data/rbi/lib/modern_treasury/models/legal_entity.rbi +543 -0
  439. data/rbi/lib/modern_treasury/models/legal_entity_association.rbi +879 -0
  440. data/rbi/lib/modern_treasury/models/legal_entity_association_create_params.rbi +892 -0
  441. data/rbi/lib/modern_treasury/models/legal_entity_create_params.rbi +1421 -0
  442. data/rbi/lib/modern_treasury/models/legal_entity_list_params.rbi +94 -0
  443. data/rbi/lib/modern_treasury/models/legal_entity_retrieve_params.rbi +21 -0
  444. data/rbi/lib/modern_treasury/models/legal_entity_update_params.rbi +487 -0
  445. data/rbi/lib/modern_treasury/models/line_item.rbi +158 -0
  446. data/rbi/lib/modern_treasury/models/line_item_list_params.rbi +65 -0
  447. data/rbi/lib/modern_treasury/models/line_item_retrieve_params.rbi +58 -0
  448. data/rbi/lib/modern_treasury/models/line_item_update_params.rbi +68 -0
  449. data/rbi/lib/modern_treasury/models/paper_item.rbi +167 -0
  450. data/rbi/lib/modern_treasury/models/paper_item_list_params.rbi +78 -0
  451. data/rbi/lib/modern_treasury/models/paper_item_retrieve_params.rbi +21 -0
  452. data/rbi/lib/modern_treasury/models/payment_flow.rbi +285 -0
  453. data/rbi/lib/modern_treasury/models/payment_flow_create_params.rbi +99 -0
  454. data/rbi/lib/modern_treasury/models/payment_flow_list_params.rbi +101 -0
  455. data/rbi/lib/modern_treasury/models/payment_flow_retrieve_params.rbi +21 -0
  456. data/rbi/lib/modern_treasury/models/payment_flow_update_params.rbi +53 -0
  457. data/rbi/lib/modern_treasury/models/payment_order.rbi +1115 -0
  458. data/rbi/lib/modern_treasury/models/payment_order_create_async_params.rbi +2008 -0
  459. data/rbi/lib/modern_treasury/models/payment_order_create_params.rbi +2083 -0
  460. data/rbi/lib/modern_treasury/models/payment_order_list_params.rbi +282 -0
  461. data/rbi/lib/modern_treasury/models/payment_order_retrieve_params.rbi +21 -0
  462. data/rbi/lib/modern_treasury/models/payment_order_subtype.rbi +50 -0
  463. data/rbi/lib/modern_treasury/models/payment_order_type.rbi +50 -0
  464. data/rbi/lib/modern_treasury/models/payment_order_update_params.rbi +1651 -0
  465. data/rbi/lib/modern_treasury/models/payment_orders/reversal.rbi +145 -0
  466. data/rbi/lib/modern_treasury/models/payment_orders/reversal_create_params.rbi +465 -0
  467. data/rbi/lib/modern_treasury/models/payment_orders/reversal_list_params.rbi +45 -0
  468. data/rbi/lib/modern_treasury/models/payment_orders/reversal_retrieve_params.rbi +29 -0
  469. data/rbi/lib/modern_treasury/models/payment_reference.rbi +371 -0
  470. data/rbi/lib/modern_treasury/models/payment_reference_list_params.rbi +109 -0
  471. data/rbi/lib/modern_treasury/models/payment_reference_retireve_params.rbi +21 -0
  472. data/rbi/lib/modern_treasury/models/payment_reference_retrieve_params.rbi +21 -0
  473. data/rbi/lib/modern_treasury/models/ping_response.rbi +18 -0
  474. data/rbi/lib/modern_treasury/models/reconciliation_rule.rbi +164 -0
  475. data/rbi/lib/modern_treasury/models/return_create_params.rbi +161 -0
  476. data/rbi/lib/modern_treasury/models/return_list_params.rbi +112 -0
  477. data/rbi/lib/modern_treasury/models/return_object.rbi +769 -0
  478. data/rbi/lib/modern_treasury/models/return_retrieve_params.rbi +21 -0
  479. data/rbi/lib/modern_treasury/models/routing_detail.rbi +297 -0
  480. data/rbi/lib/modern_treasury/models/routing_detail_create_params.rbi +207 -0
  481. data/rbi/lib/modern_treasury/models/routing_detail_delete_params.rbi +56 -0
  482. data/rbi/lib/modern_treasury/models/routing_detail_list_params.rbi +48 -0
  483. data/rbi/lib/modern_treasury/models/routing_detail_retrieve_params.rbi +40 -0
  484. data/rbi/lib/modern_treasury/models/routing_number_lookup_request.rbi +291 -0
  485. data/rbi/lib/modern_treasury/models/transaction.rbi +380 -0
  486. data/rbi/lib/modern_treasury/models/transaction_create_params.rbi +162 -0
  487. data/rbi/lib/modern_treasury/models/transaction_delete_params.rbi +21 -0
  488. data/rbi/lib/modern_treasury/models/transaction_direction.rbi +19 -0
  489. data/rbi/lib/modern_treasury/models/transaction_list_params.rbi +168 -0
  490. data/rbi/lib/modern_treasury/models/transaction_retrieve_params.rbi +21 -0
  491. data/rbi/lib/modern_treasury/models/transaction_update_params.rbi +34 -0
  492. data/rbi/lib/modern_treasury/models/transactions/line_item_create_params.rbi +51 -0
  493. data/rbi/lib/modern_treasury/models/transactions/line_item_delete_params.rbi +23 -0
  494. data/rbi/lib/modern_treasury/models/transactions/line_item_list_params.rbi +84 -0
  495. data/rbi/lib/modern_treasury/models/transactions/line_item_retrieve_params.rbi +23 -0
  496. data/rbi/lib/modern_treasury/models/transactions/transaction_line_item.rbi +212 -0
  497. data/rbi/lib/modern_treasury/models/validation_validate_routing_number_params.rbi +178 -0
  498. data/rbi/lib/modern_treasury/models/virtual_account.rbi +141 -0
  499. data/rbi/lib/modern_treasury/models/virtual_account_create_params.rbi +753 -0
  500. data/rbi/lib/modern_treasury/models/virtual_account_delete_params.rbi +21 -0
  501. data/rbi/lib/modern_treasury/models/virtual_account_list_params.rbi +77 -0
  502. data/rbi/lib/modern_treasury/models/virtual_account_retrieve_params.rbi +21 -0
  503. data/rbi/lib/modern_treasury/models/virtual_account_update_params.rbi +60 -0
  504. data/rbi/lib/modern_treasury/models/wealth_and_employment_details.rbi +410 -0
  505. data/rbi/lib/modern_treasury/page.rbi +31 -0
  506. data/rbi/lib/modern_treasury/pooled_net_requester.rbi +62 -0
  507. data/rbi/lib/modern_treasury/request_options.rbi +63 -0
  508. data/rbi/lib/modern_treasury/resources/account_collection_flows.rbi +88 -0
  509. data/rbi/lib/modern_treasury/resources/account_details.rbi +100 -0
  510. data/rbi/lib/modern_treasury/resources/bulk_requests.rbi +95 -0
  511. data/rbi/lib/modern_treasury/resources/bulk_results.rbi +60 -0
  512. data/rbi/lib/modern_treasury/resources/connection_legal_entities.rbi +90 -0
  513. data/rbi/lib/modern_treasury/resources/connections.rbi +33 -0
  514. data/rbi/lib/modern_treasury/resources/counterparties.rbi +198 -0
  515. data/rbi/lib/modern_treasury/resources/documents.rbi +72 -0
  516. data/rbi/lib/modern_treasury/resources/events.rbi +54 -0
  517. data/rbi/lib/modern_treasury/resources/expected_payments.rbi +248 -0
  518. data/rbi/lib/modern_treasury/resources/external_accounts.rbi +212 -0
  519. data/rbi/lib/modern_treasury/resources/foreign_exchange_quotes.rbi +97 -0
  520. data/rbi/lib/modern_treasury/resources/incoming_payment_details.rbi +127 -0
  521. data/rbi/lib/modern_treasury/resources/internal_accounts/balance_reports.rbi +106 -0
  522. data/rbi/lib/modern_treasury/resources/internal_accounts.rbi +137 -0
  523. data/rbi/lib/modern_treasury/resources/invoices/line_items.rbi +157 -0
  524. data/rbi/lib/modern_treasury/resources/invoices.rbi +338 -0
  525. data/rbi/lib/modern_treasury/resources/ledger_account_balance_monitors.rbi +119 -0
  526. data/rbi/lib/modern_treasury/resources/ledger_account_categories.rbi +227 -0
  527. data/rbi/lib/modern_treasury/resources/ledger_account_settlements/account_entries.rbi +51 -0
  528. data/rbi/lib/modern_treasury/resources/ledger_account_settlements.rbi +143 -0
  529. data/rbi/lib/modern_treasury/resources/ledger_account_statements.rbi +57 -0
  530. data/rbi/lib/modern_treasury/resources/ledger_accounts.rbi +191 -0
  531. data/rbi/lib/modern_treasury/resources/ledger_entries.rbi +135 -0
  532. data/rbi/lib/modern_treasury/resources/ledger_event_handlers.rbi +107 -0
  533. data/rbi/lib/modern_treasury/resources/ledger_transactions/versions.rbi +46 -0
  534. data/rbi/lib/modern_treasury/resources/ledger_transactions.rbi +268 -0
  535. data/rbi/lib/modern_treasury/resources/ledgerable_events.rbi +51 -0
  536. data/rbi/lib/modern_treasury/resources/ledgers.rbi +118 -0
  537. data/rbi/lib/modern_treasury/resources/legal_entities.rbi +217 -0
  538. data/rbi/lib/modern_treasury/resources/legal_entity_associations.rbi +44 -0
  539. data/rbi/lib/modern_treasury/resources/line_items.rbi +81 -0
  540. data/rbi/lib/modern_treasury/resources/paper_items.rbi +52 -0
  541. data/rbi/lib/modern_treasury/resources/payment_flows.rbi +108 -0
  542. data/rbi/lib/modern_treasury/resources/payment_orders/reversals.rbi +82 -0
  543. data/rbi/lib/modern_treasury/resources/payment_orders.rbi +601 -0
  544. data/rbi/lib/modern_treasury/resources/payment_references.rbi +53 -0
  545. data/rbi/lib/modern_treasury/resources/returns.rbi +91 -0
  546. data/rbi/lib/modern_treasury/resources/routing_details.rbi +105 -0
  547. data/rbi/lib/modern_treasury/resources/transactions/line_items.rbi +87 -0
  548. data/rbi/lib/modern_treasury/resources/transactions.rbi +166 -0
  549. data/rbi/lib/modern_treasury/resources/validations.rbi +33 -0
  550. data/rbi/lib/modern_treasury/resources/virtual_accounts.rbi +139 -0
  551. data/rbi/lib/modern_treasury/util.rbi +281 -0
  552. data/rbi/lib/modern_treasury/version.rbi +5 -0
  553. data/sig/modern_treasury/base_client.rbs +108 -0
  554. data/sig/modern_treasury/base_model.rbs +262 -0
  555. data/sig/modern_treasury/base_page.rbs +20 -0
  556. data/sig/modern_treasury/client.rbs +106 -0
  557. data/sig/modern_treasury/errors.rbs +99 -0
  558. data/sig/modern_treasury/extern.rbs +4 -0
  559. data/sig/modern_treasury/models/account_collection_flow.rbs +147 -0
  560. data/sig/modern_treasury/models/account_collection_flow_create_params.rbs +80 -0
  561. data/sig/modern_treasury/models/account_collection_flow_list_params.rbs +53 -0
  562. data/sig/modern_treasury/models/account_collection_flow_retrieve_params.rbs +15 -0
  563. data/sig/modern_treasury/models/account_collection_flow_update_params.rbs +33 -0
  564. data/sig/modern_treasury/models/account_detail.rbs +81 -0
  565. data/sig/modern_treasury/models/account_detail_create_params.rbs +74 -0
  566. data/sig/modern_treasury/models/account_detail_delete_params.rbs +37 -0
  567. data/sig/modern_treasury/models/account_detail_list_params.rbs +33 -0
  568. data/sig/modern_treasury/models/account_detail_retrieve_params.rbs +27 -0
  569. data/sig/modern_treasury/models/accounts_type.rbs +14 -0
  570. data/sig/modern_treasury/models/async_response.rbs +15 -0
  571. data/sig/modern_treasury/models/bank_settings.rbs +54 -0
  572. data/sig/modern_treasury/models/bulk_request.rbs +100 -0
  573. data/sig/modern_treasury/models/bulk_request_create_params.rbs +2594 -0
  574. data/sig/modern_treasury/models/bulk_request_list_params.rbs +97 -0
  575. data/sig/modern_treasury/models/bulk_request_retrieve_params.rbs +15 -0
  576. data/sig/modern_treasury/models/bulk_result.rbs +176 -0
  577. data/sig/modern_treasury/models/bulk_result_list_params.rbs +106 -0
  578. data/sig/modern_treasury/models/bulk_result_retrieve_params.rbs +14 -0
  579. data/sig/modern_treasury/models/client_ping_params.rbs +14 -0
  580. data/sig/modern_treasury/models/connection.rbs +50 -0
  581. data/sig/modern_treasury/models/connection_legal_entity.rbs +67 -0
  582. data/sig/modern_treasury/models/connection_legal_entity_create_params.rbs +711 -0
  583. data/sig/modern_treasury/models/connection_legal_entity_list_params.rbs +62 -0
  584. data/sig/modern_treasury/models/connection_legal_entity_retrieve_params.rbs +15 -0
  585. data/sig/modern_treasury/models/connection_legal_entity_update_params.rbs +37 -0
  586. data/sig/modern_treasury/models/connection_list_params.rbs +41 -0
  587. data/sig/modern_treasury/models/counterparty.rbs +343 -0
  588. data/sig/modern_treasury/models/counterparty_collect_account_params.rbs +110 -0
  589. data/sig/modern_treasury/models/counterparty_collect_account_response.rbs +18 -0
  590. data/sig/modern_treasury/models/counterparty_create_params.rbs +1265 -0
  591. data/sig/modern_treasury/models/counterparty_delete_params.rbs +14 -0
  592. data/sig/modern_treasury/models/counterparty_list_params.rbs +65 -0
  593. data/sig/modern_treasury/models/counterparty_retrieve_params.rbs +15 -0
  594. data/sig/modern_treasury/models/counterparty_update_params.rbs +53 -0
  595. data/sig/modern_treasury/models/currency.rbs +390 -0
  596. data/sig/modern_treasury/models/document.rbs +162 -0
  597. data/sig/modern_treasury/models/document_create_params.rbs +70 -0
  598. data/sig/modern_treasury/models/document_list_params.rbs +76 -0
  599. data/sig/modern_treasury/models/document_retrieve_params.rbs +14 -0
  600. data/sig/modern_treasury/models/event.rbs +54 -0
  601. data/sig/modern_treasury/models/event_list_params.rbs +59 -0
  602. data/sig/modern_treasury/models/event_retrieve_params.rbs +14 -0
  603. data/sig/modern_treasury/models/expected_payment.rbs +154 -0
  604. data/sig/modern_treasury/models/expected_payment_create_params.rbs +294 -0
  605. data/sig/modern_treasury/models/expected_payment_delete_params.rbs +15 -0
  606. data/sig/modern_treasury/models/expected_payment_list_params.rbs +166 -0
  607. data/sig/modern_treasury/models/expected_payment_retrieve_params.rbs +15 -0
  608. data/sig/modern_treasury/models/expected_payment_type.rbs +72 -0
  609. data/sig/modern_treasury/models/expected_payment_update_params.rbs +110 -0
  610. data/sig/modern_treasury/models/external_account.rbs +235 -0
  611. data/sig/modern_treasury/models/external_account_complete_verification_params.rbs +22 -0
  612. data/sig/modern_treasury/models/external_account_create_params.rbs +463 -0
  613. data/sig/modern_treasury/models/external_account_delete_params.rbs +15 -0
  614. data/sig/modern_treasury/models/external_account_list_params.rbs +47 -0
  615. data/sig/modern_treasury/models/external_account_retrieve_params.rbs +15 -0
  616. data/sig/modern_treasury/models/external_account_type.rbs +28 -0
  617. data/sig/modern_treasury/models/external_account_update_params.rbs +105 -0
  618. data/sig/modern_treasury/models/external_account_verify_params.rbs +141 -0
  619. data/sig/modern_treasury/models/external_account_verify_response.rbs +157 -0
  620. data/sig/modern_treasury/models/foreign_exchange_quote.rbs +103 -0
  621. data/sig/modern_treasury/models/foreign_exchange_quote_create_params.rbs +53 -0
  622. data/sig/modern_treasury/models/foreign_exchange_quote_list_params.rbs +71 -0
  623. data/sig/modern_treasury/models/foreign_exchange_quote_retrieve_params.rbs +15 -0
  624. data/sig/modern_treasury/models/incoming_payment_detail.rbs +225 -0
  625. data/sig/modern_treasury/models/incoming_payment_detail_create_async_params.rbs +93 -0
  626. data/sig/modern_treasury/models/incoming_payment_detail_list_params.rbs +108 -0
  627. data/sig/modern_treasury/models/incoming_payment_detail_retrieve_params.rbs +15 -0
  628. data/sig/modern_treasury/models/incoming_payment_detail_update_params.rbs +22 -0
  629. data/sig/modern_treasury/models/internal_account.rbs +181 -0
  630. data/sig/modern_treasury/models/internal_account_create_params.rbs +115 -0
  631. data/sig/modern_treasury/models/internal_account_list_params.rbs +140 -0
  632. data/sig/modern_treasury/models/internal_account_retrieve_params.rbs +15 -0
  633. data/sig/modern_treasury/models/internal_account_update_params.rbs +49 -0
  634. data/sig/modern_treasury/models/internal_accounts/balance_report.rbs +160 -0
  635. data/sig/modern_treasury/models/internal_accounts/balance_report_create_params.rbs +105 -0
  636. data/sig/modern_treasury/models/internal_accounts/balance_report_delete_params.rbs +22 -0
  637. data/sig/modern_treasury/models/internal_accounts/balance_report_list_params.rbs +59 -0
  638. data/sig/modern_treasury/models/internal_accounts/balance_report_retrieve_params.rbs +22 -0
  639. data/sig/modern_treasury/models/invoice.rbs +367 -0
  640. data/sig/modern_treasury/models/invoice_add_payment_order_params.rbs +20 -0
  641. data/sig/modern_treasury/models/invoice_create_params.rbs +370 -0
  642. data/sig/modern_treasury/models/invoice_list_params.rbs +101 -0
  643. data/sig/modern_treasury/models/invoice_retrieve_params.rbs +14 -0
  644. data/sig/modern_treasury/models/invoice_update_params.rbs +378 -0
  645. data/sig/modern_treasury/models/invoices/invoice_line_item.rbs +70 -0
  646. data/sig/modern_treasury/models/invoices/line_item_create_params.rbs +59 -0
  647. data/sig/modern_treasury/models/invoices/line_item_delete_params.rbs +22 -0
  648. data/sig/modern_treasury/models/invoices/line_item_list_params.rbs +28 -0
  649. data/sig/modern_treasury/models/invoices/line_item_retrieve_params.rbs +22 -0
  650. data/sig/modern_treasury/models/invoices/line_item_update_params.rbs +67 -0
  651. data/sig/modern_treasury/models/ledger.rbs +50 -0
  652. data/sig/modern_treasury/models/ledger_account.rbs +212 -0
  653. data/sig/modern_treasury/models/ledger_account_balance_monitor.rbs +215 -0
  654. data/sig/modern_treasury/models/ledger_account_balance_monitor_create_params.rbs +57 -0
  655. data/sig/modern_treasury/models/ledger_account_balance_monitor_delete_params.rbs +15 -0
  656. data/sig/modern_treasury/models/ledger_account_balance_monitor_list_params.rbs +47 -0
  657. data/sig/modern_treasury/models/ledger_account_balance_monitor_retrieve_params.rbs +15 -0
  658. data/sig/modern_treasury/models/ledger_account_balance_monitor_update_params.rbs +28 -0
  659. data/sig/modern_treasury/models/ledger_account_category.rbs +178 -0
  660. data/sig/modern_treasury/models/ledger_account_category_add_ledger_account_params.rbs +20 -0
  661. data/sig/modern_treasury/models/ledger_account_category_add_nested_category_params.rbs +20 -0
  662. data/sig/modern_treasury/models/ledger_account_category_create_params.rbs +55 -0
  663. data/sig/modern_treasury/models/ledger_account_category_delete_params.rbs +15 -0
  664. data/sig/modern_treasury/models/ledger_account_category_list_params.rbs +91 -0
  665. data/sig/modern_treasury/models/ledger_account_category_remove_ledger_account_params.rbs +20 -0
  666. data/sig/modern_treasury/models/ledger_account_category_remove_nested_category_params.rbs +20 -0
  667. data/sig/modern_treasury/models/ledger_account_category_retrieve_params.rbs +43 -0
  668. data/sig/modern_treasury/models/ledger_account_category_update_params.rbs +31 -0
  669. data/sig/modern_treasury/models/ledger_account_create_params.rbs +83 -0
  670. data/sig/modern_treasury/models/ledger_account_delete_params.rbs +15 -0
  671. data/sig/modern_treasury/models/ledger_account_list_params.rbs +285 -0
  672. data/sig/modern_treasury/models/ledger_account_retrieve_params.rbs +68 -0
  673. data/sig/modern_treasury/models/ledger_account_settlement.rbs +98 -0
  674. data/sig/modern_treasury/models/ledger_account_settlement_create_params.rbs +64 -0
  675. data/sig/modern_treasury/models/ledger_account_settlement_list_params.rbs +77 -0
  676. data/sig/modern_treasury/models/ledger_account_settlement_retrieve_params.rbs +15 -0
  677. data/sig/modern_treasury/models/ledger_account_settlement_update_params.rbs +48 -0
  678. data/sig/modern_treasury/models/ledger_account_settlements/account_entry_delete_params.rbs +22 -0
  679. data/sig/modern_treasury/models/ledger_account_settlements/account_entry_update_params.rbs +23 -0
  680. data/sig/modern_treasury/models/ledger_account_statement_create_params.rbs +41 -0
  681. data/sig/modern_treasury/models/ledger_account_statement_create_response.rbs +306 -0
  682. data/sig/modern_treasury/models/ledger_account_statement_retrieve_params.rbs +15 -0
  683. data/sig/modern_treasury/models/ledger_account_statement_retrieve_response.rbs +306 -0
  684. data/sig/modern_treasury/models/ledger_account_update_params.rbs +31 -0
  685. data/sig/modern_treasury/models/ledger_create_params.rbs +29 -0
  686. data/sig/modern_treasury/models/ledger_delete_params.rbs +14 -0
  687. data/sig/modern_treasury/models/ledger_entry.rbs +206 -0
  688. data/sig/modern_treasury/models/ledger_entry_list_params.rbs +206 -0
  689. data/sig/modern_treasury/models/ledger_entry_retrieve_params.rbs +22 -0
  690. data/sig/modern_treasury/models/ledger_entry_update_params.rbs +22 -0
  691. data/sig/modern_treasury/models/ledger_event_handler.rbs +126 -0
  692. data/sig/modern_treasury/models/ledger_event_handler_create_params.rbs +109 -0
  693. data/sig/modern_treasury/models/ledger_event_handler_delete_params.rbs +15 -0
  694. data/sig/modern_treasury/models/ledger_event_handler_list_params.rbs +47 -0
  695. data/sig/modern_treasury/models/ledger_event_handler_retrieve_params.rbs +15 -0
  696. data/sig/modern_treasury/models/ledger_event_handler_variable.rbs +36 -0
  697. data/sig/modern_treasury/models/ledger_list_params.rbs +47 -0
  698. data/sig/modern_treasury/models/ledger_retrieve_params.rbs +14 -0
  699. data/sig/modern_treasury/models/ledger_transaction.rbs +123 -0
  700. data/sig/modern_treasury/models/ledger_transaction_create_params.rbs +155 -0
  701. data/sig/modern_treasury/models/ledger_transaction_create_partial_post_params.rbs +81 -0
  702. data/sig/modern_treasury/models/ledger_transaction_create_reversal_params.rbs +96 -0
  703. data/sig/modern_treasury/models/ledger_transaction_list_params.rbs +219 -0
  704. data/sig/modern_treasury/models/ledger_transaction_retrieve_params.rbs +15 -0
  705. data/sig/modern_treasury/models/ledger_transaction_update_params.rbs +147 -0
  706. data/sig/modern_treasury/models/ledger_transactions/ledger_transaction_version.rbs +326 -0
  707. data/sig/modern_treasury/models/ledger_transactions/version_list_params.rbs +55 -0
  708. data/sig/modern_treasury/models/ledger_update_params.rbs +31 -0
  709. data/sig/modern_treasury/models/ledgerable_event.rbs +54 -0
  710. data/sig/modern_treasury/models/ledgerable_event_create_params.rbs +37 -0
  711. data/sig/modern_treasury/models/ledgerable_event_retrieve_params.rbs +15 -0
  712. data/sig/modern_treasury/models/legal_entity.rbs +363 -0
  713. data/sig/modern_treasury/models/legal_entity_association.rbs +425 -0
  714. data/sig/modern_treasury/models/legal_entity_association_create_params.rbs +371 -0
  715. data/sig/modern_treasury/models/legal_entity_create_params.rbs +678 -0
  716. data/sig/modern_treasury/models/legal_entity_list_params.rbs +60 -0
  717. data/sig/modern_treasury/models/legal_entity_retrieve_params.rbs +15 -0
  718. data/sig/modern_treasury/models/legal_entity_update_params.rbs +300 -0
  719. data/sig/modern_treasury/models/line_item.rbs +89 -0
  720. data/sig/modern_treasury/models/line_item_list_params.rbs +44 -0
  721. data/sig/modern_treasury/models/line_item_retrieve_params.rbs +38 -0
  722. data/sig/modern_treasury/models/line_item_update_params.rbs +44 -0
  723. data/sig/modern_treasury/models/paper_item.rbs +98 -0
  724. data/sig/modern_treasury/models/paper_item_list_params.rbs +47 -0
  725. data/sig/modern_treasury/models/paper_item_retrieve_params.rbs +14 -0
  726. data/sig/modern_treasury/models/payment_flow.rbs +165 -0
  727. data/sig/modern_treasury/models/payment_flow_create_params.rbs +56 -0
  728. data/sig/modern_treasury/models/payment_flow_list_params.rbs +65 -0
  729. data/sig/modern_treasury/models/payment_flow_retrieve_params.rbs +15 -0
  730. data/sig/modern_treasury/models/payment_flow_update_params.rbs +31 -0
  731. data/sig/modern_treasury/models/payment_order.rbs +564 -0
  732. data/sig/modern_treasury/models/payment_order_create_async_params.rbs +893 -0
  733. data/sig/modern_treasury/models/payment_order_create_params.rbs +963 -0
  734. data/sig/modern_treasury/models/payment_order_list_params.rbs +238 -0
  735. data/sig/modern_treasury/models/payment_order_retrieve_params.rbs +15 -0
  736. data/sig/modern_treasury/models/payment_order_subtype.rbs +70 -0
  737. data/sig/modern_treasury/models/payment_order_type.rbs +72 -0
  738. data/sig/modern_treasury/models/payment_order_update_params.rbs +781 -0
  739. data/sig/modern_treasury/models/payment_orders/reversal.rbs +95 -0
  740. data/sig/modern_treasury/models/payment_orders/reversal_create_params.rbs +205 -0
  741. data/sig/modern_treasury/models/payment_orders/reversal_list_params.rbs +28 -0
  742. data/sig/modern_treasury/models/payment_orders/reversal_retrieve_params.rbs +22 -0
  743. data/sig/modern_treasury/models/payment_reference.rbs +213 -0
  744. data/sig/modern_treasury/models/payment_reference_list_params.rbs +61 -0
  745. data/sig/modern_treasury/models/payment_reference_retireve_params.rbs +15 -0
  746. data/sig/modern_treasury/models/payment_reference_retrieve_params.rbs +15 -0
  747. data/sig/modern_treasury/models/ping_response.rbs +13 -0
  748. data/sig/modern_treasury/models/reconciliation_rule.rbs +138 -0
  749. data/sig/modern_treasury/models/return_create_params.rbs +168 -0
  750. data/sig/modern_treasury/models/return_list_params.rbs +74 -0
  751. data/sig/modern_treasury/models/return_object.rbs +492 -0
  752. data/sig/modern_treasury/models/return_retrieve_params.rbs +14 -0
  753. data/sig/modern_treasury/models/routing_detail.rbs +233 -0
  754. data/sig/modern_treasury/models/routing_detail_create_params.rbs +165 -0
  755. data/sig/modern_treasury/models/routing_detail_delete_params.rbs +37 -0
  756. data/sig/modern_treasury/models/routing_detail_list_params.rbs +33 -0
  757. data/sig/modern_treasury/models/routing_detail_retrieve_params.rbs +27 -0
  758. data/sig/modern_treasury/models/routing_number_lookup_request.rbs +185 -0
  759. data/sig/modern_treasury/models/transaction.rbs +281 -0
  760. data/sig/modern_treasury/models/transaction_create_params.rbs +134 -0
  761. data/sig/modern_treasury/models/transaction_delete_params.rbs +14 -0
  762. data/sig/modern_treasury/models/transaction_direction.rbs +14 -0
  763. data/sig/modern_treasury/models/transaction_list_params.rbs +101 -0
  764. data/sig/modern_treasury/models/transaction_retrieve_params.rbs +14 -0
  765. data/sig/modern_treasury/models/transaction_update_params.rbs +22 -0
  766. data/sig/modern_treasury/models/transactions/line_item_create_params.rbs +29 -0
  767. data/sig/modern_treasury/models/transactions/line_item_delete_params.rbs +16 -0
  768. data/sig/modern_treasury/models/transactions/line_item_list_params.rbs +58 -0
  769. data/sig/modern_treasury/models/transactions/line_item_retrieve_params.rbs +16 -0
  770. data/sig/modern_treasury/models/transactions/transaction_line_item.rbs +110 -0
  771. data/sig/modern_treasury/models/validation_validate_routing_number_params.rbs +78 -0
  772. data/sig/modern_treasury/models/virtual_account.rbs +78 -0
  773. data/sig/modern_treasury/models/virtual_account_create_params.rbs +354 -0
  774. data/sig/modern_treasury/models/virtual_account_delete_params.rbs +15 -0
  775. data/sig/modern_treasury/models/virtual_account_list_params.rbs +47 -0
  776. data/sig/modern_treasury/models/virtual_account_retrieve_params.rbs +15 -0
  777. data/sig/modern_treasury/models/virtual_account_update_params.rbs +41 -0
  778. data/sig/modern_treasury/models/wealth_and_employment_details.rbs +306 -0
  779. data/sig/modern_treasury/page.rbs +17 -0
  780. data/sig/modern_treasury/pooled_net_requester.rbs +37 -0
  781. data/sig/modern_treasury/request_options.rbs +46 -0
  782. data/sig/modern_treasury/resources/account_collection_flows.rbs +35 -0
  783. data/sig/modern_treasury/resources/account_details.rbs +37 -0
  784. data/sig/modern_treasury/resources/bulk_requests.rbs +30 -0
  785. data/sig/modern_treasury/resources/bulk_results.rbs +23 -0
  786. data/sig/modern_treasury/resources/connection_legal_entities.rbs +34 -0
  787. data/sig/modern_treasury/resources/connections.rbs +15 -0
  788. data/sig/modern_treasury/resources/counterparties.rbs +64 -0
  789. data/sig/modern_treasury/resources/documents.rbs +28 -0
  790. data/sig/modern_treasury/resources/events.rbs +23 -0
  791. data/sig/modern_treasury/resources/expected_payments.rbs +76 -0
  792. data/sig/modern_treasury/resources/external_accounts.rbs +71 -0
  793. data/sig/modern_treasury/resources/foreign_exchange_quotes.rbs +35 -0
  794. data/sig/modern_treasury/resources/incoming_payment_details.rbs +43 -0
  795. data/sig/modern_treasury/resources/internal_accounts/balance_reports.rbs +39 -0
  796. data/sig/modern_treasury/resources/internal_accounts.rbs +49 -0
  797. data/sig/modern_treasury/resources/invoices/line_items.rbs +53 -0
  798. data/sig/modern_treasury/resources/invoices.rbs +94 -0
  799. data/sig/modern_treasury/resources/ledger_account_balance_monitors.rbs +41 -0
  800. data/sig/modern_treasury/resources/ledger_account_categories.rbs +76 -0
  801. data/sig/modern_treasury/resources/ledger_account_settlements/account_entries.rbs +21 -0
  802. data/sig/modern_treasury/resources/ledger_account_settlements.rbs +48 -0
  803. data/sig/modern_treasury/resources/ledger_account_statements.rbs +21 -0
  804. data/sig/modern_treasury/resources/ledger_accounts.rbs +58 -0
  805. data/sig/modern_treasury/resources/ledger_entries.rbs +43 -0
  806. data/sig/modern_treasury/resources/ledger_event_handlers.rbs +37 -0
  807. data/sig/modern_treasury/resources/ledger_transactions/versions.rbs +19 -0
  808. data/sig/modern_treasury/resources/ledger_transactions.rbs +83 -0
  809. data/sig/modern_treasury/resources/ledgerable_events.rbs +20 -0
  810. data/sig/modern_treasury/resources/ledgers.rbs +41 -0
  811. data/sig/modern_treasury/resources/legal_entities.rbs +76 -0
  812. data/sig/modern_treasury/resources/legal_entity_associations.rbs +17 -0
  813. data/sig/modern_treasury/resources/line_items.rbs +30 -0
  814. data/sig/modern_treasury/resources/paper_items.rbs +21 -0
  815. data/sig/modern_treasury/resources/payment_flows.rbs +40 -0
  816. data/sig/modern_treasury/resources/payment_orders/reversals.rbs +30 -0
  817. data/sig/modern_treasury/resources/payment_orders.rbs +153 -0
  818. data/sig/modern_treasury/resources/payment_references.rbs +23 -0
  819. data/sig/modern_treasury/resources/returns.rbs +32 -0
  820. data/sig/modern_treasury/resources/routing_details.rbs +38 -0
  821. data/sig/modern_treasury/resources/transactions/line_items.rbs +35 -0
  822. data/sig/modern_treasury/resources/transactions.rbs +57 -0
  823. data/sig/modern_treasury/resources/validations.rbs +13 -0
  824. data/sig/modern_treasury/resources/virtual_accounts.rbs +49 -0
  825. data/sig/modern_treasury/util.rbs +136 -0
  826. data/sig/modern_treasury/version.rbs +3 -0
  827. metadata +861 -20
@@ -0,0 +1,4128 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ModernTreasury
4
+ module Models
5
+ class BulkRequestCreateParams < ModernTreasury::BaseModel
6
+ # @!parse
7
+ # extend ModernTreasury::RequestParameters::Converter
8
+ include ModernTreasury::RequestParameters
9
+
10
+ # @!attribute action_type
11
+ # One of create, or update.
12
+ #
13
+ # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::ActionType]
14
+ required :action_type, enum: -> { ModernTreasury::Models::BulkRequestCreateParams::ActionType }
15
+
16
+ # @!attribute resource_type
17
+ # One of payment_order, expected_payment, or ledger_transaction.
18
+ #
19
+ # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::ResourceType]
20
+ required :resource_type, enum: -> { ModernTreasury::Models::BulkRequestCreateParams::ResourceType }
21
+
22
+ # @!attribute resources
23
+ # An array of objects where each object contains the input params for a single
24
+ # `action_type` request on a `resource_type` resource
25
+ #
26
+ # @return [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest, ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest, ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionCreateRequest, ModernTreasury::Models::BulkRequestCreateParams::Resource::TransactionCreateRequest, ModernTreasury::Models::BulkRequestCreateParams::Resource::ID, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID, ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentUpdateRequestWithID, ModernTreasury::Models::BulkRequestCreateParams::Resource::TransactionUpdateRequestWithID, ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionUpdateRequestWithID>]
27
+ required :resources,
28
+ -> { ModernTreasury::ArrayOf[union: ModernTreasury::Models::BulkRequestCreateParams::Resource] }
29
+
30
+ # @!attribute [r] metadata
31
+ # Additional data represented as key-value pairs. Both the key and value must be
32
+ # strings.
33
+ #
34
+ # @return [Hash{Symbol=>String}, nil]
35
+ optional :metadata, ModernTreasury::HashOf[String]
36
+
37
+ # @!parse
38
+ # # @return [Hash{Symbol=>String}]
39
+ # attr_writer :metadata
40
+
41
+ # @!parse
42
+ # # @param action_type [Symbol, ModernTreasury::Models::BulkRequestCreateParams::ActionType]
43
+ # # @param resource_type [Symbol, ModernTreasury::Models::BulkRequestCreateParams::ResourceType]
44
+ # # @param resources [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest, ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest, ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionCreateRequest, ModernTreasury::Models::BulkRequestCreateParams::Resource::TransactionCreateRequest, ModernTreasury::Models::BulkRequestCreateParams::Resource::ID, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID, ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentUpdateRequestWithID, ModernTreasury::Models::BulkRequestCreateParams::Resource::TransactionUpdateRequestWithID, ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionUpdateRequestWithID>]
45
+ # # @param metadata [Hash{Symbol=>String}]
46
+ # # @param request_options [ModernTreasury::RequestOptions, Hash{Symbol=>Object}]
47
+ # #
48
+ # def initialize(action_type:, resource_type:, resources:, metadata: nil, request_options: {}, **) = super
49
+
50
+ # def initialize: (Hash | ModernTreasury::BaseModel) -> void
51
+
52
+ # One of create, or update.
53
+ module ActionType
54
+ extend ModernTreasury::Enum
55
+
56
+ CREATE = :create
57
+ UPDATE = :update
58
+ DELETE = :delete
59
+
60
+ finalize!
61
+
62
+ # @!parse
63
+ # # @return [Array<Symbol>]
64
+ # def self.values; end
65
+ end
66
+
67
+ # One of payment_order, expected_payment, or ledger_transaction.
68
+ module ResourceType
69
+ extend ModernTreasury::Enum
70
+
71
+ PAYMENT_ORDER = :payment_order
72
+ LEDGER_TRANSACTION = :ledger_transaction
73
+ TRANSACTION = :transaction
74
+ EXPECTED_PAYMENT = :expected_payment
75
+
76
+ finalize!
77
+
78
+ # @!parse
79
+ # # @return [Array<Symbol>]
80
+ # def self.values; end
81
+ end
82
+
83
+ module Resource
84
+ extend ModernTreasury::Union
85
+
86
+ variant -> { ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest }
87
+
88
+ variant -> { ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest }
89
+
90
+ variant -> { ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionCreateRequest }
91
+
92
+ variant -> { ModernTreasury::Models::BulkRequestCreateParams::Resource::TransactionCreateRequest }
93
+
94
+ variant -> { ModernTreasury::Models::BulkRequestCreateParams::Resource::ID }
95
+
96
+ variant -> { ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID }
97
+
98
+ variant -> { ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentUpdateRequestWithID }
99
+
100
+ variant -> { ModernTreasury::Models::BulkRequestCreateParams::Resource::TransactionUpdateRequestWithID }
101
+
102
+ variant -> { ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionUpdateRequestWithID }
103
+
104
+ class PaymentOrderAsyncCreateRequest < ModernTreasury::BaseModel
105
+ # @!attribute amount
106
+ # Value in specified currency's smallest unit. e.g. $10 would be represented as
107
+ # 1000 (cents). For RTP, the maximum amount allowed by the network is $100,000.
108
+ #
109
+ # @return [Integer]
110
+ required :amount, Integer
111
+
112
+ # @!attribute direction
113
+ # One of `credit`, `debit`. Describes the direction money is flowing in the
114
+ # transaction. A `credit` moves money from your account to someone else's. A
115
+ # `debit` pulls money from someone else's account to your own. Note that wire,
116
+ # rtp, and check payments will always be `credit`.
117
+ #
118
+ # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::Direction]
119
+ required :direction,
120
+ enum: -> { ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::Direction }
121
+
122
+ # @!attribute originating_account_id
123
+ # The ID of one of your organization's internal accounts.
124
+ #
125
+ # @return [String]
126
+ required :originating_account_id, String
127
+
128
+ # @!attribute type
129
+ # One of `ach`, `se_bankgirot`, `eft`, `wire`, `check`, `sen`, `book`, `rtp`,
130
+ # `sepa`, `bacs`, `au_becs`, `interac`, `neft`, `nics`,
131
+ # `nz_national_clearing_code`, `sic`, `signet`, `provexchange`, `zengin`.
132
+ #
133
+ # @return [Symbol, ModernTreasury::Models::PaymentOrderType]
134
+ required :type, enum: -> { ModernTreasury::Models::PaymentOrderType }
135
+
136
+ # @!attribute [r] accounting
137
+ #
138
+ # @return [ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::Accounting, nil]
139
+ optional :accounting,
140
+ -> { ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::Accounting }
141
+
142
+ # @!parse
143
+ # # @return [ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::Accounting]
144
+ # attr_writer :accounting
145
+
146
+ # @!attribute accounting_category_id
147
+ # The ID of one of your accounting categories. Note that these will only be
148
+ # accessible if your accounting system has been connected.
149
+ #
150
+ # @return [String, nil]
151
+ optional :accounting_category_id, String, nil?: true
152
+
153
+ # @!attribute accounting_ledger_class_id
154
+ # The ID of one of your accounting ledger classes. Note that these will only be
155
+ # accessible if your accounting system has been connected.
156
+ #
157
+ # @return [String, nil]
158
+ optional :accounting_ledger_class_id, String, nil?: true
159
+
160
+ # @!attribute charge_bearer
161
+ # The party that will pay the fees for the payment order. Only applies to wire
162
+ # payment orders. Can be one of shared, sender, or receiver, which correspond
163
+ # respectively with the SWIFT 71A values `SHA`, `OUR`, `BEN`.
164
+ #
165
+ # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ChargeBearer, nil]
166
+ optional :charge_bearer,
167
+ enum: -> { ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ChargeBearer },
168
+ nil?: true
169
+
170
+ # @!attribute [r] currency
171
+ # Defaults to the currency of the originating account.
172
+ #
173
+ # @return [Symbol, ModernTreasury::Models::Currency, nil]
174
+ optional :currency, enum: -> { ModernTreasury::Models::Currency }
175
+
176
+ # @!parse
177
+ # # @return [Symbol, ModernTreasury::Models::Currency]
178
+ # attr_writer :currency
179
+
180
+ # @!attribute description
181
+ # An optional description for internal use.
182
+ #
183
+ # @return [String, nil]
184
+ optional :description, String, nil?: true
185
+
186
+ # @!attribute [r] effective_date
187
+ # Date transactions are to be posted to the participants' account. Defaults to the
188
+ # current business day or the next business day if the current day is a bank
189
+ # holiday or weekend. Format: yyyy-mm-dd.
190
+ #
191
+ # @return [Date, nil]
192
+ optional :effective_date, Date
193
+
194
+ # @!parse
195
+ # # @return [Date]
196
+ # attr_writer :effective_date
197
+
198
+ # @!attribute expires_at
199
+ # RFP payments require an expires_at. This value must be past the effective_date.
200
+ #
201
+ # @return [Time, nil]
202
+ optional :expires_at, Time, nil?: true
203
+
204
+ # @!attribute [r] fallback_type
205
+ # A payment type to fallback to if the original type is not valid for the
206
+ # receiving account. Currently, this only supports falling back from RTP to ACH
207
+ # (type=rtp and fallback_type=ach)
208
+ #
209
+ # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::FallbackType, nil]
210
+ optional :fallback_type,
211
+ enum: -> { ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::FallbackType }
212
+
213
+ # @!parse
214
+ # # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::FallbackType]
215
+ # attr_writer :fallback_type
216
+
217
+ # @!attribute foreign_exchange_contract
218
+ # If present, indicates a specific foreign exchange contract number that has been
219
+ # generated by your financial institution.
220
+ #
221
+ # @return [String, nil]
222
+ optional :foreign_exchange_contract, String, nil?: true
223
+
224
+ # @!attribute foreign_exchange_indicator
225
+ # Indicates the type of FX transfer to initiate, can be either
226
+ # `variable_to_fixed`, `fixed_to_variable`, or `null` if the payment order
227
+ # currency matches the originating account currency.
228
+ #
229
+ # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ForeignExchangeIndicator, nil]
230
+ optional :foreign_exchange_indicator,
231
+ enum: -> { ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ForeignExchangeIndicator },
232
+ nil?: true
233
+
234
+ # @!attribute [r] ledger_transaction
235
+ # Specifies a ledger transaction object that will be created with the payment
236
+ # order. If the ledger transaction cannot be created, then the payment order
237
+ # creation will fail. The resulting ledger transaction will mirror the status of
238
+ # the payment order.
239
+ #
240
+ # @return [ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::LedgerTransaction, nil]
241
+ optional :ledger_transaction,
242
+ -> { ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::LedgerTransaction }
243
+
244
+ # @!parse
245
+ # # @return [ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::LedgerTransaction]
246
+ # attr_writer :ledger_transaction
247
+
248
+ # @!attribute [r] ledger_transaction_id
249
+ # Either ledger_transaction or ledger_transaction_id can be provided. Only a
250
+ # pending ledger transaction can be attached upon payment order creation. Once the
251
+ # payment order is created, the status of the ledger transaction tracks the
252
+ # payment order automatically.
253
+ #
254
+ # @return [String, nil]
255
+ optional :ledger_transaction_id, String
256
+
257
+ # @!parse
258
+ # # @return [String]
259
+ # attr_writer :ledger_transaction_id
260
+
261
+ # @!attribute [r] line_items
262
+ # An array of line items that must sum up to the amount of the payment order.
263
+ #
264
+ # @return [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::LineItem>, nil]
265
+ optional :line_items,
266
+ -> { ModernTreasury::ArrayOf[ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::LineItem] }
267
+
268
+ # @!parse
269
+ # # @return [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::LineItem>]
270
+ # attr_writer :line_items
271
+
272
+ # @!attribute [r] metadata
273
+ # Additional data represented as key-value pairs. Both the key and value must be
274
+ # strings.
275
+ #
276
+ # @return [Hash{Symbol=>String}, nil]
277
+ optional :metadata, ModernTreasury::HashOf[String]
278
+
279
+ # @!parse
280
+ # # @return [Hash{Symbol=>String}]
281
+ # attr_writer :metadata
282
+
283
+ # @!attribute [r] nsf_protected
284
+ # A boolean to determine if NSF Protection is enabled for this payment order. Note
285
+ # that this setting must also be turned on in your organization settings page.
286
+ #
287
+ # @return [Boolean, nil]
288
+ optional :nsf_protected, ModernTreasury::BooleanModel
289
+
290
+ # @!parse
291
+ # # @return [Boolean]
292
+ # attr_writer :nsf_protected
293
+
294
+ # @!attribute originating_party_name
295
+ # If present, this will replace your default company name on receiver's bank
296
+ # statement. This field can only be used for ACH payments currently. For ACH, only
297
+ # the first 16 characters of this string will be used. Any additional characters
298
+ # will be truncated.
299
+ #
300
+ # @return [String, nil]
301
+ optional :originating_party_name, String, nil?: true
302
+
303
+ # @!attribute [r] priority
304
+ # Either `normal` or `high`. For ACH and EFT payments, `high` represents a
305
+ # same-day ACH or EFT transfer, respectively. For check payments, `high` can mean
306
+ # an overnight check rather than standard mail.
307
+ #
308
+ # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::Priority, nil]
309
+ optional :priority,
310
+ enum: -> { ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::Priority }
311
+
312
+ # @!parse
313
+ # # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::Priority]
314
+ # attr_writer :priority
315
+
316
+ # @!attribute process_after
317
+ # If present, Modern Treasury will not process the payment until after this time.
318
+ # If `process_after` is past the cutoff for `effective_date`, `process_after` will
319
+ # take precedence and `effective_date` will automatically update to reflect the
320
+ # earliest possible sending date after `process_after`. Format is ISO8601
321
+ # timestamp.
322
+ #
323
+ # @return [Time, nil]
324
+ optional :process_after, Time, nil?: true
325
+
326
+ # @!attribute purpose
327
+ # For `wire`, this is usually the purpose which is transmitted via the
328
+ # "InstrForDbtrAgt" field in the ISO20022 file. For `eft`, this field is the 3
329
+ # digit CPA Code that will be attached to the payment.
330
+ #
331
+ # @return [String, nil]
332
+ optional :purpose, String, nil?: true
333
+
334
+ # @!attribute [r] receiving_account
335
+ # Either `receiving_account` or `receiving_account_id` must be present. When using
336
+ # `receiving_account_id`, you may pass the id of an external account or an
337
+ # internal account.
338
+ #
339
+ # @return [ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount, nil]
340
+ optional :receiving_account,
341
+ -> { ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount }
342
+
343
+ # @!parse
344
+ # # @return [ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount]
345
+ # attr_writer :receiving_account
346
+
347
+ # @!attribute [r] receiving_account_id
348
+ # Either `receiving_account` or `receiving_account_id` must be present. When using
349
+ # `receiving_account_id`, you may pass the id of an external account or an
350
+ # internal account.
351
+ #
352
+ # @return [String, nil]
353
+ optional :receiving_account_id, String
354
+
355
+ # @!parse
356
+ # # @return [String]
357
+ # attr_writer :receiving_account_id
358
+
359
+ # @!attribute remittance_information
360
+ # For `ach`, this field will be passed through on an addenda record. For `wire`
361
+ # payments the field will be passed through as the "Originator to Beneficiary
362
+ # Information", also known as OBI or Fedwire tag 6000.
363
+ #
364
+ # @return [String, nil]
365
+ optional :remittance_information, String, nil?: true
366
+
367
+ # @!attribute send_remittance_advice
368
+ # Send an email to the counterparty when the payment order is sent to the bank. If
369
+ # `null`, `send_remittance_advice` on the Counterparty is used.
370
+ #
371
+ # @return [Boolean, nil]
372
+ optional :send_remittance_advice, ModernTreasury::BooleanModel, nil?: true
373
+
374
+ # @!attribute statement_descriptor
375
+ # An optional descriptor which will appear in the receiver's statement. For
376
+ # `check` payments this field will be used as the memo line. For `ach` the maximum
377
+ # length is 10 characters. Note that for ACH payments, the name on your bank
378
+ # account will be included automatically by the bank, so you can use the
379
+ # characters for other useful information. For `eft` the maximum length is 15
380
+ # characters.
381
+ #
382
+ # @return [String, nil]
383
+ optional :statement_descriptor, String, nil?: true
384
+
385
+ # @!attribute subtype
386
+ # An additional layer of classification for the type of payment order you are
387
+ # doing. This field is only used for `ach` payment orders currently. For `ach`
388
+ # payment orders, the `subtype` represents the SEC code. We currently support
389
+ # `CCD`, `PPD`, `IAT`, `CTX`, `WEB`, `CIE`, and `TEL`.
390
+ #
391
+ # @return [Symbol, ModernTreasury::Models::PaymentOrderSubtype, nil]
392
+ optional :subtype, enum: -> { ModernTreasury::Models::PaymentOrderSubtype }, nil?: true
393
+
394
+ # @!attribute [r] transaction_monitoring_enabled
395
+ # A flag that determines whether a payment order should go through transaction
396
+ # monitoring.
397
+ #
398
+ # @return [Boolean, nil]
399
+ optional :transaction_monitoring_enabled, ModernTreasury::BooleanModel
400
+
401
+ # @!parse
402
+ # # @return [Boolean]
403
+ # attr_writer :transaction_monitoring_enabled
404
+
405
+ # @!attribute ultimate_originating_party_identifier
406
+ # Identifier of the ultimate originator of the payment order.
407
+ #
408
+ # @return [String, nil]
409
+ optional :ultimate_originating_party_identifier, String, nil?: true
410
+
411
+ # @!attribute ultimate_originating_party_name
412
+ # Name of the ultimate originator of the payment order.
413
+ #
414
+ # @return [String, nil]
415
+ optional :ultimate_originating_party_name, String, nil?: true
416
+
417
+ # @!attribute ultimate_receiving_party_identifier
418
+ # Identifier of the ultimate funds recipient.
419
+ #
420
+ # @return [String, nil]
421
+ optional :ultimate_receiving_party_identifier, String, nil?: true
422
+
423
+ # @!attribute ultimate_receiving_party_name
424
+ # Name of the ultimate funds recipient.
425
+ #
426
+ # @return [String, nil]
427
+ optional :ultimate_receiving_party_name, String, nil?: true
428
+
429
+ # @!parse
430
+ # # @param amount [Integer]
431
+ # # @param direction [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::Direction]
432
+ # # @param originating_account_id [String]
433
+ # # @param type [Symbol, ModernTreasury::Models::PaymentOrderType]
434
+ # # @param accounting [ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::Accounting]
435
+ # # @param accounting_category_id [String, nil]
436
+ # # @param accounting_ledger_class_id [String, nil]
437
+ # # @param charge_bearer [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ChargeBearer, nil]
438
+ # # @param currency [Symbol, ModernTreasury::Models::Currency]
439
+ # # @param description [String, nil]
440
+ # # @param effective_date [Date]
441
+ # # @param expires_at [Time, nil]
442
+ # # @param fallback_type [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::FallbackType]
443
+ # # @param foreign_exchange_contract [String, nil]
444
+ # # @param foreign_exchange_indicator [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ForeignExchangeIndicator, nil]
445
+ # # @param ledger_transaction [ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::LedgerTransaction]
446
+ # # @param ledger_transaction_id [String]
447
+ # # @param line_items [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::LineItem>]
448
+ # # @param metadata [Hash{Symbol=>String}]
449
+ # # @param nsf_protected [Boolean]
450
+ # # @param originating_party_name [String, nil]
451
+ # # @param priority [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::Priority]
452
+ # # @param process_after [Time, nil]
453
+ # # @param purpose [String, nil]
454
+ # # @param receiving_account [ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount]
455
+ # # @param receiving_account_id [String]
456
+ # # @param remittance_information [String, nil]
457
+ # # @param send_remittance_advice [Boolean, nil]
458
+ # # @param statement_descriptor [String, nil]
459
+ # # @param subtype [Symbol, ModernTreasury::Models::PaymentOrderSubtype, nil]
460
+ # # @param transaction_monitoring_enabled [Boolean]
461
+ # # @param ultimate_originating_party_identifier [String, nil]
462
+ # # @param ultimate_originating_party_name [String, nil]
463
+ # # @param ultimate_receiving_party_identifier [String, nil]
464
+ # # @param ultimate_receiving_party_name [String, nil]
465
+ # #
466
+ # def initialize(
467
+ # amount:,
468
+ # direction:,
469
+ # originating_account_id:,
470
+ # type:,
471
+ # accounting: nil,
472
+ # accounting_category_id: nil,
473
+ # accounting_ledger_class_id: nil,
474
+ # charge_bearer: nil,
475
+ # currency: nil,
476
+ # description: nil,
477
+ # effective_date: nil,
478
+ # expires_at: nil,
479
+ # fallback_type: nil,
480
+ # foreign_exchange_contract: nil,
481
+ # foreign_exchange_indicator: nil,
482
+ # ledger_transaction: nil,
483
+ # ledger_transaction_id: nil,
484
+ # line_items: nil,
485
+ # metadata: nil,
486
+ # nsf_protected: nil,
487
+ # originating_party_name: nil,
488
+ # priority: nil,
489
+ # process_after: nil,
490
+ # purpose: nil,
491
+ # receiving_account: nil,
492
+ # receiving_account_id: nil,
493
+ # remittance_information: nil,
494
+ # send_remittance_advice: nil,
495
+ # statement_descriptor: nil,
496
+ # subtype: nil,
497
+ # transaction_monitoring_enabled: nil,
498
+ # ultimate_originating_party_identifier: nil,
499
+ # ultimate_originating_party_name: nil,
500
+ # ultimate_receiving_party_identifier: nil,
501
+ # ultimate_receiving_party_name: nil,
502
+ # **
503
+ # )
504
+ # super
505
+ # end
506
+
507
+ # def initialize: (Hash | ModernTreasury::BaseModel) -> void
508
+
509
+ # One of `credit`, `debit`. Describes the direction money is flowing in the
510
+ # transaction. A `credit` moves money from your account to someone else's. A
511
+ # `debit` pulls money from someone else's account to your own. Note that wire,
512
+ # rtp, and check payments will always be `credit`.
513
+ module Direction
514
+ extend ModernTreasury::Enum
515
+
516
+ CREDIT = :credit
517
+ DEBIT = :debit
518
+
519
+ finalize!
520
+
521
+ # @!parse
522
+ # # @return [Array<Symbol>]
523
+ # def self.values; end
524
+ end
525
+
526
+ class Accounting < ModernTreasury::BaseModel
527
+ # @!attribute account_id
528
+ # The ID of one of your accounting categories. Note that these will only be
529
+ # accessible if your accounting system has been connected.
530
+ #
531
+ # @return [String, nil]
532
+ optional :account_id, String, nil?: true
533
+
534
+ # @!attribute class_id
535
+ # The ID of one of the class objects in your accounting system. Class objects
536
+ # track segments of your business independent of client or project. Note that
537
+ # these will only be accessible if your accounting system has been connected.
538
+ #
539
+ # @return [String, nil]
540
+ optional :class_id, String, nil?: true
541
+
542
+ # @!parse
543
+ # # @param account_id [String, nil]
544
+ # # @param class_id [String, nil]
545
+ # #
546
+ # def initialize(account_id: nil, class_id: nil, **) = super
547
+
548
+ # def initialize: (Hash | ModernTreasury::BaseModel) -> void
549
+ end
550
+
551
+ # The party that will pay the fees for the payment order. Only applies to wire
552
+ # payment orders. Can be one of shared, sender, or receiver, which correspond
553
+ # respectively with the SWIFT 71A values `SHA`, `OUR`, `BEN`.
554
+ module ChargeBearer
555
+ extend ModernTreasury::Enum
556
+
557
+ SHARED = :shared
558
+ SENDER = :sender
559
+ RECEIVER = :receiver
560
+
561
+ finalize!
562
+
563
+ # @!parse
564
+ # # @return [Array<Symbol>]
565
+ # def self.values; end
566
+ end
567
+
568
+ # A payment type to fallback to if the original type is not valid for the
569
+ # receiving account. Currently, this only supports falling back from RTP to ACH
570
+ # (type=rtp and fallback_type=ach)
571
+ module FallbackType
572
+ extend ModernTreasury::Enum
573
+
574
+ ACH = :ach
575
+
576
+ finalize!
577
+
578
+ # @!parse
579
+ # # @return [Array<Symbol>]
580
+ # def self.values; end
581
+ end
582
+
583
+ # Indicates the type of FX transfer to initiate, can be either
584
+ # `variable_to_fixed`, `fixed_to_variable`, or `null` if the payment order
585
+ # currency matches the originating account currency.
586
+ module ForeignExchangeIndicator
587
+ extend ModernTreasury::Enum
588
+
589
+ FIXED_TO_VARIABLE = :fixed_to_variable
590
+ VARIABLE_TO_FIXED = :variable_to_fixed
591
+
592
+ finalize!
593
+
594
+ # @!parse
595
+ # # @return [Array<Symbol>]
596
+ # def self.values; end
597
+ end
598
+
599
+ class LedgerTransaction < ModernTreasury::BaseModel
600
+ # @!attribute ledger_entries
601
+ # An array of ledger entry objects.
602
+ #
603
+ # @return [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::LedgerTransaction::LedgerEntry>]
604
+ required :ledger_entries,
605
+ -> do
606
+ ModernTreasury::ArrayOf[
607
+ ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::LedgerTransaction::LedgerEntry
608
+ ]
609
+ end
610
+
611
+ # @!attribute description
612
+ # An optional description for internal use.
613
+ #
614
+ # @return [String, nil]
615
+ optional :description, String, nil?: true
616
+
617
+ # @!attribute [r] effective_at
618
+ # The timestamp (ISO8601 format) at which the ledger transaction happened for
619
+ # reporting purposes.
620
+ #
621
+ # @return [Time, nil]
622
+ optional :effective_at, Time
623
+
624
+ # @!parse
625
+ # # @return [Time]
626
+ # attr_writer :effective_at
627
+
628
+ # @!attribute [r] effective_date
629
+ # The date (YYYY-MM-DD) on which the ledger transaction happened for reporting
630
+ # purposes.
631
+ #
632
+ # @return [Date, nil]
633
+ optional :effective_date, Date
634
+
635
+ # @!parse
636
+ # # @return [Date]
637
+ # attr_writer :effective_date
638
+
639
+ # @!attribute [r] external_id
640
+ # A unique string to represent the ledger transaction. Only one pending or posted
641
+ # ledger transaction may have this ID in the ledger.
642
+ #
643
+ # @return [String, nil]
644
+ optional :external_id, String
645
+
646
+ # @!parse
647
+ # # @return [String]
648
+ # attr_writer :external_id
649
+
650
+ # @!attribute [r] ledgerable_id
651
+ # If the ledger transaction can be reconciled to another object in Modern
652
+ # Treasury, the id will be populated here, otherwise null.
653
+ #
654
+ # @return [String, nil]
655
+ optional :ledgerable_id, String
656
+
657
+ # @!parse
658
+ # # @return [String]
659
+ # attr_writer :ledgerable_id
660
+
661
+ # @!attribute [r] ledgerable_type
662
+ # If the ledger transaction can be reconciled to another object in Modern
663
+ # Treasury, the type will be populated here, otherwise null. This can be one of
664
+ # payment_order, incoming_payment_detail, expected_payment, return, paper_item, or
665
+ # reversal.
666
+ #
667
+ # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::LedgerTransaction::LedgerableType, nil]
668
+ optional :ledgerable_type,
669
+ enum: -> { ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::LedgerTransaction::LedgerableType }
670
+
671
+ # @!parse
672
+ # # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::LedgerTransaction::LedgerableType]
673
+ # attr_writer :ledgerable_type
674
+
675
+ # @!attribute [r] metadata
676
+ # Additional data represented as key-value pairs. Both the key and value must be
677
+ # strings.
678
+ #
679
+ # @return [Hash{Symbol=>String}, nil]
680
+ optional :metadata, ModernTreasury::HashOf[String]
681
+
682
+ # @!parse
683
+ # # @return [Hash{Symbol=>String}]
684
+ # attr_writer :metadata
685
+
686
+ # @!attribute [r] status
687
+ # To post a ledger transaction at creation, use `posted`.
688
+ #
689
+ # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::LedgerTransaction::Status, nil]
690
+ optional :status,
691
+ enum: -> { ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::LedgerTransaction::Status }
692
+
693
+ # @!parse
694
+ # # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::LedgerTransaction::Status]
695
+ # attr_writer :status
696
+
697
+ # @!parse
698
+ # # Specifies a ledger transaction object that will be created with the payment
699
+ # # order. If the ledger transaction cannot be created, then the payment order
700
+ # # creation will fail. The resulting ledger transaction will mirror the status of
701
+ # # the payment order.
702
+ # #
703
+ # # @param ledger_entries [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::LedgerTransaction::LedgerEntry>]
704
+ # # @param description [String, nil]
705
+ # # @param effective_at [Time]
706
+ # # @param effective_date [Date]
707
+ # # @param external_id [String]
708
+ # # @param ledgerable_id [String]
709
+ # # @param ledgerable_type [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::LedgerTransaction::LedgerableType]
710
+ # # @param metadata [Hash{Symbol=>String}]
711
+ # # @param status [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::LedgerTransaction::Status]
712
+ # #
713
+ # def initialize(
714
+ # ledger_entries:,
715
+ # description: nil,
716
+ # effective_at: nil,
717
+ # effective_date: nil,
718
+ # external_id: nil,
719
+ # ledgerable_id: nil,
720
+ # ledgerable_type: nil,
721
+ # metadata: nil,
722
+ # status: nil,
723
+ # **
724
+ # )
725
+ # super
726
+ # end
727
+
728
+ # def initialize: (Hash | ModernTreasury::BaseModel) -> void
729
+
730
+ class LedgerEntry < ModernTreasury::BaseModel
731
+ # @!attribute amount
732
+ # Value in specified currency's smallest unit. e.g. $10 would be represented
733
+ # as 1000. Can be any integer up to 36 digits.
734
+ #
735
+ # @return [Integer]
736
+ required :amount, Integer
737
+
738
+ # @!attribute direction
739
+ # One of `credit`, `debit`. Describes the direction money is flowing in the
740
+ # transaction. A `credit` moves money from your account to someone else's. A
741
+ # `debit` pulls money from someone else's account to your own. Note that wire,
742
+ # rtp, and check payments will always be `credit`.
743
+ #
744
+ # @return [Symbol, ModernTreasury::Models::TransactionDirection]
745
+ required :direction, enum: -> { ModernTreasury::Models::TransactionDirection }
746
+
747
+ # @!attribute ledger_account_id
748
+ # The ledger account that this ledger entry is associated with.
749
+ #
750
+ # @return [String]
751
+ required :ledger_account_id, String
752
+
753
+ # @!attribute available_balance_amount
754
+ # Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
755
+ # account’s available balance. If any of these conditions would be false after the
756
+ # transaction is created, the entire call will fail with error code 422.
757
+ #
758
+ # @return [Hash{Symbol=>Integer}, nil]
759
+ optional :available_balance_amount, ModernTreasury::HashOf[Integer], nil?: true
760
+
761
+ # @!attribute lock_version
762
+ # Lock version of the ledger account. This can be passed when creating a ledger
763
+ # transaction to only succeed if no ledger transactions have posted since the
764
+ # given version. See our post about Designing the Ledgers API with Optimistic
765
+ # Locking for more details.
766
+ #
767
+ # @return [Integer, nil]
768
+ optional :lock_version, Integer, nil?: true
769
+
770
+ # @!attribute [r] metadata
771
+ # Additional data represented as key-value pairs. Both the key and value must be
772
+ # strings.
773
+ #
774
+ # @return [Hash{Symbol=>String}, nil]
775
+ optional :metadata, ModernTreasury::HashOf[String]
776
+
777
+ # @!parse
778
+ # # @return [Hash{Symbol=>String}]
779
+ # attr_writer :metadata
780
+
781
+ # @!attribute pending_balance_amount
782
+ # Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
783
+ # account’s pending balance. If any of these conditions would be false after the
784
+ # transaction is created, the entire call will fail with error code 422.
785
+ #
786
+ # @return [Hash{Symbol=>Integer}, nil]
787
+ optional :pending_balance_amount, ModernTreasury::HashOf[Integer], nil?: true
788
+
789
+ # @!attribute posted_balance_amount
790
+ # Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
791
+ # account’s posted balance. If any of these conditions would be false after the
792
+ # transaction is created, the entire call will fail with error code 422.
793
+ #
794
+ # @return [Hash{Symbol=>Integer}, nil]
795
+ optional :posted_balance_amount, ModernTreasury::HashOf[Integer], nil?: true
796
+
797
+ # @!attribute show_resulting_ledger_account_balances
798
+ # If true, response will include the balance of the associated ledger account for
799
+ # the entry.
800
+ #
801
+ # @return [Boolean, nil]
802
+ optional :show_resulting_ledger_account_balances, ModernTreasury::BooleanModel, nil?: true
803
+
804
+ # @!parse
805
+ # # @param amount [Integer]
806
+ # # @param direction [Symbol, ModernTreasury::Models::TransactionDirection]
807
+ # # @param ledger_account_id [String]
808
+ # # @param available_balance_amount [Hash{Symbol=>Integer}, nil]
809
+ # # @param lock_version [Integer, nil]
810
+ # # @param metadata [Hash{Symbol=>String}]
811
+ # # @param pending_balance_amount [Hash{Symbol=>Integer}, nil]
812
+ # # @param posted_balance_amount [Hash{Symbol=>Integer}, nil]
813
+ # # @param show_resulting_ledger_account_balances [Boolean, nil]
814
+ # #
815
+ # def initialize(
816
+ # amount:,
817
+ # direction:,
818
+ # ledger_account_id:,
819
+ # available_balance_amount: nil,
820
+ # lock_version: nil,
821
+ # metadata: nil,
822
+ # pending_balance_amount: nil,
823
+ # posted_balance_amount: nil,
824
+ # show_resulting_ledger_account_balances: nil,
825
+ # **
826
+ # )
827
+ # super
828
+ # end
829
+
830
+ # def initialize: (Hash | ModernTreasury::BaseModel) -> void
831
+ end
832
+
833
+ # If the ledger transaction can be reconciled to another object in Modern
834
+ # Treasury, the type will be populated here, otherwise null. This can be one of
835
+ # payment_order, incoming_payment_detail, expected_payment, return, paper_item, or
836
+ # reversal.
837
+ module LedgerableType
838
+ extend ModernTreasury::Enum
839
+
840
+ EXPECTED_PAYMENT = :expected_payment
841
+ INCOMING_PAYMENT_DETAIL = :incoming_payment_detail
842
+ PAPER_ITEM = :paper_item
843
+ PAYMENT_ORDER = :payment_order
844
+ RETURN = :return
845
+ REVERSAL = :reversal
846
+
847
+ finalize!
848
+
849
+ # @!parse
850
+ # # @return [Array<Symbol>]
851
+ # def self.values; end
852
+ end
853
+
854
+ # To post a ledger transaction at creation, use `posted`.
855
+ module Status
856
+ extend ModernTreasury::Enum
857
+
858
+ ARCHIVED = :archived
859
+ PENDING = :pending
860
+ POSTED = :posted
861
+
862
+ finalize!
863
+
864
+ # @!parse
865
+ # # @return [Array<Symbol>]
866
+ # def self.values; end
867
+ end
868
+ end
869
+
870
+ class LineItem < ModernTreasury::BaseModel
871
+ # @!attribute amount
872
+ # Value in specified currency's smallest unit. e.g. $10 would be represented
873
+ # as 1000.
874
+ #
875
+ # @return [Integer]
876
+ required :amount, Integer
877
+
878
+ # @!attribute accounting_category_id
879
+ # The ID of one of your accounting categories. Note that these will only be
880
+ # accessible if your accounting system has been connected.
881
+ #
882
+ # @return [String, nil]
883
+ optional :accounting_category_id, String, nil?: true
884
+
885
+ # @!attribute description
886
+ # A free-form description of the line item.
887
+ #
888
+ # @return [String, nil]
889
+ optional :description, String, nil?: true
890
+
891
+ # @!attribute [r] metadata
892
+ # Additional data represented as key-value pairs. Both the key and value must be
893
+ # strings.
894
+ #
895
+ # @return [Hash{Symbol=>String}, nil]
896
+ optional :metadata, ModernTreasury::HashOf[String]
897
+
898
+ # @!parse
899
+ # # @return [Hash{Symbol=>String}]
900
+ # attr_writer :metadata
901
+
902
+ # @!parse
903
+ # # @param amount [Integer]
904
+ # # @param accounting_category_id [String, nil]
905
+ # # @param description [String, nil]
906
+ # # @param metadata [Hash{Symbol=>String}]
907
+ # #
908
+ # def initialize(amount:, accounting_category_id: nil, description: nil, metadata: nil, **) = super
909
+
910
+ # def initialize: (Hash | ModernTreasury::BaseModel) -> void
911
+ end
912
+
913
+ # Either `normal` or `high`. For ACH and EFT payments, `high` represents a
914
+ # same-day ACH or EFT transfer, respectively. For check payments, `high` can mean
915
+ # an overnight check rather than standard mail.
916
+ module Priority
917
+ extend ModernTreasury::Enum
918
+
919
+ HIGH = :high
920
+ NORMAL = :normal
921
+
922
+ finalize!
923
+
924
+ # @!parse
925
+ # # @return [Array<Symbol>]
926
+ # def self.values; end
927
+ end
928
+
929
+ class ReceivingAccount < ModernTreasury::BaseModel
930
+ # @!attribute [r] account_details
931
+ #
932
+ # @return [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::AccountDetail>, nil]
933
+ optional :account_details,
934
+ -> do
935
+ ModernTreasury::ArrayOf[
936
+ ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::AccountDetail
937
+ ]
938
+ end
939
+
940
+ # @!parse
941
+ # # @return [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::AccountDetail>]
942
+ # attr_writer :account_details
943
+
944
+ # @!attribute [r] account_type
945
+ # Can be `checking`, `savings` or `other`.
946
+ #
947
+ # @return [Symbol, ModernTreasury::Models::ExternalAccountType, nil]
948
+ optional :account_type, enum: -> { ModernTreasury::Models::ExternalAccountType }
949
+
950
+ # @!parse
951
+ # # @return [Symbol, ModernTreasury::Models::ExternalAccountType]
952
+ # attr_writer :account_type
953
+
954
+ # @!attribute [r] contact_details
955
+ #
956
+ # @return [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::ContactDetail>, nil]
957
+ optional :contact_details,
958
+ -> do
959
+ ModernTreasury::ArrayOf[
960
+ ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::ContactDetail
961
+ ]
962
+ end
963
+
964
+ # @!parse
965
+ # # @return [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::ContactDetail>]
966
+ # attr_writer :contact_details
967
+
968
+ # @!attribute [r] ledger_account
969
+ # Specifies a ledger account object that will be created with the external
970
+ # account. The resulting ledger account is linked to the external account for
971
+ # auto-ledgering Payment objects. See
972
+ # https://docs.moderntreasury.com/docs/linking-to-other-modern-treasury-objects
973
+ # for more details.
974
+ #
975
+ # @return [ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::LedgerAccount, nil]
976
+ optional :ledger_account,
977
+ -> { ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::LedgerAccount }
978
+
979
+ # @!parse
980
+ # # @return [ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::LedgerAccount]
981
+ # attr_writer :ledger_account
982
+
983
+ # @!attribute [r] metadata
984
+ # Additional data represented as key-value pairs. Both the key and value must be
985
+ # strings.
986
+ #
987
+ # @return [Hash{Symbol=>String}, nil]
988
+ optional :metadata, ModernTreasury::HashOf[String]
989
+
990
+ # @!parse
991
+ # # @return [Hash{Symbol=>String}]
992
+ # attr_writer :metadata
993
+
994
+ # @!attribute name
995
+ # A nickname for the external account. This is only for internal usage and won't
996
+ # affect any payments
997
+ #
998
+ # @return [String, nil]
999
+ optional :name, String, nil?: true
1000
+
1001
+ # @!attribute [r] party_address
1002
+ # Required if receiving wire payments.
1003
+ #
1004
+ # @return [ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::PartyAddress, nil]
1005
+ optional :party_address,
1006
+ -> { ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::PartyAddress }
1007
+
1008
+ # @!parse
1009
+ # # @return [ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::PartyAddress]
1010
+ # attr_writer :party_address
1011
+
1012
+ # @!attribute [r] party_identifier
1013
+ #
1014
+ # @return [String, nil]
1015
+ optional :party_identifier, String
1016
+
1017
+ # @!parse
1018
+ # # @return [String]
1019
+ # attr_writer :party_identifier
1020
+
1021
+ # @!attribute [r] party_name
1022
+ # If this value isn't provided, it will be inherited from the counterparty's name.
1023
+ #
1024
+ # @return [String, nil]
1025
+ optional :party_name, String
1026
+
1027
+ # @!parse
1028
+ # # @return [String]
1029
+ # attr_writer :party_name
1030
+
1031
+ # @!attribute party_type
1032
+ # Either `individual` or `business`.
1033
+ #
1034
+ # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::PartyType, nil]
1035
+ optional :party_type,
1036
+ enum: -> { ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::PartyType },
1037
+ nil?: true
1038
+
1039
+ # @!attribute [r] plaid_processor_token
1040
+ # If you've enabled the Modern Treasury + Plaid integration in your Plaid account,
1041
+ # you can pass the processor token in this field.
1042
+ #
1043
+ # @return [String, nil]
1044
+ optional :plaid_processor_token, String
1045
+
1046
+ # @!parse
1047
+ # # @return [String]
1048
+ # attr_writer :plaid_processor_token
1049
+
1050
+ # @!attribute [r] routing_details
1051
+ #
1052
+ # @return [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::RoutingDetail>, nil]
1053
+ optional :routing_details,
1054
+ -> do
1055
+ ModernTreasury::ArrayOf[
1056
+ ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::RoutingDetail
1057
+ ]
1058
+ end
1059
+
1060
+ # @!parse
1061
+ # # @return [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::RoutingDetail>]
1062
+ # attr_writer :routing_details
1063
+
1064
+ # @!parse
1065
+ # # Either `receiving_account` or `receiving_account_id` must be present. When using
1066
+ # # `receiving_account_id`, you may pass the id of an external account or an
1067
+ # # internal account.
1068
+ # #
1069
+ # # @param account_details [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::AccountDetail>]
1070
+ # # @param account_type [Symbol, ModernTreasury::Models::ExternalAccountType]
1071
+ # # @param contact_details [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::ContactDetail>]
1072
+ # # @param ledger_account [ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::LedgerAccount]
1073
+ # # @param metadata [Hash{Symbol=>String}]
1074
+ # # @param name [String, nil]
1075
+ # # @param party_address [ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::PartyAddress]
1076
+ # # @param party_identifier [String]
1077
+ # # @param party_name [String]
1078
+ # # @param party_type [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::PartyType, nil]
1079
+ # # @param plaid_processor_token [String]
1080
+ # # @param routing_details [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::RoutingDetail>]
1081
+ # #
1082
+ # def initialize(
1083
+ # account_details: nil,
1084
+ # account_type: nil,
1085
+ # contact_details: nil,
1086
+ # ledger_account: nil,
1087
+ # metadata: nil,
1088
+ # name: nil,
1089
+ # party_address: nil,
1090
+ # party_identifier: nil,
1091
+ # party_name: nil,
1092
+ # party_type: nil,
1093
+ # plaid_processor_token: nil,
1094
+ # routing_details: nil,
1095
+ # **
1096
+ # )
1097
+ # super
1098
+ # end
1099
+
1100
+ # def initialize: (Hash | ModernTreasury::BaseModel) -> void
1101
+
1102
+ class AccountDetail < ModernTreasury::BaseModel
1103
+ # @!attribute account_number
1104
+ #
1105
+ # @return [String]
1106
+ required :account_number, String
1107
+
1108
+ # @!attribute [r] account_number_type
1109
+ #
1110
+ # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::AccountDetail::AccountNumberType, nil]
1111
+ optional :account_number_type,
1112
+ enum: -> { ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::AccountDetail::AccountNumberType }
1113
+
1114
+ # @!parse
1115
+ # # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::AccountDetail::AccountNumberType]
1116
+ # attr_writer :account_number_type
1117
+
1118
+ # @!parse
1119
+ # # @param account_number [String]
1120
+ # # @param account_number_type [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::AccountDetail::AccountNumberType]
1121
+ # #
1122
+ # def initialize(account_number:, account_number_type: nil, **) = super
1123
+
1124
+ # def initialize: (Hash | ModernTreasury::BaseModel) -> void
1125
+
1126
+ module AccountNumberType
1127
+ extend ModernTreasury::Enum
1128
+
1129
+ AU_NUMBER = :au_number
1130
+ CLABE = :clabe
1131
+ HK_NUMBER = :hk_number
1132
+ IBAN = :iban
1133
+ ID_NUMBER = :id_number
1134
+ NZ_NUMBER = :nz_number
1135
+ OTHER = :other
1136
+ PAN = :pan
1137
+ SG_NUMBER = :sg_number
1138
+ WALLET_ADDRESS = :wallet_address
1139
+
1140
+ finalize!
1141
+
1142
+ # @!parse
1143
+ # # @return [Array<Symbol>]
1144
+ # def self.values; end
1145
+ end
1146
+ end
1147
+
1148
+ class ContactDetail < ModernTreasury::BaseModel
1149
+ # @!attribute [r] contact_identifier
1150
+ #
1151
+ # @return [String, nil]
1152
+ optional :contact_identifier, String
1153
+
1154
+ # @!parse
1155
+ # # @return [String]
1156
+ # attr_writer :contact_identifier
1157
+
1158
+ # @!attribute [r] contact_identifier_type
1159
+ #
1160
+ # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::ContactDetail::ContactIdentifierType, nil]
1161
+ optional :contact_identifier_type,
1162
+ enum: -> { ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::ContactDetail::ContactIdentifierType }
1163
+
1164
+ # @!parse
1165
+ # # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::ContactDetail::ContactIdentifierType]
1166
+ # attr_writer :contact_identifier_type
1167
+
1168
+ # @!parse
1169
+ # # @param contact_identifier [String]
1170
+ # # @param contact_identifier_type [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::ContactDetail::ContactIdentifierType]
1171
+ # #
1172
+ # def initialize(contact_identifier: nil, contact_identifier_type: nil, **) = super
1173
+
1174
+ # def initialize: (Hash | ModernTreasury::BaseModel) -> void
1175
+
1176
+ module ContactIdentifierType
1177
+ extend ModernTreasury::Enum
1178
+
1179
+ EMAIL = :email
1180
+ PHONE_NUMBER = :phone_number
1181
+ WEBSITE = :website
1182
+
1183
+ finalize!
1184
+
1185
+ # @!parse
1186
+ # # @return [Array<Symbol>]
1187
+ # def self.values; end
1188
+ end
1189
+ end
1190
+
1191
+ class LedgerAccount < ModernTreasury::BaseModel
1192
+ # @!attribute currency
1193
+ # The currency of the ledger account.
1194
+ #
1195
+ # @return [String]
1196
+ required :currency, String
1197
+
1198
+ # @!attribute ledger_id
1199
+ # The id of the ledger that this account belongs to.
1200
+ #
1201
+ # @return [String]
1202
+ required :ledger_id, String
1203
+
1204
+ # @!attribute name
1205
+ # The name of the ledger account.
1206
+ #
1207
+ # @return [String]
1208
+ required :name, String
1209
+
1210
+ # @!attribute normal_balance
1211
+ # The normal balance of the ledger account.
1212
+ #
1213
+ # @return [Symbol, ModernTreasury::Models::TransactionDirection]
1214
+ required :normal_balance, enum: -> { ModernTreasury::Models::TransactionDirection }
1215
+
1216
+ # @!attribute currency_exponent
1217
+ # The currency exponent of the ledger account.
1218
+ #
1219
+ # @return [Integer, nil]
1220
+ optional :currency_exponent, Integer, nil?: true
1221
+
1222
+ # @!attribute description
1223
+ # The description of the ledger account.
1224
+ #
1225
+ # @return [String, nil]
1226
+ optional :description, String, nil?: true
1227
+
1228
+ # @!attribute [r] ledger_account_category_ids
1229
+ # The array of ledger account category ids that this ledger account should be a
1230
+ # child of.
1231
+ #
1232
+ # @return [Array<String>, nil]
1233
+ optional :ledger_account_category_ids, ModernTreasury::ArrayOf[String]
1234
+
1235
+ # @!parse
1236
+ # # @return [Array<String>]
1237
+ # attr_writer :ledger_account_category_ids
1238
+
1239
+ # @!attribute [r] ledgerable_id
1240
+ # If the ledger account links to another object in Modern Treasury, the id will be
1241
+ # populated here, otherwise null.
1242
+ #
1243
+ # @return [String, nil]
1244
+ optional :ledgerable_id, String
1245
+
1246
+ # @!parse
1247
+ # # @return [String]
1248
+ # attr_writer :ledgerable_id
1249
+
1250
+ # @!attribute [r] ledgerable_type
1251
+ # If the ledger account links to another object in Modern Treasury, the type will
1252
+ # be populated here, otherwise null. The value is one of internal_account or
1253
+ # external_account.
1254
+ #
1255
+ # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::LedgerAccount::LedgerableType, nil]
1256
+ optional :ledgerable_type,
1257
+ enum: -> { ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::LedgerAccount::LedgerableType }
1258
+
1259
+ # @!parse
1260
+ # # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::LedgerAccount::LedgerableType]
1261
+ # attr_writer :ledgerable_type
1262
+
1263
+ # @!attribute [r] metadata
1264
+ # Additional data represented as key-value pairs. Both the key and value must be
1265
+ # strings.
1266
+ #
1267
+ # @return [Hash{Symbol=>String}, nil]
1268
+ optional :metadata, ModernTreasury::HashOf[String]
1269
+
1270
+ # @!parse
1271
+ # # @return [Hash{Symbol=>String}]
1272
+ # attr_writer :metadata
1273
+
1274
+ # @!parse
1275
+ # # Specifies a ledger account object that will be created with the external
1276
+ # # account. The resulting ledger account is linked to the external account for
1277
+ # # auto-ledgering Payment objects. See
1278
+ # # https://docs.moderntreasury.com/docs/linking-to-other-modern-treasury-objects
1279
+ # # for more details.
1280
+ # #
1281
+ # # @param currency [String]
1282
+ # # @param ledger_id [String]
1283
+ # # @param name [String]
1284
+ # # @param normal_balance [Symbol, ModernTreasury::Models::TransactionDirection]
1285
+ # # @param currency_exponent [Integer, nil]
1286
+ # # @param description [String, nil]
1287
+ # # @param ledger_account_category_ids [Array<String>]
1288
+ # # @param ledgerable_id [String]
1289
+ # # @param ledgerable_type [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::LedgerAccount::LedgerableType]
1290
+ # # @param metadata [Hash{Symbol=>String}]
1291
+ # #
1292
+ # def initialize(
1293
+ # currency:,
1294
+ # ledger_id:,
1295
+ # name:,
1296
+ # normal_balance:,
1297
+ # currency_exponent: nil,
1298
+ # description: nil,
1299
+ # ledger_account_category_ids: nil,
1300
+ # ledgerable_id: nil,
1301
+ # ledgerable_type: nil,
1302
+ # metadata: nil,
1303
+ # **
1304
+ # )
1305
+ # super
1306
+ # end
1307
+
1308
+ # def initialize: (Hash | ModernTreasury::BaseModel) -> void
1309
+
1310
+ # If the ledger account links to another object in Modern Treasury, the type will
1311
+ # be populated here, otherwise null. The value is one of internal_account or
1312
+ # external_account.
1313
+ module LedgerableType
1314
+ extend ModernTreasury::Enum
1315
+
1316
+ COUNTERPARTY = :counterparty
1317
+ EXTERNAL_ACCOUNT = :external_account
1318
+ INTERNAL_ACCOUNT = :internal_account
1319
+ VIRTUAL_ACCOUNT = :virtual_account
1320
+
1321
+ finalize!
1322
+
1323
+ # @!parse
1324
+ # # @return [Array<Symbol>]
1325
+ # def self.values; end
1326
+ end
1327
+ end
1328
+
1329
+ class PartyAddress < ModernTreasury::BaseModel
1330
+ # @!attribute country
1331
+ # Country code conforms to [ISO 3166-1 alpha-2]
1332
+ #
1333
+ # @return [String, nil]
1334
+ optional :country, String, nil?: true
1335
+
1336
+ # @!attribute line1
1337
+ #
1338
+ # @return [String, nil]
1339
+ optional :line1, String, nil?: true
1340
+
1341
+ # @!attribute line2
1342
+ #
1343
+ # @return [String, nil]
1344
+ optional :line2, String, nil?: true
1345
+
1346
+ # @!attribute locality
1347
+ # Locality or City.
1348
+ #
1349
+ # @return [String, nil]
1350
+ optional :locality, String, nil?: true
1351
+
1352
+ # @!attribute postal_code
1353
+ # The postal code of the address.
1354
+ #
1355
+ # @return [String, nil]
1356
+ optional :postal_code, String, nil?: true
1357
+
1358
+ # @!attribute region
1359
+ # Region or State.
1360
+ #
1361
+ # @return [String, nil]
1362
+ optional :region, String, nil?: true
1363
+
1364
+ # @!parse
1365
+ # # Required if receiving wire payments.
1366
+ # #
1367
+ # # @param country [String, nil]
1368
+ # # @param line1 [String, nil]
1369
+ # # @param line2 [String, nil]
1370
+ # # @param locality [String, nil]
1371
+ # # @param postal_code [String, nil]
1372
+ # # @param region [String, nil]
1373
+ # #
1374
+ # def initialize(country: nil, line1: nil, line2: nil, locality: nil, postal_code: nil, region: nil, **) = super
1375
+
1376
+ # def initialize: (Hash | ModernTreasury::BaseModel) -> void
1377
+ end
1378
+
1379
+ # Either `individual` or `business`.
1380
+ module PartyType
1381
+ extend ModernTreasury::Enum
1382
+
1383
+ BUSINESS = :business
1384
+ INDIVIDUAL = :individual
1385
+
1386
+ finalize!
1387
+
1388
+ # @!parse
1389
+ # # @return [Array<Symbol>]
1390
+ # def self.values; end
1391
+ end
1392
+
1393
+ class RoutingDetail < ModernTreasury::BaseModel
1394
+ # @!attribute routing_number
1395
+ #
1396
+ # @return [String]
1397
+ required :routing_number, String
1398
+
1399
+ # @!attribute routing_number_type
1400
+ #
1401
+ # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::RoutingDetail::RoutingNumberType]
1402
+ required :routing_number_type,
1403
+ enum: -> { ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::RoutingDetail::RoutingNumberType }
1404
+
1405
+ # @!attribute [r] payment_type
1406
+ #
1407
+ # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::RoutingDetail::PaymentType, nil]
1408
+ optional :payment_type,
1409
+ enum: -> { ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::RoutingDetail::PaymentType }
1410
+
1411
+ # @!parse
1412
+ # # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::RoutingDetail::PaymentType]
1413
+ # attr_writer :payment_type
1414
+
1415
+ # @!parse
1416
+ # # @param routing_number [String]
1417
+ # # @param routing_number_type [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::RoutingDetail::RoutingNumberType]
1418
+ # # @param payment_type [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::RoutingDetail::PaymentType]
1419
+ # #
1420
+ # def initialize(routing_number:, routing_number_type:, payment_type: nil, **) = super
1421
+
1422
+ # def initialize: (Hash | ModernTreasury::BaseModel) -> void
1423
+
1424
+ module RoutingNumberType
1425
+ extend ModernTreasury::Enum
1426
+
1427
+ ABA = :aba
1428
+ AU_BSB = :au_bsb
1429
+ BR_CODIGO = :br_codigo
1430
+ CA_CPA = :ca_cpa
1431
+ CHIPS = :chips
1432
+ CNAPS = :cnaps
1433
+ DK_INTERBANK_CLEARING_CODE = :dk_interbank_clearing_code
1434
+ GB_SORT_CODE = :gb_sort_code
1435
+ HK_INTERBANK_CLEARING_CODE = :hk_interbank_clearing_code
1436
+ HU_INTERBANK_CLEARING_CODE = :hu_interbank_clearing_code
1437
+ ID_SKNBI_CODE = :id_sknbi_code
1438
+ IN_IFSC = :in_ifsc
1439
+ JP_ZENGIN_CODE = :jp_zengin_code
1440
+ MY_BRANCH_CODE = :my_branch_code
1441
+ MX_BANK_IDENTIFIER = :mx_bank_identifier
1442
+ NZ_NATIONAL_CLEARING_CODE = :nz_national_clearing_code
1443
+ PL_NATIONAL_CLEARING_CODE = :pl_national_clearing_code
1444
+ SE_BANKGIRO_CLEARING_CODE = :se_bankgiro_clearing_code
1445
+ SG_INTERBANK_CLEARING_CODE = :sg_interbank_clearing_code
1446
+ SWIFT = :swift
1447
+ ZA_NATIONAL_CLEARING_CODE = :za_national_clearing_code
1448
+
1449
+ finalize!
1450
+
1451
+ # @!parse
1452
+ # # @return [Array<Symbol>]
1453
+ # def self.values; end
1454
+ end
1455
+
1456
+ module PaymentType
1457
+ extend ModernTreasury::Enum
1458
+
1459
+ ACH = :ach
1460
+ AU_BECS = :au_becs
1461
+ BACS = :bacs
1462
+ BOOK = :book
1463
+ CARD = :card
1464
+ CHATS = :chats
1465
+ CHECK = :check
1466
+ CROSS_BORDER = :cross_border
1467
+ DK_NETS = :dk_nets
1468
+ EFT = :eft
1469
+ HU_ICS = :hu_ics
1470
+ INTERAC = :interac
1471
+ MASAV = :masav
1472
+ MX_CCEN = :mx_ccen
1473
+ NEFT = :neft
1474
+ NICS = :nics
1475
+ NZ_BECS = :nz_becs
1476
+ PL_ELIXIR = :pl_elixir
1477
+ PROVXCHANGE = :provxchange
1478
+ RO_SENT = :ro_sent
1479
+ RTP = :rtp
1480
+ SE_BANKGIROT = :se_bankgirot
1481
+ SEN = :sen
1482
+ SEPA = :sepa
1483
+ SG_GIRO = :sg_giro
1484
+ SIC = :sic
1485
+ SIGNET = :signet
1486
+ SKNBI = :sknbi
1487
+ WIRE = :wire
1488
+ ZENGIN = :zengin
1489
+
1490
+ finalize!
1491
+
1492
+ # @!parse
1493
+ # # @return [Array<Symbol>]
1494
+ # def self.values; end
1495
+ end
1496
+ end
1497
+ end
1498
+ end
1499
+
1500
+ class ExpectedPaymentCreateRequest < ModernTreasury::BaseModel
1501
+ # @!attribute amount_lower_bound
1502
+ # The lowest amount this expected payment may be equal to. Value in specified
1503
+ # currency's smallest unit. e.g. $10 would be represented as 1000.
1504
+ #
1505
+ # @return [Integer, nil]
1506
+ optional :amount_lower_bound, Integer, nil?: true
1507
+
1508
+ # @!attribute amount_upper_bound
1509
+ # The highest amount this expected payment may be equal to. Value in specified
1510
+ # currency's smallest unit. e.g. $10 would be represented as 1000.
1511
+ #
1512
+ # @return [Integer, nil]
1513
+ optional :amount_upper_bound, Integer, nil?: true
1514
+
1515
+ # @!attribute counterparty_id
1516
+ # The ID of the counterparty you expect for this payment.
1517
+ #
1518
+ # @return [String, nil]
1519
+ optional :counterparty_id, String, nil?: true
1520
+
1521
+ # @!attribute currency
1522
+ # Must conform to ISO 4217. Defaults to the currency of the internal account.
1523
+ #
1524
+ # @return [Symbol, ModernTreasury::Models::Currency, nil]
1525
+ optional :currency, enum: -> { ModernTreasury::Models::Currency }, nil?: true
1526
+
1527
+ # @!attribute date_lower_bound
1528
+ # The earliest date the payment may come in. Format: yyyy-mm-dd
1529
+ #
1530
+ # @return [Date, nil]
1531
+ optional :date_lower_bound, Date, nil?: true
1532
+
1533
+ # @!attribute date_upper_bound
1534
+ # The latest date the payment may come in. Format: yyyy-mm-dd
1535
+ #
1536
+ # @return [Date, nil]
1537
+ optional :date_upper_bound, Date, nil?: true
1538
+
1539
+ # @!attribute description
1540
+ # An optional description for internal use.
1541
+ #
1542
+ # @return [String, nil]
1543
+ optional :description, String, nil?: true
1544
+
1545
+ # @!attribute direction
1546
+ # One of credit or debit. When you are receiving money, use credit. When you are
1547
+ # being charged, use debit.
1548
+ #
1549
+ # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest::Direction, nil]
1550
+ optional :direction,
1551
+ enum: -> { ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest::Direction },
1552
+ nil?: true
1553
+
1554
+ # @!attribute internal_account_id
1555
+ # The ID of the Internal Account for the expected payment.
1556
+ #
1557
+ # @return [String, nil]
1558
+ optional :internal_account_id, String, nil?: true
1559
+
1560
+ # @!attribute [r] ledger_transaction
1561
+ # Specifies a ledger transaction object that will be created with the expected
1562
+ # payment. If the ledger transaction cannot be created, then the expected payment
1563
+ # creation will fail. The resulting ledger transaction will mirror the status of
1564
+ # the expected payment.
1565
+ #
1566
+ # @return [ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest::LedgerTransaction, nil]
1567
+ optional :ledger_transaction,
1568
+ -> { ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest::LedgerTransaction }
1569
+
1570
+ # @!parse
1571
+ # # @return [ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest::LedgerTransaction]
1572
+ # attr_writer :ledger_transaction
1573
+
1574
+ # @!attribute [r] ledger_transaction_id
1575
+ # Either ledger_transaction or ledger_transaction_id can be provided. Only a
1576
+ # pending ledger transaction can be attached upon expected payment creation. Once
1577
+ # the expected payment is created, the status of the ledger transaction tracks the
1578
+ # expected payment automatically.
1579
+ #
1580
+ # @return [String, nil]
1581
+ optional :ledger_transaction_id, String
1582
+
1583
+ # @!parse
1584
+ # # @return [String]
1585
+ # attr_writer :ledger_transaction_id
1586
+
1587
+ # @!attribute [r] line_items
1588
+ #
1589
+ # @return [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest::LineItem>, nil]
1590
+ optional :line_items,
1591
+ -> { ModernTreasury::ArrayOf[ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest::LineItem] }
1592
+
1593
+ # @!parse
1594
+ # # @return [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest::LineItem>]
1595
+ # attr_writer :line_items
1596
+
1597
+ # @!attribute [r] metadata
1598
+ # Additional data represented as key-value pairs. Both the key and value must be
1599
+ # strings.
1600
+ #
1601
+ # @return [Hash{Symbol=>String}, nil]
1602
+ optional :metadata, ModernTreasury::HashOf[String]
1603
+
1604
+ # @!parse
1605
+ # # @return [Hash{Symbol=>String}]
1606
+ # attr_writer :metadata
1607
+
1608
+ # @!attribute reconciliation_filters
1609
+ # The reconciliation filters you have for this payment.
1610
+ #
1611
+ # @return [Object, nil]
1612
+ optional :reconciliation_filters, ModernTreasury::Unknown, nil?: true
1613
+
1614
+ # @!attribute reconciliation_groups
1615
+ # The reconciliation groups you have for this payment.
1616
+ #
1617
+ # @return [Object, nil]
1618
+ optional :reconciliation_groups, ModernTreasury::Unknown, nil?: true
1619
+
1620
+ # @!attribute reconciliation_rule_variables
1621
+ # An array of reconciliation rule variables for this payment.
1622
+ #
1623
+ # @return [Array<ModernTreasury::Models::ReconciliationRule>, nil]
1624
+ optional :reconciliation_rule_variables,
1625
+ -> { ModernTreasury::ArrayOf[ModernTreasury::Models::ReconciliationRule] },
1626
+ nil?: true
1627
+
1628
+ # @!attribute remittance_information
1629
+ # For `ach`, this field will be passed through on an addenda record. For `wire`
1630
+ # payments the field will be passed through as the "Originator to Beneficiary
1631
+ # Information", also known as OBI or Fedwire tag 6000.
1632
+ #
1633
+ # @return [String, nil]
1634
+ optional :remittance_information, String, nil?: true
1635
+
1636
+ # @!attribute statement_descriptor
1637
+ # The statement description you expect to see on the transaction. For ACH
1638
+ # payments, this will be the full line item passed from the bank. For wire
1639
+ # payments, this will be the OBI field on the wire. For check payments, this will
1640
+ # be the memo field.
1641
+ #
1642
+ # @return [String, nil]
1643
+ optional :statement_descriptor, String, nil?: true
1644
+
1645
+ # @!attribute type
1646
+ # One of: ach, au_becs, bacs, book, check, eft, interac, provxchange, rtp, sen,
1647
+ # sepa, signet, wire.
1648
+ #
1649
+ # @return [Symbol, ModernTreasury::Models::ExpectedPaymentType, nil]
1650
+ optional :type, enum: -> { ModernTreasury::Models::ExpectedPaymentType }, nil?: true
1651
+
1652
+ # @!parse
1653
+ # # @param amount_lower_bound [Integer, nil]
1654
+ # # @param amount_upper_bound [Integer, nil]
1655
+ # # @param counterparty_id [String, nil]
1656
+ # # @param currency [Symbol, ModernTreasury::Models::Currency, nil]
1657
+ # # @param date_lower_bound [Date, nil]
1658
+ # # @param date_upper_bound [Date, nil]
1659
+ # # @param description [String, nil]
1660
+ # # @param direction [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest::Direction, nil]
1661
+ # # @param internal_account_id [String, nil]
1662
+ # # @param ledger_transaction [ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest::LedgerTransaction]
1663
+ # # @param ledger_transaction_id [String]
1664
+ # # @param line_items [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest::LineItem>]
1665
+ # # @param metadata [Hash{Symbol=>String}]
1666
+ # # @param reconciliation_filters [Object, nil]
1667
+ # # @param reconciliation_groups [Object, nil]
1668
+ # # @param reconciliation_rule_variables [Array<ModernTreasury::Models::ReconciliationRule>, nil]
1669
+ # # @param remittance_information [String, nil]
1670
+ # # @param statement_descriptor [String, nil]
1671
+ # # @param type [Symbol, ModernTreasury::Models::ExpectedPaymentType, nil]
1672
+ # #
1673
+ # def initialize(
1674
+ # amount_lower_bound: nil,
1675
+ # amount_upper_bound: nil,
1676
+ # counterparty_id: nil,
1677
+ # currency: nil,
1678
+ # date_lower_bound: nil,
1679
+ # date_upper_bound: nil,
1680
+ # description: nil,
1681
+ # direction: nil,
1682
+ # internal_account_id: nil,
1683
+ # ledger_transaction: nil,
1684
+ # ledger_transaction_id: nil,
1685
+ # line_items: nil,
1686
+ # metadata: nil,
1687
+ # reconciliation_filters: nil,
1688
+ # reconciliation_groups: nil,
1689
+ # reconciliation_rule_variables: nil,
1690
+ # remittance_information: nil,
1691
+ # statement_descriptor: nil,
1692
+ # type: nil,
1693
+ # **
1694
+ # )
1695
+ # super
1696
+ # end
1697
+
1698
+ # def initialize: (Hash | ModernTreasury::BaseModel) -> void
1699
+
1700
+ # One of credit or debit. When you are receiving money, use credit. When you are
1701
+ # being charged, use debit.
1702
+ module Direction
1703
+ extend ModernTreasury::Enum
1704
+
1705
+ CREDIT = :credit
1706
+ DEBIT = :debit
1707
+
1708
+ finalize!
1709
+
1710
+ # @!parse
1711
+ # # @return [Array<Symbol>]
1712
+ # def self.values; end
1713
+ end
1714
+
1715
+ class LedgerTransaction < ModernTreasury::BaseModel
1716
+ # @!attribute ledger_entries
1717
+ # An array of ledger entry objects.
1718
+ #
1719
+ # @return [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest::LedgerTransaction::LedgerEntry>]
1720
+ required :ledger_entries,
1721
+ -> do
1722
+ ModernTreasury::ArrayOf[
1723
+ ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest::LedgerTransaction::LedgerEntry
1724
+ ]
1725
+ end
1726
+
1727
+ # @!attribute description
1728
+ # An optional description for internal use.
1729
+ #
1730
+ # @return [String, nil]
1731
+ optional :description, String, nil?: true
1732
+
1733
+ # @!attribute [r] effective_at
1734
+ # The timestamp (ISO8601 format) at which the ledger transaction happened for
1735
+ # reporting purposes.
1736
+ #
1737
+ # @return [Time, nil]
1738
+ optional :effective_at, Time
1739
+
1740
+ # @!parse
1741
+ # # @return [Time]
1742
+ # attr_writer :effective_at
1743
+
1744
+ # @!attribute [r] effective_date
1745
+ # The date (YYYY-MM-DD) on which the ledger transaction happened for reporting
1746
+ # purposes.
1747
+ #
1748
+ # @return [Date, nil]
1749
+ optional :effective_date, Date
1750
+
1751
+ # @!parse
1752
+ # # @return [Date]
1753
+ # attr_writer :effective_date
1754
+
1755
+ # @!attribute [r] external_id
1756
+ # A unique string to represent the ledger transaction. Only one pending or posted
1757
+ # ledger transaction may have this ID in the ledger.
1758
+ #
1759
+ # @return [String, nil]
1760
+ optional :external_id, String
1761
+
1762
+ # @!parse
1763
+ # # @return [String]
1764
+ # attr_writer :external_id
1765
+
1766
+ # @!attribute [r] ledgerable_id
1767
+ # If the ledger transaction can be reconciled to another object in Modern
1768
+ # Treasury, the id will be populated here, otherwise null.
1769
+ #
1770
+ # @return [String, nil]
1771
+ optional :ledgerable_id, String
1772
+
1773
+ # @!parse
1774
+ # # @return [String]
1775
+ # attr_writer :ledgerable_id
1776
+
1777
+ # @!attribute [r] ledgerable_type
1778
+ # If the ledger transaction can be reconciled to another object in Modern
1779
+ # Treasury, the type will be populated here, otherwise null. This can be one of
1780
+ # payment_order, incoming_payment_detail, expected_payment, return, paper_item, or
1781
+ # reversal.
1782
+ #
1783
+ # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest::LedgerTransaction::LedgerableType, nil]
1784
+ optional :ledgerable_type,
1785
+ enum: -> { ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest::LedgerTransaction::LedgerableType }
1786
+
1787
+ # @!parse
1788
+ # # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest::LedgerTransaction::LedgerableType]
1789
+ # attr_writer :ledgerable_type
1790
+
1791
+ # @!attribute [r] metadata
1792
+ # Additional data represented as key-value pairs. Both the key and value must be
1793
+ # strings.
1794
+ #
1795
+ # @return [Hash{Symbol=>String}, nil]
1796
+ optional :metadata, ModernTreasury::HashOf[String]
1797
+
1798
+ # @!parse
1799
+ # # @return [Hash{Symbol=>String}]
1800
+ # attr_writer :metadata
1801
+
1802
+ # @!attribute [r] status
1803
+ # To post a ledger transaction at creation, use `posted`.
1804
+ #
1805
+ # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest::LedgerTransaction::Status, nil]
1806
+ optional :status,
1807
+ enum: -> { ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest::LedgerTransaction::Status }
1808
+
1809
+ # @!parse
1810
+ # # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest::LedgerTransaction::Status]
1811
+ # attr_writer :status
1812
+
1813
+ # @!parse
1814
+ # # Specifies a ledger transaction object that will be created with the expected
1815
+ # # payment. If the ledger transaction cannot be created, then the expected payment
1816
+ # # creation will fail. The resulting ledger transaction will mirror the status of
1817
+ # # the expected payment.
1818
+ # #
1819
+ # # @param ledger_entries [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest::LedgerTransaction::LedgerEntry>]
1820
+ # # @param description [String, nil]
1821
+ # # @param effective_at [Time]
1822
+ # # @param effective_date [Date]
1823
+ # # @param external_id [String]
1824
+ # # @param ledgerable_id [String]
1825
+ # # @param ledgerable_type [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest::LedgerTransaction::LedgerableType]
1826
+ # # @param metadata [Hash{Symbol=>String}]
1827
+ # # @param status [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest::LedgerTransaction::Status]
1828
+ # #
1829
+ # def initialize(
1830
+ # ledger_entries:,
1831
+ # description: nil,
1832
+ # effective_at: nil,
1833
+ # effective_date: nil,
1834
+ # external_id: nil,
1835
+ # ledgerable_id: nil,
1836
+ # ledgerable_type: nil,
1837
+ # metadata: nil,
1838
+ # status: nil,
1839
+ # **
1840
+ # )
1841
+ # super
1842
+ # end
1843
+
1844
+ # def initialize: (Hash | ModernTreasury::BaseModel) -> void
1845
+
1846
+ class LedgerEntry < ModernTreasury::BaseModel
1847
+ # @!attribute amount
1848
+ # Value in specified currency's smallest unit. e.g. $10 would be represented
1849
+ # as 1000. Can be any integer up to 36 digits.
1850
+ #
1851
+ # @return [Integer]
1852
+ required :amount, Integer
1853
+
1854
+ # @!attribute direction
1855
+ # One of `credit`, `debit`. Describes the direction money is flowing in the
1856
+ # transaction. A `credit` moves money from your account to someone else's. A
1857
+ # `debit` pulls money from someone else's account to your own. Note that wire,
1858
+ # rtp, and check payments will always be `credit`.
1859
+ #
1860
+ # @return [Symbol, ModernTreasury::Models::TransactionDirection]
1861
+ required :direction, enum: -> { ModernTreasury::Models::TransactionDirection }
1862
+
1863
+ # @!attribute ledger_account_id
1864
+ # The ledger account that this ledger entry is associated with.
1865
+ #
1866
+ # @return [String]
1867
+ required :ledger_account_id, String
1868
+
1869
+ # @!attribute available_balance_amount
1870
+ # Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
1871
+ # account’s available balance. If any of these conditions would be false after the
1872
+ # transaction is created, the entire call will fail with error code 422.
1873
+ #
1874
+ # @return [Hash{Symbol=>Integer}, nil]
1875
+ optional :available_balance_amount, ModernTreasury::HashOf[Integer], nil?: true
1876
+
1877
+ # @!attribute lock_version
1878
+ # Lock version of the ledger account. This can be passed when creating a ledger
1879
+ # transaction to only succeed if no ledger transactions have posted since the
1880
+ # given version. See our post about Designing the Ledgers API with Optimistic
1881
+ # Locking for more details.
1882
+ #
1883
+ # @return [Integer, nil]
1884
+ optional :lock_version, Integer, nil?: true
1885
+
1886
+ # @!attribute [r] metadata
1887
+ # Additional data represented as key-value pairs. Both the key and value must be
1888
+ # strings.
1889
+ #
1890
+ # @return [Hash{Symbol=>String}, nil]
1891
+ optional :metadata, ModernTreasury::HashOf[String]
1892
+
1893
+ # @!parse
1894
+ # # @return [Hash{Symbol=>String}]
1895
+ # attr_writer :metadata
1896
+
1897
+ # @!attribute pending_balance_amount
1898
+ # Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
1899
+ # account’s pending balance. If any of these conditions would be false after the
1900
+ # transaction is created, the entire call will fail with error code 422.
1901
+ #
1902
+ # @return [Hash{Symbol=>Integer}, nil]
1903
+ optional :pending_balance_amount, ModernTreasury::HashOf[Integer], nil?: true
1904
+
1905
+ # @!attribute posted_balance_amount
1906
+ # Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
1907
+ # account’s posted balance. If any of these conditions would be false after the
1908
+ # transaction is created, the entire call will fail with error code 422.
1909
+ #
1910
+ # @return [Hash{Symbol=>Integer}, nil]
1911
+ optional :posted_balance_amount, ModernTreasury::HashOf[Integer], nil?: true
1912
+
1913
+ # @!attribute show_resulting_ledger_account_balances
1914
+ # If true, response will include the balance of the associated ledger account for
1915
+ # the entry.
1916
+ #
1917
+ # @return [Boolean, nil]
1918
+ optional :show_resulting_ledger_account_balances, ModernTreasury::BooleanModel, nil?: true
1919
+
1920
+ # @!parse
1921
+ # # @param amount [Integer]
1922
+ # # @param direction [Symbol, ModernTreasury::Models::TransactionDirection]
1923
+ # # @param ledger_account_id [String]
1924
+ # # @param available_balance_amount [Hash{Symbol=>Integer}, nil]
1925
+ # # @param lock_version [Integer, nil]
1926
+ # # @param metadata [Hash{Symbol=>String}]
1927
+ # # @param pending_balance_amount [Hash{Symbol=>Integer}, nil]
1928
+ # # @param posted_balance_amount [Hash{Symbol=>Integer}, nil]
1929
+ # # @param show_resulting_ledger_account_balances [Boolean, nil]
1930
+ # #
1931
+ # def initialize(
1932
+ # amount:,
1933
+ # direction:,
1934
+ # ledger_account_id:,
1935
+ # available_balance_amount: nil,
1936
+ # lock_version: nil,
1937
+ # metadata: nil,
1938
+ # pending_balance_amount: nil,
1939
+ # posted_balance_amount: nil,
1940
+ # show_resulting_ledger_account_balances: nil,
1941
+ # **
1942
+ # )
1943
+ # super
1944
+ # end
1945
+
1946
+ # def initialize: (Hash | ModernTreasury::BaseModel) -> void
1947
+ end
1948
+
1949
+ # If the ledger transaction can be reconciled to another object in Modern
1950
+ # Treasury, the type will be populated here, otherwise null. This can be one of
1951
+ # payment_order, incoming_payment_detail, expected_payment, return, paper_item, or
1952
+ # reversal.
1953
+ module LedgerableType
1954
+ extend ModernTreasury::Enum
1955
+
1956
+ EXPECTED_PAYMENT = :expected_payment
1957
+ INCOMING_PAYMENT_DETAIL = :incoming_payment_detail
1958
+ PAPER_ITEM = :paper_item
1959
+ PAYMENT_ORDER = :payment_order
1960
+ RETURN = :return
1961
+ REVERSAL = :reversal
1962
+
1963
+ finalize!
1964
+
1965
+ # @!parse
1966
+ # # @return [Array<Symbol>]
1967
+ # def self.values; end
1968
+ end
1969
+
1970
+ # To post a ledger transaction at creation, use `posted`.
1971
+ module Status
1972
+ extend ModernTreasury::Enum
1973
+
1974
+ ARCHIVED = :archived
1975
+ PENDING = :pending
1976
+ POSTED = :posted
1977
+
1978
+ finalize!
1979
+
1980
+ # @!parse
1981
+ # # @return [Array<Symbol>]
1982
+ # def self.values; end
1983
+ end
1984
+ end
1985
+
1986
+ class LineItem < ModernTreasury::BaseModel
1987
+ # @!attribute amount
1988
+ # Value in specified currency's smallest unit. e.g. $10 would be represented
1989
+ # as 1000.
1990
+ #
1991
+ # @return [Integer]
1992
+ required :amount, Integer
1993
+
1994
+ # @!attribute accounting_category_id
1995
+ # The ID of one of your accounting categories. Note that these will only be
1996
+ # accessible if your accounting system has been connected.
1997
+ #
1998
+ # @return [String, nil]
1999
+ optional :accounting_category_id, String, nil?: true
2000
+
2001
+ # @!attribute description
2002
+ # A free-form description of the line item.
2003
+ #
2004
+ # @return [String, nil]
2005
+ optional :description, String, nil?: true
2006
+
2007
+ # @!attribute [r] metadata
2008
+ # Additional data represented as key-value pairs. Both the key and value must be
2009
+ # strings.
2010
+ #
2011
+ # @return [Hash{Symbol=>String}, nil]
2012
+ optional :metadata, ModernTreasury::HashOf[String]
2013
+
2014
+ # @!parse
2015
+ # # @return [Hash{Symbol=>String}]
2016
+ # attr_writer :metadata
2017
+
2018
+ # @!parse
2019
+ # # @param amount [Integer]
2020
+ # # @param accounting_category_id [String, nil]
2021
+ # # @param description [String, nil]
2022
+ # # @param metadata [Hash{Symbol=>String}]
2023
+ # #
2024
+ # def initialize(amount:, accounting_category_id: nil, description: nil, metadata: nil, **) = super
2025
+
2026
+ # def initialize: (Hash | ModernTreasury::BaseModel) -> void
2027
+ end
2028
+ end
2029
+
2030
+ class LedgerTransactionCreateRequest < ModernTreasury::BaseModel
2031
+ # @!attribute ledger_entries
2032
+ # An array of ledger entry objects.
2033
+ #
2034
+ # @return [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionCreateRequest::LedgerEntry>]
2035
+ required :ledger_entries,
2036
+ -> { ModernTreasury::ArrayOf[ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionCreateRequest::LedgerEntry] }
2037
+
2038
+ # @!attribute description
2039
+ # An optional description for internal use.
2040
+ #
2041
+ # @return [String, nil]
2042
+ optional :description, String, nil?: true
2043
+
2044
+ # @!attribute [r] effective_at
2045
+ # The timestamp (ISO8601 format) at which the ledger transaction happened for
2046
+ # reporting purposes.
2047
+ #
2048
+ # @return [Time, nil]
2049
+ optional :effective_at, Time
2050
+
2051
+ # @!parse
2052
+ # # @return [Time]
2053
+ # attr_writer :effective_at
2054
+
2055
+ # @!attribute [r] effective_date
2056
+ # The date (YYYY-MM-DD) on which the ledger transaction happened for reporting
2057
+ # purposes.
2058
+ #
2059
+ # @return [Date, nil]
2060
+ optional :effective_date, Date
2061
+
2062
+ # @!parse
2063
+ # # @return [Date]
2064
+ # attr_writer :effective_date
2065
+
2066
+ # @!attribute [r] external_id
2067
+ # A unique string to represent the ledger transaction. Only one pending or posted
2068
+ # ledger transaction may have this ID in the ledger.
2069
+ #
2070
+ # @return [String, nil]
2071
+ optional :external_id, String
2072
+
2073
+ # @!parse
2074
+ # # @return [String]
2075
+ # attr_writer :external_id
2076
+
2077
+ # @!attribute [r] ledgerable_id
2078
+ # If the ledger transaction can be reconciled to another object in Modern
2079
+ # Treasury, the id will be populated here, otherwise null.
2080
+ #
2081
+ # @return [String, nil]
2082
+ optional :ledgerable_id, String
2083
+
2084
+ # @!parse
2085
+ # # @return [String]
2086
+ # attr_writer :ledgerable_id
2087
+
2088
+ # @!attribute [r] ledgerable_type
2089
+ # If the ledger transaction can be reconciled to another object in Modern
2090
+ # Treasury, the type will be populated here, otherwise null. This can be one of
2091
+ # payment_order, incoming_payment_detail, expected_payment, return, paper_item, or
2092
+ # reversal.
2093
+ #
2094
+ # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionCreateRequest::LedgerableType, nil]
2095
+ optional :ledgerable_type,
2096
+ enum: -> { ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionCreateRequest::LedgerableType }
2097
+
2098
+ # @!parse
2099
+ # # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionCreateRequest::LedgerableType]
2100
+ # attr_writer :ledgerable_type
2101
+
2102
+ # @!attribute [r] metadata
2103
+ # Additional data represented as key-value pairs. Both the key and value must be
2104
+ # strings.
2105
+ #
2106
+ # @return [Hash{Symbol=>String}, nil]
2107
+ optional :metadata, ModernTreasury::HashOf[String]
2108
+
2109
+ # @!parse
2110
+ # # @return [Hash{Symbol=>String}]
2111
+ # attr_writer :metadata
2112
+
2113
+ # @!attribute [r] status
2114
+ # To post a ledger transaction at creation, use `posted`.
2115
+ #
2116
+ # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionCreateRequest::Status, nil]
2117
+ optional :status,
2118
+ enum: -> { ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionCreateRequest::Status }
2119
+
2120
+ # @!parse
2121
+ # # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionCreateRequest::Status]
2122
+ # attr_writer :status
2123
+
2124
+ # @!parse
2125
+ # # @param ledger_entries [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionCreateRequest::LedgerEntry>]
2126
+ # # @param description [String, nil]
2127
+ # # @param effective_at [Time]
2128
+ # # @param effective_date [Date]
2129
+ # # @param external_id [String]
2130
+ # # @param ledgerable_id [String]
2131
+ # # @param ledgerable_type [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionCreateRequest::LedgerableType]
2132
+ # # @param metadata [Hash{Symbol=>String}]
2133
+ # # @param status [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionCreateRequest::Status]
2134
+ # #
2135
+ # def initialize(
2136
+ # ledger_entries:,
2137
+ # description: nil,
2138
+ # effective_at: nil,
2139
+ # effective_date: nil,
2140
+ # external_id: nil,
2141
+ # ledgerable_id: nil,
2142
+ # ledgerable_type: nil,
2143
+ # metadata: nil,
2144
+ # status: nil,
2145
+ # **
2146
+ # )
2147
+ # super
2148
+ # end
2149
+
2150
+ # def initialize: (Hash | ModernTreasury::BaseModel) -> void
2151
+
2152
+ class LedgerEntry < ModernTreasury::BaseModel
2153
+ # @!attribute amount
2154
+ # Value in specified currency's smallest unit. e.g. $10 would be represented
2155
+ # as 1000. Can be any integer up to 36 digits.
2156
+ #
2157
+ # @return [Integer]
2158
+ required :amount, Integer
2159
+
2160
+ # @!attribute direction
2161
+ # One of `credit`, `debit`. Describes the direction money is flowing in the
2162
+ # transaction. A `credit` moves money from your account to someone else's. A
2163
+ # `debit` pulls money from someone else's account to your own. Note that wire,
2164
+ # rtp, and check payments will always be `credit`.
2165
+ #
2166
+ # @return [Symbol, ModernTreasury::Models::TransactionDirection]
2167
+ required :direction, enum: -> { ModernTreasury::Models::TransactionDirection }
2168
+
2169
+ # @!attribute ledger_account_id
2170
+ # The ledger account that this ledger entry is associated with.
2171
+ #
2172
+ # @return [String]
2173
+ required :ledger_account_id, String
2174
+
2175
+ # @!attribute available_balance_amount
2176
+ # Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
2177
+ # account’s available balance. If any of these conditions would be false after the
2178
+ # transaction is created, the entire call will fail with error code 422.
2179
+ #
2180
+ # @return [Hash{Symbol=>Integer}, nil]
2181
+ optional :available_balance_amount, ModernTreasury::HashOf[Integer], nil?: true
2182
+
2183
+ # @!attribute lock_version
2184
+ # Lock version of the ledger account. This can be passed when creating a ledger
2185
+ # transaction to only succeed if no ledger transactions have posted since the
2186
+ # given version. See our post about Designing the Ledgers API with Optimistic
2187
+ # Locking for more details.
2188
+ #
2189
+ # @return [Integer, nil]
2190
+ optional :lock_version, Integer, nil?: true
2191
+
2192
+ # @!attribute [r] metadata
2193
+ # Additional data represented as key-value pairs. Both the key and value must be
2194
+ # strings.
2195
+ #
2196
+ # @return [Hash{Symbol=>String}, nil]
2197
+ optional :metadata, ModernTreasury::HashOf[String]
2198
+
2199
+ # @!parse
2200
+ # # @return [Hash{Symbol=>String}]
2201
+ # attr_writer :metadata
2202
+
2203
+ # @!attribute pending_balance_amount
2204
+ # Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
2205
+ # account’s pending balance. If any of these conditions would be false after the
2206
+ # transaction is created, the entire call will fail with error code 422.
2207
+ #
2208
+ # @return [Hash{Symbol=>Integer}, nil]
2209
+ optional :pending_balance_amount, ModernTreasury::HashOf[Integer], nil?: true
2210
+
2211
+ # @!attribute posted_balance_amount
2212
+ # Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
2213
+ # account’s posted balance. If any of these conditions would be false after the
2214
+ # transaction is created, the entire call will fail with error code 422.
2215
+ #
2216
+ # @return [Hash{Symbol=>Integer}, nil]
2217
+ optional :posted_balance_amount, ModernTreasury::HashOf[Integer], nil?: true
2218
+
2219
+ # @!attribute show_resulting_ledger_account_balances
2220
+ # If true, response will include the balance of the associated ledger account for
2221
+ # the entry.
2222
+ #
2223
+ # @return [Boolean, nil]
2224
+ optional :show_resulting_ledger_account_balances, ModernTreasury::BooleanModel, nil?: true
2225
+
2226
+ # @!parse
2227
+ # # @param amount [Integer]
2228
+ # # @param direction [Symbol, ModernTreasury::Models::TransactionDirection]
2229
+ # # @param ledger_account_id [String]
2230
+ # # @param available_balance_amount [Hash{Symbol=>Integer}, nil]
2231
+ # # @param lock_version [Integer, nil]
2232
+ # # @param metadata [Hash{Symbol=>String}]
2233
+ # # @param pending_balance_amount [Hash{Symbol=>Integer}, nil]
2234
+ # # @param posted_balance_amount [Hash{Symbol=>Integer}, nil]
2235
+ # # @param show_resulting_ledger_account_balances [Boolean, nil]
2236
+ # #
2237
+ # def initialize(
2238
+ # amount:,
2239
+ # direction:,
2240
+ # ledger_account_id:,
2241
+ # available_balance_amount: nil,
2242
+ # lock_version: nil,
2243
+ # metadata: nil,
2244
+ # pending_balance_amount: nil,
2245
+ # posted_balance_amount: nil,
2246
+ # show_resulting_ledger_account_balances: nil,
2247
+ # **
2248
+ # )
2249
+ # super
2250
+ # end
2251
+
2252
+ # def initialize: (Hash | ModernTreasury::BaseModel) -> void
2253
+ end
2254
+
2255
+ # If the ledger transaction can be reconciled to another object in Modern
2256
+ # Treasury, the type will be populated here, otherwise null. This can be one of
2257
+ # payment_order, incoming_payment_detail, expected_payment, return, paper_item, or
2258
+ # reversal.
2259
+ module LedgerableType
2260
+ extend ModernTreasury::Enum
2261
+
2262
+ EXPECTED_PAYMENT = :expected_payment
2263
+ INCOMING_PAYMENT_DETAIL = :incoming_payment_detail
2264
+ PAPER_ITEM = :paper_item
2265
+ PAYMENT_ORDER = :payment_order
2266
+ RETURN = :return
2267
+ REVERSAL = :reversal
2268
+
2269
+ finalize!
2270
+
2271
+ # @!parse
2272
+ # # @return [Array<Symbol>]
2273
+ # def self.values; end
2274
+ end
2275
+
2276
+ # To post a ledger transaction at creation, use `posted`.
2277
+ module Status
2278
+ extend ModernTreasury::Enum
2279
+
2280
+ ARCHIVED = :archived
2281
+ PENDING = :pending
2282
+ POSTED = :posted
2283
+
2284
+ finalize!
2285
+
2286
+ # @!parse
2287
+ # # @return [Array<Symbol>]
2288
+ # def self.values; end
2289
+ end
2290
+ end
2291
+
2292
+ class TransactionCreateRequest < ModernTreasury::BaseModel
2293
+ # @!attribute amount
2294
+ # Value in specified currency's smallest unit. e.g. $10 would be represented
2295
+ # as 1000.
2296
+ #
2297
+ # @return [Integer]
2298
+ required :amount, Integer
2299
+
2300
+ # @!attribute as_of_date
2301
+ # The date on which the transaction occurred.
2302
+ #
2303
+ # @return [Date, nil]
2304
+ required :as_of_date, Date, nil?: true
2305
+
2306
+ # @!attribute direction
2307
+ # Either `credit` or `debit`.
2308
+ #
2309
+ # @return [String]
2310
+ required :direction, String
2311
+
2312
+ # @!attribute internal_account_id
2313
+ # The ID of the relevant Internal Account.
2314
+ #
2315
+ # @return [String]
2316
+ required :internal_account_id, String
2317
+
2318
+ # @!attribute vendor_code
2319
+ # When applicable, the bank-given code that determines the transaction's category.
2320
+ # For most banks this is the BAI2/BTRS transaction code.
2321
+ #
2322
+ # @return [String, nil]
2323
+ required :vendor_code, String, nil?: true
2324
+
2325
+ # @!attribute vendor_code_type
2326
+ # The type of `vendor_code` being reported. Can be one of `bai2`, `bankprov`,
2327
+ # `bnk_dev`, `cleartouch`, `currencycloud`, `cross_river`, `dc_bank`, `dwolla`,
2328
+ # `evolve`, `goldman_sachs`, `iso20022`, `jpmc`, `mx`, `signet`, `silvergate`,
2329
+ # `swift`, `us_bank`, or others.
2330
+ #
2331
+ # @return [String, nil]
2332
+ required :vendor_code_type, String, nil?: true
2333
+
2334
+ # @!attribute [r] metadata
2335
+ # Additional data represented as key-value pairs. Both the key and value must be
2336
+ # strings.
2337
+ #
2338
+ # @return [Hash{Symbol=>String}, nil]
2339
+ optional :metadata, ModernTreasury::HashOf[String]
2340
+
2341
+ # @!parse
2342
+ # # @return [Hash{Symbol=>String}]
2343
+ # attr_writer :metadata
2344
+
2345
+ # @!attribute [r] posted
2346
+ # This field will be `true` if the transaction has posted to the account.
2347
+ #
2348
+ # @return [Boolean, nil]
2349
+ optional :posted, ModernTreasury::BooleanModel
2350
+
2351
+ # @!parse
2352
+ # # @return [Boolean]
2353
+ # attr_writer :posted
2354
+
2355
+ # @!attribute type
2356
+ # The type of the transaction. Examples could be
2357
+ # `card, `ach`, `wire`, `check`, `rtp`, `book`, or `sen`.
2358
+ #
2359
+ # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::TransactionCreateRequest::Type, nil]
2360
+ optional :type,
2361
+ enum: -> { ModernTreasury::Models::BulkRequestCreateParams::Resource::TransactionCreateRequest::Type },
2362
+ nil?: true
2363
+
2364
+ # @!attribute vendor_description
2365
+ # The transaction detail text that often appears in on your bank statement and in
2366
+ # your banking portal.
2367
+ #
2368
+ # @return [String, nil]
2369
+ optional :vendor_description, String, nil?: true
2370
+
2371
+ # @!parse
2372
+ # # @param amount [Integer]
2373
+ # # @param as_of_date [Date, nil]
2374
+ # # @param direction [String]
2375
+ # # @param internal_account_id [String]
2376
+ # # @param vendor_code [String, nil]
2377
+ # # @param vendor_code_type [String, nil]
2378
+ # # @param metadata [Hash{Symbol=>String}]
2379
+ # # @param posted [Boolean]
2380
+ # # @param type [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::TransactionCreateRequest::Type, nil]
2381
+ # # @param vendor_description [String, nil]
2382
+ # #
2383
+ # def initialize(
2384
+ # amount:,
2385
+ # as_of_date:,
2386
+ # direction:,
2387
+ # internal_account_id:,
2388
+ # vendor_code:,
2389
+ # vendor_code_type:,
2390
+ # metadata: nil,
2391
+ # posted: nil,
2392
+ # type: nil,
2393
+ # vendor_description: nil,
2394
+ # **
2395
+ # )
2396
+ # super
2397
+ # end
2398
+
2399
+ # def initialize: (Hash | ModernTreasury::BaseModel) -> void
2400
+
2401
+ # The type of the transaction. Examples could be
2402
+ # `card, `ach`, `wire`, `check`, `rtp`, `book`, or `sen`.
2403
+ module Type
2404
+ extend ModernTreasury::Enum
2405
+
2406
+ ACH = :ach
2407
+ AU_BECS = :au_becs
2408
+ BACS = :bacs
2409
+ BOOK = :book
2410
+ CARD = :card
2411
+ CHATS = :chats
2412
+ CHECK = :check
2413
+ CROSS_BORDER = :cross_border
2414
+ DK_NETS = :dk_nets
2415
+ EFT = :eft
2416
+ HU_ICS = :hu_ics
2417
+ INTERAC = :interac
2418
+ MASAV = :masav
2419
+ MX_CCEN = :mx_ccen
2420
+ NEFT = :neft
2421
+ NICS = :nics
2422
+ NZ_BECS = :nz_becs
2423
+ PL_ELIXIR = :pl_elixir
2424
+ PROVXCHANGE = :provxchange
2425
+ RO_SENT = :ro_sent
2426
+ RTP = :rtp
2427
+ SE_BANKGIROT = :se_bankgirot
2428
+ SEN = :sen
2429
+ SEPA = :sepa
2430
+ SG_GIRO = :sg_giro
2431
+ SIC = :sic
2432
+ SIGNET = :signet
2433
+ SKNBI = :sknbi
2434
+ WIRE = :wire
2435
+ ZENGIN = :zengin
2436
+ OTHER = :other
2437
+
2438
+ finalize!
2439
+
2440
+ # @!parse
2441
+ # # @return [Array<Symbol>]
2442
+ # def self.values; end
2443
+ end
2444
+ end
2445
+
2446
+ class ID < ModernTreasury::BaseModel
2447
+ # @!attribute [r] id
2448
+ #
2449
+ # @return [String, nil]
2450
+ optional :id, String
2451
+
2452
+ # @!parse
2453
+ # # @return [String]
2454
+ # attr_writer :id
2455
+
2456
+ # @!parse
2457
+ # # @param id [String]
2458
+ # #
2459
+ # def initialize(id: nil, **) = super
2460
+
2461
+ # def initialize: (Hash | ModernTreasury::BaseModel) -> void
2462
+ end
2463
+
2464
+ class PaymentOrderUpdateRequestWithID < ModernTreasury::BaseModel
2465
+ # @!attribute [r] id
2466
+ #
2467
+ # @return [String, nil]
2468
+ optional :id, String
2469
+
2470
+ # @!parse
2471
+ # # @return [String]
2472
+ # attr_writer :id
2473
+
2474
+ # @!attribute [r] accounting
2475
+ #
2476
+ # @return [ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::Accounting, nil]
2477
+ optional :accounting,
2478
+ -> { ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::Accounting }
2479
+
2480
+ # @!parse
2481
+ # # @return [ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::Accounting]
2482
+ # attr_writer :accounting
2483
+
2484
+ # @!attribute accounting_category_id
2485
+ # The ID of one of your accounting categories. Note that these will only be
2486
+ # accessible if your accounting system has been connected.
2487
+ #
2488
+ # @return [String, nil]
2489
+ optional :accounting_category_id, String, nil?: true
2490
+
2491
+ # @!attribute accounting_ledger_class_id
2492
+ # The ID of one of your accounting ledger classes. Note that these will only be
2493
+ # accessible if your accounting system has been connected.
2494
+ #
2495
+ # @return [String, nil]
2496
+ optional :accounting_ledger_class_id, String, nil?: true
2497
+
2498
+ # @!attribute [r] amount
2499
+ # Value in specified currency's smallest unit. e.g. $10 would be represented as
2500
+ # 1000 (cents). For RTP, the maximum amount allowed by the network is $100,000.
2501
+ #
2502
+ # @return [Integer, nil]
2503
+ optional :amount, Integer
2504
+
2505
+ # @!parse
2506
+ # # @return [Integer]
2507
+ # attr_writer :amount
2508
+
2509
+ # @!attribute charge_bearer
2510
+ # The party that will pay the fees for the payment order. Only applies to wire
2511
+ # payment orders. Can be one of shared, sender, or receiver, which correspond
2512
+ # respectively with the SWIFT 71A values `SHA`, `OUR`, `BEN`.
2513
+ #
2514
+ # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ChargeBearer, nil]
2515
+ optional :charge_bearer,
2516
+ enum: -> { ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ChargeBearer },
2517
+ nil?: true
2518
+
2519
+ # @!attribute counterparty_id
2520
+ # Required when receiving_account_id is passed the ID of an external account.
2521
+ #
2522
+ # @return [String, nil]
2523
+ optional :counterparty_id, String, nil?: true
2524
+
2525
+ # @!attribute [r] currency
2526
+ # Defaults to the currency of the originating account.
2527
+ #
2528
+ # @return [Symbol, ModernTreasury::Models::Currency, nil]
2529
+ optional :currency, enum: -> { ModernTreasury::Models::Currency }
2530
+
2531
+ # @!parse
2532
+ # # @return [Symbol, ModernTreasury::Models::Currency]
2533
+ # attr_writer :currency
2534
+
2535
+ # @!attribute description
2536
+ # An optional description for internal use.
2537
+ #
2538
+ # @return [String, nil]
2539
+ optional :description, String, nil?: true
2540
+
2541
+ # @!attribute [r] direction
2542
+ # One of `credit`, `debit`. Describes the direction money is flowing in the
2543
+ # transaction. A `credit` moves money from your account to someone else's. A
2544
+ # `debit` pulls money from someone else's account to your own. Note that wire,
2545
+ # rtp, and check payments will always be `credit`.
2546
+ #
2547
+ # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::Direction, nil]
2548
+ optional :direction,
2549
+ enum: -> { ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::Direction }
2550
+
2551
+ # @!parse
2552
+ # # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::Direction]
2553
+ # attr_writer :direction
2554
+
2555
+ # @!attribute [r] effective_date
2556
+ # Date transactions are to be posted to the participants' account. Defaults to the
2557
+ # current business day or the next business day if the current day is a bank
2558
+ # holiday or weekend. Format: yyyy-mm-dd.
2559
+ #
2560
+ # @return [Date, nil]
2561
+ optional :effective_date, Date
2562
+
2563
+ # @!parse
2564
+ # # @return [Date]
2565
+ # attr_writer :effective_date
2566
+
2567
+ # @!attribute expires_at
2568
+ # RFP payments require an expires_at. This value must be past the effective_date.
2569
+ #
2570
+ # @return [Time, nil]
2571
+ optional :expires_at, Time, nil?: true
2572
+
2573
+ # @!attribute [r] fallback_type
2574
+ # A payment type to fallback to if the original type is not valid for the
2575
+ # receiving account. Currently, this only supports falling back from RTP to ACH
2576
+ # (type=rtp and fallback_type=ach)
2577
+ #
2578
+ # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::FallbackType, nil]
2579
+ optional :fallback_type,
2580
+ enum: -> { ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::FallbackType }
2581
+
2582
+ # @!parse
2583
+ # # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::FallbackType]
2584
+ # attr_writer :fallback_type
2585
+
2586
+ # @!attribute foreign_exchange_contract
2587
+ # If present, indicates a specific foreign exchange contract number that has been
2588
+ # generated by your financial institution.
2589
+ #
2590
+ # @return [String, nil]
2591
+ optional :foreign_exchange_contract, String, nil?: true
2592
+
2593
+ # @!attribute foreign_exchange_indicator
2594
+ # Indicates the type of FX transfer to initiate, can be either
2595
+ # `variable_to_fixed`, `fixed_to_variable`, or `null` if the payment order
2596
+ # currency matches the originating account currency.
2597
+ #
2598
+ # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ForeignExchangeIndicator, nil]
2599
+ optional :foreign_exchange_indicator,
2600
+ enum: -> { ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ForeignExchangeIndicator },
2601
+ nil?: true
2602
+
2603
+ # @!attribute [r] line_items
2604
+ # An array of line items that must sum up to the amount of the payment order.
2605
+ #
2606
+ # @return [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::LineItem>, nil]
2607
+ optional :line_items,
2608
+ -> { ModernTreasury::ArrayOf[ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::LineItem] }
2609
+
2610
+ # @!parse
2611
+ # # @return [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::LineItem>]
2612
+ # attr_writer :line_items
2613
+
2614
+ # @!attribute [r] metadata
2615
+ # Additional data represented as key-value pairs. Both the key and value must be
2616
+ # strings.
2617
+ #
2618
+ # @return [Hash{Symbol=>String}, nil]
2619
+ optional :metadata, ModernTreasury::HashOf[String]
2620
+
2621
+ # @!parse
2622
+ # # @return [Hash{Symbol=>String}]
2623
+ # attr_writer :metadata
2624
+
2625
+ # @!attribute [r] nsf_protected
2626
+ # A boolean to determine if NSF Protection is enabled for this payment order. Note
2627
+ # that this setting must also be turned on in your organization settings page.
2628
+ #
2629
+ # @return [Boolean, nil]
2630
+ optional :nsf_protected, ModernTreasury::BooleanModel
2631
+
2632
+ # @!parse
2633
+ # # @return [Boolean]
2634
+ # attr_writer :nsf_protected
2635
+
2636
+ # @!attribute [r] originating_account_id
2637
+ # The ID of one of your organization's internal accounts.
2638
+ #
2639
+ # @return [String, nil]
2640
+ optional :originating_account_id, String
2641
+
2642
+ # @!parse
2643
+ # # @return [String]
2644
+ # attr_writer :originating_account_id
2645
+
2646
+ # @!attribute originating_party_name
2647
+ # If present, this will replace your default company name on receiver's bank
2648
+ # statement. This field can only be used for ACH payments currently. For ACH, only
2649
+ # the first 16 characters of this string will be used. Any additional characters
2650
+ # will be truncated.
2651
+ #
2652
+ # @return [String, nil]
2653
+ optional :originating_party_name, String, nil?: true
2654
+
2655
+ # @!attribute [r] priority
2656
+ # Either `normal` or `high`. For ACH and EFT payments, `high` represents a
2657
+ # same-day ACH or EFT transfer, respectively. For check payments, `high` can mean
2658
+ # an overnight check rather than standard mail.
2659
+ #
2660
+ # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::Priority, nil]
2661
+ optional :priority,
2662
+ enum: -> { ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::Priority }
2663
+
2664
+ # @!parse
2665
+ # # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::Priority]
2666
+ # attr_writer :priority
2667
+
2668
+ # @!attribute process_after
2669
+ # If present, Modern Treasury will not process the payment until after this time.
2670
+ # If `process_after` is past the cutoff for `effective_date`, `process_after` will
2671
+ # take precedence and `effective_date` will automatically update to reflect the
2672
+ # earliest possible sending date after `process_after`. Format is ISO8601
2673
+ # timestamp.
2674
+ #
2675
+ # @return [Time, nil]
2676
+ optional :process_after, Time, nil?: true
2677
+
2678
+ # @!attribute purpose
2679
+ # For `wire`, this is usually the purpose which is transmitted via the
2680
+ # "InstrForDbtrAgt" field in the ISO20022 file. For `eft`, this field is the 3
2681
+ # digit CPA Code that will be attached to the payment.
2682
+ #
2683
+ # @return [String, nil]
2684
+ optional :purpose, String, nil?: true
2685
+
2686
+ # @!attribute [r] receiving_account
2687
+ # Either `receiving_account` or `receiving_account_id` must be present. When using
2688
+ # `receiving_account_id`, you may pass the id of an external account or an
2689
+ # internal account.
2690
+ #
2691
+ # @return [ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount, nil]
2692
+ optional :receiving_account,
2693
+ -> { ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount }
2694
+
2695
+ # @!parse
2696
+ # # @return [ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount]
2697
+ # attr_writer :receiving_account
2698
+
2699
+ # @!attribute [r] receiving_account_id
2700
+ # Either `receiving_account` or `receiving_account_id` must be present. When using
2701
+ # `receiving_account_id`, you may pass the id of an external account or an
2702
+ # internal account.
2703
+ #
2704
+ # @return [String, nil]
2705
+ optional :receiving_account_id, String
2706
+
2707
+ # @!parse
2708
+ # # @return [String]
2709
+ # attr_writer :receiving_account_id
2710
+
2711
+ # @!attribute remittance_information
2712
+ # For `ach`, this field will be passed through on an addenda record. For `wire`
2713
+ # payments the field will be passed through as the "Originator to Beneficiary
2714
+ # Information", also known as OBI or Fedwire tag 6000.
2715
+ #
2716
+ # @return [String, nil]
2717
+ optional :remittance_information, String, nil?: true
2718
+
2719
+ # @!attribute send_remittance_advice
2720
+ # Send an email to the counterparty when the payment order is sent to the bank. If
2721
+ # `null`, `send_remittance_advice` on the Counterparty is used.
2722
+ #
2723
+ # @return [Boolean, nil]
2724
+ optional :send_remittance_advice, ModernTreasury::BooleanModel, nil?: true
2725
+
2726
+ # @!attribute statement_descriptor
2727
+ # An optional descriptor which will appear in the receiver's statement. For
2728
+ # `check` payments this field will be used as the memo line. For `ach` the maximum
2729
+ # length is 10 characters. Note that for ACH payments, the name on your bank
2730
+ # account will be included automatically by the bank, so you can use the
2731
+ # characters for other useful information. For `eft` the maximum length is 15
2732
+ # characters.
2733
+ #
2734
+ # @return [String, nil]
2735
+ optional :statement_descriptor, String, nil?: true
2736
+
2737
+ # @!attribute [r] status
2738
+ # To cancel a payment order, use `cancelled`. To redraft a returned payment order,
2739
+ # use `approved`. To undo approval on a denied or approved payment order, use
2740
+ # `needs_approval`.
2741
+ #
2742
+ # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::Status, nil]
2743
+ optional :status,
2744
+ enum: -> { ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::Status }
2745
+
2746
+ # @!parse
2747
+ # # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::Status]
2748
+ # attr_writer :status
2749
+
2750
+ # @!attribute subtype
2751
+ # An additional layer of classification for the type of payment order you are
2752
+ # doing. This field is only used for `ach` payment orders currently. For `ach`
2753
+ # payment orders, the `subtype` represents the SEC code. We currently support
2754
+ # `CCD`, `PPD`, `IAT`, `CTX`, `WEB`, `CIE`, and `TEL`.
2755
+ #
2756
+ # @return [Symbol, ModernTreasury::Models::PaymentOrderSubtype, nil]
2757
+ optional :subtype, enum: -> { ModernTreasury::Models::PaymentOrderSubtype }, nil?: true
2758
+
2759
+ # @!attribute [r] type
2760
+ # One of `ach`, `se_bankgirot`, `eft`, `wire`, `check`, `sen`, `book`, `rtp`,
2761
+ # `sepa`, `bacs`, `au_becs`, `interac`, `neft`, `nics`,
2762
+ # `nz_national_clearing_code`, `sic`, `signet`, `provexchange`, `zengin`.
2763
+ #
2764
+ # @return [Symbol, ModernTreasury::Models::PaymentOrderType, nil]
2765
+ optional :type, enum: -> { ModernTreasury::Models::PaymentOrderType }
2766
+
2767
+ # @!parse
2768
+ # # @return [Symbol, ModernTreasury::Models::PaymentOrderType]
2769
+ # attr_writer :type
2770
+
2771
+ # @!attribute ultimate_originating_party_identifier
2772
+ # This represents the identifier by which the person is known to the receiver when
2773
+ # using the CIE subtype for ACH payments. Only the first 22 characters of this
2774
+ # string will be used. Any additional characters will be truncated.
2775
+ #
2776
+ # @return [String, nil]
2777
+ optional :ultimate_originating_party_identifier, String, nil?: true
2778
+
2779
+ # @!attribute ultimate_originating_party_name
2780
+ # This represents the name of the person that the payment is on behalf of when
2781
+ # using the CIE subtype for ACH payments. Only the first 15 characters of this
2782
+ # string will be used. Any additional characters will be truncated.
2783
+ #
2784
+ # @return [String, nil]
2785
+ optional :ultimate_originating_party_name, String, nil?: true
2786
+
2787
+ # @!attribute ultimate_receiving_party_identifier
2788
+ # This represents the name of the merchant that the payment is being sent to when
2789
+ # using the CIE subtype for ACH payments. Only the first 22 characters of this
2790
+ # string will be used. Any additional characters will be truncated.
2791
+ #
2792
+ # @return [String, nil]
2793
+ optional :ultimate_receiving_party_identifier, String, nil?: true
2794
+
2795
+ # @!attribute ultimate_receiving_party_name
2796
+ # This represents the identifier by which the merchant is known to the person
2797
+ # initiating an ACH payment with CIE subtype. Only the first 15 characters of this
2798
+ # string will be used. Any additional characters will be truncated.
2799
+ #
2800
+ # @return [String, nil]
2801
+ optional :ultimate_receiving_party_name, String, nil?: true
2802
+
2803
+ # @!parse
2804
+ # # @param id [String]
2805
+ # # @param accounting [ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::Accounting]
2806
+ # # @param accounting_category_id [String, nil]
2807
+ # # @param accounting_ledger_class_id [String, nil]
2808
+ # # @param amount [Integer]
2809
+ # # @param charge_bearer [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ChargeBearer, nil]
2810
+ # # @param counterparty_id [String, nil]
2811
+ # # @param currency [Symbol, ModernTreasury::Models::Currency]
2812
+ # # @param description [String, nil]
2813
+ # # @param direction [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::Direction]
2814
+ # # @param effective_date [Date]
2815
+ # # @param expires_at [Time, nil]
2816
+ # # @param fallback_type [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::FallbackType]
2817
+ # # @param foreign_exchange_contract [String, nil]
2818
+ # # @param foreign_exchange_indicator [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ForeignExchangeIndicator, nil]
2819
+ # # @param line_items [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::LineItem>]
2820
+ # # @param metadata [Hash{Symbol=>String}]
2821
+ # # @param nsf_protected [Boolean]
2822
+ # # @param originating_account_id [String]
2823
+ # # @param originating_party_name [String, nil]
2824
+ # # @param priority [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::Priority]
2825
+ # # @param process_after [Time, nil]
2826
+ # # @param purpose [String, nil]
2827
+ # # @param receiving_account [ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount]
2828
+ # # @param receiving_account_id [String]
2829
+ # # @param remittance_information [String, nil]
2830
+ # # @param send_remittance_advice [Boolean, nil]
2831
+ # # @param statement_descriptor [String, nil]
2832
+ # # @param status [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::Status]
2833
+ # # @param subtype [Symbol, ModernTreasury::Models::PaymentOrderSubtype, nil]
2834
+ # # @param type [Symbol, ModernTreasury::Models::PaymentOrderType]
2835
+ # # @param ultimate_originating_party_identifier [String, nil]
2836
+ # # @param ultimate_originating_party_name [String, nil]
2837
+ # # @param ultimate_receiving_party_identifier [String, nil]
2838
+ # # @param ultimate_receiving_party_name [String, nil]
2839
+ # #
2840
+ # def initialize(
2841
+ # id: nil,
2842
+ # accounting: nil,
2843
+ # accounting_category_id: nil,
2844
+ # accounting_ledger_class_id: nil,
2845
+ # amount: nil,
2846
+ # charge_bearer: nil,
2847
+ # counterparty_id: nil,
2848
+ # currency: nil,
2849
+ # description: nil,
2850
+ # direction: nil,
2851
+ # effective_date: nil,
2852
+ # expires_at: nil,
2853
+ # fallback_type: nil,
2854
+ # foreign_exchange_contract: nil,
2855
+ # foreign_exchange_indicator: nil,
2856
+ # line_items: nil,
2857
+ # metadata: nil,
2858
+ # nsf_protected: nil,
2859
+ # originating_account_id: nil,
2860
+ # originating_party_name: nil,
2861
+ # priority: nil,
2862
+ # process_after: nil,
2863
+ # purpose: nil,
2864
+ # receiving_account: nil,
2865
+ # receiving_account_id: nil,
2866
+ # remittance_information: nil,
2867
+ # send_remittance_advice: nil,
2868
+ # statement_descriptor: nil,
2869
+ # status: nil,
2870
+ # subtype: nil,
2871
+ # type: nil,
2872
+ # ultimate_originating_party_identifier: nil,
2873
+ # ultimate_originating_party_name: nil,
2874
+ # ultimate_receiving_party_identifier: nil,
2875
+ # ultimate_receiving_party_name: nil,
2876
+ # **
2877
+ # )
2878
+ # super
2879
+ # end
2880
+
2881
+ # def initialize: (Hash | ModernTreasury::BaseModel) -> void
2882
+
2883
+ class Accounting < ModernTreasury::BaseModel
2884
+ # @!attribute account_id
2885
+ # The ID of one of your accounting categories. Note that these will only be
2886
+ # accessible if your accounting system has been connected.
2887
+ #
2888
+ # @return [String, nil]
2889
+ optional :account_id, String, nil?: true
2890
+
2891
+ # @!attribute class_id
2892
+ # The ID of one of the class objects in your accounting system. Class objects
2893
+ # track segments of your business independent of client or project. Note that
2894
+ # these will only be accessible if your accounting system has been connected.
2895
+ #
2896
+ # @return [String, nil]
2897
+ optional :class_id, String, nil?: true
2898
+
2899
+ # @!parse
2900
+ # # @param account_id [String, nil]
2901
+ # # @param class_id [String, nil]
2902
+ # #
2903
+ # def initialize(account_id: nil, class_id: nil, **) = super
2904
+
2905
+ # def initialize: (Hash | ModernTreasury::BaseModel) -> void
2906
+ end
2907
+
2908
+ # The party that will pay the fees for the payment order. Only applies to wire
2909
+ # payment orders. Can be one of shared, sender, or receiver, which correspond
2910
+ # respectively with the SWIFT 71A values `SHA`, `OUR`, `BEN`.
2911
+ module ChargeBearer
2912
+ extend ModernTreasury::Enum
2913
+
2914
+ SHARED = :shared
2915
+ SENDER = :sender
2916
+ RECEIVER = :receiver
2917
+
2918
+ finalize!
2919
+
2920
+ # @!parse
2921
+ # # @return [Array<Symbol>]
2922
+ # def self.values; end
2923
+ end
2924
+
2925
+ # One of `credit`, `debit`. Describes the direction money is flowing in the
2926
+ # transaction. A `credit` moves money from your account to someone else's. A
2927
+ # `debit` pulls money from someone else's account to your own. Note that wire,
2928
+ # rtp, and check payments will always be `credit`.
2929
+ module Direction
2930
+ extend ModernTreasury::Enum
2931
+
2932
+ CREDIT = :credit
2933
+ DEBIT = :debit
2934
+
2935
+ finalize!
2936
+
2937
+ # @!parse
2938
+ # # @return [Array<Symbol>]
2939
+ # def self.values; end
2940
+ end
2941
+
2942
+ # A payment type to fallback to if the original type is not valid for the
2943
+ # receiving account. Currently, this only supports falling back from RTP to ACH
2944
+ # (type=rtp and fallback_type=ach)
2945
+ module FallbackType
2946
+ extend ModernTreasury::Enum
2947
+
2948
+ ACH = :ach
2949
+
2950
+ finalize!
2951
+
2952
+ # @!parse
2953
+ # # @return [Array<Symbol>]
2954
+ # def self.values; end
2955
+ end
2956
+
2957
+ # Indicates the type of FX transfer to initiate, can be either
2958
+ # `variable_to_fixed`, `fixed_to_variable`, or `null` if the payment order
2959
+ # currency matches the originating account currency.
2960
+ module ForeignExchangeIndicator
2961
+ extend ModernTreasury::Enum
2962
+
2963
+ FIXED_TO_VARIABLE = :fixed_to_variable
2964
+ VARIABLE_TO_FIXED = :variable_to_fixed
2965
+
2966
+ finalize!
2967
+
2968
+ # @!parse
2969
+ # # @return [Array<Symbol>]
2970
+ # def self.values; end
2971
+ end
2972
+
2973
+ class LineItem < ModernTreasury::BaseModel
2974
+ # @!attribute amount
2975
+ # Value in specified currency's smallest unit. e.g. $10 would be represented
2976
+ # as 1000.
2977
+ #
2978
+ # @return [Integer]
2979
+ required :amount, Integer
2980
+
2981
+ # @!attribute accounting_category_id
2982
+ # The ID of one of your accounting categories. Note that these will only be
2983
+ # accessible if your accounting system has been connected.
2984
+ #
2985
+ # @return [String, nil]
2986
+ optional :accounting_category_id, String, nil?: true
2987
+
2988
+ # @!attribute description
2989
+ # A free-form description of the line item.
2990
+ #
2991
+ # @return [String, nil]
2992
+ optional :description, String, nil?: true
2993
+
2994
+ # @!attribute [r] metadata
2995
+ # Additional data represented as key-value pairs. Both the key and value must be
2996
+ # strings.
2997
+ #
2998
+ # @return [Hash{Symbol=>String}, nil]
2999
+ optional :metadata, ModernTreasury::HashOf[String]
3000
+
3001
+ # @!parse
3002
+ # # @return [Hash{Symbol=>String}]
3003
+ # attr_writer :metadata
3004
+
3005
+ # @!parse
3006
+ # # @param amount [Integer]
3007
+ # # @param accounting_category_id [String, nil]
3008
+ # # @param description [String, nil]
3009
+ # # @param metadata [Hash{Symbol=>String}]
3010
+ # #
3011
+ # def initialize(amount:, accounting_category_id: nil, description: nil, metadata: nil, **) = super
3012
+
3013
+ # def initialize: (Hash | ModernTreasury::BaseModel) -> void
3014
+ end
3015
+
3016
+ # Either `normal` or `high`. For ACH and EFT payments, `high` represents a
3017
+ # same-day ACH or EFT transfer, respectively. For check payments, `high` can mean
3018
+ # an overnight check rather than standard mail.
3019
+ module Priority
3020
+ extend ModernTreasury::Enum
3021
+
3022
+ HIGH = :high
3023
+ NORMAL = :normal
3024
+
3025
+ finalize!
3026
+
3027
+ # @!parse
3028
+ # # @return [Array<Symbol>]
3029
+ # def self.values; end
3030
+ end
3031
+
3032
+ class ReceivingAccount < ModernTreasury::BaseModel
3033
+ # @!attribute [r] account_details
3034
+ #
3035
+ # @return [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::AccountDetail>, nil]
3036
+ optional :account_details,
3037
+ -> do
3038
+ ModernTreasury::ArrayOf[
3039
+ ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::AccountDetail
3040
+ ]
3041
+ end
3042
+
3043
+ # @!parse
3044
+ # # @return [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::AccountDetail>]
3045
+ # attr_writer :account_details
3046
+
3047
+ # @!attribute [r] account_type
3048
+ # Can be `checking`, `savings` or `other`.
3049
+ #
3050
+ # @return [Symbol, ModernTreasury::Models::ExternalAccountType, nil]
3051
+ optional :account_type, enum: -> { ModernTreasury::Models::ExternalAccountType }
3052
+
3053
+ # @!parse
3054
+ # # @return [Symbol, ModernTreasury::Models::ExternalAccountType]
3055
+ # attr_writer :account_type
3056
+
3057
+ # @!attribute [r] contact_details
3058
+ #
3059
+ # @return [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::ContactDetail>, nil]
3060
+ optional :contact_details,
3061
+ -> do
3062
+ ModernTreasury::ArrayOf[
3063
+ ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::ContactDetail
3064
+ ]
3065
+ end
3066
+
3067
+ # @!parse
3068
+ # # @return [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::ContactDetail>]
3069
+ # attr_writer :contact_details
3070
+
3071
+ # @!attribute [r] ledger_account
3072
+ # Specifies a ledger account object that will be created with the external
3073
+ # account. The resulting ledger account is linked to the external account for
3074
+ # auto-ledgering Payment objects. See
3075
+ # https://docs.moderntreasury.com/docs/linking-to-other-modern-treasury-objects
3076
+ # for more details.
3077
+ #
3078
+ # @return [ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::LedgerAccount, nil]
3079
+ optional :ledger_account,
3080
+ -> { ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::LedgerAccount }
3081
+
3082
+ # @!parse
3083
+ # # @return [ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::LedgerAccount]
3084
+ # attr_writer :ledger_account
3085
+
3086
+ # @!attribute [r] metadata
3087
+ # Additional data represented as key-value pairs. Both the key and value must be
3088
+ # strings.
3089
+ #
3090
+ # @return [Hash{Symbol=>String}, nil]
3091
+ optional :metadata, ModernTreasury::HashOf[String]
3092
+
3093
+ # @!parse
3094
+ # # @return [Hash{Symbol=>String}]
3095
+ # attr_writer :metadata
3096
+
3097
+ # @!attribute name
3098
+ # A nickname for the external account. This is only for internal usage and won't
3099
+ # affect any payments
3100
+ #
3101
+ # @return [String, nil]
3102
+ optional :name, String, nil?: true
3103
+
3104
+ # @!attribute [r] party_address
3105
+ # Required if receiving wire payments.
3106
+ #
3107
+ # @return [ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::PartyAddress, nil]
3108
+ optional :party_address,
3109
+ -> { ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::PartyAddress }
3110
+
3111
+ # @!parse
3112
+ # # @return [ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::PartyAddress]
3113
+ # attr_writer :party_address
3114
+
3115
+ # @!attribute [r] party_identifier
3116
+ #
3117
+ # @return [String, nil]
3118
+ optional :party_identifier, String
3119
+
3120
+ # @!parse
3121
+ # # @return [String]
3122
+ # attr_writer :party_identifier
3123
+
3124
+ # @!attribute [r] party_name
3125
+ # If this value isn't provided, it will be inherited from the counterparty's name.
3126
+ #
3127
+ # @return [String, nil]
3128
+ optional :party_name, String
3129
+
3130
+ # @!parse
3131
+ # # @return [String]
3132
+ # attr_writer :party_name
3133
+
3134
+ # @!attribute party_type
3135
+ # Either `individual` or `business`.
3136
+ #
3137
+ # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::PartyType, nil]
3138
+ optional :party_type,
3139
+ enum: -> { ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::PartyType },
3140
+ nil?: true
3141
+
3142
+ # @!attribute [r] plaid_processor_token
3143
+ # If you've enabled the Modern Treasury + Plaid integration in your Plaid account,
3144
+ # you can pass the processor token in this field.
3145
+ #
3146
+ # @return [String, nil]
3147
+ optional :plaid_processor_token, String
3148
+
3149
+ # @!parse
3150
+ # # @return [String]
3151
+ # attr_writer :plaid_processor_token
3152
+
3153
+ # @!attribute [r] routing_details
3154
+ #
3155
+ # @return [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::RoutingDetail>, nil]
3156
+ optional :routing_details,
3157
+ -> do
3158
+ ModernTreasury::ArrayOf[
3159
+ ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::RoutingDetail
3160
+ ]
3161
+ end
3162
+
3163
+ # @!parse
3164
+ # # @return [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::RoutingDetail>]
3165
+ # attr_writer :routing_details
3166
+
3167
+ # @!parse
3168
+ # # Either `receiving_account` or `receiving_account_id` must be present. When using
3169
+ # # `receiving_account_id`, you may pass the id of an external account or an
3170
+ # # internal account.
3171
+ # #
3172
+ # # @param account_details [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::AccountDetail>]
3173
+ # # @param account_type [Symbol, ModernTreasury::Models::ExternalAccountType]
3174
+ # # @param contact_details [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::ContactDetail>]
3175
+ # # @param ledger_account [ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::LedgerAccount]
3176
+ # # @param metadata [Hash{Symbol=>String}]
3177
+ # # @param name [String, nil]
3178
+ # # @param party_address [ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::PartyAddress]
3179
+ # # @param party_identifier [String]
3180
+ # # @param party_name [String]
3181
+ # # @param party_type [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::PartyType, nil]
3182
+ # # @param plaid_processor_token [String]
3183
+ # # @param routing_details [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::RoutingDetail>]
3184
+ # #
3185
+ # def initialize(
3186
+ # account_details: nil,
3187
+ # account_type: nil,
3188
+ # contact_details: nil,
3189
+ # ledger_account: nil,
3190
+ # metadata: nil,
3191
+ # name: nil,
3192
+ # party_address: nil,
3193
+ # party_identifier: nil,
3194
+ # party_name: nil,
3195
+ # party_type: nil,
3196
+ # plaid_processor_token: nil,
3197
+ # routing_details: nil,
3198
+ # **
3199
+ # )
3200
+ # super
3201
+ # end
3202
+
3203
+ # def initialize: (Hash | ModernTreasury::BaseModel) -> void
3204
+
3205
+ class AccountDetail < ModernTreasury::BaseModel
3206
+ # @!attribute account_number
3207
+ #
3208
+ # @return [String]
3209
+ required :account_number, String
3210
+
3211
+ # @!attribute [r] account_number_type
3212
+ #
3213
+ # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::AccountDetail::AccountNumberType, nil]
3214
+ optional :account_number_type,
3215
+ enum: -> { ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::AccountDetail::AccountNumberType }
3216
+
3217
+ # @!parse
3218
+ # # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::AccountDetail::AccountNumberType]
3219
+ # attr_writer :account_number_type
3220
+
3221
+ # @!parse
3222
+ # # @param account_number [String]
3223
+ # # @param account_number_type [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::AccountDetail::AccountNumberType]
3224
+ # #
3225
+ # def initialize(account_number:, account_number_type: nil, **) = super
3226
+
3227
+ # def initialize: (Hash | ModernTreasury::BaseModel) -> void
3228
+
3229
+ module AccountNumberType
3230
+ extend ModernTreasury::Enum
3231
+
3232
+ AU_NUMBER = :au_number
3233
+ CLABE = :clabe
3234
+ HK_NUMBER = :hk_number
3235
+ IBAN = :iban
3236
+ ID_NUMBER = :id_number
3237
+ NZ_NUMBER = :nz_number
3238
+ OTHER = :other
3239
+ PAN = :pan
3240
+ SG_NUMBER = :sg_number
3241
+ WALLET_ADDRESS = :wallet_address
3242
+
3243
+ finalize!
3244
+
3245
+ # @!parse
3246
+ # # @return [Array<Symbol>]
3247
+ # def self.values; end
3248
+ end
3249
+ end
3250
+
3251
+ class ContactDetail < ModernTreasury::BaseModel
3252
+ # @!attribute [r] contact_identifier
3253
+ #
3254
+ # @return [String, nil]
3255
+ optional :contact_identifier, String
3256
+
3257
+ # @!parse
3258
+ # # @return [String]
3259
+ # attr_writer :contact_identifier
3260
+
3261
+ # @!attribute [r] contact_identifier_type
3262
+ #
3263
+ # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::ContactDetail::ContactIdentifierType, nil]
3264
+ optional :contact_identifier_type,
3265
+ enum: -> { ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::ContactDetail::ContactIdentifierType }
3266
+
3267
+ # @!parse
3268
+ # # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::ContactDetail::ContactIdentifierType]
3269
+ # attr_writer :contact_identifier_type
3270
+
3271
+ # @!parse
3272
+ # # @param contact_identifier [String]
3273
+ # # @param contact_identifier_type [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::ContactDetail::ContactIdentifierType]
3274
+ # #
3275
+ # def initialize(contact_identifier: nil, contact_identifier_type: nil, **) = super
3276
+
3277
+ # def initialize: (Hash | ModernTreasury::BaseModel) -> void
3278
+
3279
+ module ContactIdentifierType
3280
+ extend ModernTreasury::Enum
3281
+
3282
+ EMAIL = :email
3283
+ PHONE_NUMBER = :phone_number
3284
+ WEBSITE = :website
3285
+
3286
+ finalize!
3287
+
3288
+ # @!parse
3289
+ # # @return [Array<Symbol>]
3290
+ # def self.values; end
3291
+ end
3292
+ end
3293
+
3294
+ class LedgerAccount < ModernTreasury::BaseModel
3295
+ # @!attribute currency
3296
+ # The currency of the ledger account.
3297
+ #
3298
+ # @return [String]
3299
+ required :currency, String
3300
+
3301
+ # @!attribute ledger_id
3302
+ # The id of the ledger that this account belongs to.
3303
+ #
3304
+ # @return [String]
3305
+ required :ledger_id, String
3306
+
3307
+ # @!attribute name
3308
+ # The name of the ledger account.
3309
+ #
3310
+ # @return [String]
3311
+ required :name, String
3312
+
3313
+ # @!attribute normal_balance
3314
+ # The normal balance of the ledger account.
3315
+ #
3316
+ # @return [Symbol, ModernTreasury::Models::TransactionDirection]
3317
+ required :normal_balance, enum: -> { ModernTreasury::Models::TransactionDirection }
3318
+
3319
+ # @!attribute currency_exponent
3320
+ # The currency exponent of the ledger account.
3321
+ #
3322
+ # @return [Integer, nil]
3323
+ optional :currency_exponent, Integer, nil?: true
3324
+
3325
+ # @!attribute description
3326
+ # The description of the ledger account.
3327
+ #
3328
+ # @return [String, nil]
3329
+ optional :description, String, nil?: true
3330
+
3331
+ # @!attribute [r] ledger_account_category_ids
3332
+ # The array of ledger account category ids that this ledger account should be a
3333
+ # child of.
3334
+ #
3335
+ # @return [Array<String>, nil]
3336
+ optional :ledger_account_category_ids, ModernTreasury::ArrayOf[String]
3337
+
3338
+ # @!parse
3339
+ # # @return [Array<String>]
3340
+ # attr_writer :ledger_account_category_ids
3341
+
3342
+ # @!attribute [r] ledgerable_id
3343
+ # If the ledger account links to another object in Modern Treasury, the id will be
3344
+ # populated here, otherwise null.
3345
+ #
3346
+ # @return [String, nil]
3347
+ optional :ledgerable_id, String
3348
+
3349
+ # @!parse
3350
+ # # @return [String]
3351
+ # attr_writer :ledgerable_id
3352
+
3353
+ # @!attribute [r] ledgerable_type
3354
+ # If the ledger account links to another object in Modern Treasury, the type will
3355
+ # be populated here, otherwise null. The value is one of internal_account or
3356
+ # external_account.
3357
+ #
3358
+ # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::LedgerAccount::LedgerableType, nil]
3359
+ optional :ledgerable_type,
3360
+ enum: -> { ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::LedgerAccount::LedgerableType }
3361
+
3362
+ # @!parse
3363
+ # # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::LedgerAccount::LedgerableType]
3364
+ # attr_writer :ledgerable_type
3365
+
3366
+ # @!attribute [r] metadata
3367
+ # Additional data represented as key-value pairs. Both the key and value must be
3368
+ # strings.
3369
+ #
3370
+ # @return [Hash{Symbol=>String}, nil]
3371
+ optional :metadata, ModernTreasury::HashOf[String]
3372
+
3373
+ # @!parse
3374
+ # # @return [Hash{Symbol=>String}]
3375
+ # attr_writer :metadata
3376
+
3377
+ # @!parse
3378
+ # # Specifies a ledger account object that will be created with the external
3379
+ # # account. The resulting ledger account is linked to the external account for
3380
+ # # auto-ledgering Payment objects. See
3381
+ # # https://docs.moderntreasury.com/docs/linking-to-other-modern-treasury-objects
3382
+ # # for more details.
3383
+ # #
3384
+ # # @param currency [String]
3385
+ # # @param ledger_id [String]
3386
+ # # @param name [String]
3387
+ # # @param normal_balance [Symbol, ModernTreasury::Models::TransactionDirection]
3388
+ # # @param currency_exponent [Integer, nil]
3389
+ # # @param description [String, nil]
3390
+ # # @param ledger_account_category_ids [Array<String>]
3391
+ # # @param ledgerable_id [String]
3392
+ # # @param ledgerable_type [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::LedgerAccount::LedgerableType]
3393
+ # # @param metadata [Hash{Symbol=>String}]
3394
+ # #
3395
+ # def initialize(
3396
+ # currency:,
3397
+ # ledger_id:,
3398
+ # name:,
3399
+ # normal_balance:,
3400
+ # currency_exponent: nil,
3401
+ # description: nil,
3402
+ # ledger_account_category_ids: nil,
3403
+ # ledgerable_id: nil,
3404
+ # ledgerable_type: nil,
3405
+ # metadata: nil,
3406
+ # **
3407
+ # )
3408
+ # super
3409
+ # end
3410
+
3411
+ # def initialize: (Hash | ModernTreasury::BaseModel) -> void
3412
+
3413
+ # If the ledger account links to another object in Modern Treasury, the type will
3414
+ # be populated here, otherwise null. The value is one of internal_account or
3415
+ # external_account.
3416
+ module LedgerableType
3417
+ extend ModernTreasury::Enum
3418
+
3419
+ COUNTERPARTY = :counterparty
3420
+ EXTERNAL_ACCOUNT = :external_account
3421
+ INTERNAL_ACCOUNT = :internal_account
3422
+ VIRTUAL_ACCOUNT = :virtual_account
3423
+
3424
+ finalize!
3425
+
3426
+ # @!parse
3427
+ # # @return [Array<Symbol>]
3428
+ # def self.values; end
3429
+ end
3430
+ end
3431
+
3432
+ class PartyAddress < ModernTreasury::BaseModel
3433
+ # @!attribute country
3434
+ # Country code conforms to [ISO 3166-1 alpha-2]
3435
+ #
3436
+ # @return [String, nil]
3437
+ optional :country, String, nil?: true
3438
+
3439
+ # @!attribute line1
3440
+ #
3441
+ # @return [String, nil]
3442
+ optional :line1, String, nil?: true
3443
+
3444
+ # @!attribute line2
3445
+ #
3446
+ # @return [String, nil]
3447
+ optional :line2, String, nil?: true
3448
+
3449
+ # @!attribute locality
3450
+ # Locality or City.
3451
+ #
3452
+ # @return [String, nil]
3453
+ optional :locality, String, nil?: true
3454
+
3455
+ # @!attribute postal_code
3456
+ # The postal code of the address.
3457
+ #
3458
+ # @return [String, nil]
3459
+ optional :postal_code, String, nil?: true
3460
+
3461
+ # @!attribute region
3462
+ # Region or State.
3463
+ #
3464
+ # @return [String, nil]
3465
+ optional :region, String, nil?: true
3466
+
3467
+ # @!parse
3468
+ # # Required if receiving wire payments.
3469
+ # #
3470
+ # # @param country [String, nil]
3471
+ # # @param line1 [String, nil]
3472
+ # # @param line2 [String, nil]
3473
+ # # @param locality [String, nil]
3474
+ # # @param postal_code [String, nil]
3475
+ # # @param region [String, nil]
3476
+ # #
3477
+ # def initialize(country: nil, line1: nil, line2: nil, locality: nil, postal_code: nil, region: nil, **) = super
3478
+
3479
+ # def initialize: (Hash | ModernTreasury::BaseModel) -> void
3480
+ end
3481
+
3482
+ # Either `individual` or `business`.
3483
+ module PartyType
3484
+ extend ModernTreasury::Enum
3485
+
3486
+ BUSINESS = :business
3487
+ INDIVIDUAL = :individual
3488
+
3489
+ finalize!
3490
+
3491
+ # @!parse
3492
+ # # @return [Array<Symbol>]
3493
+ # def self.values; end
3494
+ end
3495
+
3496
+ class RoutingDetail < ModernTreasury::BaseModel
3497
+ # @!attribute routing_number
3498
+ #
3499
+ # @return [String]
3500
+ required :routing_number, String
3501
+
3502
+ # @!attribute routing_number_type
3503
+ #
3504
+ # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::RoutingDetail::RoutingNumberType]
3505
+ required :routing_number_type,
3506
+ enum: -> { ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::RoutingDetail::RoutingNumberType }
3507
+
3508
+ # @!attribute [r] payment_type
3509
+ #
3510
+ # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::RoutingDetail::PaymentType, nil]
3511
+ optional :payment_type,
3512
+ enum: -> { ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::RoutingDetail::PaymentType }
3513
+
3514
+ # @!parse
3515
+ # # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::RoutingDetail::PaymentType]
3516
+ # attr_writer :payment_type
3517
+
3518
+ # @!parse
3519
+ # # @param routing_number [String]
3520
+ # # @param routing_number_type [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::RoutingDetail::RoutingNumberType]
3521
+ # # @param payment_type [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::RoutingDetail::PaymentType]
3522
+ # #
3523
+ # def initialize(routing_number:, routing_number_type:, payment_type: nil, **) = super
3524
+
3525
+ # def initialize: (Hash | ModernTreasury::BaseModel) -> void
3526
+
3527
+ module RoutingNumberType
3528
+ extend ModernTreasury::Enum
3529
+
3530
+ ABA = :aba
3531
+ AU_BSB = :au_bsb
3532
+ BR_CODIGO = :br_codigo
3533
+ CA_CPA = :ca_cpa
3534
+ CHIPS = :chips
3535
+ CNAPS = :cnaps
3536
+ DK_INTERBANK_CLEARING_CODE = :dk_interbank_clearing_code
3537
+ GB_SORT_CODE = :gb_sort_code
3538
+ HK_INTERBANK_CLEARING_CODE = :hk_interbank_clearing_code
3539
+ HU_INTERBANK_CLEARING_CODE = :hu_interbank_clearing_code
3540
+ ID_SKNBI_CODE = :id_sknbi_code
3541
+ IN_IFSC = :in_ifsc
3542
+ JP_ZENGIN_CODE = :jp_zengin_code
3543
+ MY_BRANCH_CODE = :my_branch_code
3544
+ MX_BANK_IDENTIFIER = :mx_bank_identifier
3545
+ NZ_NATIONAL_CLEARING_CODE = :nz_national_clearing_code
3546
+ PL_NATIONAL_CLEARING_CODE = :pl_national_clearing_code
3547
+ SE_BANKGIRO_CLEARING_CODE = :se_bankgiro_clearing_code
3548
+ SG_INTERBANK_CLEARING_CODE = :sg_interbank_clearing_code
3549
+ SWIFT = :swift
3550
+ ZA_NATIONAL_CLEARING_CODE = :za_national_clearing_code
3551
+
3552
+ finalize!
3553
+
3554
+ # @!parse
3555
+ # # @return [Array<Symbol>]
3556
+ # def self.values; end
3557
+ end
3558
+
3559
+ module PaymentType
3560
+ extend ModernTreasury::Enum
3561
+
3562
+ ACH = :ach
3563
+ AU_BECS = :au_becs
3564
+ BACS = :bacs
3565
+ BOOK = :book
3566
+ CARD = :card
3567
+ CHATS = :chats
3568
+ CHECK = :check
3569
+ CROSS_BORDER = :cross_border
3570
+ DK_NETS = :dk_nets
3571
+ EFT = :eft
3572
+ HU_ICS = :hu_ics
3573
+ INTERAC = :interac
3574
+ MASAV = :masav
3575
+ MX_CCEN = :mx_ccen
3576
+ NEFT = :neft
3577
+ NICS = :nics
3578
+ NZ_BECS = :nz_becs
3579
+ PL_ELIXIR = :pl_elixir
3580
+ PROVXCHANGE = :provxchange
3581
+ RO_SENT = :ro_sent
3582
+ RTP = :rtp
3583
+ SE_BANKGIROT = :se_bankgirot
3584
+ SEN = :sen
3585
+ SEPA = :sepa
3586
+ SG_GIRO = :sg_giro
3587
+ SIC = :sic
3588
+ SIGNET = :signet
3589
+ SKNBI = :sknbi
3590
+ WIRE = :wire
3591
+ ZENGIN = :zengin
3592
+
3593
+ finalize!
3594
+
3595
+ # @!parse
3596
+ # # @return [Array<Symbol>]
3597
+ # def self.values; end
3598
+ end
3599
+ end
3600
+ end
3601
+
3602
+ # To cancel a payment order, use `cancelled`. To redraft a returned payment order,
3603
+ # use `approved`. To undo approval on a denied or approved payment order, use
3604
+ # `needs_approval`.
3605
+ module Status
3606
+ extend ModernTreasury::Enum
3607
+
3608
+ APPROVED = :approved
3609
+ CANCELLED = :cancelled
3610
+ COMPLETED = :completed
3611
+ DENIED = :denied
3612
+ FAILED = :failed
3613
+ NEEDS_APPROVAL = :needs_approval
3614
+ PENDING = :pending
3615
+ PROCESSING = :processing
3616
+ RETURNED = :returned
3617
+ REVERSED = :reversed
3618
+ SENT = :sent
3619
+
3620
+ finalize!
3621
+
3622
+ # @!parse
3623
+ # # @return [Array<Symbol>]
3624
+ # def self.values; end
3625
+ end
3626
+ end
3627
+
3628
+ class ExpectedPaymentUpdateRequestWithID < ModernTreasury::BaseModel
3629
+ # @!attribute [r] id
3630
+ #
3631
+ # @return [String, nil]
3632
+ optional :id, String
3633
+
3634
+ # @!parse
3635
+ # # @return [String]
3636
+ # attr_writer :id
3637
+
3638
+ # @!attribute amount_lower_bound
3639
+ # The lowest amount this expected payment may be equal to. Value in specified
3640
+ # currency's smallest unit. e.g. $10 would be represented as 1000.
3641
+ #
3642
+ # @return [Integer, nil]
3643
+ optional :amount_lower_bound, Integer, nil?: true
3644
+
3645
+ # @!attribute amount_upper_bound
3646
+ # The highest amount this expected payment may be equal to. Value in specified
3647
+ # currency's smallest unit. e.g. $10 would be represented as 1000.
3648
+ #
3649
+ # @return [Integer, nil]
3650
+ optional :amount_upper_bound, Integer, nil?: true
3651
+
3652
+ # @!attribute counterparty_id
3653
+ # The ID of the counterparty you expect for this payment.
3654
+ #
3655
+ # @return [String, nil]
3656
+ optional :counterparty_id, String, nil?: true
3657
+
3658
+ # @!attribute currency
3659
+ # Must conform to ISO 4217. Defaults to the currency of the internal account.
3660
+ #
3661
+ # @return [Symbol, ModernTreasury::Models::Currency, nil]
3662
+ optional :currency, enum: -> { ModernTreasury::Models::Currency }, nil?: true
3663
+
3664
+ # @!attribute date_lower_bound
3665
+ # The earliest date the payment may come in. Format: yyyy-mm-dd
3666
+ #
3667
+ # @return [Date, nil]
3668
+ optional :date_lower_bound, Date, nil?: true
3669
+
3670
+ # @!attribute date_upper_bound
3671
+ # The latest date the payment may come in. Format: yyyy-mm-dd
3672
+ #
3673
+ # @return [Date, nil]
3674
+ optional :date_upper_bound, Date, nil?: true
3675
+
3676
+ # @!attribute description
3677
+ # An optional description for internal use.
3678
+ #
3679
+ # @return [String, nil]
3680
+ optional :description, String, nil?: true
3681
+
3682
+ # @!attribute direction
3683
+ # One of credit or debit. When you are receiving money, use credit. When you are
3684
+ # being charged, use debit.
3685
+ #
3686
+ # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentUpdateRequestWithID::Direction, nil]
3687
+ optional :direction,
3688
+ enum: -> { ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentUpdateRequestWithID::Direction },
3689
+ nil?: true
3690
+
3691
+ # @!attribute internal_account_id
3692
+ # The ID of the Internal Account for the expected payment.
3693
+ #
3694
+ # @return [String, nil]
3695
+ optional :internal_account_id, String, nil?: true
3696
+
3697
+ # @!attribute [r] metadata
3698
+ # Additional data represented as key-value pairs. Both the key and value must be
3699
+ # strings.
3700
+ #
3701
+ # @return [Hash{Symbol=>String}, nil]
3702
+ optional :metadata, ModernTreasury::HashOf[String]
3703
+
3704
+ # @!parse
3705
+ # # @return [Hash{Symbol=>String}]
3706
+ # attr_writer :metadata
3707
+
3708
+ # @!attribute reconciliation_filters
3709
+ # The reconciliation filters you have for this payment.
3710
+ #
3711
+ # @return [Object, nil]
3712
+ optional :reconciliation_filters, ModernTreasury::Unknown, nil?: true
3713
+
3714
+ # @!attribute reconciliation_groups
3715
+ # The reconciliation groups you have for this payment.
3716
+ #
3717
+ # @return [Object, nil]
3718
+ optional :reconciliation_groups, ModernTreasury::Unknown, nil?: true
3719
+
3720
+ # @!attribute reconciliation_rule_variables
3721
+ # An array of reconciliation rule variables for this payment.
3722
+ #
3723
+ # @return [Array<ModernTreasury::Models::ReconciliationRule>, nil]
3724
+ optional :reconciliation_rule_variables,
3725
+ -> { ModernTreasury::ArrayOf[ModernTreasury::Models::ReconciliationRule] },
3726
+ nil?: true
3727
+
3728
+ # @!attribute remittance_information
3729
+ # For `ach`, this field will be passed through on an addenda record. For `wire`
3730
+ # payments the field will be passed through as the "Originator to Beneficiary
3731
+ # Information", also known as OBI or Fedwire tag 6000.
3732
+ #
3733
+ # @return [String, nil]
3734
+ optional :remittance_information, String, nil?: true
3735
+
3736
+ # @!attribute statement_descriptor
3737
+ # The statement description you expect to see on the transaction. For ACH
3738
+ # payments, this will be the full line item passed from the bank. For wire
3739
+ # payments, this will be the OBI field on the wire. For check payments, this will
3740
+ # be the memo field.
3741
+ #
3742
+ # @return [String, nil]
3743
+ optional :statement_descriptor, String, nil?: true
3744
+
3745
+ # @!attribute status
3746
+ # The Expected Payment's status can be updated from partially_reconciled to
3747
+ # reconciled.
3748
+ #
3749
+ # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentUpdateRequestWithID::Status, nil]
3750
+ optional :status,
3751
+ enum: -> { ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentUpdateRequestWithID::Status },
3752
+ nil?: true
3753
+
3754
+ # @!attribute type
3755
+ # One of: ach, au_becs, bacs, book, check, eft, interac, provxchange, rtp, sen,
3756
+ # sepa, signet, wire.
3757
+ #
3758
+ # @return [Symbol, ModernTreasury::Models::ExpectedPaymentType, nil]
3759
+ optional :type, enum: -> { ModernTreasury::Models::ExpectedPaymentType }, nil?: true
3760
+
3761
+ # @!parse
3762
+ # # @param id [String]
3763
+ # # @param amount_lower_bound [Integer, nil]
3764
+ # # @param amount_upper_bound [Integer, nil]
3765
+ # # @param counterparty_id [String, nil]
3766
+ # # @param currency [Symbol, ModernTreasury::Models::Currency, nil]
3767
+ # # @param date_lower_bound [Date, nil]
3768
+ # # @param date_upper_bound [Date, nil]
3769
+ # # @param description [String, nil]
3770
+ # # @param direction [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentUpdateRequestWithID::Direction, nil]
3771
+ # # @param internal_account_id [String, nil]
3772
+ # # @param metadata [Hash{Symbol=>String}]
3773
+ # # @param reconciliation_filters [Object, nil]
3774
+ # # @param reconciliation_groups [Object, nil]
3775
+ # # @param reconciliation_rule_variables [Array<ModernTreasury::Models::ReconciliationRule>, nil]
3776
+ # # @param remittance_information [String, nil]
3777
+ # # @param statement_descriptor [String, nil]
3778
+ # # @param status [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentUpdateRequestWithID::Status, nil]
3779
+ # # @param type [Symbol, ModernTreasury::Models::ExpectedPaymentType, nil]
3780
+ # #
3781
+ # def initialize(
3782
+ # id: nil,
3783
+ # amount_lower_bound: nil,
3784
+ # amount_upper_bound: nil,
3785
+ # counterparty_id: nil,
3786
+ # currency: nil,
3787
+ # date_lower_bound: nil,
3788
+ # date_upper_bound: nil,
3789
+ # description: nil,
3790
+ # direction: nil,
3791
+ # internal_account_id: nil,
3792
+ # metadata: nil,
3793
+ # reconciliation_filters: nil,
3794
+ # reconciliation_groups: nil,
3795
+ # reconciliation_rule_variables: nil,
3796
+ # remittance_information: nil,
3797
+ # statement_descriptor: nil,
3798
+ # status: nil,
3799
+ # type: nil,
3800
+ # **
3801
+ # )
3802
+ # super
3803
+ # end
3804
+
3805
+ # def initialize: (Hash | ModernTreasury::BaseModel) -> void
3806
+
3807
+ # One of credit or debit. When you are receiving money, use credit. When you are
3808
+ # being charged, use debit.
3809
+ module Direction
3810
+ extend ModernTreasury::Enum
3811
+
3812
+ CREDIT = :credit
3813
+ DEBIT = :debit
3814
+
3815
+ finalize!
3816
+
3817
+ # @!parse
3818
+ # # @return [Array<Symbol>]
3819
+ # def self.values; end
3820
+ end
3821
+
3822
+ # The Expected Payment's status can be updated from partially_reconciled to
3823
+ # reconciled.
3824
+ module Status
3825
+ extend ModernTreasury::Enum
3826
+
3827
+ RECONCILED = :reconciled
3828
+
3829
+ finalize!
3830
+
3831
+ # @!parse
3832
+ # # @return [Array<Symbol>]
3833
+ # def self.values; end
3834
+ end
3835
+ end
3836
+
3837
+ class TransactionUpdateRequestWithID < ModernTreasury::BaseModel
3838
+ # @!attribute [r] id
3839
+ #
3840
+ # @return [String, nil]
3841
+ optional :id, String
3842
+
3843
+ # @!parse
3844
+ # # @return [String]
3845
+ # attr_writer :id
3846
+
3847
+ # @!attribute [r] metadata
3848
+ # Additional data in the form of key-value pairs. Pairs can be removed by passing
3849
+ # an empty string or `null` as the value.
3850
+ #
3851
+ # @return [Hash{Symbol=>String}, nil]
3852
+ optional :metadata, ModernTreasury::HashOf[String]
3853
+
3854
+ # @!parse
3855
+ # # @return [Hash{Symbol=>String}]
3856
+ # attr_writer :metadata
3857
+
3858
+ # @!parse
3859
+ # # @param id [String]
3860
+ # # @param metadata [Hash{Symbol=>String}]
3861
+ # #
3862
+ # def initialize(id: nil, metadata: nil, **) = super
3863
+
3864
+ # def initialize: (Hash | ModernTreasury::BaseModel) -> void
3865
+ end
3866
+
3867
+ class LedgerTransactionUpdateRequestWithID < ModernTreasury::BaseModel
3868
+ # @!attribute [r] id
3869
+ #
3870
+ # @return [String, nil]
3871
+ optional :id, String
3872
+
3873
+ # @!parse
3874
+ # # @return [String]
3875
+ # attr_writer :id
3876
+
3877
+ # @!attribute description
3878
+ # An optional description for internal use.
3879
+ #
3880
+ # @return [String, nil]
3881
+ optional :description, String, nil?: true
3882
+
3883
+ # @!attribute [r] effective_at
3884
+ # The timestamp (ISO8601 format) at which the ledger transaction happened for
3885
+ # reporting purposes.
3886
+ #
3887
+ # @return [Time, nil]
3888
+ optional :effective_at, Time
3889
+
3890
+ # @!parse
3891
+ # # @return [Time]
3892
+ # attr_writer :effective_at
3893
+
3894
+ # @!attribute [r] ledger_entries
3895
+ # An array of ledger entry objects.
3896
+ #
3897
+ # @return [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionUpdateRequestWithID::LedgerEntry>, nil]
3898
+ optional :ledger_entries,
3899
+ -> do
3900
+ ModernTreasury::ArrayOf[
3901
+ ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionUpdateRequestWithID::LedgerEntry
3902
+ ]
3903
+ end
3904
+
3905
+ # @!parse
3906
+ # # @return [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionUpdateRequestWithID::LedgerEntry>]
3907
+ # attr_writer :ledger_entries
3908
+
3909
+ # @!attribute [r] ledgerable_id
3910
+ # If the ledger transaction can be reconciled to another object in Modern
3911
+ # Treasury, the id will be populated here, otherwise null.
3912
+ #
3913
+ # @return [String, nil]
3914
+ optional :ledgerable_id, String
3915
+
3916
+ # @!parse
3917
+ # # @return [String]
3918
+ # attr_writer :ledgerable_id
3919
+
3920
+ # @!attribute [r] ledgerable_type
3921
+ # If the ledger transaction can be reconciled to another object in Modern
3922
+ # Treasury, the type will be populated here, otherwise null. This can be one of
3923
+ # payment_order, incoming_payment_detail, expected_payment, return, paper_item, or
3924
+ # reversal.
3925
+ #
3926
+ # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionUpdateRequestWithID::LedgerableType, nil]
3927
+ optional :ledgerable_type,
3928
+ enum: -> { ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionUpdateRequestWithID::LedgerableType }
3929
+
3930
+ # @!parse
3931
+ # # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionUpdateRequestWithID::LedgerableType]
3932
+ # attr_writer :ledgerable_type
3933
+
3934
+ # @!attribute [r] metadata
3935
+ # Additional data represented as key-value pairs. Both the key and value must be
3936
+ # strings.
3937
+ #
3938
+ # @return [Hash{Symbol=>String}, nil]
3939
+ optional :metadata, ModernTreasury::HashOf[String]
3940
+
3941
+ # @!parse
3942
+ # # @return [Hash{Symbol=>String}]
3943
+ # attr_writer :metadata
3944
+
3945
+ # @!attribute [r] status
3946
+ # To post a ledger transaction at creation, use `posted`.
3947
+ #
3948
+ # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionUpdateRequestWithID::Status, nil]
3949
+ optional :status,
3950
+ enum: -> { ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionUpdateRequestWithID::Status }
3951
+
3952
+ # @!parse
3953
+ # # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionUpdateRequestWithID::Status]
3954
+ # attr_writer :status
3955
+
3956
+ # @!parse
3957
+ # # @param id [String]
3958
+ # # @param description [String, nil]
3959
+ # # @param effective_at [Time]
3960
+ # # @param ledger_entries [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionUpdateRequestWithID::LedgerEntry>]
3961
+ # # @param ledgerable_id [String]
3962
+ # # @param ledgerable_type [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionUpdateRequestWithID::LedgerableType]
3963
+ # # @param metadata [Hash{Symbol=>String}]
3964
+ # # @param status [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionUpdateRequestWithID::Status]
3965
+ # #
3966
+ # def initialize(
3967
+ # id: nil,
3968
+ # description: nil,
3969
+ # effective_at: nil,
3970
+ # ledger_entries: nil,
3971
+ # ledgerable_id: nil,
3972
+ # ledgerable_type: nil,
3973
+ # metadata: nil,
3974
+ # status: nil,
3975
+ # **
3976
+ # )
3977
+ # super
3978
+ # end
3979
+
3980
+ # def initialize: (Hash | ModernTreasury::BaseModel) -> void
3981
+
3982
+ class LedgerEntry < ModernTreasury::BaseModel
3983
+ # @!attribute amount
3984
+ # Value in specified currency's smallest unit. e.g. $10 would be represented
3985
+ # as 1000. Can be any integer up to 36 digits.
3986
+ #
3987
+ # @return [Integer]
3988
+ required :amount, Integer
3989
+
3990
+ # @!attribute direction
3991
+ # One of `credit`, `debit`. Describes the direction money is flowing in the
3992
+ # transaction. A `credit` moves money from your account to someone else's. A
3993
+ # `debit` pulls money from someone else's account to your own. Note that wire,
3994
+ # rtp, and check payments will always be `credit`.
3995
+ #
3996
+ # @return [Symbol, ModernTreasury::Models::TransactionDirection]
3997
+ required :direction, enum: -> { ModernTreasury::Models::TransactionDirection }
3998
+
3999
+ # @!attribute ledger_account_id
4000
+ # The ledger account that this ledger entry is associated with.
4001
+ #
4002
+ # @return [String]
4003
+ required :ledger_account_id, String
4004
+
4005
+ # @!attribute available_balance_amount
4006
+ # Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
4007
+ # account’s available balance. If any of these conditions would be false after the
4008
+ # transaction is created, the entire call will fail with error code 422.
4009
+ #
4010
+ # @return [Hash{Symbol=>Integer}, nil]
4011
+ optional :available_balance_amount, ModernTreasury::HashOf[Integer], nil?: true
4012
+
4013
+ # @!attribute lock_version
4014
+ # Lock version of the ledger account. This can be passed when creating a ledger
4015
+ # transaction to only succeed if no ledger transactions have posted since the
4016
+ # given version. See our post about Designing the Ledgers API with Optimistic
4017
+ # Locking for more details.
4018
+ #
4019
+ # @return [Integer, nil]
4020
+ optional :lock_version, Integer, nil?: true
4021
+
4022
+ # @!attribute [r] metadata
4023
+ # Additional data represented as key-value pairs. Both the key and value must be
4024
+ # strings.
4025
+ #
4026
+ # @return [Hash{Symbol=>String}, nil]
4027
+ optional :metadata, ModernTreasury::HashOf[String]
4028
+
4029
+ # @!parse
4030
+ # # @return [Hash{Symbol=>String}]
4031
+ # attr_writer :metadata
4032
+
4033
+ # @!attribute pending_balance_amount
4034
+ # Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
4035
+ # account’s pending balance. If any of these conditions would be false after the
4036
+ # transaction is created, the entire call will fail with error code 422.
4037
+ #
4038
+ # @return [Hash{Symbol=>Integer}, nil]
4039
+ optional :pending_balance_amount, ModernTreasury::HashOf[Integer], nil?: true
4040
+
4041
+ # @!attribute posted_balance_amount
4042
+ # Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
4043
+ # account’s posted balance. If any of these conditions would be false after the
4044
+ # transaction is created, the entire call will fail with error code 422.
4045
+ #
4046
+ # @return [Hash{Symbol=>Integer}, nil]
4047
+ optional :posted_balance_amount, ModernTreasury::HashOf[Integer], nil?: true
4048
+
4049
+ # @!attribute show_resulting_ledger_account_balances
4050
+ # If true, response will include the balance of the associated ledger account for
4051
+ # the entry.
4052
+ #
4053
+ # @return [Boolean, nil]
4054
+ optional :show_resulting_ledger_account_balances, ModernTreasury::BooleanModel, nil?: true
4055
+
4056
+ # @!parse
4057
+ # # @param amount [Integer]
4058
+ # # @param direction [Symbol, ModernTreasury::Models::TransactionDirection]
4059
+ # # @param ledger_account_id [String]
4060
+ # # @param available_balance_amount [Hash{Symbol=>Integer}, nil]
4061
+ # # @param lock_version [Integer, nil]
4062
+ # # @param metadata [Hash{Symbol=>String}]
4063
+ # # @param pending_balance_amount [Hash{Symbol=>Integer}, nil]
4064
+ # # @param posted_balance_amount [Hash{Symbol=>Integer}, nil]
4065
+ # # @param show_resulting_ledger_account_balances [Boolean, nil]
4066
+ # #
4067
+ # def initialize(
4068
+ # amount:,
4069
+ # direction:,
4070
+ # ledger_account_id:,
4071
+ # available_balance_amount: nil,
4072
+ # lock_version: nil,
4073
+ # metadata: nil,
4074
+ # pending_balance_amount: nil,
4075
+ # posted_balance_amount: nil,
4076
+ # show_resulting_ledger_account_balances: nil,
4077
+ # **
4078
+ # )
4079
+ # super
4080
+ # end
4081
+
4082
+ # def initialize: (Hash | ModernTreasury::BaseModel) -> void
4083
+ end
4084
+
4085
+ # If the ledger transaction can be reconciled to another object in Modern
4086
+ # Treasury, the type will be populated here, otherwise null. This can be one of
4087
+ # payment_order, incoming_payment_detail, expected_payment, return, paper_item, or
4088
+ # reversal.
4089
+ module LedgerableType
4090
+ extend ModernTreasury::Enum
4091
+
4092
+ EXPECTED_PAYMENT = :expected_payment
4093
+ INCOMING_PAYMENT_DETAIL = :incoming_payment_detail
4094
+ PAPER_ITEM = :paper_item
4095
+ PAYMENT_ORDER = :payment_order
4096
+ RETURN = :return
4097
+ REVERSAL = :reversal
4098
+
4099
+ finalize!
4100
+
4101
+ # @!parse
4102
+ # # @return [Array<Symbol>]
4103
+ # def self.values; end
4104
+ end
4105
+
4106
+ # To post a ledger transaction at creation, use `posted`.
4107
+ module Status
4108
+ extend ModernTreasury::Enum
4109
+
4110
+ ARCHIVED = :archived
4111
+ PENDING = :pending
4112
+ POSTED = :posted
4113
+
4114
+ finalize!
4115
+
4116
+ # @!parse
4117
+ # # @return [Array<Symbol>]
4118
+ # def self.values; end
4119
+ end
4120
+ end
4121
+
4122
+ # @!parse
4123
+ # # @return [Array(ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest, ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest, ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionCreateRequest, ModernTreasury::Models::BulkRequestCreateParams::Resource::TransactionCreateRequest, ModernTreasury::Models::BulkRequestCreateParams::Resource::ID, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID, ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentUpdateRequestWithID, ModernTreasury::Models::BulkRequestCreateParams::Resource::TransactionUpdateRequestWithID, ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionUpdateRequestWithID)]
4124
+ # def self.variants; end
4125
+ end
4126
+ end
4127
+ end
4128
+ end