modern_treasury 0.1.0.pre.alpha.21 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (375) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +65 -0
  3. data/README.md +1 -1
  4. data/lib/modern_treasury/client.rb +0 -12
  5. data/lib/modern_treasury/errors.rb +22 -0
  6. data/lib/modern_treasury/internal/transport/base_client.rb +11 -3
  7. data/lib/modern_treasury/internal/type/array_of.rb +6 -1
  8. data/lib/modern_treasury/internal/type/base_model.rb +81 -27
  9. data/lib/modern_treasury/internal/type/boolean.rb +7 -1
  10. data/lib/modern_treasury/internal/type/converter.rb +42 -34
  11. data/lib/modern_treasury/internal/type/enum.rb +10 -2
  12. data/lib/modern_treasury/internal/type/file_input.rb +6 -1
  13. data/lib/modern_treasury/internal/type/hash_of.rb +6 -1
  14. data/lib/modern_treasury/internal/type/union.rb +12 -7
  15. data/lib/modern_treasury/internal/type/unknown.rb +7 -1
  16. data/lib/modern_treasury/models/accounting.rb +30 -0
  17. data/lib/modern_treasury/models/address.rb +94 -0
  18. data/lib/modern_treasury/models/address_request.rb +54 -0
  19. data/lib/modern_treasury/models/bulk_request_create_params.rb +147 -1383
  20. data/lib/modern_treasury/models/bulk_result.rb +5 -3
  21. data/lib/modern_treasury/models/child_legal_entity_create.rb +275 -0
  22. data/lib/modern_treasury/models/connection_legal_entity_create_params.rb +10 -627
  23. data/lib/modern_treasury/models/contact_detail.rb +81 -0
  24. data/lib/modern_treasury/models/contact_detail_create_request.rb +34 -0
  25. data/lib/modern_treasury/models/counterparty.rb +24 -177
  26. data/lib/modern_treasury/models/counterparty_create_params.rb +38 -838
  27. data/lib/modern_treasury/models/counterparty_list_params.rb +9 -1
  28. data/lib/modern_treasury/models/document.rb +4 -6
  29. data/lib/modern_treasury/models/document_create_params.rb +0 -2
  30. data/lib/modern_treasury/models/document_list_params.rb +4 -6
  31. data/lib/modern_treasury/models/expected_payment.rb +9 -1
  32. data/lib/modern_treasury/models/expected_payment_create_params.rb +12 -230
  33. data/lib/modern_treasury/models/expected_payment_list_params.rb +8 -1
  34. data/lib/modern_treasury/models/expected_payment_update_params.rb +9 -1
  35. data/lib/modern_treasury/models/external_account.rb +15 -177
  36. data/lib/modern_treasury/models/external_account_create_params.rb +19 -210
  37. data/lib/modern_treasury/models/external_account_list_params.rb +9 -1
  38. data/lib/modern_treasury/models/external_account_update_params.rb +3 -52
  39. data/lib/modern_treasury/models/foreign_exchange_quote.rb +3 -73
  40. data/lib/modern_treasury/models/foreign_exchange_rate.rb +71 -0
  41. data/lib/modern_treasury/models/identification_create_request.rb +86 -0
  42. data/lib/modern_treasury/models/incoming_payment_detail.rb +1 -0
  43. data/lib/modern_treasury/models/internal_account.rb +122 -71
  44. data/lib/modern_treasury/models/internal_account_create_params.rb +138 -1
  45. data/lib/modern_treasury/models/internal_account_update_account_capability_params.rb +34 -0
  46. data/lib/modern_treasury/models/internal_account_update_account_capability_response.rb +131 -0
  47. data/lib/modern_treasury/models/internal_accounts/balance_report_retrieve_params.rb +23 -0
  48. data/lib/modern_treasury/models/invoice.rb +13 -82
  49. data/lib/modern_treasury/models/invoice_create_params.rb +3 -83
  50. data/lib/modern_treasury/models/invoice_update_params.rb +3 -83
  51. data/lib/modern_treasury/models/ledger_account.rb +18 -142
  52. data/lib/modern_treasury/models/ledger_account_balance_monitor.rb +3 -182
  53. data/lib/modern_treasury/models/ledger_account_category.rb +12 -176
  54. data/lib/modern_treasury/models/ledger_account_category_list_params.rb +17 -6
  55. data/lib/modern_treasury/models/ledger_account_category_retrieve_params.rb +4 -2
  56. data/lib/modern_treasury/models/ledger_account_create_params.rb +2 -105
  57. data/lib/modern_treasury/models/ledger_account_create_request.rb +113 -0
  58. data/lib/modern_treasury/models/ledger_account_list_params.rb +15 -1
  59. data/lib/modern_treasury/models/ledger_account_statement_create_response.rb +6 -360
  60. data/lib/modern_treasury/models/ledger_account_statement_retrieve_response.rb +6 -360
  61. data/lib/modern_treasury/models/ledger_balance.rb +45 -0
  62. data/lib/modern_treasury/models/ledger_balances.rb +38 -0
  63. data/lib/modern_treasury/models/ledger_entry.rb +3 -183
  64. data/lib/modern_treasury/models/ledger_entry_create_request.rb +98 -0
  65. data/lib/modern_treasury/models/ledger_entry_list_params.rb +48 -8
  66. data/lib/modern_treasury/models/ledger_transaction.rb +14 -6
  67. data/lib/modern_treasury/models/ledger_transaction_create_params.rb +2 -212
  68. data/lib/modern_treasury/models/ledger_transaction_create_request.rb +123 -0
  69. data/lib/modern_treasury/models/ledger_transaction_create_reversal_params.rb +0 -1
  70. data/lib/modern_treasury/models/ledger_transaction_list_params.rb +44 -7
  71. data/lib/modern_treasury/models/ledger_transaction_update_params.rb +5 -104
  72. data/lib/modern_treasury/models/ledger_transactions/ledger_transaction_version.rb +15 -193
  73. data/lib/modern_treasury/models/legal_entity_address_create_request.rb +78 -0
  74. data/lib/modern_treasury/models/legal_entity_association.rb +1 -0
  75. data/lib/modern_treasury/models/legal_entity_association_create_params.rb +4 -448
  76. data/lib/modern_treasury/models/legal_entity_create_params.rb +10 -618
  77. data/lib/modern_treasury/models/legal_entity_update_params.rb +6 -165
  78. data/lib/modern_treasury/models/line_item.rb +3 -29
  79. data/lib/modern_treasury/models/payment_action_list_params.rb +1 -0
  80. data/lib/modern_treasury/models/payment_order.rb +34 -111
  81. data/lib/modern_treasury/models/payment_order_create_async_params.rb +32 -484
  82. data/lib/modern_treasury/models/payment_order_create_params.rb +32 -486
  83. data/lib/modern_treasury/models/payment_order_list_params.rb +9 -1
  84. data/lib/modern_treasury/models/payment_order_update_params.rb +30 -255
  85. data/lib/modern_treasury/models/payment_orders/reversal_create_params.rb +3 -232
  86. data/lib/modern_treasury/models/payment_reference.rb +11 -2
  87. data/lib/modern_treasury/models/return_create_params.rb +75 -1
  88. data/lib/modern_treasury/models/return_list_params.rb +5 -6
  89. data/lib/modern_treasury/models/return_object.rb +87 -5
  90. data/lib/modern_treasury/models/routing_detail.rb +4 -93
  91. data/lib/modern_treasury/models/routing_detail_create_params.rb +1 -0
  92. data/lib/modern_treasury/models/routing_number_lookup_request.rb +3 -55
  93. data/lib/modern_treasury/models/transaction.rb +6 -73
  94. data/lib/modern_treasury/models/transaction_create_params.rb +9 -1
  95. data/lib/modern_treasury/models/transactions/transaction_line_item.rb +9 -2
  96. data/lib/modern_treasury/models/validation_validate_routing_number_params.rb +1 -0
  97. data/lib/modern_treasury/models/virtual_account_create_params.rb +4 -117
  98. data/lib/modern_treasury/models.rb +31 -24
  99. data/lib/modern_treasury/resources/bulk_requests.rb +1 -1
  100. data/lib/modern_treasury/resources/counterparties.rb +20 -14
  101. data/lib/modern_treasury/resources/expected_payments.rb +10 -4
  102. data/lib/modern_treasury/resources/external_accounts.rb +23 -17
  103. data/lib/modern_treasury/resources/internal_accounts/balance_reports.rb +2 -2
  104. data/lib/modern_treasury/resources/internal_accounts.rb +37 -1
  105. data/lib/modern_treasury/resources/invoices.rb +2 -2
  106. data/lib/modern_treasury/resources/ledger_account_categories.rb +4 -2
  107. data/lib/modern_treasury/resources/ledger_accounts.rb +6 -2
  108. data/lib/modern_treasury/resources/ledger_entries.rb +1 -1
  109. data/lib/modern_treasury/resources/ledger_transactions.rb +5 -5
  110. data/lib/modern_treasury/resources/legal_entities.rb +4 -4
  111. data/lib/modern_treasury/resources/legal_entity_associations.rb +1 -1
  112. data/lib/modern_treasury/resources/payment_orders/reversals.rb +1 -1
  113. data/lib/modern_treasury/resources/payment_orders.rb +11 -9
  114. data/lib/modern_treasury/resources/returns.rb +4 -2
  115. data/lib/modern_treasury/resources/transactions.rb +3 -1
  116. data/lib/modern_treasury/resources/virtual_accounts.rb +1 -1
  117. data/lib/modern_treasury/version.rb +1 -1
  118. data/lib/modern_treasury.rb +16 -15
  119. data/rbi/modern_treasury/client.rbi +0 -9
  120. data/rbi/modern_treasury/errors.rbi +16 -0
  121. data/rbi/modern_treasury/internal/transport/base_client.rbi +1 -1
  122. data/rbi/modern_treasury/internal/type/boolean.rbi +2 -0
  123. data/rbi/modern_treasury/internal/type/converter.rbi +15 -15
  124. data/rbi/modern_treasury/internal/type/union.rbi +5 -0
  125. data/rbi/modern_treasury/internal/type/unknown.rbi +2 -0
  126. data/rbi/modern_treasury/models/accounting.rbi +48 -0
  127. data/rbi/modern_treasury/models/address.rbi +107 -0
  128. data/rbi/modern_treasury/models/address_request.rbi +76 -0
  129. data/rbi/modern_treasury/models/bulk_request_create_params.rbi +802 -3025
  130. data/rbi/modern_treasury/models/bulk_result.rbi +2 -0
  131. data/rbi/modern_treasury/models/child_legal_entity_create.rbi +511 -0
  132. data/rbi/modern_treasury/models/connection_legal_entity_create_params.rbi +17 -1314
  133. data/rbi/modern_treasury/models/contact_detail.rbi +124 -0
  134. data/rbi/modern_treasury/models/contact_detail_create_request.rbi +99 -0
  135. data/rbi/modern_treasury/models/counterparty.rbi +24 -264
  136. data/rbi/modern_treasury/models/counterparty_create_params.rbi +60 -1726
  137. data/rbi/modern_treasury/models/counterparty_list_params.rbi +11 -0
  138. data/rbi/modern_treasury/models/document.rbi +6 -16
  139. data/rbi/modern_treasury/models/document_create_params.rbi +0 -10
  140. data/rbi/modern_treasury/models/document_list_params.rbi +6 -16
  141. data/rbi/modern_treasury/models/expected_payment.rbi +8 -0
  142. data/rbi/modern_treasury/models/expected_payment_create_params.rbi +12 -419
  143. data/rbi/modern_treasury/models/expected_payment_list_params.rbi +9 -0
  144. data/rbi/modern_treasury/models/expected_payment_update_params.rbi +8 -0
  145. data/rbi/modern_treasury/models/external_account.rbi +15 -244
  146. data/rbi/modern_treasury/models/external_account_create_params.rbi +25 -400
  147. data/rbi/modern_treasury/models/external_account_list_params.rbi +11 -0
  148. data/rbi/modern_treasury/models/external_account_update_params.rbi +4 -86
  149. data/rbi/modern_treasury/models/foreign_exchange_quote.rbi +4 -99
  150. data/rbi/modern_treasury/models/foreign_exchange_rate.rbi +96 -0
  151. data/rbi/modern_treasury/models/identification_create_request.rbi +212 -0
  152. data/rbi/modern_treasury/models/incoming_payment_detail.rbi +5 -0
  153. data/rbi/modern_treasury/models/internal_account.rbi +332 -120
  154. data/rbi/modern_treasury/models/internal_account_create_params.rbi +333 -0
  155. data/rbi/modern_treasury/models/internal_account_update_account_capability_params.rbi +54 -0
  156. data/rbi/modern_treasury/models/internal_account_update_account_capability_response.rbi +304 -0
  157. data/rbi/modern_treasury/models/internal_accounts/balance_report_retrieve_params.rbi +37 -0
  158. data/rbi/modern_treasury/models/invoice.rbi +13 -128
  159. data/rbi/modern_treasury/models/invoice_create_params.rbi +4 -139
  160. data/rbi/modern_treasury/models/invoice_update_params.rbi +4 -139
  161. data/rbi/modern_treasury/models/ledger_account.rbi +20 -218
  162. data/rbi/modern_treasury/models/ledger_account_balance_monitor.rbi +4 -303
  163. data/rbi/modern_treasury/models/ledger_account_category.rbi +12 -301
  164. data/rbi/modern_treasury/models/ledger_account_category_list_params.rbi +23 -7
  165. data/rbi/modern_treasury/models/ledger_account_category_retrieve_params.rbi +6 -3
  166. data/rbi/modern_treasury/models/ledger_account_create_params.rbi +5 -173
  167. data/rbi/modern_treasury/models/ledger_account_create_request.rbi +194 -0
  168. data/rbi/modern_treasury/models/ledger_account_list_params.rbi +22 -0
  169. data/rbi/modern_treasury/models/ledger_account_statement_create_response.rbi +8 -612
  170. data/rbi/modern_treasury/models/ledger_account_statement_retrieve_response.rbi +8 -612
  171. data/rbi/modern_treasury/models/ledger_balance.rbi +66 -0
  172. data/rbi/modern_treasury/models/ledger_balances.rbi +75 -0
  173. data/rbi/modern_treasury/models/ledger_entry.rbi +4 -309
  174. data/rbi/modern_treasury/models/ledger_entry_create_request.rbi +137 -0
  175. data/rbi/modern_treasury/models/ledger_entry_list_params.rbi +99 -16
  176. data/rbi/modern_treasury/models/ledger_transaction.rbi +17 -11
  177. data/rbi/modern_treasury/models/ledger_transaction_create_params.rbi +5 -383
  178. data/rbi/modern_treasury/models/ledger_transaction_create_request.rbi +258 -0
  179. data/rbi/modern_treasury/models/ledger_transaction_create_reversal_params.rbi +0 -5
  180. data/rbi/modern_treasury/models/ledger_transaction_list_params.rbi +93 -18
  181. data/rbi/modern_treasury/models/ledger_transaction_update_params.rbi +7 -158
  182. data/rbi/modern_treasury/models/ledger_transactions/ledger_transaction_version.rbi +18 -316
  183. data/rbi/modern_treasury/models/legal_entity_address_create_request.rbi +157 -0
  184. data/rbi/modern_treasury/models/legal_entity_association.rbi +5 -0
  185. data/rbi/modern_treasury/models/legal_entity_association_create_params.rbi +9 -917
  186. data/rbi/modern_treasury/models/legal_entity_create_params.rbi +17 -1297
  187. data/rbi/modern_treasury/models/legal_entity_update_params.rbi +8 -378
  188. data/rbi/modern_treasury/models/line_item.rbi +4 -52
  189. data/rbi/modern_treasury/models/payment_action_list_params.rbi +5 -0
  190. data/rbi/modern_treasury/models/payment_order.rbi +81 -172
  191. data/rbi/modern_treasury/models/payment_order_create_async_params.rbi +42 -891
  192. data/rbi/modern_treasury/models/payment_order_create_params.rbi +42 -896
  193. data/rbi/modern_treasury/models/payment_order_list_params.rbi +14 -0
  194. data/rbi/modern_treasury/models/payment_order_update_params.rbi +43 -469
  195. data/rbi/modern_treasury/models/payment_orders/reversal_create_params.rbi +4 -415
  196. data/rbi/modern_treasury/models/payment_reference.rbi +54 -9
  197. data/rbi/modern_treasury/models/return_create_params.rbi +114 -0
  198. data/rbi/modern_treasury/models/return_list_params.rbi +6 -11
  199. data/rbi/modern_treasury/models/return_object.rbi +165 -16
  200. data/rbi/modern_treasury/models/routing_detail.rbi +9 -113
  201. data/rbi/modern_treasury/models/routing_detail_create_params.rbi +5 -0
  202. data/rbi/modern_treasury/models/routing_number_lookup_request.rbi +4 -87
  203. data/rbi/modern_treasury/models/transaction.rbi +19 -103
  204. data/rbi/modern_treasury/models/transaction_create_params.rbi +8 -0
  205. data/rbi/modern_treasury/models/transactions/transaction_line_item.rbi +8 -5
  206. data/rbi/modern_treasury/models/validation_validate_routing_number_params.rbi +5 -0
  207. data/rbi/modern_treasury/models/virtual_account_create_params.rbi +9 -203
  208. data/rbi/modern_treasury/models.rbi +36 -31
  209. data/rbi/modern_treasury/resources/bulk_requests.rbi +2 -1
  210. data/rbi/modern_treasury/resources/counterparties.rbi +20 -12
  211. data/rbi/modern_treasury/resources/documents.rbi +2 -2
  212. data/rbi/modern_treasury/resources/expected_payments.rbi +9 -1
  213. data/rbi/modern_treasury/resources/external_accounts.rbi +29 -22
  214. data/rbi/modern_treasury/resources/internal_accounts/balance_reports.rbi +7 -3
  215. data/rbi/modern_treasury/resources/internal_accounts.rbi +31 -0
  216. data/rbi/modern_treasury/resources/invoices.rbi +2 -8
  217. data/rbi/modern_treasury/resources/ledger_account_categories.rbi +9 -3
  218. data/rbi/modern_treasury/resources/ledger_accounts.rbi +5 -1
  219. data/rbi/modern_treasury/resources/ledger_entries.rbi +9 -2
  220. data/rbi/modern_treasury/resources/ledger_transactions.rbi +13 -13
  221. data/rbi/modern_treasury/resources/legal_entities.rbi +4 -8
  222. data/rbi/modern_treasury/resources/legal_entity_associations.rbi +1 -2
  223. data/rbi/modern_treasury/resources/payment_orders/reversals.rbi +1 -1
  224. data/rbi/modern_treasury/resources/payment_orders.rbi +16 -17
  225. data/rbi/modern_treasury/resources/returns.rbi +8 -2
  226. data/rbi/modern_treasury/resources/transactions.rbi +3 -0
  227. data/rbi/modern_treasury/resources/virtual_accounts.rbi +1 -2
  228. data/sig/modern_treasury/client.rbs +0 -6
  229. data/sig/modern_treasury/errors.rbs +9 -0
  230. data/sig/modern_treasury/internal/transport/base_client.rbs +1 -1
  231. data/sig/modern_treasury/internal/type/converter.rbs +7 -1
  232. data/sig/modern_treasury/models/accounting.rbs +15 -0
  233. data/sig/modern_treasury/models/address.rbs +70 -0
  234. data/sig/modern_treasury/models/address_request.rbs +45 -0
  235. data/sig/modern_treasury/models/bulk_request_create_params.rbs +99 -999
  236. data/sig/modern_treasury/models/bulk_result.rbs +1 -0
  237. data/sig/modern_treasury/models/child_legal_entity_create.rbs +220 -0
  238. data/sig/modern_treasury/models/connection_legal_entity_create_params.rbs +21 -548
  239. data/sig/modern_treasury/models/contact_detail.rbs +67 -0
  240. data/sig/modern_treasury/models/contact_detail_create_request.rbs +43 -0
  241. data/sig/modern_treasury/models/counterparty.rbs +20 -141
  242. data/sig/modern_treasury/models/counterparty_create_params.rbs +51 -737
  243. data/sig/modern_treasury/models/counterparty_list_params.rbs +7 -0
  244. data/sig/modern_treasury/models/document.rbs +0 -4
  245. data/sig/modern_treasury/models/document_create_params.rbs +0 -4
  246. data/sig/modern_treasury/models/document_list_params.rbs +0 -4
  247. data/sig/modern_treasury/models/expected_payment.rbs +5 -0
  248. data/sig/modern_treasury/models/expected_payment_create_params.rbs +11 -173
  249. data/sig/modern_treasury/models/expected_payment_list_params.rbs +7 -0
  250. data/sig/modern_treasury/models/expected_payment_update_params.rbs +5 -0
  251. data/sig/modern_treasury/models/external_account.rbs +13 -139
  252. data/sig/modern_treasury/models/external_account_create_params.rbs +25 -189
  253. data/sig/modern_treasury/models/external_account_list_params.rbs +7 -0
  254. data/sig/modern_treasury/models/external_account_update_params.rbs +6 -48
  255. data/sig/modern_treasury/models/foreign_exchange_quote.rbs +4 -51
  256. data/sig/modern_treasury/models/foreign_exchange_rate.rbs +50 -0
  257. data/sig/modern_treasury/models/identification_create_request.rbs +93 -0
  258. data/sig/modern_treasury/models/incoming_payment_detail.rbs +2 -0
  259. data/sig/modern_treasury/models/internal_account.rbs +148 -71
  260. data/sig/modern_treasury/models/internal_account_create_params.rbs +143 -0
  261. data/sig/modern_treasury/models/internal_account_update_account_capability_params.rbs +28 -0
  262. data/sig/modern_treasury/models/internal_account_update_account_capability_response.rbs +137 -0
  263. data/sig/modern_treasury/models/internal_accounts/balance_report_retrieve_params.rbs +10 -0
  264. data/sig/modern_treasury/models/invoice.rbs +9 -68
  265. data/sig/modern_treasury/models/invoice_create_params.rbs +6 -70
  266. data/sig/modern_treasury/models/invoice_update_params.rbs +6 -70
  267. data/sig/modern_treasury/models/ledger_account.rbs +17 -123
  268. data/sig/modern_treasury/models/ledger_account_balance_monitor.rbs +4 -142
  269. data/sig/modern_treasury/models/ledger_account_category.rbs +9 -142
  270. data/sig/modern_treasury/models/ledger_account_category_list_params.rbs +12 -5
  271. data/sig/modern_treasury/models/ledger_account_create_params.rbs +4 -84
  272. data/sig/modern_treasury/models/ledger_account_create_request.rbs +89 -0
  273. data/sig/modern_treasury/models/ledger_account_list_params.rbs +16 -0
  274. data/sig/modern_treasury/models/ledger_account_statement_create_response.rbs +8 -284
  275. data/sig/modern_treasury/models/ledger_account_statement_retrieve_response.rbs +8 -284
  276. data/sig/modern_treasury/models/ledger_balance.rbs +40 -0
  277. data/sig/modern_treasury/models/ledger_balances.rbs +30 -0
  278. data/sig/modern_treasury/models/ledger_entry.rbs +4 -142
  279. data/sig/modern_treasury/models/ledger_entry_create_request.rbs +62 -0
  280. data/sig/modern_treasury/models/ledger_entry_list_params.rbs +21 -3
  281. data/sig/modern_treasury/models/ledger_transaction.rbs +5 -2
  282. data/sig/modern_treasury/models/ledger_transaction_create_params.rbs +4 -165
  283. data/sig/modern_treasury/models/ledger_transaction_create_request.rbs +109 -0
  284. data/sig/modern_treasury/models/ledger_transaction_create_reversal_params.rbs +0 -2
  285. data/sig/modern_treasury/models/ledger_transaction_list_params.rbs +21 -5
  286. data/sig/modern_treasury/models/ledger_transaction_update_params.rbs +6 -67
  287. data/sig/modern_treasury/models/ledger_transactions/ledger_transaction_version.rbs +9 -144
  288. data/sig/modern_treasury/models/legal_entity_address_create_request.rbs +68 -0
  289. data/sig/modern_treasury/models/legal_entity_association.rbs +3 -1
  290. data/sig/modern_treasury/models/legal_entity_association_create_params.rbs +9 -380
  291. data/sig/modern_treasury/models/legal_entity_create_params.rbs +21 -548
  292. data/sig/modern_treasury/models/legal_entity_update_params.rbs +12 -168
  293. data/sig/modern_treasury/models/line_item.rbs +4 -16
  294. data/sig/modern_treasury/models/payment_action_list_params.rbs +2 -1
  295. data/sig/modern_treasury/models/payment_order.rbs +37 -71
  296. data/sig/modern_treasury/models/payment_order_create_async_params.rbs +37 -380
  297. data/sig/modern_treasury/models/payment_order_create_params.rbs +37 -384
  298. data/sig/modern_treasury/models/payment_order_list_params.rbs +9 -0
  299. data/sig/modern_treasury/models/payment_order_update_params.rbs +33 -207
  300. data/sig/modern_treasury/models/payment_orders/reversal_create_params.rbs +6 -173
  301. data/sig/modern_treasury/models/payment_reference.rbs +22 -4
  302. data/sig/modern_treasury/models/return_create_params.rbs +47 -0
  303. data/sig/modern_treasury/models/return_list_params.rbs +1 -6
  304. data/sig/modern_treasury/models/return_object.rbs +70 -12
  305. data/sig/modern_treasury/models/routing_detail.rbs +6 -71
  306. data/sig/modern_treasury/models/routing_detail_create_params.rbs +2 -0
  307. data/sig/modern_treasury/models/routing_number_lookup_request.rbs +6 -48
  308. data/sig/modern_treasury/models/transaction.rbs +10 -53
  309. data/sig/modern_treasury/models/transaction_create_params.rbs +5 -0
  310. data/sig/modern_treasury/models/transactions/transaction_line_item.rbs +5 -2
  311. data/sig/modern_treasury/models/validation_validate_routing_number_params.rbs +2 -0
  312. data/sig/modern_treasury/models/virtual_account_create_params.rbs +8 -95
  313. data/sig/modern_treasury/models.rbs +30 -24
  314. data/sig/modern_treasury/resources/counterparties.rbs +2 -0
  315. data/sig/modern_treasury/resources/expected_payments.rbs +4 -1
  316. data/sig/modern_treasury/resources/external_accounts.rbs +6 -4
  317. data/sig/modern_treasury/resources/internal_accounts/balance_reports.rbs +1 -1
  318. data/sig/modern_treasury/resources/internal_accounts.rbs +8 -0
  319. data/sig/modern_treasury/resources/invoices.rbs +2 -2
  320. data/sig/modern_treasury/resources/ledger_account_categories.rbs +2 -1
  321. data/sig/modern_treasury/resources/ledger_accounts.rbs +3 -1
  322. data/sig/modern_treasury/resources/ledger_transactions.rbs +4 -4
  323. data/sig/modern_treasury/resources/legal_entities.rbs +4 -4
  324. data/sig/modern_treasury/resources/legal_entity_associations.rbs +1 -1
  325. data/sig/modern_treasury/resources/payment_orders/reversals.rbs +1 -1
  326. data/sig/modern_treasury/resources/payment_orders.rbs +6 -5
  327. data/sig/modern_treasury/resources/returns.rbs +1 -0
  328. data/sig/modern_treasury/resources/transactions.rbs +1 -0
  329. data/sig/modern_treasury/resources/virtual_accounts.rbs +1 -1
  330. metadata +52 -49
  331. data/lib/modern_treasury/models/ledger_event_handler.rb +0 -222
  332. data/lib/modern_treasury/models/ledger_event_handler_create_params.rb +0 -177
  333. data/lib/modern_treasury/models/ledger_event_handler_delete_params.rb +0 -14
  334. data/lib/modern_treasury/models/ledger_event_handler_list_params.rb +0 -58
  335. data/lib/modern_treasury/models/ledger_event_handler_retrieve_params.rb +0 -14
  336. data/lib/modern_treasury/models/ledger_event_handler_variable.rb +0 -59
  337. data/lib/modern_treasury/models/ledgerable_event.rb +0 -92
  338. data/lib/modern_treasury/models/ledgerable_event_create_params.rb +0 -50
  339. data/lib/modern_treasury/models/ledgerable_event_retrieve_params.rb +0 -14
  340. data/lib/modern_treasury/models/paper_item.rb +0 -178
  341. data/lib/modern_treasury/models/paper_item_list_params.rb +0 -56
  342. data/lib/modern_treasury/models/paper_item_retrieve_params.rb +0 -14
  343. data/lib/modern_treasury/resources/ledger_event_handlers.rb +0 -125
  344. data/lib/modern_treasury/resources/ledgerable_events.rb +0 -65
  345. data/lib/modern_treasury/resources/paper_items.rb +0 -68
  346. data/rbi/modern_treasury/models/ledger_event_handler.rbi +0 -322
  347. data/rbi/modern_treasury/models/ledger_event_handler_create_params.rbi +0 -303
  348. data/rbi/modern_treasury/models/ledger_event_handler_delete_params.rbi +0 -32
  349. data/rbi/modern_treasury/models/ledger_event_handler_list_params.rbi +0 -92
  350. data/rbi/modern_treasury/models/ledger_event_handler_retrieve_params.rbi +0 -32
  351. data/rbi/modern_treasury/models/ledger_event_handler_variable.rbi +0 -98
  352. data/rbi/modern_treasury/models/ledgerable_event.rbi +0 -108
  353. data/rbi/modern_treasury/models/ledgerable_event_create_params.rbi +0 -75
  354. data/rbi/modern_treasury/models/ledgerable_event_retrieve_params.rbi +0 -32
  355. data/rbi/modern_treasury/models/paper_item.rbi +0 -204
  356. data/rbi/modern_treasury/models/paper_item_list_params.rbi +0 -88
  357. data/rbi/modern_treasury/models/paper_item_retrieve_params.rbi +0 -32
  358. data/rbi/modern_treasury/resources/ledger_event_handlers.rbi +0 -109
  359. data/rbi/modern_treasury/resources/ledgerable_events.rbi +0 -50
  360. data/rbi/modern_treasury/resources/paper_items.rbi +0 -51
  361. data/sig/modern_treasury/models/ledger_event_handler.rbs +0 -149
  362. data/sig/modern_treasury/models/ledger_event_handler_create_params.rbs +0 -127
  363. data/sig/modern_treasury/models/ledger_event_handler_delete_params.rbs +0 -15
  364. data/sig/modern_treasury/models/ledger_event_handler_list_params.rbs +0 -54
  365. data/sig/modern_treasury/models/ledger_event_handler_retrieve_params.rbs +0 -15
  366. data/sig/modern_treasury/models/ledger_event_handler_variable.rbs +0 -36
  367. data/sig/modern_treasury/models/ledgerable_event.rbs +0 -65
  368. data/sig/modern_treasury/models/ledgerable_event_create_params.rbs +0 -43
  369. data/sig/modern_treasury/models/ledgerable_event_retrieve_params.rbs +0 -15
  370. data/sig/modern_treasury/models/paper_item.rbs +0 -122
  371. data/sig/modern_treasury/models/paper_item_list_params.rbs +0 -54
  372. data/sig/modern_treasury/models/paper_item_retrieve_params.rbs +0 -15
  373. data/sig/modern_treasury/resources/ledger_event_handlers.rbs +0 -37
  374. data/sig/modern_treasury/resources/ledgerable_events.rbs +0 -20
  375. data/sig/modern_treasury/resources/paper_items.rbs +0 -21
@@ -111,8 +111,8 @@ module ModernTreasury
111
111
 
112
112
  # @!attribute status
113
113
  #
114
- # @return [Symbol, ModernTreasury::Models::LedgerTransactionListParams::Status, nil]
115
- optional :status, enum: -> { ModernTreasury::LedgerTransactionListParams::Status }
114
+ # @return [Symbol, Array<Symbol, ModernTreasury::Models::LedgerTransactionListParams::Status::UnionMember1>, ModernTreasury::Models::LedgerTransactionListParams::Status, nil]
115
+ optional :status, union: -> { ModernTreasury::LedgerTransactionListParams::Status }
116
116
 
117
117
  # @!attribute updated_at
118
118
  # Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to filter by the
@@ -160,7 +160,7 @@ module ModernTreasury
160
160
  #
161
161
  # @param reverses_ledger_transaction_id [String]
162
162
  #
163
- # @param status [Symbol, ModernTreasury::Models::LedgerTransactionListParams::Status]
163
+ # @param status [Symbol, Array<Symbol, ModernTreasury::Models::LedgerTransactionListParams::Status::UnionMember1>, ModernTreasury::Models::LedgerTransactionListParams::Status]
164
164
  #
165
165
  # @param updated_at [Hash{Symbol=>Time}] Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to filter by the pos
166
166
  #
@@ -171,7 +171,6 @@ module ModernTreasury
171
171
 
172
172
  EXPECTED_PAYMENT = :expected_payment
173
173
  INCOMING_PAYMENT_DETAIL = :incoming_payment_detail
174
- PAPER_ITEM = :paper_item
175
174
  PAYMENT_ORDER = :payment_order
176
175
  RETURN = :return
177
176
  REVERSAL = :reversal
@@ -223,14 +222,52 @@ module ModernTreasury
223
222
  end
224
223
 
225
224
  module Status
226
- extend ModernTreasury::Internal::Type::Enum
225
+ extend ModernTreasury::Internal::Type::Union
226
+
227
+ variant const: -> { ModernTreasury::Models::LedgerTransactionListParams::Status::PENDING }
228
+
229
+ variant const: -> { ModernTreasury::Models::LedgerTransactionListParams::Status::POSTED }
230
+
231
+ variant const: -> { ModernTreasury::Models::LedgerTransactionListParams::Status::ARCHIVED }
232
+
233
+ variant -> { ModernTreasury::Models::LedgerTransactionListParams::Status::UnionMember1Array }
234
+
235
+ module UnionMember1
236
+ extend ModernTreasury::Internal::Type::Enum
237
+
238
+ PENDING = :pending
239
+ POSTED = :posted
240
+ ARCHIVED = :archived
241
+
242
+ # @!method self.values
243
+ # @return [Array<Symbol>]
244
+ end
245
+
246
+ # @!method self.variants
247
+ # @return [Array(Symbol, Array<Symbol, ModernTreasury::Models::LedgerTransactionListParams::Status::UnionMember1>)]
248
+
249
+ define_sorbet_constant!(:Variants) do
250
+ T.type_alias do
251
+ T.any(
252
+ ModernTreasury::LedgerTransactionListParams::Status::TaggedSymbol,
253
+ T::Array[ModernTreasury::LedgerTransactionListParams::Status::UnionMember1::TaggedSymbol]
254
+ )
255
+ end
256
+ end
257
+
258
+ # @!group
227
259
 
228
260
  PENDING = :pending
229
261
  POSTED = :posted
230
262
  ARCHIVED = :archived
231
263
 
232
- # @!method self.values
233
- # @return [Array<Symbol>]
264
+ # @!endgroup
265
+
266
+ # @type [ModernTreasury::Internal::Type::Converter]
267
+ UnionMember1Array =
268
+ ModernTreasury::Internal::Type::ArrayOf[enum: -> {
269
+ ModernTreasury::LedgerTransactionListParams::Status::UnionMember1
270
+ }]
234
271
  end
235
272
  end
236
273
  end
@@ -23,11 +23,9 @@ module ModernTreasury
23
23
  # @!attribute ledger_entries
24
24
  # An array of ledger entry objects.
25
25
  #
26
- # @return [Array<ModernTreasury::Models::LedgerTransactionUpdateParams::LedgerEntry>, nil]
26
+ # @return [Array<ModernTreasury::Models::LedgerEntryCreateRequest>, nil]
27
27
  optional :ledger_entries,
28
- -> {
29
- ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::LedgerTransactionUpdateParams::LedgerEntry]
30
- }
28
+ -> { ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::LedgerEntryCreateRequest] }
31
29
 
32
30
  # @!attribute ledgerable_id
33
31
  # If the ledger transaction can be reconciled to another object in Modern
@@ -39,8 +37,7 @@ module ModernTreasury
39
37
  # @!attribute ledgerable_type
40
38
  # If the ledger transaction can be reconciled to another object in Modern
41
39
  # Treasury, the type will be populated here, otherwise null. This can be one of
42
- # payment_order, incoming_payment_detail, expected_payment, return, paper_item, or
43
- # reversal.
40
+ # payment_order, incoming_payment_detail, expected_payment, return, or reversal.
44
41
  #
45
42
  # @return [Symbol, ModernTreasury::Models::LedgerTransactionUpdateParams::LedgerableType, nil]
46
43
  optional :ledgerable_type, enum: -> { ModernTreasury::LedgerTransactionUpdateParams::LedgerableType }
@@ -66,7 +63,7 @@ module ModernTreasury
66
63
  #
67
64
  # @param effective_at [Time] The timestamp (ISO8601 format) at which the ledger transaction happened for repo
68
65
  #
69
- # @param ledger_entries [Array<ModernTreasury::Models::LedgerTransactionUpdateParams::LedgerEntry>] An array of ledger entry objects.
66
+ # @param ledger_entries [Array<ModernTreasury::Models::LedgerEntryCreateRequest>] An array of ledger entry objects.
70
67
  #
71
68
  # @param ledgerable_id [String] If the ledger transaction can be reconciled to another object in Modern Treasury
72
69
  #
@@ -78,110 +75,14 @@ module ModernTreasury
78
75
  #
79
76
  # @param request_options [ModernTreasury::RequestOptions, Hash{Symbol=>Object}]
80
77
 
81
- class LedgerEntry < ModernTreasury::Internal::Type::BaseModel
82
- # @!attribute amount
83
- # Value in specified currency's smallest unit. e.g. $10 would be represented
84
- # as 1000. Can be any integer up to 36 digits.
85
- #
86
- # @return [Integer]
87
- required :amount, Integer
88
-
89
- # @!attribute direction
90
- # One of `credit`, `debit`. Describes the direction money is flowing in the
91
- # transaction. A `credit` moves money from your account to someone else's. A
92
- # `debit` pulls money from someone else's account to your own. Note that wire,
93
- # rtp, and check payments will always be `credit`.
94
- #
95
- # @return [Symbol, ModernTreasury::Models::TransactionDirection]
96
- required :direction, enum: -> { ModernTreasury::TransactionDirection }
97
-
98
- # @!attribute ledger_account_id
99
- # The ledger account that this ledger entry is associated with.
100
- #
101
- # @return [String]
102
- required :ledger_account_id, String
103
-
104
- # @!attribute available_balance_amount
105
- # Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
106
- # account’s available balance. If any of these conditions would be false after the
107
- # transaction is created, the entire call will fail with error code 422.
108
- #
109
- # @return [Hash{Symbol=>Integer}, nil]
110
- optional :available_balance_amount, ModernTreasury::Internal::Type::HashOf[Integer], nil?: true
111
-
112
- # @!attribute lock_version
113
- # Lock version of the ledger account. This can be passed when creating a ledger
114
- # transaction to only succeed if no ledger transactions have posted since the
115
- # given version. See our post about Designing the Ledgers API with Optimistic
116
- # Locking for more details.
117
- #
118
- # @return [Integer, nil]
119
- optional :lock_version, Integer, nil?: true
120
-
121
- # @!attribute metadata
122
- # Additional data represented as key-value pairs. Both the key and value must be
123
- # strings.
124
- #
125
- # @return [Hash{Symbol=>String}, nil]
126
- optional :metadata, ModernTreasury::Internal::Type::HashOf[String]
127
-
128
- # @!attribute pending_balance_amount
129
- # Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
130
- # account’s pending balance. If any of these conditions would be false after the
131
- # transaction is created, the entire call will fail with error code 422.
132
- #
133
- # @return [Hash{Symbol=>Integer}, nil]
134
- optional :pending_balance_amount, ModernTreasury::Internal::Type::HashOf[Integer], nil?: true
135
-
136
- # @!attribute posted_balance_amount
137
- # Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
138
- # account’s posted balance. If any of these conditions would be false after the
139
- # transaction is created, the entire call will fail with error code 422.
140
- #
141
- # @return [Hash{Symbol=>Integer}, nil]
142
- optional :posted_balance_amount, ModernTreasury::Internal::Type::HashOf[Integer], nil?: true
143
-
144
- # @!attribute show_resulting_ledger_account_balances
145
- # If true, response will include the balance of the associated ledger account for
146
- # the entry.
147
- #
148
- # @return [Boolean, nil]
149
- optional :show_resulting_ledger_account_balances, ModernTreasury::Internal::Type::Boolean, nil?: true
150
-
151
- # @!method initialize(amount:, direction:, ledger_account_id:, available_balance_amount: nil, lock_version: nil, metadata: nil, pending_balance_amount: nil, posted_balance_amount: nil, show_resulting_ledger_account_balances: nil)
152
- # Some parameter documentations has been truncated, see
153
- # {ModernTreasury::Models::LedgerTransactionUpdateParams::LedgerEntry} for more
154
- # details.
155
- #
156
- # @param amount [Integer] Value in specified currency's smallest unit. e.g. $10 would be represented as 10
157
- #
158
- # @param direction [Symbol, ModernTreasury::Models::TransactionDirection] One of `credit`, `debit`. Describes the direction money is flowing in the transa
159
- #
160
- # @param ledger_account_id [String] The ledger account that this ledger entry is associated with.
161
- #
162
- # @param available_balance_amount [Hash{Symbol=>Integer}, nil] Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the accou
163
- #
164
- # @param lock_version [Integer, nil] Lock version of the ledger account. This can be passed when creating a ledger tr
165
- #
166
- # @param metadata [Hash{Symbol=>String}] Additional data represented as key-value pairs. Both the key and value must be s
167
- #
168
- # @param pending_balance_amount [Hash{Symbol=>Integer}, nil] Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the accou
169
- #
170
- # @param posted_balance_amount [Hash{Symbol=>Integer}, nil] Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the accou
171
- #
172
- # @param show_resulting_ledger_account_balances [Boolean, nil] If true, response will include the balance of the associated ledger account for
173
- end
174
-
175
78
  # If the ledger transaction can be reconciled to another object in Modern
176
79
  # Treasury, the type will be populated here, otherwise null. This can be one of
177
- # payment_order, incoming_payment_detail, expected_payment, return, paper_item, or
178
- # reversal.
80
+ # payment_order, incoming_payment_detail, expected_payment, return, or reversal.
179
81
  module LedgerableType
180
82
  extend ModernTreasury::Internal::Type::Enum
181
83
 
182
84
  EXPECTED_PAYMENT = :expected_payment
183
85
  INCOMING_PAYMENT_DETAIL = :incoming_payment_detail
184
- PAPER_ITEM = :paper_item
185
86
  PAYMENT_ORDER = :payment_order
186
87
  RETURN = :return
187
88
  REVERSAL = :reversal
@@ -10,6 +10,15 @@ module ModernTreasury
10
10
  # @return [String]
11
11
  required :id, String
12
12
 
13
+ # @!attribute archived_reason
14
+ # System-set reason why the ledger transaction was archived; currently only
15
+ # 'balance_lock_failure' for transactions that violated balance constraints. Only
16
+ # populated when archive_on_balance_lock_failure is true and a balance lock
17
+ # violation occurs, otherwise null.
18
+ #
19
+ # @return [String, nil]
20
+ required :archived_reason, String, nil?: true
21
+
13
22
  # @!attribute created_at
14
23
  #
15
24
  # @return [Time]
@@ -137,13 +146,15 @@ module ModernTreasury
137
146
  # @return [Integer]
138
147
  required :version, Integer
139
148
 
140
- # @!method initialize(id:, created_at:, description:, effective_at:, effective_date:, external_id:, ledger_entries:, ledger_id:, ledger_transaction_id:, ledgerable_id:, ledgerable_type:, live_mode:, metadata:, object:, partially_posts_ledger_transaction_id:, posted_at:, reversed_by_ledger_transaction_id:, reverses_ledger_transaction_id:, status:, version:)
149
+ # @!method initialize(id:, archived_reason:, created_at:, description:, effective_at:, effective_date:, external_id:, ledger_entries:, ledger_id:, ledger_transaction_id:, ledgerable_id:, ledgerable_type:, live_mode:, metadata:, object:, partially_posts_ledger_transaction_id:, posted_at:, reversed_by_ledger_transaction_id:, reverses_ledger_transaction_id:, status:, version:)
141
150
  # Some parameter documentations has been truncated, see
142
151
  # {ModernTreasury::Models::LedgerTransactions::LedgerTransactionVersion} for more
143
152
  # details.
144
153
  #
145
154
  # @param id [String]
146
155
  #
156
+ # @param archived_reason [String, nil] System-set reason why the ledger transaction was archived; currently only 'balan
157
+ #
147
158
  # @param created_at [Time]
148
159
  #
149
160
  # @param description [String, nil] An optional description for internal use.
@@ -270,12 +281,8 @@ module ModernTreasury
270
281
  # https://docs.moderntreasury.com/docs/transaction-status-and-balances for more
271
282
  # details.
272
283
  #
273
- # @return [ModernTreasury::Models::LedgerTransactions::LedgerTransactionVersion::LedgerEntry::ResultingLedgerAccountBalances, nil]
274
- required :resulting_ledger_account_balances,
275
- -> {
276
- ModernTreasury::LedgerTransactions::LedgerTransactionVersion::LedgerEntry::ResultingLedgerAccountBalances
277
- },
278
- nil?: true
284
+ # @return [ModernTreasury::Models::LedgerBalances, nil]
285
+ required :resulting_ledger_account_balances, -> { ModernTreasury::LedgerBalances }, nil?: true
279
286
 
280
287
  # @!attribute status
281
288
  # Equal to the state of the ledger transaction when the ledger entry was created.
@@ -316,194 +323,10 @@ module ModernTreasury
316
323
  #
317
324
  # @param object [String]
318
325
  #
319
- # @param resulting_ledger_account_balances [ModernTreasury::Models::LedgerTransactions::LedgerTransactionVersion::LedgerEntry::ResultingLedgerAccountBalances, nil] The pending, posted, and available balances for this ledger entry's ledger accou
326
+ # @param resulting_ledger_account_balances [ModernTreasury::Models::LedgerBalances, nil] The pending, posted, and available balances for this ledger entry's ledger accou
320
327
  #
321
328
  # @param status [Symbol, ModernTreasury::Models::LedgerTransactions::LedgerTransactionVersion::LedgerEntry::Status] Equal to the state of the ledger transaction when the ledger entry was created.
322
329
 
323
- # @see ModernTreasury::Models::LedgerTransactions::LedgerTransactionVersion::LedgerEntry#resulting_ledger_account_balances
324
- class ResultingLedgerAccountBalances < ModernTreasury::Internal::Type::BaseModel
325
- # @!attribute available_balance
326
- # The available_balance is the sum of all posted inbound entries and pending
327
- # outbound entries. For credit normal, available_amount = posted_credits -
328
- # pending_debits; for debit normal, available_amount = posted_debits -
329
- # pending_credits.
330
- #
331
- # @return [ModernTreasury::Models::LedgerTransactions::LedgerTransactionVersion::LedgerEntry::ResultingLedgerAccountBalances::AvailableBalance]
332
- required :available_balance,
333
- -> {
334
- ModernTreasury::LedgerTransactions::LedgerTransactionVersion::LedgerEntry::ResultingLedgerAccountBalances::AvailableBalance
335
- }
336
-
337
- # @!attribute pending_balance
338
- # The pending_balance is the sum of all pending and posted entries.
339
- #
340
- # @return [ModernTreasury::Models::LedgerTransactions::LedgerTransactionVersion::LedgerEntry::ResultingLedgerAccountBalances::PendingBalance]
341
- required :pending_balance,
342
- -> {
343
- ModernTreasury::LedgerTransactions::LedgerTransactionVersion::LedgerEntry::ResultingLedgerAccountBalances::PendingBalance
344
- }
345
-
346
- # @!attribute posted_balance
347
- # The posted_balance is the sum of all posted entries.
348
- #
349
- # @return [ModernTreasury::Models::LedgerTransactions::LedgerTransactionVersion::LedgerEntry::ResultingLedgerAccountBalances::PostedBalance]
350
- required :posted_balance,
351
- -> {
352
- ModernTreasury::LedgerTransactions::LedgerTransactionVersion::LedgerEntry::ResultingLedgerAccountBalances::PostedBalance
353
- }
354
-
355
- # @!method initialize(available_balance:, pending_balance:, posted_balance:)
356
- # Some parameter documentations has been truncated, see
357
- # {ModernTreasury::Models::LedgerTransactions::LedgerTransactionVersion::LedgerEntry::ResultingLedgerAccountBalances}
358
- # for more details.
359
- #
360
- # The pending, posted, and available balances for this ledger entry's ledger
361
- # account. The posted balance is the sum of all posted entries on the account. The
362
- # pending balance is the sum of all pending and posted entries on the account. The
363
- # available balance is the posted incoming entries minus the sum of the pending
364
- # and posted outgoing amounts. Please see
365
- # https://docs.moderntreasury.com/docs/transaction-status-and-balances for more
366
- # details.
367
- #
368
- # @param available_balance [ModernTreasury::Models::LedgerTransactions::LedgerTransactionVersion::LedgerEntry::ResultingLedgerAccountBalances::AvailableBalance] The available_balance is the sum of all posted inbound entries and pending outbo
369
- #
370
- # @param pending_balance [ModernTreasury::Models::LedgerTransactions::LedgerTransactionVersion::LedgerEntry::ResultingLedgerAccountBalances::PendingBalance] The pending_balance is the sum of all pending and posted entries.
371
- #
372
- # @param posted_balance [ModernTreasury::Models::LedgerTransactions::LedgerTransactionVersion::LedgerEntry::ResultingLedgerAccountBalances::PostedBalance] The posted_balance is the sum of all posted entries.
373
-
374
- # @see ModernTreasury::Models::LedgerTransactions::LedgerTransactionVersion::LedgerEntry::ResultingLedgerAccountBalances#available_balance
375
- class AvailableBalance < ModernTreasury::Internal::Type::BaseModel
376
- # @!attribute amount
377
- #
378
- # @return [Integer]
379
- required :amount, Integer
380
-
381
- # @!attribute credits
382
- #
383
- # @return [Integer]
384
- required :credits, Integer
385
-
386
- # @!attribute currency
387
- # The currency of the ledger account.
388
- #
389
- # @return [String]
390
- required :currency, String
391
-
392
- # @!attribute currency_exponent
393
- # The currency exponent of the ledger account.
394
- #
395
- # @return [Integer]
396
- required :currency_exponent, Integer
397
-
398
- # @!attribute debits
399
- #
400
- # @return [Integer]
401
- required :debits, Integer
402
-
403
- # @!method initialize(amount:, credits:, currency:, currency_exponent:, debits:)
404
- # The available_balance is the sum of all posted inbound entries and pending
405
- # outbound entries. For credit normal, available_amount = posted_credits -
406
- # pending_debits; for debit normal, available_amount = posted_debits -
407
- # pending_credits.
408
- #
409
- # @param amount [Integer]
410
- #
411
- # @param credits [Integer]
412
- #
413
- # @param currency [String] The currency of the ledger account.
414
- #
415
- # @param currency_exponent [Integer] The currency exponent of the ledger account.
416
- #
417
- # @param debits [Integer]
418
- end
419
-
420
- # @see ModernTreasury::Models::LedgerTransactions::LedgerTransactionVersion::LedgerEntry::ResultingLedgerAccountBalances#pending_balance
421
- class PendingBalance < ModernTreasury::Internal::Type::BaseModel
422
- # @!attribute amount
423
- #
424
- # @return [Integer]
425
- required :amount, Integer
426
-
427
- # @!attribute credits
428
- #
429
- # @return [Integer]
430
- required :credits, Integer
431
-
432
- # @!attribute currency
433
- # The currency of the ledger account.
434
- #
435
- # @return [String]
436
- required :currency, String
437
-
438
- # @!attribute currency_exponent
439
- # The currency exponent of the ledger account.
440
- #
441
- # @return [Integer]
442
- required :currency_exponent, Integer
443
-
444
- # @!attribute debits
445
- #
446
- # @return [Integer]
447
- required :debits, Integer
448
-
449
- # @!method initialize(amount:, credits:, currency:, currency_exponent:, debits:)
450
- # The pending_balance is the sum of all pending and posted entries.
451
- #
452
- # @param amount [Integer]
453
- #
454
- # @param credits [Integer]
455
- #
456
- # @param currency [String] The currency of the ledger account.
457
- #
458
- # @param currency_exponent [Integer] The currency exponent of the ledger account.
459
- #
460
- # @param debits [Integer]
461
- end
462
-
463
- # @see ModernTreasury::Models::LedgerTransactions::LedgerTransactionVersion::LedgerEntry::ResultingLedgerAccountBalances#posted_balance
464
- class PostedBalance < ModernTreasury::Internal::Type::BaseModel
465
- # @!attribute amount
466
- #
467
- # @return [Integer]
468
- required :amount, Integer
469
-
470
- # @!attribute credits
471
- #
472
- # @return [Integer]
473
- required :credits, Integer
474
-
475
- # @!attribute currency
476
- # The currency of the ledger account.
477
- #
478
- # @return [String]
479
- required :currency, String
480
-
481
- # @!attribute currency_exponent
482
- # The currency exponent of the ledger account.
483
- #
484
- # @return [Integer]
485
- required :currency_exponent, Integer
486
-
487
- # @!attribute debits
488
- #
489
- # @return [Integer]
490
- required :debits, Integer
491
-
492
- # @!method initialize(amount:, credits:, currency:, currency_exponent:, debits:)
493
- # The posted_balance is the sum of all posted entries.
494
- #
495
- # @param amount [Integer]
496
- #
497
- # @param credits [Integer]
498
- #
499
- # @param currency [String] The currency of the ledger account.
500
- #
501
- # @param currency_exponent [Integer] The currency exponent of the ledger account.
502
- #
503
- # @param debits [Integer]
504
- end
505
- end
506
-
507
330
  # Equal to the state of the ledger transaction when the ledger entry was created.
508
331
  # One of `pending`, `posted`, or `archived`.
509
332
  #
@@ -530,7 +353,6 @@ module ModernTreasury
530
353
 
531
354
  EXPECTED_PAYMENT = :expected_payment
532
355
  INCOMING_PAYMENT_DETAIL = :incoming_payment_detail
533
- PAPER_ITEM = :paper_item
534
356
  PAYMENT_ORDER = :payment_order
535
357
  RETURN = :return
536
358
  REVERSAL = :reversal
@@ -0,0 +1,78 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ModernTreasury
4
+ module Models
5
+ class LegalEntityAddressCreateRequest < ModernTreasury::Internal::Type::BaseModel
6
+ # @!attribute country
7
+ # Country code conforms to [ISO 3166-1 alpha-2]
8
+ #
9
+ # @return [String, nil]
10
+ required :country, String, nil?: true
11
+
12
+ # @!attribute line1
13
+ #
14
+ # @return [String, nil]
15
+ required :line1, String, nil?: true
16
+
17
+ # @!attribute locality
18
+ # Locality or City.
19
+ #
20
+ # @return [String, nil]
21
+ required :locality, String, nil?: true
22
+
23
+ # @!attribute postal_code
24
+ # The postal code of the address.
25
+ #
26
+ # @return [String, nil]
27
+ required :postal_code, String, nil?: true
28
+
29
+ # @!attribute region
30
+ # Region or State.
31
+ #
32
+ # @return [String, nil]
33
+ required :region, String, nil?: true
34
+
35
+ # @!attribute address_types
36
+ # The types of this address.
37
+ #
38
+ # @return [Array<Symbol, ModernTreasury::Models::LegalEntityAddressCreateRequest::AddressType>, nil]
39
+ optional :address_types,
40
+ -> {
41
+ ModernTreasury::Internal::Type::ArrayOf[enum: ModernTreasury::LegalEntityAddressCreateRequest::AddressType]
42
+ }
43
+
44
+ # @!attribute line2
45
+ #
46
+ # @return [String, nil]
47
+ optional :line2, String, nil?: true
48
+
49
+ # @!method initialize(country:, line1:, locality:, postal_code:, region:, address_types: nil, line2: nil)
50
+ # @param country [String, nil] Country code conforms to [ISO 3166-1 alpha-2]
51
+ #
52
+ # @param line1 [String, nil]
53
+ #
54
+ # @param locality [String, nil] Locality or City.
55
+ #
56
+ # @param postal_code [String, nil] The postal code of the address.
57
+ #
58
+ # @param region [String, nil] Region or State.
59
+ #
60
+ # @param address_types [Array<Symbol, ModernTreasury::Models::LegalEntityAddressCreateRequest::AddressType>] The types of this address.
61
+ #
62
+ # @param line2 [String, nil]
63
+
64
+ module AddressType
65
+ extend ModernTreasury::Internal::Type::Enum
66
+
67
+ BUSINESS = :business
68
+ MAILING = :mailing
69
+ OTHER = :other
70
+ PO_BOX = :po_box
71
+ RESIDENTIAL = :residential
72
+
73
+ # @!method self.values
74
+ # @return [Array<Symbol>]
75
+ end
76
+ end
77
+ end
78
+ end
@@ -665,6 +665,7 @@ module ModernTreasury
665
665
  module RelationshipType
666
666
  extend ModernTreasury::Internal::Type::Enum
667
667
 
668
+ AUTHORIZED_SIGNER = :authorized_signer
668
669
  BENEFICIAL_OWNER = :beneficial_owner
669
670
  CONTROL_PERSON = :control_person
670
671