modern_treasury 0.1.0.pre.alpha.15 → 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 (711) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +63 -20
  3. data/lib/modern_treasury/base_client.rb +93 -111
  4. data/lib/modern_treasury/base_model.rb +442 -422
  5. data/lib/modern_treasury/base_page.rb +34 -15
  6. data/lib/modern_treasury/client.rb +21 -7
  7. data/lib/modern_treasury/errors.rb +15 -19
  8. data/lib/modern_treasury/extern.rb +1 -4
  9. data/lib/modern_treasury/models/account_collection_flow.rb +9 -54
  10. data/lib/modern_treasury/models/account_collection_flow_create_params.rb +3 -22
  11. data/lib/modern_treasury/models/account_collection_flow_update_params.rb +3 -12
  12. data/lib/modern_treasury/models/account_detail.rb +3 -22
  13. data/lib/modern_treasury/models/account_detail_create_params.rb +6 -33
  14. data/lib/modern_treasury/models/account_detail_delete_params.rb +3 -11
  15. data/lib/modern_treasury/models/accounts_type.rb +3 -13
  16. data/lib/modern_treasury/models/bulk_request.rb +9 -50
  17. data/lib/modern_treasury/models/bulk_request_create_params.rb +118 -656
  18. data/lib/modern_treasury/models/bulk_request_list_params.rb +9 -50
  19. data/lib/modern_treasury/models/bulk_result.rb +16 -67
  20. data/lib/modern_treasury/models/bulk_result_list_params.rb +9 -48
  21. data/lib/modern_treasury/models/connection_legal_entity.rb +3 -18
  22. data/lib/modern_treasury/models/connection_legal_entity_create_params.rb +33 -200
  23. data/lib/modern_treasury/models/connection_legal_entity_list_params.rb +3 -17
  24. data/lib/modern_treasury/models/connection_legal_entity_update_params.rb +3 -12
  25. data/lib/modern_treasury/models/counterparty.rb +15 -77
  26. data/lib/modern_treasury/models/counterparty_collect_account_params.rb +3 -21
  27. data/lib/modern_treasury/models/counterparty_create_params.rb +61 -357
  28. data/lib/modern_treasury/models/currency.rb +3 -22
  29. data/lib/modern_treasury/models/document.rb +3 -22
  30. data/lib/modern_treasury/models/document_create_params.rb +3 -21
  31. data/lib/modern_treasury/models/document_list_params.rb +3 -22
  32. data/lib/modern_treasury/models/expected_payment.rb +9 -46
  33. data/lib/modern_treasury/models/expected_payment_create_params.rb +9 -52
  34. data/lib/modern_treasury/models/expected_payment_list_params.rb +6 -40
  35. data/lib/modern_treasury/models/expected_payment_type.rb +3 -22
  36. data/lib/modern_treasury/models/expected_payment_update_params.rb +6 -26
  37. data/lib/modern_treasury/models/external_account.rb +12 -59
  38. data/lib/modern_treasury/models/external_account_create_params.rb +18 -110
  39. data/lib/modern_treasury/models/external_account_type.rb +3 -22
  40. data/lib/modern_treasury/models/external_account_update_params.rb +3 -14
  41. data/lib/modern_treasury/models/external_account_verify_params.rb +9 -48
  42. data/lib/modern_treasury/models/external_account_verify_response.rb +16 -66
  43. data/lib/modern_treasury/models/incoming_payment_detail.rb +12 -82
  44. data/lib/modern_treasury/models/incoming_payment_detail_create_async_params.rb +6 -36
  45. data/lib/modern_treasury/models/incoming_payment_detail_list_params.rb +6 -38
  46. data/lib/modern_treasury/models/internal_account.rb +6 -36
  47. data/lib/modern_treasury/models/internal_account_create_params.rb +3 -14
  48. data/lib/modern_treasury/models/internal_account_list_params.rb +3 -22
  49. data/lib/modern_treasury/models/internal_accounts/balance_report.rb +12 -46
  50. data/lib/modern_treasury/models/internal_accounts/balance_report_create_params.rb +6 -40
  51. data/lib/modern_treasury/models/internal_accounts/balance_report_list_params.rb +3 -18
  52. data/lib/modern_treasury/models/invoice.rb +12 -67
  53. data/lib/modern_treasury/models/invoice_create_params.rb +6 -31
  54. data/lib/modern_treasury/models/invoice_list_params.rb +3 -21
  55. data/lib/modern_treasury/models/invoice_update_params.rb +6 -31
  56. data/lib/modern_treasury/models/ledger_account.rb +3 -18
  57. data/lib/modern_treasury/models/ledger_account_create_params.rb +3 -18
  58. data/lib/modern_treasury/models/ledger_account_settlement.rb +3 -22
  59. data/lib/modern_treasury/models/ledger_account_settlement_create_params.rb +3 -14
  60. data/lib/modern_treasury/models/ledger_account_settlement_update_params.rb +3 -14
  61. data/lib/modern_treasury/models/ledger_entry.rb +3 -16
  62. data/lib/modern_treasury/models/ledger_entry_list_params.rb +9 -42
  63. data/lib/modern_treasury/models/ledger_event_handler.rb +4 -0
  64. data/lib/modern_treasury/models/ledger_event_handler_create_params.rb +3 -0
  65. data/lib/modern_treasury/models/ledger_event_handler_variable.rb +2 -0
  66. data/lib/modern_treasury/models/ledger_transaction.rb +6 -38
  67. data/lib/modern_treasury/models/ledger_transaction_create_params.rb +6 -38
  68. data/lib/modern_treasury/models/ledger_transaction_create_partial_post_params.rb +3 -14
  69. data/lib/modern_treasury/models/ledger_transaction_create_reversal_params.rb +6 -38
  70. data/lib/modern_treasury/models/ledger_transaction_list_params.rb +12 -62
  71. data/lib/modern_treasury/models/ledger_transaction_update_params.rb +6 -38
  72. data/lib/modern_treasury/models/ledger_transactions/ledger_transaction_version.rb +9 -54
  73. data/lib/modern_treasury/models/ledgerable_event.rb +1 -0
  74. data/lib/modern_treasury/models/legal_entity.rb +15 -95
  75. data/lib/modern_treasury/models/legal_entity_association.rb +18 -109
  76. data/lib/modern_treasury/models/legal_entity_association_create_params.rb +18 -107
  77. data/lib/modern_treasury/models/legal_entity_create_params.rb +33 -200
  78. data/lib/modern_treasury/models/legal_entity_list_params.rb +3 -13
  79. data/lib/modern_treasury/models/legal_entity_update_params.rb +12 -79
  80. data/lib/modern_treasury/models/line_item.rb +3 -14
  81. data/lib/modern_treasury/models/line_item_list_params.rb +3 -13
  82. data/lib/modern_treasury/models/line_item_retrieve_params.rb +3 -13
  83. data/lib/modern_treasury/models/line_item_update_params.rb +3 -13
  84. data/lib/modern_treasury/models/paper_item.rb +3 -16
  85. data/lib/modern_treasury/models/payment_flow.rb +12 -58
  86. data/lib/modern_treasury/models/payment_flow_create_params.rb +3 -14
  87. data/lib/modern_treasury/models/payment_flow_update_params.rb +3 -12
  88. data/lib/modern_treasury/models/payment_order.rb +33 -142
  89. data/lib/modern_treasury/models/payment_order_create_async_params.rb +39 -218
  90. data/lib/modern_treasury/models/payment_order_create_params.rb +42 -239
  91. data/lib/modern_treasury/models/payment_order_list_params.rb +9 -56
  92. data/lib/modern_treasury/models/payment_order_subtype.rb +3 -22
  93. data/lib/modern_treasury/models/payment_order_type.rb +3 -22
  94. data/lib/modern_treasury/models/payment_order_update_params.rb +36 -202
  95. data/lib/modern_treasury/models/payment_orders/reversal.rb +6 -42
  96. data/lib/modern_treasury/models/payment_orders/reversal_create_params.rb +9 -58
  97. data/lib/modern_treasury/models/payment_reference.rb +8 -39
  98. data/lib/modern_treasury/models/payment_reference_list_params.rb +3 -16
  99. data/lib/modern_treasury/models/reconciliation_rule.rb +6 -36
  100. data/lib/modern_treasury/models/return_create_params.rb +6 -34
  101. data/lib/modern_treasury/models/return_list_params.rb +3 -20
  102. data/lib/modern_treasury/models/return_object.rb +20 -123
  103. data/lib/modern_treasury/models/routing_detail.rb +6 -44
  104. data/lib/modern_treasury/models/routing_detail_create_params.rb +9 -55
  105. data/lib/modern_treasury/models/routing_detail_delete_params.rb +3 -11
  106. data/lib/modern_treasury/models/routing_number_lookup_request.rb +6 -43
  107. data/lib/modern_treasury/models/transaction.rb +9 -47
  108. data/lib/modern_treasury/models/transaction_create_params.rb +3 -22
  109. data/lib/modern_treasury/models/transaction_direction.rb +3 -13
  110. data/lib/modern_treasury/models/transactions/line_item_list_params.rb +3 -13
  111. data/lib/modern_treasury/models/transactions/transaction_line_item.rb +6 -36
  112. data/lib/modern_treasury/models/validation_validate_routing_number_params.rb +3 -22
  113. data/lib/modern_treasury/models/virtual_account_create_params.rb +12 -84
  114. data/lib/modern_treasury/models/wealth_and_employment_details.rb +18 -130
  115. data/lib/modern_treasury/page.rb +26 -28
  116. data/lib/modern_treasury/pooled_net_requester.rb +103 -86
  117. data/lib/modern_treasury/request_options.rb +5 -12
  118. data/lib/modern_treasury/resources/account_collection_flows.rb +0 -5
  119. data/lib/modern_treasury/resources/account_details.rb +26 -25
  120. data/lib/modern_treasury/resources/bulk_requests.rb +0 -4
  121. data/lib/modern_treasury/resources/bulk_results.rb +0 -3
  122. data/lib/modern_treasury/resources/connection_legal_entities.rb +0 -5
  123. data/lib/modern_treasury/resources/connections.rb +0 -2
  124. data/lib/modern_treasury/resources/counterparties.rb +0 -7
  125. data/lib/modern_treasury/resources/documents.rb +1 -5
  126. data/lib/modern_treasury/resources/events.rb +0 -3
  127. data/lib/modern_treasury/resources/expected_payments.rb +0 -6
  128. data/lib/modern_treasury/resources/external_accounts.rb +0 -8
  129. data/lib/modern_treasury/resources/foreign_exchange_quotes.rb +0 -4
  130. data/lib/modern_treasury/resources/incoming_payment_details.rb +0 -5
  131. data/lib/modern_treasury/resources/internal_accounts/balance_reports.rb +14 -14
  132. data/lib/modern_treasury/resources/internal_accounts.rb +0 -5
  133. data/lib/modern_treasury/resources/invoices/line_items.rb +13 -16
  134. data/lib/modern_treasury/resources/invoices.rb +4 -9
  135. data/lib/modern_treasury/resources/ledger_account_balance_monitors.rb +0 -6
  136. data/lib/modern_treasury/resources/ledger_account_categories.rb +24 -26
  137. data/lib/modern_treasury/resources/ledger_account_settlements/account_entries.rb +4 -5
  138. data/lib/modern_treasury/resources/ledger_account_settlements.rb +2 -6
  139. data/lib/modern_treasury/resources/ledger_account_statements.rb +0 -3
  140. data/lib/modern_treasury/resources/ledger_accounts.rb +0 -6
  141. data/lib/modern_treasury/resources/ledger_entries.rb +0 -4
  142. data/lib/modern_treasury/resources/ledger_event_handlers.rb +0 -5
  143. data/lib/modern_treasury/resources/ledger_transactions/versions.rb +0 -2
  144. data/lib/modern_treasury/resources/ledger_transactions.rb +0 -7
  145. data/lib/modern_treasury/resources/ledgerable_events.rb +0 -3
  146. data/lib/modern_treasury/resources/ledgers.rb +0 -6
  147. data/lib/modern_treasury/resources/legal_entities.rb +0 -5
  148. data/lib/modern_treasury/resources/legal_entity_associations.rb +0 -2
  149. data/lib/modern_treasury/resources/line_items.rb +22 -21
  150. data/lib/modern_treasury/resources/paper_items.rb +0 -3
  151. data/lib/modern_treasury/resources/payment_flows.rb +0 -5
  152. data/lib/modern_treasury/resources/payment_orders/reversals.rb +4 -7
  153. data/lib/modern_treasury/resources/payment_orders.rb +0 -6
  154. data/lib/modern_treasury/resources/payment_references.rb +1 -20
  155. data/lib/modern_treasury/resources/returns.rb +0 -4
  156. data/lib/modern_treasury/resources/routing_details.rb +26 -25
  157. data/lib/modern_treasury/resources/transactions/line_items.rb +0 -5
  158. data/lib/modern_treasury/resources/transactions.rb +0 -6
  159. data/lib/modern_treasury/resources/validations.rb +0 -2
  160. data/lib/modern_treasury/resources/virtual_accounts.rb +0 -6
  161. data/lib/modern_treasury/util.rb +645 -385
  162. data/lib/modern_treasury/version.rb +1 -1
  163. data/lib/modern_treasury.rb +17 -0
  164. data/manifest.yaml +2 -0
  165. data/rbi/lib/modern_treasury/base_client.rbi +108 -72
  166. data/rbi/lib/modern_treasury/base_model.rbi +404 -239
  167. data/rbi/lib/modern_treasury/base_page.rbi +3 -6
  168. data/rbi/lib/modern_treasury/client.rbi +55 -79
  169. data/rbi/lib/modern_treasury/errors.rbi +23 -24
  170. data/rbi/lib/modern_treasury/extern.rbi +1 -1
  171. data/rbi/lib/modern_treasury/models/account_collection_flow.rbi +107 -102
  172. data/rbi/lib/modern_treasury/models/account_collection_flow_create_params.rbi +69 -42
  173. data/rbi/lib/modern_treasury/models/account_collection_flow_list_params.rbi +19 -34
  174. data/rbi/lib/modern_treasury/models/account_collection_flow_retrieve_params.rbi +5 -2
  175. data/rbi/lib/modern_treasury/models/account_collection_flow_update_params.rbi +31 -16
  176. data/rbi/lib/modern_treasury/models/account_detail.rbi +44 -73
  177. data/rbi/lib/modern_treasury/models/account_detail_create_params.rbi +60 -42
  178. data/rbi/lib/modern_treasury/models/account_detail_delete_params.rbi +24 -26
  179. data/rbi/lib/modern_treasury/models/account_detail_list_params.rbi +11 -23
  180. data/rbi/lib/modern_treasury/models/account_detail_retrieve_params.rbi +14 -22
  181. data/rbi/lib/modern_treasury/models/accounts_type.rbi +8 -5
  182. data/rbi/lib/modern_treasury/models/async_response.rbi +4 -14
  183. data/rbi/lib/modern_treasury/models/bank_settings.rbi +22 -62
  184. data/rbi/lib/modern_treasury/models/bulk_request.rbi +69 -102
  185. data/rbi/lib/modern_treasury/models/bulk_request_create_params.rbi +4011 -2385
  186. data/rbi/lib/modern_treasury/models/bulk_request_list_params.rbi +73 -62
  187. data/rbi/lib/modern_treasury/models/bulk_request_retrieve_params.rbi +5 -2
  188. data/rbi/lib/modern_treasury/models/bulk_result.rbi +104 -183
  189. data/rbi/lib/modern_treasury/models/bulk_result_list_params.rbi +78 -66
  190. data/rbi/lib/modern_treasury/models/bulk_result_retrieve_params.rbi +5 -2
  191. data/rbi/lib/modern_treasury/models/client_ping_params.rbi +5 -2
  192. data/rbi/lib/modern_treasury/models/connection.rbi +16 -56
  193. data/rbi/lib/modern_treasury/models/connection_legal_entity.rbi +33 -72
  194. data/rbi/lib/modern_treasury/models/connection_legal_entity_create_params.rbi +1090 -645
  195. data/rbi/lib/modern_treasury/models/connection_legal_entity_list_params.rbi +33 -39
  196. data/rbi/lib/modern_treasury/models/connection_legal_entity_retrieve_params.rbi +5 -2
  197. data/rbi/lib/modern_treasury/models/connection_legal_entity_update_params.rbi +31 -15
  198. data/rbi/lib/modern_treasury/models/connection_list_params.rbi +15 -30
  199. data/rbi/lib/modern_treasury/models/counterparty.rbi +247 -354
  200. data/rbi/lib/modern_treasury/models/counterparty_collect_account_params.rbi +115 -62
  201. data/rbi/lib/modern_treasury/models/counterparty_collect_account_response.rbi +12 -20
  202. data/rbi/lib/modern_treasury/models/counterparty_create_params.rbi +1877 -1038
  203. data/rbi/lib/modern_treasury/models/counterparty_delete_params.rbi +5 -2
  204. data/rbi/lib/modern_treasury/models/counterparty_list_params.rbi +35 -44
  205. data/rbi/lib/modern_treasury/models/counterparty_retrieve_params.rbi +5 -2
  206. data/rbi/lib/modern_treasury/models/counterparty_update_params.rbi +27 -34
  207. data/rbi/lib/modern_treasury/models/currency.rbi +196 -192
  208. data/rbi/lib/modern_treasury/models/document.rbi +83 -165
  209. data/rbi/lib/modern_treasury/models/document_create_params.rbi +48 -44
  210. data/rbi/lib/modern_treasury/models/document_list_params.rbi +56 -48
  211. data/rbi/lib/modern_treasury/models/document_retrieve_params.rbi +5 -2
  212. data/rbi/lib/modern_treasury/models/event.rbi +19 -73
  213. data/rbi/lib/modern_treasury/models/event_list_params.rbi +24 -39
  214. data/rbi/lib/modern_treasury/models/event_retrieve_params.rbi +5 -2
  215. data/rbi/lib/modern_treasury/models/expected_payment.rbi +116 -194
  216. data/rbi/lib/modern_treasury/models/expected_payment_create_params.rbi +313 -288
  217. data/rbi/lib/modern_treasury/models/expected_payment_delete_params.rbi +5 -2
  218. data/rbi/lib/modern_treasury/models/expected_payment_list_params.rbi +108 -105
  219. data/rbi/lib/modern_treasury/models/expected_payment_retrieve_params.rbi +5 -2
  220. data/rbi/lib/modern_treasury/models/expected_payment_type.rbi +38 -33
  221. data/rbi/lib/modern_treasury/models/expected_payment_update_params.rbi +87 -129
  222. data/rbi/lib/modern_treasury/models/external_account.rbi +150 -285
  223. data/rbi/lib/modern_treasury/models/external_account_complete_verification_params.rbi +6 -8
  224. data/rbi/lib/modern_treasury/models/external_account_create_params.rbi +670 -322
  225. data/rbi/lib/modern_treasury/models/external_account_delete_params.rbi +5 -2
  226. data/rbi/lib/modern_treasury/models/external_account_list_params.rbi +20 -29
  227. data/rbi/lib/modern_treasury/models/external_account_retrieve_params.rbi +5 -2
  228. data/rbi/lib/modern_treasury/models/external_account_type.rbi +15 -11
  229. data/rbi/lib/modern_treasury/models/external_account_update_params.rbi +59 -92
  230. data/rbi/lib/modern_treasury/models/external_account_verify_params.rbi +106 -86
  231. data/rbi/lib/modern_treasury/models/external_account_verify_response.rbi +304 -121
  232. data/rbi/lib/modern_treasury/models/foreign_exchange_quote.rbi +61 -132
  233. data/rbi/lib/modern_treasury/models/foreign_exchange_quote_create_params.rbi +31 -41
  234. data/rbi/lib/modern_treasury/models/foreign_exchange_quote_list_params.rbi +37 -49
  235. data/rbi/lib/modern_treasury/models/foreign_exchange_quote_retrieve_params.rbi +5 -2
  236. data/rbi/lib/modern_treasury/models/incoming_payment_detail.rbi +272 -228
  237. data/rbi/lib/modern_treasury/models/incoming_payment_detail_create_async_params.rbi +79 -75
  238. data/rbi/lib/modern_treasury/models/incoming_payment_detail_list_params.rbi +85 -76
  239. data/rbi/lib/modern_treasury/models/incoming_payment_detail_retrieve_params.rbi +5 -2
  240. data/rbi/lib/modern_treasury/models/incoming_payment_detail_update_params.rbi +8 -8
  241. data/rbi/lib/modern_treasury/models/internal_account.rbi +106 -218
  242. data/rbi/lib/modern_treasury/models/internal_account_create_params.rbi +67 -99
  243. data/rbi/lib/modern_treasury/models/internal_account_list_params.rbi +87 -88
  244. data/rbi/lib/modern_treasury/models/internal_account_retrieve_params.rbi +5 -2
  245. data/rbi/lib/modern_treasury/models/internal_account_update_params.rbi +24 -28
  246. data/rbi/lib/modern_treasury/models/internal_accounts/balance_report.rbi +156 -181
  247. data/rbi/lib/modern_treasury/models/internal_accounts/balance_report_create_params.rbi +159 -88
  248. data/rbi/lib/modern_treasury/models/internal_accounts/balance_report_delete_params.rbi +4 -9
  249. data/rbi/lib/modern_treasury/models/internal_accounts/balance_report_list_params.rbi +66 -38
  250. data/rbi/lib/modern_treasury/models/internal_accounts/balance_report_retrieve_params.rbi +4 -9
  251. data/rbi/lib/modern_treasury/models/invoice.rbi +239 -441
  252. data/rbi/lib/modern_treasury/models/invoice_add_payment_order_params.rbi +4 -9
  253. data/rbi/lib/modern_treasury/models/invoice_create_params.rbi +292 -378
  254. data/rbi/lib/modern_treasury/models/invoice_list_params.rbi +57 -71
  255. data/rbi/lib/modern_treasury/models/invoice_retrieve_params.rbi +5 -2
  256. data/rbi/lib/modern_treasury/models/invoice_update_params.rbi +300 -374
  257. data/rbi/lib/modern_treasury/models/invoices/invoice_line_item.rbi +35 -82
  258. data/rbi/lib/modern_treasury/models/invoices/line_item_create_params.rbi +34 -40
  259. data/rbi/lib/modern_treasury/models/invoices/line_item_delete_params.rbi +4 -9
  260. data/rbi/lib/modern_treasury/models/invoices/line_item_list_params.rbi +7 -14
  261. data/rbi/lib/modern_treasury/models/invoices/line_item_retrieve_params.rbi +4 -9
  262. data/rbi/lib/modern_treasury/models/invoices/line_item_update_params.rbi +39 -44
  263. data/rbi/lib/modern_treasury/models/ledger.rbi +17 -66
  264. data/rbi/lib/modern_treasury/models/ledger_account.rbi +136 -237
  265. data/rbi/lib/modern_treasury/models/ledger_account_balance_monitor.rbi +150 -236
  266. data/rbi/lib/modern_treasury/models/ledger_account_balance_monitor_create_params.rbi +42 -52
  267. data/rbi/lib/modern_treasury/models/ledger_account_balance_monitor_delete_params.rbi +5 -2
  268. data/rbi/lib/modern_treasury/models/ledger_account_balance_monitor_list_params.rbi +22 -36
  269. data/rbi/lib/modern_treasury/models/ledger_account_balance_monitor_retrieve_params.rbi +5 -2
  270. data/rbi/lib/modern_treasury/models/ledger_account_balance_monitor_update_params.rbi +12 -13
  271. data/rbi/lib/modern_treasury/models/ledger_account_category.rbi +121 -197
  272. data/rbi/lib/modern_treasury/models/ledger_account_category_add_ledger_account_params.rbi +4 -9
  273. data/rbi/lib/modern_treasury/models/ledger_account_category_add_nested_category_params.rbi +4 -9
  274. data/rbi/lib/modern_treasury/models/ledger_account_category_create_params.rbi +28 -52
  275. data/rbi/lib/modern_treasury/models/ledger_account_category_delete_params.rbi +5 -2
  276. data/rbi/lib/modern_treasury/models/ledger_account_category_list_params.rbi +54 -63
  277. data/rbi/lib/modern_treasury/models/ledger_account_category_remove_ledger_account_params.rbi +4 -9
  278. data/rbi/lib/modern_treasury/models/ledger_account_category_remove_nested_category_params.rbi +4 -9
  279. data/rbi/lib/modern_treasury/models/ledger_account_category_retrieve_params.rbi +30 -22
  280. data/rbi/lib/modern_treasury/models/ledger_account_category_update_params.rbi +14 -19
  281. data/rbi/lib/modern_treasury/models/ledger_account_create_params.rbi +65 -74
  282. data/rbi/lib/modern_treasury/models/ledger_account_delete_params.rbi +5 -2
  283. data/rbi/lib/modern_treasury/models/ledger_account_list_params.rbi +183 -205
  284. data/rbi/lib/modern_treasury/models/ledger_account_retrieve_params.rbi +39 -37
  285. data/rbi/lib/modern_treasury/models/ledger_account_settlement.rbi +57 -116
  286. data/rbi/lib/modern_treasury/models/ledger_account_settlement_create_params.rbi +50 -58
  287. data/rbi/lib/modern_treasury/models/ledger_account_settlement_list_params.rbi +42 -54
  288. data/rbi/lib/modern_treasury/models/ledger_account_settlement_retrieve_params.rbi +5 -2
  289. data/rbi/lib/modern_treasury/models/ledger_account_settlement_update_params.rbi +35 -27
  290. data/rbi/lib/modern_treasury/models/ledger_account_settlements/account_entry_delete_params.rbi +6 -9
  291. data/rbi/lib/modern_treasury/models/ledger_account_settlements/account_entry_update_params.rbi +6 -9
  292. data/rbi/lib/modern_treasury/models/ledger_account_statement_create_params.rbi +19 -32
  293. data/rbi/lib/modern_treasury/models/ledger_account_statement_create_response.rbi +238 -335
  294. data/rbi/lib/modern_treasury/models/ledger_account_statement_retrieve_params.rbi +5 -2
  295. data/rbi/lib/modern_treasury/models/ledger_account_statement_retrieve_response.rbi +236 -335
  296. data/rbi/lib/modern_treasury/models/ledger_account_update_params.rbi +14 -19
  297. data/rbi/lib/modern_treasury/models/ledger_create_params.rbi +12 -20
  298. data/rbi/lib/modern_treasury/models/ledger_delete_params.rbi +5 -2
  299. data/rbi/lib/modern_treasury/models/ledger_entry.rbi +161 -232
  300. data/rbi/lib/modern_treasury/models/ledger_entry_list_params.rbi +170 -143
  301. data/rbi/lib/modern_treasury/models/ledger_entry_retrieve_params.rbi +8 -8
  302. data/rbi/lib/modern_treasury/models/ledger_entry_update_params.rbi +8 -8
  303. data/rbi/lib/modern_treasury/models/ledger_event_handler.rbi +77 -155
  304. data/rbi/lib/modern_treasury/models/ledger_event_handler_create_params.rbi +76 -123
  305. data/rbi/lib/modern_treasury/models/ledger_event_handler_delete_params.rbi +5 -2
  306. data/rbi/lib/modern_treasury/models/ledger_event_handler_list_params.rbi +22 -36
  307. data/rbi/lib/modern_treasury/models/ledger_event_handler_retrieve_params.rbi +5 -2
  308. data/rbi/lib/modern_treasury/models/ledger_event_handler_variable.rbi +24 -33
  309. data/rbi/lib/modern_treasury/models/ledger_list_params.rbi +24 -36
  310. data/rbi/lib/modern_treasury/models/ledger_retrieve_params.rbi +5 -2
  311. data/rbi/lib/modern_treasury/models/ledger_transaction.rbi +86 -143
  312. data/rbi/lib/modern_treasury/models/ledger_transaction_create_params.rbi +138 -133
  313. data/rbi/lib/modern_treasury/models/ledger_transaction_create_partial_post_params.rbi +88 -67
  314. data/rbi/lib/modern_treasury/models/ledger_transaction_create_reversal_params.rbi +113 -58
  315. data/rbi/lib/modern_treasury/models/ledger_transaction_list_params.rbi +188 -147
  316. data/rbi/lib/modern_treasury/models/ledger_transaction_retrieve_params.rbi +5 -2
  317. data/rbi/lib/modern_treasury/models/ledger_transaction_update_params.rbi +133 -120
  318. data/rbi/lib/modern_treasury/models/ledger_transactions/ledger_transaction_version.rbi +328 -378
  319. data/rbi/lib/modern_treasury/models/ledger_transactions/version_list_params.rbi +28 -34
  320. data/rbi/lib/modern_treasury/models/ledger_update_params.rbi +14 -19
  321. data/rbi/lib/modern_treasury/models/ledgerable_event.rbi +20 -62
  322. data/rbi/lib/modern_treasury/models/ledgerable_event_create_params.rbi +14 -26
  323. data/rbi/lib/modern_treasury/models/ledgerable_event_retrieve_params.rbi +5 -2
  324. data/rbi/lib/modern_treasury/models/legal_entity.rbi +211 -416
  325. data/rbi/lib/modern_treasury/models/legal_entity_association.rbi +468 -479
  326. data/rbi/lib/modern_treasury/models/legal_entity_association_create_params.rbi +567 -324
  327. data/rbi/lib/modern_treasury/models/legal_entity_create_params.rbi +854 -608
  328. data/rbi/lib/modern_treasury/models/legal_entity_list_params.rbi +33 -37
  329. data/rbi/lib/modern_treasury/models/legal_entity_retrieve_params.rbi +5 -2
  330. data/rbi/lib/modern_treasury/models/legal_entity_update_params.rbi +252 -267
  331. data/rbi/lib/modern_treasury/models/line_item.rbi +54 -105
  332. data/rbi/lib/modern_treasury/models/line_item_list_params.rbi +22 -28
  333. data/rbi/lib/modern_treasury/models/line_item_retrieve_params.rbi +26 -27
  334. data/rbi/lib/modern_treasury/models/line_item_update_params.rbi +25 -28
  335. data/rbi/lib/modern_treasury/models/paper_item.rbi +53 -122
  336. data/rbi/lib/modern_treasury/models/paper_item_list_params.rbi +20 -29
  337. data/rbi/lib/modern_treasury/models/paper_item_retrieve_params.rbi +5 -2
  338. data/rbi/lib/modern_treasury/models/payment_flow.rbi +141 -136
  339. data/rbi/lib/modern_treasury/models/payment_flow_create_params.rbi +36 -46
  340. data/rbi/lib/modern_treasury/models/payment_flow_list_params.rbi +25 -44
  341. data/rbi/lib/modern_treasury/models/payment_flow_retrieve_params.rbi +5 -2
  342. data/rbi/lib/modern_treasury/models/payment_flow_update_params.rbi +27 -16
  343. data/rbi/lib/modern_treasury/models/payment_order.rbi +732 -614
  344. data/rbi/lib/modern_treasury/models/payment_order_create_async_params.rbi +1297 -744
  345. data/rbi/lib/modern_treasury/models/payment_order_create_params.rbi +1346 -801
  346. data/rbi/lib/modern_treasury/models/payment_order_list_params.rbi +150 -157
  347. data/rbi/lib/modern_treasury/models/payment_order_retrieve_params.rbi +5 -2
  348. data/rbi/lib/modern_treasury/models/payment_order_subtype.rbi +39 -32
  349. data/rbi/lib/modern_treasury/models/payment_order_type.rbi +39 -33
  350. data/rbi/lib/modern_treasury/models/payment_order_update_params.rbi +1104 -632
  351. data/rbi/lib/modern_treasury/models/payment_orders/reversal.rbi +58 -91
  352. data/rbi/lib/modern_treasury/models/payment_orders/reversal_create_params.rbi +274 -172
  353. data/rbi/lib/modern_treasury/models/payment_orders/reversal_list_params.rbi +7 -14
  354. data/rbi/lib/modern_treasury/models/payment_orders/reversal_retrieve_params.rbi +4 -9
  355. data/rbi/lib/modern_treasury/models/payment_reference.rbi +298 -144
  356. data/rbi/lib/modern_treasury/models/payment_reference_list_params.rbi +49 -39
  357. data/rbi/lib/modern_treasury/models/payment_reference_retireve_params.rbi +5 -2
  358. data/rbi/lib/modern_treasury/models/payment_reference_retrieve_params.rbi +5 -2
  359. data/rbi/lib/modern_treasury/models/ping_response.rbi +3 -8
  360. data/rbi/lib/modern_treasury/models/reconciliation_rule.rbi +88 -110
  361. data/rbi/lib/modern_treasury/models/return_create_params.rbi +98 -107
  362. data/rbi/lib/modern_treasury/models/return_list_params.rbi +45 -45
  363. data/rbi/lib/modern_treasury/models/return_object.rbi +575 -393
  364. data/rbi/lib/modern_treasury/models/return_retrieve_params.rbi +5 -2
  365. data/rbi/lib/modern_treasury/models/routing_detail.rbi +140 -204
  366. data/rbi/lib/modern_treasury/models/routing_detail_create_params.rbi +159 -107
  367. data/rbi/lib/modern_treasury/models/routing_detail_delete_params.rbi +24 -26
  368. data/rbi/lib/modern_treasury/models/routing_detail_list_params.rbi +11 -23
  369. data/rbi/lib/modern_treasury/models/routing_detail_retrieve_params.rbi +14 -22
  370. data/rbi/lib/modern_treasury/models/routing_number_lookup_request.rbi +182 -122
  371. data/rbi/lib/modern_treasury/models/transaction.rbi +193 -287
  372. data/rbi/lib/modern_treasury/models/transaction_create_params.rbi +80 -100
  373. data/rbi/lib/modern_treasury/models/transaction_delete_params.rbi +5 -2
  374. data/rbi/lib/modern_treasury/models/transaction_direction.rbi +8 -5
  375. data/rbi/lib/modern_treasury/models/transaction_list_params.rbi +56 -74
  376. data/rbi/lib/modern_treasury/models/transaction_retrieve_params.rbi +5 -2
  377. data/rbi/lib/modern_treasury/models/transaction_update_params.rbi +8 -8
  378. data/rbi/lib/modern_treasury/models/transactions/line_item_create_params.rbi +10 -21
  379. data/rbi/lib/modern_treasury/models/transactions/line_item_delete_params.rbi +3 -2
  380. data/rbi/lib/modern_treasury/models/transactions/line_item_list_params.rbi +29 -45
  381. data/rbi/lib/modern_treasury/models/transactions/line_item_retrieve_params.rbi +3 -2
  382. data/rbi/lib/modern_treasury/models/transactions/transaction_line_item.rbi +104 -113
  383. data/rbi/lib/modern_treasury/models/validation_validate_routing_number_params.rbi +140 -42
  384. data/rbi/lib/modern_treasury/models/virtual_account.rbi +39 -106
  385. data/rbi/lib/modern_treasury/models/virtual_account_create_params.rbi +547 -247
  386. data/rbi/lib/modern_treasury/models/virtual_account_delete_params.rbi +5 -2
  387. data/rbi/lib/modern_treasury/models/virtual_account_list_params.rbi +19 -29
  388. data/rbi/lib/modern_treasury/models/virtual_account_retrieve_params.rbi +5 -2
  389. data/rbi/lib/modern_treasury/models/virtual_account_update_params.rbi +14 -30
  390. data/rbi/lib/modern_treasury/models/wealth_and_employment_details.rbi +288 -241
  391. data/rbi/lib/modern_treasury/page.rbi +6 -24
  392. data/rbi/lib/modern_treasury/pooled_net_requester.rbi +42 -39
  393. data/rbi/lib/modern_treasury/request_options.rbi +33 -54
  394. data/rbi/lib/modern_treasury/resources/account_collection_flows.rbi +32 -11
  395. data/rbi/lib/modern_treasury/resources/account_details.rbi +54 -15
  396. data/rbi/lib/modern_treasury/resources/bulk_requests.rbi +38 -12
  397. data/rbi/lib/modern_treasury/resources/bulk_results.rbi +22 -8
  398. data/rbi/lib/modern_treasury/resources/connection_legal_entities.rbi +37 -12
  399. data/rbi/lib/modern_treasury/resources/connections.rbi +13 -4
  400. data/rbi/lib/modern_treasury/resources/counterparties.rbi +78 -17
  401. data/rbi/lib/modern_treasury/resources/documents.rbi +28 -9
  402. data/rbi/lib/modern_treasury/resources/events.rbi +13 -5
  403. data/rbi/lib/modern_treasury/resources/expected_payments.rbi +113 -23
  404. data/rbi/lib/modern_treasury/resources/external_accounts.rbi +83 -26
  405. data/rbi/lib/modern_treasury/resources/foreign_exchange_quotes.rbi +32 -8
  406. data/rbi/lib/modern_treasury/resources/incoming_payment_details.rbi +53 -14
  407. data/rbi/lib/modern_treasury/resources/internal_accounts/balance_reports.rbi +40 -11
  408. data/rbi/lib/modern_treasury/resources/internal_accounts.rbi +47 -14
  409. data/rbi/lib/modern_treasury/resources/invoices/line_items.rbi +64 -10
  410. data/rbi/lib/modern_treasury/resources/invoices.rbi +173 -28
  411. data/rbi/lib/modern_treasury/resources/ledger_account_balance_monitors.rbi +54 -12
  412. data/rbi/lib/modern_treasury/resources/ledger_account_categories.rbi +101 -21
  413. data/rbi/lib/modern_treasury/resources/ledger_account_settlements/account_entries.rbi +22 -6
  414. data/rbi/lib/modern_treasury/resources/ledger_account_settlements.rbi +59 -12
  415. data/rbi/lib/modern_treasury/resources/ledger_account_statements.rbi +20 -5
  416. data/rbi/lib/modern_treasury/resources/ledger_accounts.rbi +93 -17
  417. data/rbi/lib/modern_treasury/resources/ledger_entries.rbi +61 -10
  418. data/rbi/lib/modern_treasury/resources/ledger_event_handlers.rbi +41 -11
  419. data/rbi/lib/modern_treasury/resources/ledger_transactions/versions.rbi +13 -3
  420. data/rbi/lib/modern_treasury/resources/ledger_transactions.rbi +113 -23
  421. data/rbi/lib/modern_treasury/resources/ledgerable_events.rbi +23 -6
  422. data/rbi/lib/modern_treasury/resources/ledgers.rbi +60 -12
  423. data/rbi/lib/modern_treasury/resources/legal_entities.rbi +83 -24
  424. data/rbi/lib/modern_treasury/resources/legal_entity_associations.rbi +15 -5
  425. data/rbi/lib/modern_treasury/resources/line_items.rbi +43 -11
  426. data/rbi/lib/modern_treasury/resources/paper_items.rbi +15 -5
  427. data/rbi/lib/modern_treasury/resources/payment_flows.rbi +36 -10
  428. data/rbi/lib/modern_treasury/resources/payment_orders/reversals.rbi +43 -10
  429. data/rbi/lib/modern_treasury/resources/payment_orders.rbi +336 -50
  430. data/rbi/lib/modern_treasury/resources/payment_references.rbi +17 -16
  431. data/rbi/lib/modern_treasury/resources/returns.rbi +33 -9
  432. data/rbi/lib/modern_treasury/resources/routing_details.rbi +51 -15
  433. data/rbi/lib/modern_treasury/resources/transactions/line_items.rbi +31 -10
  434. data/rbi/lib/modern_treasury/resources/transactions.rbi +63 -13
  435. data/rbi/lib/modern_treasury/resources/validations.rbi +16 -5
  436. data/rbi/lib/modern_treasury/resources/virtual_accounts.rbi +47 -12
  437. data/rbi/lib/modern_treasury/util.rbi +238 -92
  438. data/rbi/lib/modern_treasury/version.rbi +1 -1
  439. data/sig/modern_treasury/base_client.rbs +31 -23
  440. data/sig/modern_treasury/base_model.rbs +36 -20
  441. data/sig/modern_treasury/base_page.rbs +1 -1
  442. data/sig/modern_treasury/client.rbs +12 -8
  443. data/sig/modern_treasury/errors.rbs +22 -21
  444. data/sig/modern_treasury/models/account_collection_flow.rbs +25 -24
  445. data/sig/modern_treasury/models/account_collection_flow_create_params.rbs +10 -13
  446. data/sig/modern_treasury/models/account_collection_flow_list_params.rbs +9 -14
  447. data/sig/modern_treasury/models/account_collection_flow_retrieve_params.rbs +1 -6
  448. data/sig/modern_treasury/models/account_collection_flow_update_params.rbs +8 -11
  449. data/sig/modern_treasury/models/account_detail.rbs +15 -18
  450. data/sig/modern_treasury/models/account_detail_create_params.rbs +14 -15
  451. data/sig/modern_treasury/models/account_detail_delete_params.rbs +9 -12
  452. data/sig/modern_treasury/models/account_detail_list_params.rbs +6 -11
  453. data/sig/modern_treasury/models/account_detail_retrieve_params.rbs +5 -10
  454. data/sig/modern_treasury/models/accounts_type.rbs +4 -2
  455. data/sig/modern_treasury/models/async_response.rbs +1 -6
  456. data/sig/modern_treasury/models/bank_settings.rbs +12 -17
  457. data/sig/modern_treasury/models/bulk_request.rbs +26 -24
  458. data/sig/modern_treasury/models/bulk_request_create_params.rbs +492 -578
  459. data/sig/modern_treasury/models/bulk_request_list_params.rbs +21 -20
  460. data/sig/modern_treasury/models/bulk_request_retrieve_params.rbs +1 -6
  461. data/sig/modern_treasury/models/bulk_result.rbs +43 -45
  462. data/sig/modern_treasury/models/bulk_result_list_params.rbs +22 -21
  463. data/sig/modern_treasury/models/bulk_result_retrieve_params.rbs +1 -6
  464. data/sig/modern_treasury/models/client_ping_params.rbs +1 -6
  465. data/sig/modern_treasury/models/connection.rbs +11 -15
  466. data/sig/modern_treasury/models/connection_legal_entity.rbs +16 -19
  467. data/sig/modern_treasury/models/connection_legal_entity_create_params.rbs +138 -166
  468. data/sig/modern_treasury/models/connection_legal_entity_list_params.rbs +12 -15
  469. data/sig/modern_treasury/models/connection_legal_entity_retrieve_params.rbs +1 -6
  470. data/sig/modern_treasury/models/connection_legal_entity_update_params.rbs +8 -11
  471. data/sig/modern_treasury/models/connection_list_params.rbs +7 -12
  472. data/sig/modern_treasury/models/counterparty.rbs +78 -87
  473. data/sig/modern_treasury/models/counterparty_collect_account_params.rbs +11 -14
  474. data/sig/modern_treasury/models/counterparty_collect_account_response.rbs +1 -6
  475. data/sig/modern_treasury/models/counterparty_create_params.rbs +232 -277
  476. data/sig/modern_treasury/models/counterparty_delete_params.rbs +1 -6
  477. data/sig/modern_treasury/models/counterparty_list_params.rbs +11 -16
  478. data/sig/modern_treasury/models/counterparty_retrieve_params.rbs +1 -6
  479. data/sig/modern_treasury/models/counterparty_update_params.rbs +9 -14
  480. data/sig/modern_treasury/models/currency.rbs +4 -2
  481. data/sig/modern_treasury/models/document.rbs +33 -41
  482. data/sig/modern_treasury/models/document_create_params.rbs +11 -14
  483. data/sig/modern_treasury/models/document_list_params.rbs +11 -14
  484. data/sig/modern_treasury/models/document_retrieve_params.rbs +1 -6
  485. data/sig/modern_treasury/models/event.rbs +12 -16
  486. data/sig/modern_treasury/models/event_list_params.rbs +10 -15
  487. data/sig/modern_treasury/models/event_retrieve_params.rbs +1 -6
  488. data/sig/modern_treasury/models/expected_payment.rbs +40 -39
  489. data/sig/modern_treasury/models/expected_payment_create_params.rbs +62 -76
  490. data/sig/modern_treasury/models/expected_payment_delete_params.rbs +1 -6
  491. data/sig/modern_treasury/models/expected_payment_list_params.rbs +21 -22
  492. data/sig/modern_treasury/models/expected_payment_retrieve_params.rbs +1 -6
  493. data/sig/modern_treasury/models/expected_payment_type.rbs +4 -2
  494. data/sig/modern_treasury/models/expected_payment_update_params.rbs +28 -29
  495. data/sig/modern_treasury/models/external_account.rbs +60 -67
  496. data/sig/modern_treasury/models/external_account_complete_verification_params.rbs +4 -9
  497. data/sig/modern_treasury/models/external_account_create_params.rbs +73 -91
  498. data/sig/modern_treasury/models/external_account_delete_params.rbs +1 -6
  499. data/sig/modern_treasury/models/external_account_list_params.rbs +8 -13
  500. data/sig/modern_treasury/models/external_account_retrieve_params.rbs +1 -6
  501. data/sig/modern_treasury/models/external_account_type.rbs +4 -2
  502. data/sig/modern_treasury/models/external_account_update_params.rbs +22 -30
  503. data/sig/modern_treasury/models/external_account_verify_params.rbs +20 -19
  504. data/sig/modern_treasury/models/external_account_verify_response.rbs +28 -25
  505. data/sig/modern_treasury/models/foreign_exchange_quote.rbs +23 -33
  506. data/sig/modern_treasury/models/foreign_exchange_quote_create_params.rbs +9 -14
  507. data/sig/modern_treasury/models/foreign_exchange_quote_list_params.rbs +12 -17
  508. data/sig/modern_treasury/models/foreign_exchange_quote_retrieve_params.rbs +1 -6
  509. data/sig/modern_treasury/models/incoming_payment_detail.rbs +43 -40
  510. data/sig/modern_treasury/models/incoming_payment_detail_create_async_params.rbs +19 -20
  511. data/sig/modern_treasury/models/incoming_payment_detail_list_params.rbs +20 -21
  512. data/sig/modern_treasury/models/incoming_payment_detail_retrieve_params.rbs +1 -6
  513. data/sig/modern_treasury/models/incoming_payment_detail_update_params.rbs +4 -9
  514. data/sig/modern_treasury/models/internal_account.rbs +42 -48
  515. data/sig/modern_treasury/models/internal_account_create_params.rbs +24 -32
  516. data/sig/modern_treasury/models/internal_account_list_params.rbs +15 -18
  517. data/sig/modern_treasury/models/internal_account_retrieve_params.rbs +1 -6
  518. data/sig/modern_treasury/models/internal_account_update_params.rbs +8 -13
  519. data/sig/modern_treasury/models/internal_accounts/balance_report.rbs +39 -45
  520. data/sig/modern_treasury/models/internal_accounts/balance_report_create_params.rbs +21 -27
  521. data/sig/modern_treasury/models/internal_accounts/balance_report_delete_params.rbs +4 -9
  522. data/sig/modern_treasury/models/internal_accounts/balance_report_list_params.rbs +11 -14
  523. data/sig/modern_treasury/models/internal_accounts/balance_report_retrieve_params.rbs +4 -9
  524. data/sig/modern_treasury/models/invoice.rbs +89 -105
  525. data/sig/modern_treasury/models/invoice_add_payment_order_params.rbs +4 -6
  526. data/sig/modern_treasury/models/invoice_create_params.rbs +79 -105
  527. data/sig/modern_treasury/models/invoice_list_params.rbs +18 -21
  528. data/sig/modern_treasury/models/invoice_retrieve_params.rbs +1 -6
  529. data/sig/modern_treasury/models/invoice_update_params.rbs +79 -105
  530. data/sig/modern_treasury/models/invoices/invoice_line_item.rbs +15 -21
  531. data/sig/modern_treasury/models/invoices/line_item_create_params.rbs +10 -15
  532. data/sig/modern_treasury/models/invoices/line_item_delete_params.rbs +4 -9
  533. data/sig/modern_treasury/models/invoices/line_item_list_params.rbs +5 -10
  534. data/sig/modern_treasury/models/invoices/line_item_retrieve_params.rbs +4 -9
  535. data/sig/modern_treasury/models/invoices/line_item_update_params.rbs +11 -16
  536. data/sig/modern_treasury/models/ledger.rbs +11 -15
  537. data/sig/modern_treasury/models/ledger_account.rbs +49 -72
  538. data/sig/modern_treasury/models/ledger_account_balance_monitor.rbs +49 -80
  539. data/sig/modern_treasury/models/ledger_account_balance_monitor_create_params.rbs +12 -18
  540. data/sig/modern_treasury/models/ledger_account_balance_monitor_delete_params.rbs +1 -6
  541. data/sig/modern_treasury/models/ledger_account_balance_monitor_list_params.rbs +8 -13
  542. data/sig/modern_treasury/models/ledger_account_balance_monitor_retrieve_params.rbs +1 -6
  543. data/sig/modern_treasury/models/ledger_account_balance_monitor_update_params.rbs +5 -10
  544. data/sig/modern_treasury/models/ledger_account_category.rbs +40 -65
  545. data/sig/modern_treasury/models/ledger_account_category_add_ledger_account_params.rbs +4 -6
  546. data/sig/modern_treasury/models/ledger_account_category_add_nested_category_params.rbs +4 -6
  547. data/sig/modern_treasury/models/ledger_account_category_create_params.rbs +11 -16
  548. data/sig/modern_treasury/models/ledger_account_category_delete_params.rbs +1 -6
  549. data/sig/modern_treasury/models/ledger_account_category_list_params.rbs +14 -24
  550. data/sig/modern_treasury/models/ledger_account_category_remove_ledger_account_params.rbs +4 -6
  551. data/sig/modern_treasury/models/ledger_account_category_remove_nested_category_params.rbs +4 -6
  552. data/sig/modern_treasury/models/ledger_account_category_retrieve_params.rbs +5 -15
  553. data/sig/modern_treasury/models/ledger_account_category_update_params.rbs +6 -11
  554. data/sig/modern_treasury/models/ledger_account_create_params.rbs +17 -20
  555. data/sig/modern_treasury/models/ledger_account_delete_params.rbs +1 -6
  556. data/sig/modern_treasury/models/ledger_account_list_params.rbs +47 -72
  557. data/sig/modern_treasury/models/ledger_account_retrieve_params.rbs +11 -21
  558. data/sig/modern_treasury/models/ledger_account_settlement.rbs +23 -26
  559. data/sig/modern_treasury/models/ledger_account_settlement_create_params.rbs +15 -18
  560. data/sig/modern_treasury/models/ledger_account_settlement_list_params.rbs +13 -18
  561. data/sig/modern_treasury/models/ledger_account_settlement_retrieve_params.rbs +1 -6
  562. data/sig/modern_treasury/models/ledger_account_settlement_update_params.rbs +10 -13
  563. data/sig/modern_treasury/models/ledger_account_settlements/account_entry_delete_params.rbs +4 -9
  564. data/sig/modern_treasury/models/ledger_account_settlements/account_entry_update_params.rbs +4 -9
  565. data/sig/modern_treasury/models/ledger_account_statement_create_params.rbs +8 -13
  566. data/sig/modern_treasury/models/ledger_account_statement_create_response.rbs +69 -114
  567. data/sig/modern_treasury/models/ledger_account_statement_retrieve_params.rbs +1 -6
  568. data/sig/modern_treasury/models/ledger_account_statement_retrieve_response.rbs +69 -114
  569. data/sig/modern_treasury/models/ledger_account_update_params.rbs +6 -11
  570. data/sig/modern_treasury/models/ledger_create_params.rbs +6 -11
  571. data/sig/modern_treasury/models/ledger_delete_params.rbs +1 -6
  572. data/sig/modern_treasury/models/ledger_entry.rbs +48 -70
  573. data/sig/modern_treasury/models/ledger_entry_list_params.rbs +39 -43
  574. data/sig/modern_treasury/models/ledger_entry_retrieve_params.rbs +4 -9
  575. data/sig/modern_treasury/models/ledger_entry_update_params.rbs +4 -9
  576. data/sig/modern_treasury/models/ledger_event_handler.rbs +27 -47
  577. data/sig/modern_treasury/models/ledger_event_handler_create_params.rbs +22 -42
  578. data/sig/modern_treasury/models/ledger_event_handler_delete_params.rbs +1 -6
  579. data/sig/modern_treasury/models/ledger_event_handler_list_params.rbs +8 -13
  580. data/sig/modern_treasury/models/ledger_event_handler_retrieve_params.rbs +1 -6
  581. data/sig/modern_treasury/models/ledger_event_handler_variable.rbs +5 -15
  582. data/sig/modern_treasury/models/ledger_list_params.rbs +8 -13
  583. data/sig/modern_treasury/models/ledger_retrieve_params.rbs +1 -6
  584. data/sig/modern_treasury/models/ledger_transaction.rbs +29 -30
  585. data/sig/modern_treasury/models/ledger_transaction_create_params.rbs +31 -37
  586. data/sig/modern_treasury/models/ledger_transaction_create_partial_post_params.rbs +17 -25
  587. data/sig/modern_treasury/models/ledger_transaction_create_reversal_params.rbs +18 -19
  588. data/sig/modern_treasury/models/ledger_transaction_list_params.rbs +42 -44
  589. data/sig/modern_treasury/models/ledger_transaction_retrieve_params.rbs +1 -6
  590. data/sig/modern_treasury/models/ledger_transaction_update_params.rbs +29 -35
  591. data/sig/modern_treasury/models/ledger_transactions/ledger_transaction_version.rbs +76 -101
  592. data/sig/modern_treasury/models/ledger_transactions/version_list_params.rbs +9 -14
  593. data/sig/modern_treasury/models/ledger_update_params.rbs +6 -11
  594. data/sig/modern_treasury/models/ledgerable_event.rbs +12 -17
  595. data/sig/modern_treasury/models/ledgerable_event_create_params.rbs +7 -12
  596. data/sig/modern_treasury/models/ledgerable_event_retrieve_params.rbs +1 -6
  597. data/sig/modern_treasury/models/legal_entity.rbs +78 -87
  598. data/sig/modern_treasury/models/legal_entity_association.rbs +94 -107
  599. data/sig/modern_treasury/models/legal_entity_association_create_params.rbs +73 -86
  600. data/sig/modern_treasury/models/legal_entity_create_params.rbs +133 -156
  601. data/sig/modern_treasury/models/legal_entity_list_params.rbs +12 -15
  602. data/sig/modern_treasury/models/legal_entity_retrieve_params.rbs +1 -6
  603. data/sig/modern_treasury/models/legal_entity_update_params.rbs +56 -68
  604. data/sig/modern_treasury/models/line_item.rbs +20 -27
  605. data/sig/modern_treasury/models/line_item_list_params.rbs +10 -13
  606. data/sig/modern_treasury/models/line_item_retrieve_params.rbs +9 -12
  607. data/sig/modern_treasury/models/line_item_update_params.rbs +10 -13
  608. data/sig/modern_treasury/models/paper_item.rbs +24 -26
  609. data/sig/modern_treasury/models/paper_item_list_params.rbs +8 -13
  610. data/sig/modern_treasury/models/paper_item_retrieve_params.rbs +1 -6
  611. data/sig/modern_treasury/models/payment_flow.rbs +37 -33
  612. data/sig/modern_treasury/models/payment_flow_create_params.rbs +13 -16
  613. data/sig/modern_treasury/models/payment_flow_list_params.rbs +11 -16
  614. data/sig/modern_treasury/models/payment_flow_retrieve_params.rbs +1 -6
  615. data/sig/modern_treasury/models/payment_flow_update_params.rbs +8 -11
  616. data/sig/modern_treasury/models/payment_order.rbs +107 -109
  617. data/sig/modern_treasury/models/payment_order_create_async_params.rbs +166 -195
  618. data/sig/modern_treasury/models/payment_order_create_params.rbs +177 -209
  619. data/sig/modern_treasury/models/payment_order_list_params.rbs +32 -31
  620. data/sig/modern_treasury/models/payment_order_retrieve_params.rbs +1 -6
  621. data/sig/modern_treasury/models/payment_order_subtype.rbs +4 -2
  622. data/sig/modern_treasury/models/payment_order_type.rbs +4 -2
  623. data/sig/modern_treasury/models/payment_order_update_params.rbs +139 -160
  624. data/sig/modern_treasury/models/payment_orders/reversal.rbs +21 -22
  625. data/sig/modern_treasury/models/payment_orders/reversal_create_params.rbs +40 -49
  626. data/sig/modern_treasury/models/payment_orders/reversal_list_params.rbs +5 -10
  627. data/sig/modern_treasury/models/payment_orders/reversal_retrieve_params.rbs +4 -9
  628. data/sig/modern_treasury/models/payment_reference.rbs +19 -20
  629. data/sig/modern_treasury/models/payment_reference_list_params.rbs +12 -15
  630. data/sig/modern_treasury/models/payment_reference_retireve_params.rbs +1 -6
  631. data/sig/modern_treasury/models/payment_reference_retrieve_params.rbs +1 -6
  632. data/sig/modern_treasury/models/ping_response.rbs +1 -6
  633. data/sig/modern_treasury/models/reconciliation_rule.rbs +20 -21
  634. data/sig/modern_treasury/models/return_create_params.rbs +17 -18
  635. data/sig/modern_treasury/models/return_list_params.rbs +13 -16
  636. data/sig/modern_treasury/models/return_object.rbs +58 -56
  637. data/sig/modern_treasury/models/return_retrieve_params.rbs +1 -6
  638. data/sig/modern_treasury/models/routing_detail.rbs +34 -40
  639. data/sig/modern_treasury/models/routing_detail_create_params.rbs +19 -18
  640. data/sig/modern_treasury/models/routing_detail_delete_params.rbs +9 -12
  641. data/sig/modern_treasury/models/routing_detail_list_params.rbs +6 -11
  642. data/sig/modern_treasury/models/routing_detail_retrieve_params.rbs +5 -10
  643. data/sig/modern_treasury/models/routing_number_lookup_request.rbs +24 -30
  644. data/sig/modern_treasury/models/transaction.rbs +46 -51
  645. data/sig/modern_treasury/models/transaction_create_params.rbs +17 -20
  646. data/sig/modern_treasury/models/transaction_delete_params.rbs +1 -6
  647. data/sig/modern_treasury/models/transaction_direction.rbs +4 -2
  648. data/sig/modern_treasury/models/transaction_list_params.rbs +17 -22
  649. data/sig/modern_treasury/models/transaction_retrieve_params.rbs +1 -6
  650. data/sig/modern_treasury/models/transaction_update_params.rbs +4 -9
  651. data/sig/modern_treasury/models/transactions/line_item_create_params.rbs +6 -11
  652. data/sig/modern_treasury/models/transactions/line_item_delete_params.rbs +1 -6
  653. data/sig/modern_treasury/models/transactions/line_item_list_params.rbs +12 -15
  654. data/sig/modern_treasury/models/transactions/line_item_retrieve_params.rbs +1 -6
  655. data/sig/modern_treasury/models/transactions/transaction_line_item.rbs +25 -27
  656. data/sig/modern_treasury/models/validation_validate_routing_number_params.rbs +9 -12
  657. data/sig/modern_treasury/models/virtual_account.rbs +18 -23
  658. data/sig/modern_treasury/models/virtual_account_create_params.rbs +50 -62
  659. data/sig/modern_treasury/models/virtual_account_delete_params.rbs +1 -6
  660. data/sig/modern_treasury/models/virtual_account_list_params.rbs +8 -13
  661. data/sig/modern_treasury/models/virtual_account_retrieve_params.rbs +1 -6
  662. data/sig/modern_treasury/models/virtual_account_update_params.rbs +7 -12
  663. data/sig/modern_treasury/models/wealth_and_employment_details.rbs +44 -37
  664. data/sig/modern_treasury/page.rbs +2 -7
  665. data/sig/modern_treasury/pooled_net_requester.rbs +11 -16
  666. data/sig/modern_treasury/request_options.rbs +6 -2
  667. data/sig/modern_treasury/resources/account_collection_flows.rbs +24 -46
  668. data/sig/modern_treasury/resources/account_details.rbs +26 -50
  669. data/sig/modern_treasury/resources/bulk_requests.rbs +20 -36
  670. data/sig/modern_treasury/resources/bulk_results.rbs +14 -25
  671. data/sig/modern_treasury/resources/connection_legal_entities.rbs +23 -45
  672. data/sig/modern_treasury/resources/connections.rbs +7 -12
  673. data/sig/modern_treasury/resources/counterparties.rbs +51 -82
  674. data/sig/modern_treasury/resources/documents.rbs +18 -34
  675. data/sig/modern_treasury/resources/events.rbs +14 -24
  676. data/sig/modern_treasury/resources/expected_payments.rbs +64 -92
  677. data/sig/modern_treasury/resources/external_accounts.rbs +57 -94
  678. data/sig/modern_treasury/resources/foreign_exchange_quotes.rbs +25 -41
  679. data/sig/modern_treasury/resources/incoming_payment_details.rbs +32 -54
  680. data/sig/modern_treasury/resources/internal_accounts/balance_reports.rbs +26 -50
  681. data/sig/modern_treasury/resources/internal_accounts.rbs +36 -58
  682. data/sig/modern_treasury/resources/invoices/line_items.rbs +39 -69
  683. data/sig/modern_treasury/resources/invoices.rbs +80 -108
  684. data/sig/modern_treasury/resources/ledger_account_balance_monitors.rbs +29 -57
  685. data/sig/modern_treasury/resources/ledger_account_categories.rbs +60 -112
  686. data/sig/modern_treasury/resources/ledger_account_settlements/account_entries.rbs +10 -22
  687. data/sig/modern_treasury/resources/ledger_account_settlements.rbs +35 -57
  688. data/sig/modern_treasury/resources/ledger_account_statements.rbs +12 -23
  689. data/sig/modern_treasury/resources/ledger_accounts.rbs +46 -74
  690. data/sig/modern_treasury/resources/ledger_entries.rbs +33 -50
  691. data/sig/modern_treasury/resources/ledger_event_handlers.rbs +26 -48
  692. data/sig/modern_treasury/resources/ledger_transactions/versions.rbs +9 -14
  693. data/sig/modern_treasury/resources/ledger_transactions.rbs +68 -102
  694. data/sig/modern_treasury/resources/ledgerable_events.rbs +11 -22
  695. data/sig/modern_treasury/resources/ledgers.rbs +29 -56
  696. data/sig/modern_treasury/resources/legal_entities.rbs +65 -87
  697. data/sig/modern_treasury/resources/legal_entity_associations.rbs +9 -14
  698. data/sig/modern_treasury/resources/line_items.rbs +20 -38
  699. data/sig/modern_treasury/resources/paper_items.rbs +12 -23
  700. data/sig/modern_treasury/resources/payment_flows.rbs +29 -51
  701. data/sig/modern_treasury/resources/payment_orders/reversals.rbs +18 -36
  702. data/sig/modern_treasury/resources/payment_orders.rbs +139 -166
  703. data/sig/modern_treasury/resources/payment_references.rbs +13 -33
  704. data/sig/modern_treasury/resources/returns.rbs +22 -37
  705. data/sig/modern_treasury/resources/routing_details.rbs +27 -51
  706. data/sig/modern_treasury/resources/transactions/line_items.rbs +22 -41
  707. data/sig/modern_treasury/resources/transactions.rbs +43 -68
  708. data/sig/modern_treasury/resources/validations.rbs +5 -10
  709. data/sig/modern_treasury/resources/virtual_accounts.rbs +37 -65
  710. data/sig/modern_treasury/util.rbs +71 -26
  711. metadata +4 -4
@@ -7,327 +7,296 @@ module ModernTreasury
7
7
  include ModernTreasury::RequestParameters
8
8
 
9
9
  sig { returns(T.nilable(ModernTreasury::Models::PaymentOrderUpdateParams::Accounting)) }
10
- def accounting
11
- end
10
+ attr_reader :accounting
12
11
 
13
12
  sig do
14
- params(_: ModernTreasury::Models::PaymentOrderUpdateParams::Accounting)
15
- .returns(ModernTreasury::Models::PaymentOrderUpdateParams::Accounting)
16
- end
17
- def accounting=(_)
13
+ params(
14
+ accounting: T.any(ModernTreasury::Models::PaymentOrderUpdateParams::Accounting, ModernTreasury::Util::AnyHash)
15
+ )
16
+ .void
18
17
  end
18
+ attr_writer :accounting
19
19
 
20
+ # The ID of one of your accounting categories. Note that these will only be
21
+ # accessible if your accounting system has been connected.
20
22
  sig { returns(T.nilable(String)) }
21
- def accounting_category_id
22
- end
23
-
24
- sig { params(_: T.nilable(String)).returns(T.nilable(String)) }
25
- def accounting_category_id=(_)
26
- end
23
+ attr_accessor :accounting_category_id
27
24
 
25
+ # The ID of one of your accounting ledger classes. Note that these will only be
26
+ # accessible if your accounting system has been connected.
28
27
  sig { returns(T.nilable(String)) }
29
- def accounting_ledger_class_id
30
- end
31
-
32
- sig { params(_: T.nilable(String)).returns(T.nilable(String)) }
33
- def accounting_ledger_class_id=(_)
34
- end
28
+ attr_accessor :accounting_ledger_class_id
35
29
 
30
+ # Value in specified currency's smallest unit. e.g. $10 would be represented as
31
+ # 1000 (cents). For RTP, the maximum amount allowed by the network is $100,000.
36
32
  sig { returns(T.nilable(Integer)) }
37
- def amount
38
- end
33
+ attr_reader :amount
39
34
 
40
- sig { params(_: Integer).returns(Integer) }
41
- def amount=(_)
42
- end
35
+ sig { params(amount: Integer).void }
36
+ attr_writer :amount
43
37
 
44
- sig { returns(T.nilable(Symbol)) }
45
- def charge_bearer
46
- end
47
-
48
- sig { params(_: T.nilable(Symbol)).returns(T.nilable(Symbol)) }
49
- def charge_bearer=(_)
50
- end
38
+ # The party that will pay the fees for the payment order. Only applies to wire
39
+ # payment orders. Can be one of shared, sender, or receiver, which correspond
40
+ # respectively with the SWIFT 71A values `SHA`, `OUR`, `BEN`.
41
+ sig { returns(T.nilable(ModernTreasury::Models::PaymentOrderUpdateParams::ChargeBearer::OrSymbol)) }
42
+ attr_accessor :charge_bearer
51
43
 
44
+ # Required when receiving_account_id is passed the ID of an external account.
52
45
  sig { returns(T.nilable(String)) }
53
- def counterparty_id
54
- end
55
-
56
- sig { params(_: T.nilable(String)).returns(T.nilable(String)) }
57
- def counterparty_id=(_)
58
- end
46
+ attr_accessor :counterparty_id
59
47
 
60
- sig { returns(T.nilable(Symbol)) }
61
- def currency
62
- end
48
+ # Defaults to the currency of the originating account.
49
+ sig { returns(T.nilable(ModernTreasury::Models::Currency::OrSymbol)) }
50
+ attr_reader :currency
63
51
 
64
- sig { params(_: Symbol).returns(Symbol) }
65
- def currency=(_)
66
- end
52
+ sig { params(currency: ModernTreasury::Models::Currency::OrSymbol).void }
53
+ attr_writer :currency
67
54
 
55
+ # An optional description for internal use.
68
56
  sig { returns(T.nilable(String)) }
69
- def description
70
- end
57
+ attr_accessor :description
71
58
 
72
- sig { params(_: T.nilable(String)).returns(T.nilable(String)) }
73
- def description=(_)
74
- end
59
+ # One of `credit`, `debit`. Describes the direction money is flowing in the
60
+ # transaction. A `credit` moves money from your account to someone else's. A
61
+ # `debit` pulls money from someone else's account to your own. Note that wire,
62
+ # rtp, and check payments will always be `credit`.
63
+ sig { returns(T.nilable(ModernTreasury::Models::PaymentOrderUpdateParams::Direction::OrSymbol)) }
64
+ attr_reader :direction
75
65
 
76
- sig { returns(T.nilable(Symbol)) }
77
- def direction
78
- end
79
-
80
- sig { params(_: Symbol).returns(Symbol) }
81
- def direction=(_)
82
- end
66
+ sig { params(direction: ModernTreasury::Models::PaymentOrderUpdateParams::Direction::OrSymbol).void }
67
+ attr_writer :direction
83
68
 
69
+ # Date transactions are to be posted to the participants' account. Defaults to the
70
+ # current business day or the next business day if the current day is a bank
71
+ # holiday or weekend. Format: yyyy-mm-dd.
84
72
  sig { returns(T.nilable(Date)) }
85
- def effective_date
86
- end
73
+ attr_reader :effective_date
87
74
 
88
- sig { params(_: Date).returns(Date) }
89
- def effective_date=(_)
90
- end
75
+ sig { params(effective_date: Date).void }
76
+ attr_writer :effective_date
91
77
 
78
+ # RFP payments require an expires_at. This value must be past the effective_date.
92
79
  sig { returns(T.nilable(Time)) }
93
- def expires_at
94
- end
95
-
96
- sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) }
97
- def expires_at=(_)
98
- end
80
+ attr_accessor :expires_at
99
81
 
100
- sig { returns(T.nilable(Symbol)) }
101
- def fallback_type
102
- end
82
+ # A payment type to fallback to if the original type is not valid for the
83
+ # receiving account. Currently, this only supports falling back from RTP to ACH
84
+ # (type=rtp and fallback_type=ach)
85
+ sig { returns(T.nilable(ModernTreasury::Models::PaymentOrderUpdateParams::FallbackType::OrSymbol)) }
86
+ attr_reader :fallback_type
103
87
 
104
- sig { params(_: Symbol).returns(Symbol) }
105
- def fallback_type=(_)
106
- end
88
+ sig { params(fallback_type: ModernTreasury::Models::PaymentOrderUpdateParams::FallbackType::OrSymbol).void }
89
+ attr_writer :fallback_type
107
90
 
91
+ # If present, indicates a specific foreign exchange contract number that has been
92
+ # generated by your financial institution.
108
93
  sig { returns(T.nilable(String)) }
109
- def foreign_exchange_contract
110
- end
111
-
112
- sig { params(_: T.nilable(String)).returns(T.nilable(String)) }
113
- def foreign_exchange_contract=(_)
114
- end
115
-
116
- sig { returns(T.nilable(Symbol)) }
117
- def foreign_exchange_indicator
118
- end
94
+ attr_accessor :foreign_exchange_contract
119
95
 
120
- sig { params(_: T.nilable(Symbol)).returns(T.nilable(Symbol)) }
121
- def foreign_exchange_indicator=(_)
122
- end
96
+ # Indicates the type of FX transfer to initiate, can be either
97
+ # `variable_to_fixed`, `fixed_to_variable`, or `null` if the payment order
98
+ # currency matches the originating account currency.
99
+ sig { returns(T.nilable(ModernTreasury::Models::PaymentOrderUpdateParams::ForeignExchangeIndicator::OrSymbol)) }
100
+ attr_accessor :foreign_exchange_indicator
123
101
 
102
+ # An array of line items that must sum up to the amount of the payment order.
124
103
  sig { returns(T.nilable(T::Array[ModernTreasury::Models::PaymentOrderUpdateParams::LineItem])) }
125
- def line_items
126
- end
104
+ attr_reader :line_items
127
105
 
128
106
  sig do
129
- params(_: T::Array[ModernTreasury::Models::PaymentOrderUpdateParams::LineItem])
130
- .returns(T::Array[ModernTreasury::Models::PaymentOrderUpdateParams::LineItem])
131
- end
132
- def line_items=(_)
107
+ params(
108
+ line_items: T::Array[T.any(ModernTreasury::Models::PaymentOrderUpdateParams::LineItem, ModernTreasury::Util::AnyHash)]
109
+ )
110
+ .void
133
111
  end
112
+ attr_writer :line_items
134
113
 
114
+ # Additional data represented as key-value pairs. Both the key and value must be
115
+ # strings.
135
116
  sig { returns(T.nilable(T::Hash[Symbol, String])) }
136
- def metadata
137
- end
117
+ attr_reader :metadata
138
118
 
139
- sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) }
140
- def metadata=(_)
141
- end
119
+ sig { params(metadata: T::Hash[Symbol, String]).void }
120
+ attr_writer :metadata
142
121
 
122
+ # A boolean to determine if NSF Protection is enabled for this payment order. Note
123
+ # that this setting must also be turned on in your organization settings page.
143
124
  sig { returns(T.nilable(T::Boolean)) }
144
- def nsf_protected
145
- end
125
+ attr_reader :nsf_protected
146
126
 
147
- sig { params(_: T::Boolean).returns(T::Boolean) }
148
- def nsf_protected=(_)
149
- end
127
+ sig { params(nsf_protected: T::Boolean).void }
128
+ attr_writer :nsf_protected
150
129
 
130
+ # The ID of one of your organization's internal accounts.
151
131
  sig { returns(T.nilable(String)) }
152
- def originating_account_id
153
- end
132
+ attr_reader :originating_account_id
154
133
 
155
- sig { params(_: String).returns(String) }
156
- def originating_account_id=(_)
157
- end
134
+ sig { params(originating_account_id: String).void }
135
+ attr_writer :originating_account_id
158
136
 
137
+ # If present, this will replace your default company name on receiver's bank
138
+ # statement. This field can only be used for ACH payments currently. For ACH, only
139
+ # the first 16 characters of this string will be used. Any additional characters
140
+ # will be truncated.
159
141
  sig { returns(T.nilable(String)) }
160
- def originating_party_name
161
- end
162
-
163
- sig { params(_: T.nilable(String)).returns(T.nilable(String)) }
164
- def originating_party_name=(_)
165
- end
166
-
167
- sig { returns(T.nilable(Symbol)) }
168
- def priority
169
- end
170
-
171
- sig { params(_: Symbol).returns(Symbol) }
172
- def priority=(_)
173
- end
174
-
142
+ attr_accessor :originating_party_name
143
+
144
+ # Either `normal` or `high`. For ACH and EFT payments, `high` represents a
145
+ # same-day ACH or EFT transfer, respectively. For check payments, `high` can mean
146
+ # an overnight check rather than standard mail.
147
+ sig { returns(T.nilable(ModernTreasury::Models::PaymentOrderUpdateParams::Priority::OrSymbol)) }
148
+ attr_reader :priority
149
+
150
+ sig { params(priority: ModernTreasury::Models::PaymentOrderUpdateParams::Priority::OrSymbol).void }
151
+ attr_writer :priority
152
+
153
+ # If present, Modern Treasury will not process the payment until after this time.
154
+ # If `process_after` is past the cutoff for `effective_date`, `process_after` will
155
+ # take precedence and `effective_date` will automatically update to reflect the
156
+ # earliest possible sending date after `process_after`. Format is ISO8601
157
+ # timestamp.
175
158
  sig { returns(T.nilable(Time)) }
176
- def process_after
177
- end
178
-
179
- sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) }
180
- def process_after=(_)
181
- end
159
+ attr_accessor :process_after
182
160
 
161
+ # For `wire`, this is usually the purpose which is transmitted via the
162
+ # "InstrForDbtrAgt" field in the ISO20022 file. For `eft`, this field is the 3
163
+ # digit CPA Code that will be attached to the payment.
183
164
  sig { returns(T.nilable(String)) }
184
- def purpose
185
- end
186
-
187
- sig { params(_: T.nilable(String)).returns(T.nilable(String)) }
188
- def purpose=(_)
189
- end
165
+ attr_accessor :purpose
190
166
 
167
+ # Either `receiving_account` or `receiving_account_id` must be present. When using
168
+ # `receiving_account_id`, you may pass the id of an external account or an
169
+ # internal account.
191
170
  sig { returns(T.nilable(ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount)) }
192
- def receiving_account
193
- end
171
+ attr_reader :receiving_account
194
172
 
195
173
  sig do
196
- params(_: ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount)
197
- .returns(ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount)
198
- end
199
- def receiving_account=(_)
174
+ params(
175
+ receiving_account: T.any(ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount, ModernTreasury::Util::AnyHash)
176
+ )
177
+ .void
200
178
  end
179
+ attr_writer :receiving_account
201
180
 
181
+ # Either `receiving_account` or `receiving_account_id` must be present. When using
182
+ # `receiving_account_id`, you may pass the id of an external account or an
183
+ # internal account.
202
184
  sig { returns(T.nilable(String)) }
203
- def receiving_account_id
204
- end
185
+ attr_reader :receiving_account_id
205
186
 
206
- sig { params(_: String).returns(String) }
207
- def receiving_account_id=(_)
208
- end
187
+ sig { params(receiving_account_id: String).void }
188
+ attr_writer :receiving_account_id
209
189
 
190
+ # For `ach`, this field will be passed through on an addenda record. For `wire`
191
+ # payments the field will be passed through as the "Originator to Beneficiary
192
+ # Information", also known as OBI or Fedwire tag 6000.
210
193
  sig { returns(T.nilable(String)) }
211
- def remittance_information
212
- end
213
-
214
- sig { params(_: T.nilable(String)).returns(T.nilable(String)) }
215
- def remittance_information=(_)
216
- end
194
+ attr_accessor :remittance_information
217
195
 
196
+ # Send an email to the counterparty when the payment order is sent to the bank. If
197
+ # `null`, `send_remittance_advice` on the Counterparty is used.
218
198
  sig { returns(T.nilable(T::Boolean)) }
219
- def send_remittance_advice
220
- end
221
-
222
- sig { params(_: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) }
223
- def send_remittance_advice=(_)
224
- end
225
-
199
+ attr_accessor :send_remittance_advice
200
+
201
+ # An optional descriptor which will appear in the receiver's statement. For
202
+ # `check` payments this field will be used as the memo line. For `ach` the maximum
203
+ # length is 10 characters. Note that for ACH payments, the name on your bank
204
+ # account will be included automatically by the bank, so you can use the
205
+ # characters for other useful information. For `eft` the maximum length is 15
206
+ # characters.
226
207
  sig { returns(T.nilable(String)) }
227
- def statement_descriptor
228
- end
229
-
230
- sig { params(_: T.nilable(String)).returns(T.nilable(String)) }
231
- def statement_descriptor=(_)
232
- end
233
-
234
- sig { returns(T.nilable(Symbol)) }
235
- def status
236
- end
237
-
238
- sig { params(_: Symbol).returns(Symbol) }
239
- def status=(_)
240
- end
241
-
242
- sig { returns(T.nilable(Symbol)) }
243
- def subtype
244
- end
245
-
246
- sig { params(_: T.nilable(Symbol)).returns(T.nilable(Symbol)) }
247
- def subtype=(_)
248
- end
249
-
250
- sig { returns(T.nilable(Symbol)) }
251
- def type
252
- end
253
-
254
- sig { params(_: Symbol).returns(Symbol) }
255
- def type=(_)
256
- end
257
-
208
+ attr_accessor :statement_descriptor
209
+
210
+ # To cancel a payment order, use `cancelled`. To redraft a returned payment order,
211
+ # use `approved`. To undo approval on a denied or approved payment order, use
212
+ # `needs_approval`.
213
+ sig { returns(T.nilable(ModernTreasury::Models::PaymentOrderUpdateParams::Status::OrSymbol)) }
214
+ attr_reader :status
215
+
216
+ sig { params(status: ModernTreasury::Models::PaymentOrderUpdateParams::Status::OrSymbol).void }
217
+ attr_writer :status
218
+
219
+ # An additional layer of classification for the type of payment order you are
220
+ # doing. This field is only used for `ach` payment orders currently. For `ach`
221
+ # payment orders, the `subtype` represents the SEC code. We currently support
222
+ # `CCD`, `PPD`, `IAT`, `CTX`, `WEB`, `CIE`, and `TEL`.
223
+ sig { returns(T.nilable(ModernTreasury::Models::PaymentOrderSubtype::OrSymbol)) }
224
+ attr_accessor :subtype
225
+
226
+ # One of `ach`, `se_bankgirot`, `eft`, `wire`, `check`, `sen`, `book`, `rtp`,
227
+ # `sepa`, `bacs`, `au_becs`, `interac`, `neft`, `nics`,
228
+ # `nz_national_clearing_code`, `sic`, `signet`, `provexchange`, `zengin`.
229
+ sig { returns(T.nilable(ModernTreasury::Models::PaymentOrderType::OrSymbol)) }
230
+ attr_reader :type
231
+
232
+ sig { params(type: ModernTreasury::Models::PaymentOrderType::OrSymbol).void }
233
+ attr_writer :type
234
+
235
+ # This represents the identifier by which the person is known to the receiver when
236
+ # using the CIE subtype for ACH payments. Only the first 22 characters of this
237
+ # string will be used. Any additional characters will be truncated.
258
238
  sig { returns(T.nilable(String)) }
259
- def ultimate_originating_party_identifier
260
- end
261
-
262
- sig { params(_: T.nilable(String)).returns(T.nilable(String)) }
263
- def ultimate_originating_party_identifier=(_)
264
- end
239
+ attr_accessor :ultimate_originating_party_identifier
265
240
 
241
+ # This represents the name of the person that the payment is on behalf of when
242
+ # using the CIE subtype for ACH payments. Only the first 15 characters of this
243
+ # string will be used. Any additional characters will be truncated.
266
244
  sig { returns(T.nilable(String)) }
267
- def ultimate_originating_party_name
268
- end
269
-
270
- sig { params(_: T.nilable(String)).returns(T.nilable(String)) }
271
- def ultimate_originating_party_name=(_)
272
- end
245
+ attr_accessor :ultimate_originating_party_name
273
246
 
247
+ # This represents the name of the merchant that the payment is being sent to when
248
+ # using the CIE subtype for ACH payments. Only the first 22 characters of this
249
+ # string will be used. Any additional characters will be truncated.
274
250
  sig { returns(T.nilable(String)) }
275
- def ultimate_receiving_party_identifier
276
- end
277
-
278
- sig { params(_: T.nilable(String)).returns(T.nilable(String)) }
279
- def ultimate_receiving_party_identifier=(_)
280
- end
251
+ attr_accessor :ultimate_receiving_party_identifier
281
252
 
253
+ # This represents the identifier by which the merchant is known to the person
254
+ # initiating an ACH payment with CIE subtype. Only the first 15 characters of this
255
+ # string will be used. Any additional characters will be truncated.
282
256
  sig { returns(T.nilable(String)) }
283
- def ultimate_receiving_party_name
284
- end
285
-
286
- sig { params(_: T.nilable(String)).returns(T.nilable(String)) }
287
- def ultimate_receiving_party_name=(_)
288
- end
257
+ attr_accessor :ultimate_receiving_party_name
289
258
 
290
259
  sig do
291
260
  params(
292
- accounting: ModernTreasury::Models::PaymentOrderUpdateParams::Accounting,
261
+ accounting: T.any(ModernTreasury::Models::PaymentOrderUpdateParams::Accounting, ModernTreasury::Util::AnyHash),
293
262
  accounting_category_id: T.nilable(String),
294
263
  accounting_ledger_class_id: T.nilable(String),
295
264
  amount: Integer,
296
- charge_bearer: T.nilable(Symbol),
265
+ charge_bearer: T.nilable(ModernTreasury::Models::PaymentOrderUpdateParams::ChargeBearer::OrSymbol),
297
266
  counterparty_id: T.nilable(String),
298
- currency: Symbol,
267
+ currency: ModernTreasury::Models::Currency::OrSymbol,
299
268
  description: T.nilable(String),
300
- direction: Symbol,
269
+ direction: ModernTreasury::Models::PaymentOrderUpdateParams::Direction::OrSymbol,
301
270
  effective_date: Date,
302
271
  expires_at: T.nilable(Time),
303
- fallback_type: Symbol,
272
+ fallback_type: ModernTreasury::Models::PaymentOrderUpdateParams::FallbackType::OrSymbol,
304
273
  foreign_exchange_contract: T.nilable(String),
305
- foreign_exchange_indicator: T.nilable(Symbol),
306
- line_items: T::Array[ModernTreasury::Models::PaymentOrderUpdateParams::LineItem],
274
+ foreign_exchange_indicator: T.nilable(ModernTreasury::Models::PaymentOrderUpdateParams::ForeignExchangeIndicator::OrSymbol),
275
+ line_items: T::Array[T.any(ModernTreasury::Models::PaymentOrderUpdateParams::LineItem, ModernTreasury::Util::AnyHash)],
307
276
  metadata: T::Hash[Symbol, String],
308
277
  nsf_protected: T::Boolean,
309
278
  originating_account_id: String,
310
279
  originating_party_name: T.nilable(String),
311
- priority: Symbol,
280
+ priority: ModernTreasury::Models::PaymentOrderUpdateParams::Priority::OrSymbol,
312
281
  process_after: T.nilable(Time),
313
282
  purpose: T.nilable(String),
314
- receiving_account: ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount,
283
+ receiving_account: T.any(ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount, ModernTreasury::Util::AnyHash),
315
284
  receiving_account_id: String,
316
285
  remittance_information: T.nilable(String),
317
286
  send_remittance_advice: T.nilable(T::Boolean),
318
287
  statement_descriptor: T.nilable(String),
319
- status: Symbol,
320
- subtype: T.nilable(Symbol),
321
- type: Symbol,
288
+ status: ModernTreasury::Models::PaymentOrderUpdateParams::Status::OrSymbol,
289
+ subtype: T.nilable(ModernTreasury::Models::PaymentOrderSubtype::OrSymbol),
290
+ type: ModernTreasury::Models::PaymentOrderType::OrSymbol,
322
291
  ultimate_originating_party_identifier: T.nilable(String),
323
292
  ultimate_originating_party_name: T.nilable(String),
324
293
  ultimate_receiving_party_identifier: T.nilable(String),
325
294
  ultimate_receiving_party_name: T.nilable(String),
326
- request_options: T.any(ModernTreasury::RequestOptions, T::Hash[Symbol, T.anything])
295
+ request_options: T.any(ModernTreasury::RequestOptions, ModernTreasury::Util::AnyHash)
327
296
  )
328
- .void
297
+ .returns(T.attached_class)
329
298
  end
330
- def initialize(
299
+ def self.new(
331
300
  accounting: nil,
332
301
  accounting_category_id: nil,
333
302
  accounting_ledger_class_id: nil,
@@ -374,22 +343,22 @@ module ModernTreasury
374
343
  accounting_category_id: T.nilable(String),
375
344
  accounting_ledger_class_id: T.nilable(String),
376
345
  amount: Integer,
377
- charge_bearer: T.nilable(Symbol),
346
+ charge_bearer: T.nilable(ModernTreasury::Models::PaymentOrderUpdateParams::ChargeBearer::OrSymbol),
378
347
  counterparty_id: T.nilable(String),
379
- currency: Symbol,
348
+ currency: ModernTreasury::Models::Currency::OrSymbol,
380
349
  description: T.nilable(String),
381
- direction: Symbol,
350
+ direction: ModernTreasury::Models::PaymentOrderUpdateParams::Direction::OrSymbol,
382
351
  effective_date: Date,
383
352
  expires_at: T.nilable(Time),
384
- fallback_type: Symbol,
353
+ fallback_type: ModernTreasury::Models::PaymentOrderUpdateParams::FallbackType::OrSymbol,
385
354
  foreign_exchange_contract: T.nilable(String),
386
- foreign_exchange_indicator: T.nilable(Symbol),
355
+ foreign_exchange_indicator: T.nilable(ModernTreasury::Models::PaymentOrderUpdateParams::ForeignExchangeIndicator::OrSymbol),
387
356
  line_items: T::Array[ModernTreasury::Models::PaymentOrderUpdateParams::LineItem],
388
357
  metadata: T::Hash[Symbol, String],
389
358
  nsf_protected: T::Boolean,
390
359
  originating_account_id: String,
391
360
  originating_party_name: T.nilable(String),
392
- priority: Symbol,
361
+ priority: ModernTreasury::Models::PaymentOrderUpdateParams::Priority::OrSymbol,
393
362
  process_after: T.nilable(Time),
394
363
  purpose: T.nilable(String),
395
364
  receiving_account: ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount,
@@ -397,9 +366,9 @@ module ModernTreasury
397
366
  remittance_information: T.nilable(String),
398
367
  send_remittance_advice: T.nilable(T::Boolean),
399
368
  statement_descriptor: T.nilable(String),
400
- status: Symbol,
401
- subtype: T.nilable(Symbol),
402
- type: Symbol,
369
+ status: ModernTreasury::Models::PaymentOrderUpdateParams::Status::OrSymbol,
370
+ subtype: T.nilable(ModernTreasury::Models::PaymentOrderSubtype::OrSymbol),
371
+ type: ModernTreasury::Models::PaymentOrderType::OrSymbol,
403
372
  ultimate_originating_party_identifier: T.nilable(String),
404
373
  ultimate_originating_party_name: T.nilable(String),
405
374
  ultimate_receiving_party_identifier: T.nilable(String),
@@ -412,24 +381,19 @@ module ModernTreasury
412
381
  end
413
382
 
414
383
  class Accounting < ModernTreasury::BaseModel
384
+ # The ID of one of your accounting categories. Note that these will only be
385
+ # accessible if your accounting system has been connected.
415
386
  sig { returns(T.nilable(String)) }
416
- def account_id
417
- end
418
-
419
- sig { params(_: T.nilable(String)).returns(T.nilable(String)) }
420
- def account_id=(_)
421
- end
387
+ attr_accessor :account_id
422
388
 
389
+ # The ID of one of the class objects in your accounting system. Class objects
390
+ # track segments of your business independent of client or project. Note that
391
+ # these will only be accessible if your accounting system has been connected.
423
392
  sig { returns(T.nilable(String)) }
424
- def class_id
425
- end
393
+ attr_accessor :class_id
426
394
 
427
- sig { params(_: T.nilable(String)).returns(T.nilable(String)) }
428
- def class_id=(_)
429
- end
430
-
431
- sig { params(account_id: T.nilable(String), class_id: T.nilable(String)).void }
432
- def initialize(account_id: nil, class_id: nil)
395
+ sig { params(account_id: T.nilable(String), class_id: T.nilable(String)).returns(T.attached_class) }
396
+ def self.new(account_id: nil, class_id: nil)
433
397
  end
434
398
 
435
399
  sig { override.returns({account_id: T.nilable(String), class_id: T.nilable(String)}) }
@@ -437,82 +401,118 @@ module ModernTreasury
437
401
  end
438
402
  end
439
403
 
440
- class ChargeBearer < ModernTreasury::Enum
441
- abstract!
404
+ # The party that will pay the fees for the payment order. Only applies to wire
405
+ # payment orders. Can be one of shared, sender, or receiver, which correspond
406
+ # respectively with the SWIFT 71A values `SHA`, `OUR`, `BEN`.
407
+ module ChargeBearer
408
+ extend ModernTreasury::Enum
409
+
410
+ TaggedSymbol =
411
+ T.type_alias { T.all(Symbol, ModernTreasury::Models::PaymentOrderUpdateParams::ChargeBearer) }
412
+ OrSymbol =
413
+ T.type_alias { T.any(Symbol, ModernTreasury::Models::PaymentOrderUpdateParams::ChargeBearer::TaggedSymbol) }
442
414
 
443
- SHARED = T.let(:shared, T.nilable(Symbol))
444
- SENDER = T.let(:sender, T.nilable(Symbol))
445
- RECEIVER = T.let(:receiver, T.nilable(Symbol))
415
+ SHARED = T.let(:shared, ModernTreasury::Models::PaymentOrderUpdateParams::ChargeBearer::TaggedSymbol)
416
+ SENDER = T.let(:sender, ModernTreasury::Models::PaymentOrderUpdateParams::ChargeBearer::TaggedSymbol)
417
+ RECEIVER = T.let(:receiver, ModernTreasury::Models::PaymentOrderUpdateParams::ChargeBearer::TaggedSymbol)
446
418
 
447
- sig { override.returns(T::Array[Symbol]) }
419
+ sig { override.returns(T::Array[ModernTreasury::Models::PaymentOrderUpdateParams::ChargeBearer::TaggedSymbol]) }
448
420
  def self.values
449
421
  end
450
422
  end
451
423
 
452
- class Direction < ModernTreasury::Enum
453
- abstract!
424
+ # One of `credit`, `debit`. Describes the direction money is flowing in the
425
+ # transaction. A `credit` moves money from your account to someone else's. A
426
+ # `debit` pulls money from someone else's account to your own. Note that wire,
427
+ # rtp, and check payments will always be `credit`.
428
+ module Direction
429
+ extend ModernTreasury::Enum
454
430
 
455
- CREDIT = :credit
456
- DEBIT = :debit
431
+ TaggedSymbol =
432
+ T.type_alias { T.all(Symbol, ModernTreasury::Models::PaymentOrderUpdateParams::Direction) }
433
+ OrSymbol =
434
+ T.type_alias { T.any(Symbol, ModernTreasury::Models::PaymentOrderUpdateParams::Direction::TaggedSymbol) }
457
435
 
458
- sig { override.returns(T::Array[Symbol]) }
436
+ CREDIT = T.let(:credit, ModernTreasury::Models::PaymentOrderUpdateParams::Direction::TaggedSymbol)
437
+ DEBIT = T.let(:debit, ModernTreasury::Models::PaymentOrderUpdateParams::Direction::TaggedSymbol)
438
+
439
+ sig { override.returns(T::Array[ModernTreasury::Models::PaymentOrderUpdateParams::Direction::TaggedSymbol]) }
459
440
  def self.values
460
441
  end
461
442
  end
462
443
 
463
- class FallbackType < ModernTreasury::Enum
464
- abstract!
444
+ # A payment type to fallback to if the original type is not valid for the
445
+ # receiving account. Currently, this only supports falling back from RTP to ACH
446
+ # (type=rtp and fallback_type=ach)
447
+ module FallbackType
448
+ extend ModernTreasury::Enum
449
+
450
+ TaggedSymbol =
451
+ T.type_alias { T.all(Symbol, ModernTreasury::Models::PaymentOrderUpdateParams::FallbackType) }
452
+ OrSymbol =
453
+ T.type_alias { T.any(Symbol, ModernTreasury::Models::PaymentOrderUpdateParams::FallbackType::TaggedSymbol) }
465
454
 
466
- ACH = :ach
455
+ ACH = T.let(:ach, ModernTreasury::Models::PaymentOrderUpdateParams::FallbackType::TaggedSymbol)
467
456
 
468
- sig { override.returns(T::Array[Symbol]) }
457
+ sig { override.returns(T::Array[ModernTreasury::Models::PaymentOrderUpdateParams::FallbackType::TaggedSymbol]) }
469
458
  def self.values
470
459
  end
471
460
  end
472
461
 
473
- class ForeignExchangeIndicator < ModernTreasury::Enum
474
- abstract!
462
+ # Indicates the type of FX transfer to initiate, can be either
463
+ # `variable_to_fixed`, `fixed_to_variable`, or `null` if the payment order
464
+ # currency matches the originating account currency.
465
+ module ForeignExchangeIndicator
466
+ extend ModernTreasury::Enum
467
+
468
+ TaggedSymbol =
469
+ T.type_alias { T.all(Symbol, ModernTreasury::Models::PaymentOrderUpdateParams::ForeignExchangeIndicator) }
470
+ OrSymbol =
471
+ T.type_alias { T.any(Symbol, ModernTreasury::Models::PaymentOrderUpdateParams::ForeignExchangeIndicator::TaggedSymbol) }
475
472
 
476
- FIXED_TO_VARIABLE = T.let(:fixed_to_variable, T.nilable(Symbol))
477
- VARIABLE_TO_FIXED = T.let(:variable_to_fixed, T.nilable(Symbol))
473
+ FIXED_TO_VARIABLE =
474
+ T.let(
475
+ :fixed_to_variable,
476
+ ModernTreasury::Models::PaymentOrderUpdateParams::ForeignExchangeIndicator::TaggedSymbol
477
+ )
478
+ VARIABLE_TO_FIXED =
479
+ T.let(
480
+ :variable_to_fixed,
481
+ ModernTreasury::Models::PaymentOrderUpdateParams::ForeignExchangeIndicator::TaggedSymbol
482
+ )
478
483
 
479
- sig { override.returns(T::Array[Symbol]) }
484
+ sig do
485
+ override
486
+ .returns(
487
+ T::Array[ModernTreasury::Models::PaymentOrderUpdateParams::ForeignExchangeIndicator::TaggedSymbol]
488
+ )
489
+ end
480
490
  def self.values
481
491
  end
482
492
  end
483
493
 
484
494
  class LineItem < ModernTreasury::BaseModel
495
+ # Value in specified currency's smallest unit. e.g. $10 would be represented
496
+ # as 1000.
485
497
  sig { returns(Integer) }
486
- def amount
487
- end
488
-
489
- sig { params(_: Integer).returns(Integer) }
490
- def amount=(_)
491
- end
498
+ attr_accessor :amount
492
499
 
500
+ # The ID of one of your accounting categories. Note that these will only be
501
+ # accessible if your accounting system has been connected.
493
502
  sig { returns(T.nilable(String)) }
494
- def accounting_category_id
495
- end
496
-
497
- sig { params(_: T.nilable(String)).returns(T.nilable(String)) }
498
- def accounting_category_id=(_)
499
- end
503
+ attr_accessor :accounting_category_id
500
504
 
505
+ # A free-form description of the line item.
501
506
  sig { returns(T.nilable(String)) }
502
- def description
503
- end
504
-
505
- sig { params(_: T.nilable(String)).returns(T.nilable(String)) }
506
- def description=(_)
507
- end
507
+ attr_accessor :description
508
508
 
509
+ # Additional data represented as key-value pairs. Both the key and value must be
510
+ # strings.
509
511
  sig { returns(T.nilable(T::Hash[Symbol, String])) }
510
- def metadata
511
- end
512
+ attr_reader :metadata
512
513
 
513
- sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) }
514
- def metadata=(_)
515
- end
514
+ sig { params(metadata: T::Hash[Symbol, String]).void }
515
+ attr_writer :metadata
516
516
 
517
517
  sig do
518
518
  params(
@@ -521,9 +521,9 @@ module ModernTreasury
521
521
  description: T.nilable(String),
522
522
  metadata: T::Hash[Symbol, String]
523
523
  )
524
- .void
524
+ .returns(T.attached_class)
525
525
  end
526
- def initialize(amount:, accounting_category_id: nil, description: nil, metadata: nil)
526
+ def self.new(amount:, accounting_category_id: nil, description: nil, metadata: nil)
527
527
  end
528
528
 
529
529
  sig do
@@ -541,13 +541,20 @@ module ModernTreasury
541
541
  end
542
542
  end
543
543
 
544
- class Priority < ModernTreasury::Enum
545
- abstract!
544
+ # Either `normal` or `high`. For ACH and EFT payments, `high` represents a
545
+ # same-day ACH or EFT transfer, respectively. For check payments, `high` can mean
546
+ # an overnight check rather than standard mail.
547
+ module Priority
548
+ extend ModernTreasury::Enum
549
+
550
+ TaggedSymbol = T.type_alias { T.all(Symbol, ModernTreasury::Models::PaymentOrderUpdateParams::Priority) }
551
+ OrSymbol =
552
+ T.type_alias { T.any(Symbol, ModernTreasury::Models::PaymentOrderUpdateParams::Priority::TaggedSymbol) }
546
553
 
547
- HIGH = :high
548
- NORMAL = :normal
554
+ HIGH = T.let(:high, ModernTreasury::Models::PaymentOrderUpdateParams::Priority::TaggedSymbol)
555
+ NORMAL = T.let(:normal, ModernTreasury::Models::PaymentOrderUpdateParams::Priority::TaggedSymbol)
549
556
 
550
- sig { override.returns(T::Array[Symbol]) }
557
+ sig { override.returns(T::Array[ModernTreasury::Models::PaymentOrderUpdateParams::Priority::TaggedSymbol]) }
551
558
  def self.values
552
559
  end
553
560
  end
@@ -558,142 +565,186 @@ module ModernTreasury
558
565
  T.nilable(T::Array[ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::AccountDetail])
559
566
  )
560
567
  end
561
- def account_details
562
- end
568
+ attr_reader :account_details
563
569
 
564
570
  sig do
565
- params(_: T::Array[ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::AccountDetail])
566
- .returns(T::Array[ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::AccountDetail])
567
- end
568
- def account_details=(_)
571
+ params(
572
+ account_details: T::Array[
573
+ T.any(
574
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::AccountDetail,
575
+ ModernTreasury::Util::AnyHash
576
+ )
577
+ ]
578
+ )
579
+ .void
569
580
  end
581
+ attr_writer :account_details
570
582
 
571
- sig { returns(T.nilable(Symbol)) }
572
- def account_type
573
- end
583
+ # Can be `checking`, `savings` or `other`.
584
+ sig { returns(T.nilable(ModernTreasury::Models::ExternalAccountType::OrSymbol)) }
585
+ attr_reader :account_type
574
586
 
575
- sig { params(_: Symbol).returns(Symbol) }
576
- def account_type=(_)
577
- end
587
+ sig { params(account_type: ModernTreasury::Models::ExternalAccountType::OrSymbol).void }
588
+ attr_writer :account_type
578
589
 
579
590
  sig do
580
591
  returns(
581
592
  T.nilable(T::Array[ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::ContactDetail])
582
593
  )
583
594
  end
584
- def contact_details
585
- end
595
+ attr_reader :contact_details
586
596
 
587
597
  sig do
588
- params(_: T::Array[ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::ContactDetail])
589
- .returns(T::Array[ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::ContactDetail])
590
- end
591
- def contact_details=(_)
598
+ params(
599
+ contact_details: T::Array[
600
+ T.any(
601
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::ContactDetail,
602
+ ModernTreasury::Util::AnyHash
603
+ )
604
+ ]
605
+ )
606
+ .void
592
607
  end
608
+ attr_writer :contact_details
593
609
 
610
+ # Specifies a ledger account object that will be created with the external
611
+ # account. The resulting ledger account is linked to the external account for
612
+ # auto-ledgering Payment objects. See
613
+ # https://docs.moderntreasury.com/docs/linking-to-other-modern-treasury-objects
614
+ # for more details.
594
615
  sig { returns(T.nilable(ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::LedgerAccount)) }
595
- def ledger_account
596
- end
616
+ attr_reader :ledger_account
597
617
 
598
618
  sig do
599
- params(_: ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::LedgerAccount)
600
- .returns(ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::LedgerAccount)
601
- end
602
- def ledger_account=(_)
619
+ params(
620
+ ledger_account: T.any(
621
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::LedgerAccount,
622
+ ModernTreasury::Util::AnyHash
623
+ )
624
+ )
625
+ .void
603
626
  end
627
+ attr_writer :ledger_account
604
628
 
629
+ # Additional data represented as key-value pairs. Both the key and value must be
630
+ # strings.
605
631
  sig { returns(T.nilable(T::Hash[Symbol, String])) }
606
- def metadata
607
- end
632
+ attr_reader :metadata
608
633
 
609
- sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) }
610
- def metadata=(_)
611
- end
634
+ sig { params(metadata: T::Hash[Symbol, String]).void }
635
+ attr_writer :metadata
612
636
 
637
+ # A nickname for the external account. This is only for internal usage and won't
638
+ # affect any payments
613
639
  sig { returns(T.nilable(String)) }
614
- def name
615
- end
616
-
617
- sig { params(_: T.nilable(String)).returns(T.nilable(String)) }
618
- def name=(_)
619
- end
640
+ attr_accessor :name
620
641
 
642
+ # Required if receiving wire payments.
621
643
  sig { returns(T.nilable(ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::PartyAddress)) }
622
- def party_address
623
- end
644
+ attr_reader :party_address
624
645
 
625
646
  sig do
626
- params(_: ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::PartyAddress)
627
- .returns(ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::PartyAddress)
628
- end
629
- def party_address=(_)
647
+ params(
648
+ party_address: T.any(
649
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::PartyAddress,
650
+ ModernTreasury::Util::AnyHash
651
+ )
652
+ )
653
+ .void
630
654
  end
655
+ attr_writer :party_address
631
656
 
632
657
  sig { returns(T.nilable(String)) }
633
- def party_identifier
634
- end
658
+ attr_reader :party_identifier
635
659
 
636
- sig { params(_: String).returns(String) }
637
- def party_identifier=(_)
638
- end
660
+ sig { params(party_identifier: String).void }
661
+ attr_writer :party_identifier
639
662
 
663
+ # If this value isn't provided, it will be inherited from the counterparty's name.
640
664
  sig { returns(T.nilable(String)) }
641
- def party_name
642
- end
665
+ attr_reader :party_name
643
666
 
644
- sig { params(_: String).returns(String) }
645
- def party_name=(_)
646
- end
647
-
648
- sig { returns(T.nilable(Symbol)) }
649
- def party_type
650
- end
667
+ sig { params(party_name: String).void }
668
+ attr_writer :party_name
651
669
 
652
- sig { params(_: T.nilable(Symbol)).returns(T.nilable(Symbol)) }
653
- def party_type=(_)
670
+ # Either `individual` or `business`.
671
+ sig do
672
+ returns(
673
+ T.nilable(ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::PartyType::OrSymbol)
674
+ )
654
675
  end
676
+ attr_accessor :party_type
655
677
 
678
+ # If you've enabled the Modern Treasury + Plaid integration in your Plaid account,
679
+ # you can pass the processor token in this field.
656
680
  sig { returns(T.nilable(String)) }
657
- def plaid_processor_token
658
- end
681
+ attr_reader :plaid_processor_token
659
682
 
660
- sig { params(_: String).returns(String) }
661
- def plaid_processor_token=(_)
662
- end
683
+ sig { params(plaid_processor_token: String).void }
684
+ attr_writer :plaid_processor_token
663
685
 
664
686
  sig do
665
687
  returns(
666
688
  T.nilable(T::Array[ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail])
667
689
  )
668
690
  end
669
- def routing_details
670
- end
691
+ attr_reader :routing_details
671
692
 
672
693
  sig do
673
- params(_: T::Array[ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail])
674
- .returns(T::Array[ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail])
675
- end
676
- def routing_details=(_)
694
+ params(
695
+ routing_details: T::Array[
696
+ T.any(
697
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail,
698
+ ModernTreasury::Util::AnyHash
699
+ )
700
+ ]
701
+ )
702
+ .void
677
703
  end
704
+ attr_writer :routing_details
678
705
 
706
+ # Either `receiving_account` or `receiving_account_id` must be present. When using
707
+ # `receiving_account_id`, you may pass the id of an external account or an
708
+ # internal account.
679
709
  sig do
680
710
  params(
681
- account_details: T::Array[ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::AccountDetail],
682
- account_type: Symbol,
683
- contact_details: T::Array[ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::ContactDetail],
684
- ledger_account: ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::LedgerAccount,
711
+ account_details: T::Array[
712
+ T.any(
713
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::AccountDetail,
714
+ ModernTreasury::Util::AnyHash
715
+ )
716
+ ],
717
+ account_type: ModernTreasury::Models::ExternalAccountType::OrSymbol,
718
+ contact_details: T::Array[
719
+ T.any(
720
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::ContactDetail,
721
+ ModernTreasury::Util::AnyHash
722
+ )
723
+ ],
724
+ ledger_account: T.any(
725
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::LedgerAccount,
726
+ ModernTreasury::Util::AnyHash
727
+ ),
685
728
  metadata: T::Hash[Symbol, String],
686
729
  name: T.nilable(String),
687
- party_address: ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::PartyAddress,
730
+ party_address: T.any(
731
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::PartyAddress,
732
+ ModernTreasury::Util::AnyHash
733
+ ),
688
734
  party_identifier: String,
689
735
  party_name: String,
690
- party_type: T.nilable(Symbol),
736
+ party_type: T.nilable(ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::PartyType::OrSymbol),
691
737
  plaid_processor_token: String,
692
- routing_details: T::Array[ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail]
738
+ routing_details: T::Array[
739
+ T.any(
740
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail,
741
+ ModernTreasury::Util::AnyHash
742
+ )
743
+ ]
693
744
  )
694
- .void
745
+ .returns(T.attached_class)
695
746
  end
696
- def initialize(
747
+ def self.new(
697
748
  account_details: nil,
698
749
  account_type: nil,
699
750
  contact_details: nil,
@@ -714,7 +765,7 @@ module ModernTreasury
714
765
  .returns(
715
766
  {
716
767
  account_details: T::Array[ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::AccountDetail],
717
- account_type: Symbol,
768
+ account_type: ModernTreasury::Models::ExternalAccountType::OrSymbol,
718
769
  contact_details: T::Array[ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::ContactDetail],
719
770
  ledger_account: ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::LedgerAccount,
720
771
  metadata: T::Hash[Symbol, String],
@@ -722,7 +773,7 @@ module ModernTreasury
722
773
  party_address: ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::PartyAddress,
723
774
  party_identifier: String,
724
775
  party_name: String,
725
- party_type: T.nilable(Symbol),
776
+ party_type: T.nilable(ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::PartyType::OrSymbol),
726
777
  plaid_processor_token: String,
727
778
  routing_details: T::Array[ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail]
728
779
  }
@@ -733,44 +784,121 @@ module ModernTreasury
733
784
 
734
785
  class AccountDetail < ModernTreasury::BaseModel
735
786
  sig { returns(String) }
736
- def account_number
737
- end
787
+ attr_accessor :account_number
738
788
 
739
- sig { params(_: String).returns(String) }
740
- def account_number=(_)
789
+ sig do
790
+ returns(
791
+ T.nilable(
792
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::AccountDetail::AccountNumberType::OrSymbol
793
+ )
794
+ )
741
795
  end
796
+ attr_reader :account_number_type
742
797
 
743
- sig { returns(T.nilable(Symbol)) }
744
- def account_number_type
798
+ sig do
799
+ params(
800
+ account_number_type: ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::AccountDetail::AccountNumberType::OrSymbol
801
+ )
802
+ .void
745
803
  end
804
+ attr_writer :account_number_type
746
805
 
747
- sig { params(_: Symbol).returns(Symbol) }
748
- def account_number_type=(_)
806
+ sig do
807
+ params(
808
+ account_number: String,
809
+ account_number_type: ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::AccountDetail::AccountNumberType::OrSymbol
810
+ )
811
+ .returns(T.attached_class)
749
812
  end
750
-
751
- sig { params(account_number: String, account_number_type: Symbol).void }
752
- def initialize(account_number:, account_number_type: nil)
813
+ def self.new(account_number:, account_number_type: nil)
753
814
  end
754
815
 
755
- sig { override.returns({account_number: String, account_number_type: Symbol}) }
816
+ sig do
817
+ override
818
+ .returns(
819
+ {
820
+ account_number: String,
821
+ account_number_type: ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::AccountDetail::AccountNumberType::OrSymbol
822
+ }
823
+ )
824
+ end
756
825
  def to_hash
757
826
  end
758
827
 
759
- class AccountNumberType < ModernTreasury::Enum
760
- abstract!
761
-
762
- AU_NUMBER = :au_number
763
- CLABE = :clabe
764
- HK_NUMBER = :hk_number
765
- IBAN = :iban
766
- ID_NUMBER = :id_number
767
- NZ_NUMBER = :nz_number
768
- OTHER = :other
769
- PAN = :pan
770
- SG_NUMBER = :sg_number
771
- WALLET_ADDRESS = :wallet_address
772
-
773
- sig { override.returns(T::Array[Symbol]) }
828
+ module AccountNumberType
829
+ extend ModernTreasury::Enum
830
+
831
+ TaggedSymbol =
832
+ T.type_alias do
833
+ T.all(Symbol, ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::AccountDetail::AccountNumberType)
834
+ end
835
+ OrSymbol =
836
+ T.type_alias do
837
+ T.any(
838
+ Symbol,
839
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::AccountDetail::AccountNumberType::TaggedSymbol
840
+ )
841
+ end
842
+
843
+ AU_NUMBER =
844
+ T.let(
845
+ :au_number,
846
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::AccountDetail::AccountNumberType::TaggedSymbol
847
+ )
848
+ CLABE =
849
+ T.let(
850
+ :clabe,
851
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::AccountDetail::AccountNumberType::TaggedSymbol
852
+ )
853
+ HK_NUMBER =
854
+ T.let(
855
+ :hk_number,
856
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::AccountDetail::AccountNumberType::TaggedSymbol
857
+ )
858
+ IBAN =
859
+ T.let(
860
+ :iban,
861
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::AccountDetail::AccountNumberType::TaggedSymbol
862
+ )
863
+ ID_NUMBER =
864
+ T.let(
865
+ :id_number,
866
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::AccountDetail::AccountNumberType::TaggedSymbol
867
+ )
868
+ NZ_NUMBER =
869
+ T.let(
870
+ :nz_number,
871
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::AccountDetail::AccountNumberType::TaggedSymbol
872
+ )
873
+ OTHER =
874
+ T.let(
875
+ :other,
876
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::AccountDetail::AccountNumberType::TaggedSymbol
877
+ )
878
+ PAN =
879
+ T.let(
880
+ :pan,
881
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::AccountDetail::AccountNumberType::TaggedSymbol
882
+ )
883
+ SG_NUMBER =
884
+ T.let(
885
+ :sg_number,
886
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::AccountDetail::AccountNumberType::TaggedSymbol
887
+ )
888
+ WALLET_ADDRESS =
889
+ T.let(
890
+ :wallet_address,
891
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::AccountDetail::AccountNumberType::TaggedSymbol
892
+ )
893
+
894
+ sig do
895
+ override
896
+ .returns(
897
+ T::Array[
898
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::AccountDetail::AccountNumberType::TaggedSymbol
899
+ ]
900
+ )
901
+ end
774
902
  def self.values
775
903
  end
776
904
  end
@@ -778,139 +906,184 @@ module ModernTreasury
778
906
 
779
907
  class ContactDetail < ModernTreasury::BaseModel
780
908
  sig { returns(T.nilable(String)) }
781
- def contact_identifier
782
- end
909
+ attr_reader :contact_identifier
783
910
 
784
- sig { params(_: String).returns(String) }
785
- def contact_identifier=(_)
786
- end
911
+ sig { params(contact_identifier: String).void }
912
+ attr_writer :contact_identifier
787
913
 
788
- sig { returns(T.nilable(Symbol)) }
789
- def contact_identifier_type
914
+ sig do
915
+ returns(
916
+ T.nilable(
917
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::ContactDetail::ContactIdentifierType::OrSymbol
918
+ )
919
+ )
790
920
  end
921
+ attr_reader :contact_identifier_type
791
922
 
792
- sig { params(_: Symbol).returns(Symbol) }
793
- def contact_identifier_type=(_)
923
+ sig do
924
+ params(
925
+ contact_identifier_type: ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::ContactDetail::ContactIdentifierType::OrSymbol
926
+ )
927
+ .void
794
928
  end
929
+ attr_writer :contact_identifier_type
795
930
 
796
- sig { params(contact_identifier: String, contact_identifier_type: Symbol).void }
797
- def initialize(contact_identifier: nil, contact_identifier_type: nil)
931
+ sig do
932
+ params(
933
+ contact_identifier: String,
934
+ contact_identifier_type: ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::ContactDetail::ContactIdentifierType::OrSymbol
935
+ )
936
+ .returns(T.attached_class)
937
+ end
938
+ def self.new(contact_identifier: nil, contact_identifier_type: nil)
798
939
  end
799
940
 
800
- sig { override.returns({contact_identifier: String, contact_identifier_type: Symbol}) }
941
+ sig do
942
+ override
943
+ .returns(
944
+ {
945
+ contact_identifier: String,
946
+ contact_identifier_type: ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::ContactDetail::ContactIdentifierType::OrSymbol
947
+ }
948
+ )
949
+ end
801
950
  def to_hash
802
951
  end
803
952
 
804
- class ContactIdentifierType < ModernTreasury::Enum
805
- abstract!
806
-
807
- EMAIL = :email
808
- PHONE_NUMBER = :phone_number
809
- WEBSITE = :website
953
+ module ContactIdentifierType
954
+ extend ModernTreasury::Enum
955
+
956
+ TaggedSymbol =
957
+ T.type_alias do
958
+ T.all(Symbol, ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::ContactDetail::ContactIdentifierType)
959
+ end
960
+ OrSymbol =
961
+ T.type_alias do
962
+ T.any(
963
+ Symbol,
964
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::ContactDetail::ContactIdentifierType::TaggedSymbol
965
+ )
966
+ end
967
+
968
+ EMAIL =
969
+ T.let(
970
+ :email,
971
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::ContactDetail::ContactIdentifierType::TaggedSymbol
972
+ )
973
+ PHONE_NUMBER =
974
+ T.let(
975
+ :phone_number,
976
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::ContactDetail::ContactIdentifierType::TaggedSymbol
977
+ )
978
+ WEBSITE =
979
+ T.let(
980
+ :website,
981
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::ContactDetail::ContactIdentifierType::TaggedSymbol
982
+ )
810
983
 
811
- sig { override.returns(T::Array[Symbol]) }
984
+ sig do
985
+ override
986
+ .returns(
987
+ T::Array[
988
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::ContactDetail::ContactIdentifierType::TaggedSymbol
989
+ ]
990
+ )
991
+ end
812
992
  def self.values
813
993
  end
814
994
  end
815
995
  end
816
996
 
817
997
  class LedgerAccount < ModernTreasury::BaseModel
998
+ # The currency of the ledger account.
818
999
  sig { returns(String) }
819
- def currency
820
- end
821
-
822
- sig { params(_: String).returns(String) }
823
- def currency=(_)
824
- end
1000
+ attr_accessor :currency
825
1001
 
1002
+ # The id of the ledger that this account belongs to.
826
1003
  sig { returns(String) }
827
- def ledger_id
828
- end
829
-
830
- sig { params(_: String).returns(String) }
831
- def ledger_id=(_)
832
- end
1004
+ attr_accessor :ledger_id
833
1005
 
1006
+ # The name of the ledger account.
834
1007
  sig { returns(String) }
835
- def name
836
- end
837
-
838
- sig { params(_: String).returns(String) }
839
- def name=(_)
840
- end
841
-
842
- sig { returns(Symbol) }
843
- def normal_balance
844
- end
1008
+ attr_accessor :name
845
1009
 
846
- sig { params(_: Symbol).returns(Symbol) }
847
- def normal_balance=(_)
848
- end
1010
+ # The normal balance of the ledger account.
1011
+ sig { returns(ModernTreasury::Models::TransactionDirection::OrSymbol) }
1012
+ attr_accessor :normal_balance
849
1013
 
1014
+ # The currency exponent of the ledger account.
850
1015
  sig { returns(T.nilable(Integer)) }
851
- def currency_exponent
852
- end
853
-
854
- sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) }
855
- def currency_exponent=(_)
856
- end
1016
+ attr_accessor :currency_exponent
857
1017
 
1018
+ # The description of the ledger account.
858
1019
  sig { returns(T.nilable(String)) }
859
- def description
860
- end
861
-
862
- sig { params(_: T.nilable(String)).returns(T.nilable(String)) }
863
- def description=(_)
864
- end
1020
+ attr_accessor :description
865
1021
 
1022
+ # The array of ledger account category ids that this ledger account should be a
1023
+ # child of.
866
1024
  sig { returns(T.nilable(T::Array[String])) }
867
- def ledger_account_category_ids
868
- end
1025
+ attr_reader :ledger_account_category_ids
869
1026
 
870
- sig { params(_: T::Array[String]).returns(T::Array[String]) }
871
- def ledger_account_category_ids=(_)
872
- end
1027
+ sig { params(ledger_account_category_ids: T::Array[String]).void }
1028
+ attr_writer :ledger_account_category_ids
873
1029
 
1030
+ # If the ledger account links to another object in Modern Treasury, the id will be
1031
+ # populated here, otherwise null.
874
1032
  sig { returns(T.nilable(String)) }
875
- def ledgerable_id
876
- end
1033
+ attr_reader :ledgerable_id
877
1034
 
878
- sig { params(_: String).returns(String) }
879
- def ledgerable_id=(_)
880
- end
1035
+ sig { params(ledgerable_id: String).void }
1036
+ attr_writer :ledgerable_id
881
1037
 
882
- sig { returns(T.nilable(Symbol)) }
883
- def ledgerable_type
1038
+ # If the ledger account links to another object in Modern Treasury, the type will
1039
+ # be populated here, otherwise null. The value is one of internal_account or
1040
+ # external_account.
1041
+ sig do
1042
+ returns(
1043
+ T.nilable(
1044
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::LedgerAccount::LedgerableType::OrSymbol
1045
+ )
1046
+ )
884
1047
  end
1048
+ attr_reader :ledgerable_type
885
1049
 
886
- sig { params(_: Symbol).returns(Symbol) }
887
- def ledgerable_type=(_)
1050
+ sig do
1051
+ params(
1052
+ ledgerable_type: ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::LedgerAccount::LedgerableType::OrSymbol
1053
+ )
1054
+ .void
888
1055
  end
1056
+ attr_writer :ledgerable_type
889
1057
 
1058
+ # Additional data represented as key-value pairs. Both the key and value must be
1059
+ # strings.
890
1060
  sig { returns(T.nilable(T::Hash[Symbol, String])) }
891
- def metadata
892
- end
1061
+ attr_reader :metadata
893
1062
 
894
- sig { params(_: T::Hash[Symbol, String]).returns(T::Hash[Symbol, String]) }
895
- def metadata=(_)
896
- end
1063
+ sig { params(metadata: T::Hash[Symbol, String]).void }
1064
+ attr_writer :metadata
897
1065
 
1066
+ # Specifies a ledger account object that will be created with the external
1067
+ # account. The resulting ledger account is linked to the external account for
1068
+ # auto-ledgering Payment objects. See
1069
+ # https://docs.moderntreasury.com/docs/linking-to-other-modern-treasury-objects
1070
+ # for more details.
898
1071
  sig do
899
1072
  params(
900
1073
  currency: String,
901
1074
  ledger_id: String,
902
1075
  name: String,
903
- normal_balance: Symbol,
1076
+ normal_balance: ModernTreasury::Models::TransactionDirection::OrSymbol,
904
1077
  currency_exponent: T.nilable(Integer),
905
1078
  description: T.nilable(String),
906
1079
  ledger_account_category_ids: T::Array[String],
907
1080
  ledgerable_id: String,
908
- ledgerable_type: Symbol,
1081
+ ledgerable_type: ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::LedgerAccount::LedgerableType::OrSymbol,
909
1082
  metadata: T::Hash[Symbol, String]
910
1083
  )
911
- .void
1084
+ .returns(T.attached_class)
912
1085
  end
913
- def initialize(
1086
+ def self.new(
914
1087
  currency:,
915
1088
  ledger_id:,
916
1089
  name:,
@@ -931,12 +1104,12 @@ module ModernTreasury
931
1104
  currency: String,
932
1105
  ledger_id: String,
933
1106
  name: String,
934
- normal_balance: Symbol,
1107
+ normal_balance: ModernTreasury::Models::TransactionDirection::OrSymbol,
935
1108
  currency_exponent: T.nilable(Integer),
936
1109
  description: T.nilable(String),
937
1110
  ledger_account_category_ids: T::Array[String],
938
1111
  ledgerable_id: String,
939
- ledgerable_type: Symbol,
1112
+ ledgerable_type: ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::LedgerAccount::LedgerableType::OrSymbol,
940
1113
  metadata: T::Hash[Symbol, String]
941
1114
  }
942
1115
  )
@@ -944,69 +1117,82 @@ module ModernTreasury
944
1117
  def to_hash
945
1118
  end
946
1119
 
947
- class LedgerableType < ModernTreasury::Enum
948
- abstract!
949
-
950
- COUNTERPARTY = :counterparty
951
- EXTERNAL_ACCOUNT = :external_account
952
- INTERNAL_ACCOUNT = :internal_account
953
- VIRTUAL_ACCOUNT = :virtual_account
1120
+ # If the ledger account links to another object in Modern Treasury, the type will
1121
+ # be populated here, otherwise null. The value is one of internal_account or
1122
+ # external_account.
1123
+ module LedgerableType
1124
+ extend ModernTreasury::Enum
1125
+
1126
+ TaggedSymbol =
1127
+ T.type_alias do
1128
+ T.all(Symbol, ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::LedgerAccount::LedgerableType)
1129
+ end
1130
+ OrSymbol =
1131
+ T.type_alias do
1132
+ T.any(
1133
+ Symbol,
1134
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::LedgerAccount::LedgerableType::TaggedSymbol
1135
+ )
1136
+ end
1137
+
1138
+ COUNTERPARTY =
1139
+ T.let(
1140
+ :counterparty,
1141
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::LedgerAccount::LedgerableType::TaggedSymbol
1142
+ )
1143
+ EXTERNAL_ACCOUNT =
1144
+ T.let(
1145
+ :external_account,
1146
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::LedgerAccount::LedgerableType::TaggedSymbol
1147
+ )
1148
+ INTERNAL_ACCOUNT =
1149
+ T.let(
1150
+ :internal_account,
1151
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::LedgerAccount::LedgerableType::TaggedSymbol
1152
+ )
1153
+ VIRTUAL_ACCOUNT =
1154
+ T.let(
1155
+ :virtual_account,
1156
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::LedgerAccount::LedgerableType::TaggedSymbol
1157
+ )
954
1158
 
955
- sig { override.returns(T::Array[Symbol]) }
1159
+ sig do
1160
+ override
1161
+ .returns(
1162
+ T::Array[
1163
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::LedgerAccount::LedgerableType::TaggedSymbol
1164
+ ]
1165
+ )
1166
+ end
956
1167
  def self.values
957
1168
  end
958
1169
  end
959
1170
  end
960
1171
 
961
1172
  class PartyAddress < ModernTreasury::BaseModel
1173
+ # Country code conforms to [ISO 3166-1 alpha-2]
962
1174
  sig { returns(T.nilable(String)) }
963
- def country
964
- end
965
-
966
- sig { params(_: T.nilable(String)).returns(T.nilable(String)) }
967
- def country=(_)
968
- end
1175
+ attr_accessor :country
969
1176
 
970
1177
  sig { returns(T.nilable(String)) }
971
- def line1
972
- end
973
-
974
- sig { params(_: T.nilable(String)).returns(T.nilable(String)) }
975
- def line1=(_)
976
- end
1178
+ attr_accessor :line1
977
1179
 
978
1180
  sig { returns(T.nilable(String)) }
979
- def line2
980
- end
981
-
982
- sig { params(_: T.nilable(String)).returns(T.nilable(String)) }
983
- def line2=(_)
984
- end
1181
+ attr_accessor :line2
985
1182
 
1183
+ # Locality or City.
986
1184
  sig { returns(T.nilable(String)) }
987
- def locality
988
- end
989
-
990
- sig { params(_: T.nilable(String)).returns(T.nilable(String)) }
991
- def locality=(_)
992
- end
1185
+ attr_accessor :locality
993
1186
 
1187
+ # The postal code of the address.
994
1188
  sig { returns(T.nilable(String)) }
995
- def postal_code
996
- end
997
-
998
- sig { params(_: T.nilable(String)).returns(T.nilable(String)) }
999
- def postal_code=(_)
1000
- end
1189
+ attr_accessor :postal_code
1001
1190
 
1191
+ # Region or State.
1002
1192
  sig { returns(T.nilable(String)) }
1003
- def region
1004
- end
1005
-
1006
- sig { params(_: T.nilable(String)).returns(T.nilable(String)) }
1007
- def region=(_)
1008
- end
1193
+ attr_accessor :region
1009
1194
 
1195
+ # Required if receiving wire payments.
1010
1196
  sig do
1011
1197
  params(
1012
1198
  country: T.nilable(String),
@@ -1016,9 +1202,9 @@ module ModernTreasury
1016
1202
  postal_code: T.nilable(String),
1017
1203
  region: T.nilable(String)
1018
1204
  )
1019
- .void
1205
+ .returns(T.attached_class)
1020
1206
  end
1021
- def initialize(country: nil, line1: nil, line2: nil, locality: nil, postal_code: nil, region: nil)
1207
+ def self.new(country: nil, line1: nil, line2: nil, locality: nil, postal_code: nil, region: nil)
1022
1208
  end
1023
1209
 
1024
1210
  sig do
@@ -1038,139 +1224,425 @@ module ModernTreasury
1038
1224
  end
1039
1225
  end
1040
1226
 
1041
- class PartyType < ModernTreasury::Enum
1042
- abstract!
1227
+ # Either `individual` or `business`.
1228
+ module PartyType
1229
+ extend ModernTreasury::Enum
1043
1230
 
1044
- BUSINESS = T.let(:business, T.nilable(Symbol))
1045
- INDIVIDUAL = T.let(:individual, T.nilable(Symbol))
1231
+ TaggedSymbol =
1232
+ T.type_alias { T.all(Symbol, ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::PartyType) }
1233
+ OrSymbol =
1234
+ T.type_alias { T.any(Symbol, ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::PartyType::TaggedSymbol) }
1235
+
1236
+ BUSINESS =
1237
+ T.let(
1238
+ :business,
1239
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::PartyType::TaggedSymbol
1240
+ )
1241
+ INDIVIDUAL =
1242
+ T.let(
1243
+ :individual,
1244
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::PartyType::TaggedSymbol
1245
+ )
1046
1246
 
1047
- sig { override.returns(T::Array[Symbol]) }
1247
+ sig do
1248
+ override
1249
+ .returns(
1250
+ T::Array[ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::PartyType::TaggedSymbol]
1251
+ )
1252
+ end
1048
1253
  def self.values
1049
1254
  end
1050
1255
  end
1051
1256
 
1052
1257
  class RoutingDetail < ModernTreasury::BaseModel
1053
1258
  sig { returns(String) }
1054
- def routing_number
1055
- end
1259
+ attr_accessor :routing_number
1056
1260
 
1057
- sig { params(_: String).returns(String) }
1058
- def routing_number=(_)
1059
- end
1060
-
1061
- sig { returns(Symbol) }
1062
- def routing_number_type
1261
+ sig do
1262
+ returns(
1263
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::RoutingNumberType::OrSymbol
1264
+ )
1063
1265
  end
1266
+ attr_accessor :routing_number_type
1064
1267
 
1065
- sig { params(_: Symbol).returns(Symbol) }
1066
- def routing_number_type=(_)
1268
+ sig do
1269
+ returns(
1270
+ T.nilable(
1271
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::PaymentType::OrSymbol
1272
+ )
1273
+ )
1067
1274
  end
1275
+ attr_reader :payment_type
1068
1276
 
1069
- sig { returns(T.nilable(Symbol)) }
1070
- def payment_type
1277
+ sig do
1278
+ params(
1279
+ payment_type: ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::PaymentType::OrSymbol
1280
+ )
1281
+ .void
1071
1282
  end
1283
+ attr_writer :payment_type
1072
1284
 
1073
- sig { params(_: Symbol).returns(Symbol) }
1074
- def payment_type=(_)
1285
+ sig do
1286
+ params(
1287
+ routing_number: String,
1288
+ routing_number_type: ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::RoutingNumberType::OrSymbol,
1289
+ payment_type: ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::PaymentType::OrSymbol
1290
+ )
1291
+ .returns(T.attached_class)
1075
1292
  end
1076
-
1077
- sig { params(routing_number: String, routing_number_type: Symbol, payment_type: Symbol).void }
1078
- def initialize(routing_number:, routing_number_type:, payment_type: nil)
1293
+ def self.new(routing_number:, routing_number_type:, payment_type: nil)
1079
1294
  end
1080
1295
 
1081
1296
  sig do
1082
- override.returns({routing_number: String, routing_number_type: Symbol, payment_type: Symbol})
1297
+ override
1298
+ .returns(
1299
+ {
1300
+ routing_number: String,
1301
+ routing_number_type: ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::RoutingNumberType::OrSymbol,
1302
+ payment_type: ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::PaymentType::OrSymbol
1303
+ }
1304
+ )
1083
1305
  end
1084
1306
  def to_hash
1085
1307
  end
1086
1308
 
1087
- class RoutingNumberType < ModernTreasury::Enum
1088
- abstract!
1089
-
1090
- ABA = :aba
1091
- AU_BSB = :au_bsb
1092
- BR_CODIGO = :br_codigo
1093
- CA_CPA = :ca_cpa
1094
- CHIPS = :chips
1095
- CNAPS = :cnaps
1096
- DK_INTERBANK_CLEARING_CODE = :dk_interbank_clearing_code
1097
- GB_SORT_CODE = :gb_sort_code
1098
- HK_INTERBANK_CLEARING_CODE = :hk_interbank_clearing_code
1099
- HU_INTERBANK_CLEARING_CODE = :hu_interbank_clearing_code
1100
- ID_SKNBI_CODE = :id_sknbi_code
1101
- IN_IFSC = :in_ifsc
1102
- JP_ZENGIN_CODE = :jp_zengin_code
1103
- MY_BRANCH_CODE = :my_branch_code
1104
- MX_BANK_IDENTIFIER = :mx_bank_identifier
1105
- NZ_NATIONAL_CLEARING_CODE = :nz_national_clearing_code
1106
- PL_NATIONAL_CLEARING_CODE = :pl_national_clearing_code
1107
- SE_BANKGIRO_CLEARING_CODE = :se_bankgiro_clearing_code
1108
- SG_INTERBANK_CLEARING_CODE = :sg_interbank_clearing_code
1109
- SWIFT = :swift
1110
- ZA_NATIONAL_CLEARING_CODE = :za_national_clearing_code
1111
-
1112
- sig { override.returns(T::Array[Symbol]) }
1309
+ module RoutingNumberType
1310
+ extend ModernTreasury::Enum
1311
+
1312
+ TaggedSymbol =
1313
+ T.type_alias do
1314
+ T.all(Symbol, ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::RoutingNumberType)
1315
+ end
1316
+ OrSymbol =
1317
+ T.type_alias do
1318
+ T.any(
1319
+ Symbol,
1320
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::RoutingNumberType::TaggedSymbol
1321
+ )
1322
+ end
1323
+
1324
+ ABA =
1325
+ T.let(
1326
+ :aba,
1327
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::RoutingNumberType::TaggedSymbol
1328
+ )
1329
+ AU_BSB =
1330
+ T.let(
1331
+ :au_bsb,
1332
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::RoutingNumberType::TaggedSymbol
1333
+ )
1334
+ BR_CODIGO =
1335
+ T.let(
1336
+ :br_codigo,
1337
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::RoutingNumberType::TaggedSymbol
1338
+ )
1339
+ CA_CPA =
1340
+ T.let(
1341
+ :ca_cpa,
1342
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::RoutingNumberType::TaggedSymbol
1343
+ )
1344
+ CHIPS =
1345
+ T.let(
1346
+ :chips,
1347
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::RoutingNumberType::TaggedSymbol
1348
+ )
1349
+ CNAPS =
1350
+ T.let(
1351
+ :cnaps,
1352
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::RoutingNumberType::TaggedSymbol
1353
+ )
1354
+ DK_INTERBANK_CLEARING_CODE =
1355
+ T.let(
1356
+ :dk_interbank_clearing_code,
1357
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::RoutingNumberType::TaggedSymbol
1358
+ )
1359
+ GB_SORT_CODE =
1360
+ T.let(
1361
+ :gb_sort_code,
1362
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::RoutingNumberType::TaggedSymbol
1363
+ )
1364
+ HK_INTERBANK_CLEARING_CODE =
1365
+ T.let(
1366
+ :hk_interbank_clearing_code,
1367
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::RoutingNumberType::TaggedSymbol
1368
+ )
1369
+ HU_INTERBANK_CLEARING_CODE =
1370
+ T.let(
1371
+ :hu_interbank_clearing_code,
1372
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::RoutingNumberType::TaggedSymbol
1373
+ )
1374
+ ID_SKNBI_CODE =
1375
+ T.let(
1376
+ :id_sknbi_code,
1377
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::RoutingNumberType::TaggedSymbol
1378
+ )
1379
+ IN_IFSC =
1380
+ T.let(
1381
+ :in_ifsc,
1382
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::RoutingNumberType::TaggedSymbol
1383
+ )
1384
+ JP_ZENGIN_CODE =
1385
+ T.let(
1386
+ :jp_zengin_code,
1387
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::RoutingNumberType::TaggedSymbol
1388
+ )
1389
+ MY_BRANCH_CODE =
1390
+ T.let(
1391
+ :my_branch_code,
1392
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::RoutingNumberType::TaggedSymbol
1393
+ )
1394
+ MX_BANK_IDENTIFIER =
1395
+ T.let(
1396
+ :mx_bank_identifier,
1397
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::RoutingNumberType::TaggedSymbol
1398
+ )
1399
+ NZ_NATIONAL_CLEARING_CODE =
1400
+ T.let(
1401
+ :nz_national_clearing_code,
1402
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::RoutingNumberType::TaggedSymbol
1403
+ )
1404
+ PL_NATIONAL_CLEARING_CODE =
1405
+ T.let(
1406
+ :pl_national_clearing_code,
1407
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::RoutingNumberType::TaggedSymbol
1408
+ )
1409
+ SE_BANKGIRO_CLEARING_CODE =
1410
+ T.let(
1411
+ :se_bankgiro_clearing_code,
1412
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::RoutingNumberType::TaggedSymbol
1413
+ )
1414
+ SG_INTERBANK_CLEARING_CODE =
1415
+ T.let(
1416
+ :sg_interbank_clearing_code,
1417
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::RoutingNumberType::TaggedSymbol
1418
+ )
1419
+ SWIFT =
1420
+ T.let(
1421
+ :swift,
1422
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::RoutingNumberType::TaggedSymbol
1423
+ )
1424
+ ZA_NATIONAL_CLEARING_CODE =
1425
+ T.let(
1426
+ :za_national_clearing_code,
1427
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::RoutingNumberType::TaggedSymbol
1428
+ )
1429
+
1430
+ sig do
1431
+ override
1432
+ .returns(
1433
+ T::Array[
1434
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::RoutingNumberType::TaggedSymbol
1435
+ ]
1436
+ )
1437
+ end
1113
1438
  def self.values
1114
1439
  end
1115
1440
  end
1116
1441
 
1117
- class PaymentType < ModernTreasury::Enum
1118
- abstract!
1119
-
1120
- ACH = :ach
1121
- AU_BECS = :au_becs
1122
- BACS = :bacs
1123
- BOOK = :book
1124
- CARD = :card
1125
- CHATS = :chats
1126
- CHECK = :check
1127
- CROSS_BORDER = :cross_border
1128
- DK_NETS = :dk_nets
1129
- EFT = :eft
1130
- HU_ICS = :hu_ics
1131
- INTERAC = :interac
1132
- MASAV = :masav
1133
- MX_CCEN = :mx_ccen
1134
- NEFT = :neft
1135
- NICS = :nics
1136
- NZ_BECS = :nz_becs
1137
- PL_ELIXIR = :pl_elixir
1138
- PROVXCHANGE = :provxchange
1139
- RO_SENT = :ro_sent
1140
- RTP = :rtp
1141
- SE_BANKGIROT = :se_bankgirot
1142
- SEN = :sen
1143
- SEPA = :sepa
1144
- SG_GIRO = :sg_giro
1145
- SIC = :sic
1146
- SIGNET = :signet
1147
- SKNBI = :sknbi
1148
- WIRE = :wire
1149
- ZENGIN = :zengin
1150
-
1151
- sig { override.returns(T::Array[Symbol]) }
1442
+ module PaymentType
1443
+ extend ModernTreasury::Enum
1444
+
1445
+ TaggedSymbol =
1446
+ T.type_alias do
1447
+ T.all(Symbol, ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::PaymentType)
1448
+ end
1449
+ OrSymbol =
1450
+ T.type_alias do
1451
+ T.any(
1452
+ Symbol,
1453
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::PaymentType::TaggedSymbol
1454
+ )
1455
+ end
1456
+
1457
+ ACH =
1458
+ T.let(
1459
+ :ach,
1460
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::PaymentType::TaggedSymbol
1461
+ )
1462
+ AU_BECS =
1463
+ T.let(
1464
+ :au_becs,
1465
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::PaymentType::TaggedSymbol
1466
+ )
1467
+ BACS =
1468
+ T.let(
1469
+ :bacs,
1470
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::PaymentType::TaggedSymbol
1471
+ )
1472
+ BOOK =
1473
+ T.let(
1474
+ :book,
1475
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::PaymentType::TaggedSymbol
1476
+ )
1477
+ CARD =
1478
+ T.let(
1479
+ :card,
1480
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::PaymentType::TaggedSymbol
1481
+ )
1482
+ CHATS =
1483
+ T.let(
1484
+ :chats,
1485
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::PaymentType::TaggedSymbol
1486
+ )
1487
+ CHECK =
1488
+ T.let(
1489
+ :check,
1490
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::PaymentType::TaggedSymbol
1491
+ )
1492
+ CROSS_BORDER =
1493
+ T.let(
1494
+ :cross_border,
1495
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::PaymentType::TaggedSymbol
1496
+ )
1497
+ DK_NETS =
1498
+ T.let(
1499
+ :dk_nets,
1500
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::PaymentType::TaggedSymbol
1501
+ )
1502
+ EFT =
1503
+ T.let(
1504
+ :eft,
1505
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::PaymentType::TaggedSymbol
1506
+ )
1507
+ HU_ICS =
1508
+ T.let(
1509
+ :hu_ics,
1510
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::PaymentType::TaggedSymbol
1511
+ )
1512
+ INTERAC =
1513
+ T.let(
1514
+ :interac,
1515
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::PaymentType::TaggedSymbol
1516
+ )
1517
+ MASAV =
1518
+ T.let(
1519
+ :masav,
1520
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::PaymentType::TaggedSymbol
1521
+ )
1522
+ MX_CCEN =
1523
+ T.let(
1524
+ :mx_ccen,
1525
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::PaymentType::TaggedSymbol
1526
+ )
1527
+ NEFT =
1528
+ T.let(
1529
+ :neft,
1530
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::PaymentType::TaggedSymbol
1531
+ )
1532
+ NICS =
1533
+ T.let(
1534
+ :nics,
1535
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::PaymentType::TaggedSymbol
1536
+ )
1537
+ NZ_BECS =
1538
+ T.let(
1539
+ :nz_becs,
1540
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::PaymentType::TaggedSymbol
1541
+ )
1542
+ PL_ELIXIR =
1543
+ T.let(
1544
+ :pl_elixir,
1545
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::PaymentType::TaggedSymbol
1546
+ )
1547
+ PROVXCHANGE =
1548
+ T.let(
1549
+ :provxchange,
1550
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::PaymentType::TaggedSymbol
1551
+ )
1552
+ RO_SENT =
1553
+ T.let(
1554
+ :ro_sent,
1555
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::PaymentType::TaggedSymbol
1556
+ )
1557
+ RTP =
1558
+ T.let(
1559
+ :rtp,
1560
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::PaymentType::TaggedSymbol
1561
+ )
1562
+ SE_BANKGIROT =
1563
+ T.let(
1564
+ :se_bankgirot,
1565
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::PaymentType::TaggedSymbol
1566
+ )
1567
+ SEN =
1568
+ T.let(
1569
+ :sen,
1570
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::PaymentType::TaggedSymbol
1571
+ )
1572
+ SEPA =
1573
+ T.let(
1574
+ :sepa,
1575
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::PaymentType::TaggedSymbol
1576
+ )
1577
+ SG_GIRO =
1578
+ T.let(
1579
+ :sg_giro,
1580
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::PaymentType::TaggedSymbol
1581
+ )
1582
+ SIC =
1583
+ T.let(
1584
+ :sic,
1585
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::PaymentType::TaggedSymbol
1586
+ )
1587
+ SIGNET =
1588
+ T.let(
1589
+ :signet,
1590
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::PaymentType::TaggedSymbol
1591
+ )
1592
+ SKNBI =
1593
+ T.let(
1594
+ :sknbi,
1595
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::PaymentType::TaggedSymbol
1596
+ )
1597
+ WIRE =
1598
+ T.let(
1599
+ :wire,
1600
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::PaymentType::TaggedSymbol
1601
+ )
1602
+ ZENGIN =
1603
+ T.let(
1604
+ :zengin,
1605
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::PaymentType::TaggedSymbol
1606
+ )
1607
+
1608
+ sig do
1609
+ override
1610
+ .returns(
1611
+ T::Array[
1612
+ ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::PaymentType::TaggedSymbol
1613
+ ]
1614
+ )
1615
+ end
1152
1616
  def self.values
1153
1617
  end
1154
1618
  end
1155
1619
  end
1156
1620
  end
1157
1621
 
1158
- class Status < ModernTreasury::Enum
1159
- abstract!
1160
-
1161
- APPROVED = :approved
1162
- CANCELLED = :cancelled
1163
- COMPLETED = :completed
1164
- DENIED = :denied
1165
- FAILED = :failed
1166
- NEEDS_APPROVAL = :needs_approval
1167
- PENDING = :pending
1168
- PROCESSING = :processing
1169
- RETURNED = :returned
1170
- REVERSED = :reversed
1171
- SENT = :sent
1172
-
1173
- sig { override.returns(T::Array[Symbol]) }
1622
+ # To cancel a payment order, use `cancelled`. To redraft a returned payment order,
1623
+ # use `approved`. To undo approval on a denied or approved payment order, use
1624
+ # `needs_approval`.
1625
+ module Status
1626
+ extend ModernTreasury::Enum
1627
+
1628
+ TaggedSymbol = T.type_alias { T.all(Symbol, ModernTreasury::Models::PaymentOrderUpdateParams::Status) }
1629
+ OrSymbol =
1630
+ T.type_alias { T.any(Symbol, ModernTreasury::Models::PaymentOrderUpdateParams::Status::TaggedSymbol) }
1631
+
1632
+ APPROVED = T.let(:approved, ModernTreasury::Models::PaymentOrderUpdateParams::Status::TaggedSymbol)
1633
+ CANCELLED = T.let(:cancelled, ModernTreasury::Models::PaymentOrderUpdateParams::Status::TaggedSymbol)
1634
+ COMPLETED = T.let(:completed, ModernTreasury::Models::PaymentOrderUpdateParams::Status::TaggedSymbol)
1635
+ DENIED = T.let(:denied, ModernTreasury::Models::PaymentOrderUpdateParams::Status::TaggedSymbol)
1636
+ FAILED = T.let(:failed, ModernTreasury::Models::PaymentOrderUpdateParams::Status::TaggedSymbol)
1637
+ NEEDS_APPROVAL =
1638
+ T.let(:needs_approval, ModernTreasury::Models::PaymentOrderUpdateParams::Status::TaggedSymbol)
1639
+ PENDING = T.let(:pending, ModernTreasury::Models::PaymentOrderUpdateParams::Status::TaggedSymbol)
1640
+ PROCESSING = T.let(:processing, ModernTreasury::Models::PaymentOrderUpdateParams::Status::TaggedSymbol)
1641
+ RETURNED = T.let(:returned, ModernTreasury::Models::PaymentOrderUpdateParams::Status::TaggedSymbol)
1642
+ REVERSED = T.let(:reversed, ModernTreasury::Models::PaymentOrderUpdateParams::Status::TaggedSymbol)
1643
+ SENT = T.let(:sent, ModernTreasury::Models::PaymentOrderUpdateParams::Status::TaggedSymbol)
1644
+
1645
+ sig { override.returns(T::Array[ModernTreasury::Models::PaymentOrderUpdateParams::Status::TaggedSymbol]) }
1174
1646
  def self.values
1175
1647
  end
1176
1648
  end