modern_treasury 0.1.0.pre.alpha.22 → 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 (295) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +38 -0
  3. data/README.md +1 -1
  4. data/lib/modern_treasury/client.rb +0 -12
  5. data/lib/modern_treasury/internal/transport/base_client.rb +1 -1
  6. data/lib/modern_treasury/internal/type/base_model.rb +4 -4
  7. data/lib/modern_treasury/models/accounting.rb +30 -0
  8. data/lib/modern_treasury/models/address.rb +94 -0
  9. data/lib/modern_treasury/models/address_request.rb +54 -0
  10. data/lib/modern_treasury/models/bulk_request_create_params.rb +144 -1505
  11. data/lib/modern_treasury/models/child_legal_entity_create.rb +275 -0
  12. data/lib/modern_treasury/models/connection_legal_entity_create_params.rb +10 -627
  13. data/lib/modern_treasury/models/contact_detail.rb +81 -0
  14. data/lib/modern_treasury/models/contact_detail_create_request.rb +34 -0
  15. data/lib/modern_treasury/models/counterparty.rb +24 -177
  16. data/lib/modern_treasury/models/counterparty_create_params.rb +37 -838
  17. data/lib/modern_treasury/models/counterparty_list_params.rb +9 -1
  18. data/lib/modern_treasury/models/document.rb +4 -6
  19. data/lib/modern_treasury/models/document_create_params.rb +0 -2
  20. data/lib/modern_treasury/models/document_list_params.rb +4 -6
  21. data/lib/modern_treasury/models/expected_payment.rb +9 -1
  22. data/lib/modern_treasury/models/expected_payment_create_params.rb +12 -230
  23. data/lib/modern_treasury/models/expected_payment_list_params.rb +8 -1
  24. data/lib/modern_treasury/models/expected_payment_update_params.rb +9 -1
  25. data/lib/modern_treasury/models/external_account.rb +15 -177
  26. data/lib/modern_treasury/models/external_account_create_params.rb +18 -210
  27. data/lib/modern_treasury/models/external_account_list_params.rb +9 -1
  28. data/lib/modern_treasury/models/external_account_update_params.rb +3 -52
  29. data/lib/modern_treasury/models/foreign_exchange_quote.rb +3 -73
  30. data/lib/modern_treasury/models/foreign_exchange_rate.rb +71 -0
  31. data/lib/modern_treasury/models/identification_create_request.rb +86 -0
  32. data/lib/modern_treasury/models/internal_account.rb +3 -95
  33. data/lib/modern_treasury/models/internal_account_update_account_capability_params.rb +34 -0
  34. data/lib/modern_treasury/models/internal_account_update_account_capability_response.rb +131 -0
  35. data/lib/modern_treasury/models/invoice.rb +3 -81
  36. data/lib/modern_treasury/models/invoice_create_params.rb +3 -83
  37. data/lib/modern_treasury/models/invoice_update_params.rb +3 -83
  38. data/lib/modern_treasury/models/ledger_account.rb +9 -141
  39. data/lib/modern_treasury/models/ledger_account_balance_monitor.rb +3 -182
  40. data/lib/modern_treasury/models/ledger_account_category.rb +3 -175
  41. data/lib/modern_treasury/models/ledger_account_category_list_params.rb +9 -5
  42. data/lib/modern_treasury/models/ledger_account_category_retrieve_params.rb +4 -2
  43. data/lib/modern_treasury/models/ledger_account_create_params.rb +2 -105
  44. data/lib/modern_treasury/models/ledger_account_create_request.rb +113 -0
  45. data/lib/modern_treasury/models/ledger_account_statement_create_response.rb +6 -360
  46. data/lib/modern_treasury/models/ledger_account_statement_retrieve_response.rb +6 -360
  47. data/lib/modern_treasury/models/ledger_balance.rb +45 -0
  48. data/lib/modern_treasury/models/ledger_balances.rb +38 -0
  49. data/lib/modern_treasury/models/ledger_entry.rb +3 -183
  50. data/lib/modern_treasury/models/ledger_entry_create_request.rb +98 -0
  51. data/lib/modern_treasury/models/ledger_entry_list_params.rb +48 -8
  52. data/lib/modern_treasury/models/ledger_transaction.rb +14 -6
  53. data/lib/modern_treasury/models/ledger_transaction_create_params.rb +2 -212
  54. data/lib/modern_treasury/models/ledger_transaction_create_request.rb +123 -0
  55. data/lib/modern_treasury/models/ledger_transaction_create_reversal_params.rb +0 -1
  56. data/lib/modern_treasury/models/ledger_transaction_list_params.rb +44 -7
  57. data/lib/modern_treasury/models/ledger_transaction_update_params.rb +5 -104
  58. data/lib/modern_treasury/models/ledger_transactions/ledger_transaction_version.rb +15 -193
  59. data/lib/modern_treasury/models/legal_entity_address_create_request.rb +78 -0
  60. data/lib/modern_treasury/models/legal_entity_association.rb +1 -0
  61. data/lib/modern_treasury/models/legal_entity_association_create_params.rb +4 -448
  62. data/lib/modern_treasury/models/legal_entity_create_params.rb +10 -618
  63. data/lib/modern_treasury/models/legal_entity_update_params.rb +6 -165
  64. data/lib/modern_treasury/models/line_item.rb +3 -29
  65. data/lib/modern_treasury/models/payment_action_list_params.rb +1 -0
  66. data/lib/modern_treasury/models/payment_order.rb +13 -102
  67. data/lib/modern_treasury/models/payment_order_create_async_params.rb +24 -477
  68. data/lib/modern_treasury/models/payment_order_create_params.rb +24 -479
  69. data/lib/modern_treasury/models/payment_order_update_params.rb +21 -248
  70. data/lib/modern_treasury/models/payment_orders/reversal_create_params.rb +3 -232
  71. data/lib/modern_treasury/models/payment_reference.rb +7 -1
  72. data/lib/modern_treasury/models/return_list_params.rb +5 -6
  73. data/lib/modern_treasury/models/return_object.rb +7 -3
  74. data/lib/modern_treasury/models/routing_detail.rb +3 -93
  75. data/lib/modern_treasury/models/routing_number_lookup_request.rb +3 -55
  76. data/lib/modern_treasury/models/transaction.rb +5 -73
  77. data/lib/modern_treasury/models/transactions/transaction_line_item.rb +0 -1
  78. data/lib/modern_treasury/models/virtual_account_create_params.rb +3 -117
  79. data/lib/modern_treasury/models.rb +31 -6
  80. data/lib/modern_treasury/resources/bulk_requests.rb +1 -1
  81. data/lib/modern_treasury/resources/counterparties.rb +20 -14
  82. data/lib/modern_treasury/resources/expected_payments.rb +10 -4
  83. data/lib/modern_treasury/resources/external_accounts.rb +23 -17
  84. data/lib/modern_treasury/resources/internal_accounts.rb +34 -0
  85. data/lib/modern_treasury/resources/invoices.rb +2 -2
  86. data/lib/modern_treasury/resources/ledger_account_categories.rb +1 -1
  87. data/lib/modern_treasury/resources/ledger_accounts.rb +1 -1
  88. data/lib/modern_treasury/resources/ledger_entries.rb +1 -1
  89. data/lib/modern_treasury/resources/ledger_transactions.rb +5 -5
  90. data/lib/modern_treasury/resources/legal_entities.rb +4 -4
  91. data/lib/modern_treasury/resources/legal_entity_associations.rb +1 -1
  92. data/lib/modern_treasury/resources/payment_orders/reversals.rb +1 -1
  93. data/lib/modern_treasury/resources/payment_orders.rb +5 -5
  94. data/lib/modern_treasury/resources/returns.rb +1 -1
  95. data/lib/modern_treasury/resources/virtual_accounts.rb +1 -1
  96. data/lib/modern_treasury/version.rb +1 -1
  97. data/lib/modern_treasury.rb +16 -6
  98. data/rbi/modern_treasury/client.rbi +0 -9
  99. data/rbi/modern_treasury/internal/transport/base_client.rbi +1 -1
  100. data/rbi/modern_treasury/models/accounting.rbi +48 -0
  101. data/rbi/modern_treasury/models/address.rbi +107 -0
  102. data/rbi/modern_treasury/models/address_request.rbi +76 -0
  103. data/rbi/modern_treasury/models/bulk_request_create_params.rbi +701 -3140
  104. data/rbi/modern_treasury/models/child_legal_entity_create.rbi +511 -0
  105. data/rbi/modern_treasury/models/connection_legal_entity_create_params.rbi +17 -1314
  106. data/rbi/modern_treasury/models/contact_detail.rbi +124 -0
  107. data/rbi/modern_treasury/models/contact_detail_create_request.rbi +99 -0
  108. data/rbi/modern_treasury/models/counterparty.rbi +24 -264
  109. data/rbi/modern_treasury/models/counterparty_create_params.rbi +47 -1718
  110. data/rbi/modern_treasury/models/counterparty_list_params.rbi +11 -0
  111. data/rbi/modern_treasury/models/document.rbi +6 -16
  112. data/rbi/modern_treasury/models/document_create_params.rbi +0 -10
  113. data/rbi/modern_treasury/models/document_list_params.rbi +6 -16
  114. data/rbi/modern_treasury/models/expected_payment.rbi +8 -0
  115. data/rbi/modern_treasury/models/expected_payment_create_params.rbi +12 -419
  116. data/rbi/modern_treasury/models/expected_payment_list_params.rbi +9 -0
  117. data/rbi/modern_treasury/models/expected_payment_update_params.rbi +8 -0
  118. data/rbi/modern_treasury/models/external_account.rbi +15 -244
  119. data/rbi/modern_treasury/models/external_account_create_params.rbi +20 -400
  120. data/rbi/modern_treasury/models/external_account_list_params.rbi +11 -0
  121. data/rbi/modern_treasury/models/external_account_update_params.rbi +4 -86
  122. data/rbi/modern_treasury/models/foreign_exchange_quote.rbi +4 -99
  123. data/rbi/modern_treasury/models/foreign_exchange_rate.rbi +96 -0
  124. data/rbi/modern_treasury/models/identification_create_request.rbi +212 -0
  125. data/rbi/modern_treasury/models/internal_account.rbi +4 -115
  126. data/rbi/modern_treasury/models/internal_account_update_account_capability_params.rbi +54 -0
  127. data/rbi/modern_treasury/models/internal_account_update_account_capability_response.rbi +304 -0
  128. data/rbi/modern_treasury/models/invoice.rbi +3 -128
  129. data/rbi/modern_treasury/models/invoice_create_params.rbi +4 -139
  130. data/rbi/modern_treasury/models/invoice_update_params.rbi +4 -139
  131. data/rbi/modern_treasury/models/ledger_account.rbi +12 -218
  132. data/rbi/modern_treasury/models/ledger_account_balance_monitor.rbi +4 -303
  133. data/rbi/modern_treasury/models/ledger_account_category.rbi +4 -301
  134. data/rbi/modern_treasury/models/ledger_account_category_list_params.rbi +14 -7
  135. data/rbi/modern_treasury/models/ledger_account_category_retrieve_params.rbi +6 -3
  136. data/rbi/modern_treasury/models/ledger_account_create_params.rbi +5 -173
  137. data/rbi/modern_treasury/models/ledger_account_create_request.rbi +194 -0
  138. data/rbi/modern_treasury/models/ledger_account_statement_create_response.rbi +8 -612
  139. data/rbi/modern_treasury/models/ledger_account_statement_retrieve_response.rbi +8 -612
  140. data/rbi/modern_treasury/models/ledger_balance.rbi +66 -0
  141. data/rbi/modern_treasury/models/ledger_balances.rbi +75 -0
  142. data/rbi/modern_treasury/models/ledger_entry.rbi +4 -309
  143. data/rbi/modern_treasury/models/ledger_entry_create_request.rbi +137 -0
  144. data/rbi/modern_treasury/models/ledger_entry_list_params.rbi +99 -16
  145. data/rbi/modern_treasury/models/ledger_transaction.rbi +17 -11
  146. data/rbi/modern_treasury/models/ledger_transaction_create_params.rbi +5 -383
  147. data/rbi/modern_treasury/models/ledger_transaction_create_request.rbi +258 -0
  148. data/rbi/modern_treasury/models/ledger_transaction_create_reversal_params.rbi +0 -5
  149. data/rbi/modern_treasury/models/ledger_transaction_list_params.rbi +93 -18
  150. data/rbi/modern_treasury/models/ledger_transaction_update_params.rbi +7 -158
  151. data/rbi/modern_treasury/models/ledger_transactions/ledger_transaction_version.rbi +18 -316
  152. data/rbi/modern_treasury/models/legal_entity_address_create_request.rbi +157 -0
  153. data/rbi/modern_treasury/models/legal_entity_association.rbi +5 -0
  154. data/rbi/modern_treasury/models/legal_entity_association_create_params.rbi +9 -917
  155. data/rbi/modern_treasury/models/legal_entity_create_params.rbi +17 -1297
  156. data/rbi/modern_treasury/models/legal_entity_update_params.rbi +8 -378
  157. data/rbi/modern_treasury/models/line_item.rbi +4 -52
  158. data/rbi/modern_treasury/models/payment_action_list_params.rbi +5 -0
  159. data/rbi/modern_treasury/models/payment_order.rbi +43 -159
  160. data/rbi/modern_treasury/models/payment_order_create_async_params.rbi +28 -882
  161. data/rbi/modern_treasury/models/payment_order_create_params.rbi +28 -887
  162. data/rbi/modern_treasury/models/payment_order_update_params.rbi +24 -460
  163. data/rbi/modern_treasury/models/payment_orders/reversal_create_params.rbi +4 -415
  164. data/rbi/modern_treasury/models/payment_reference.rbi +35 -5
  165. data/rbi/modern_treasury/models/return_list_params.rbi +6 -11
  166. data/rbi/modern_treasury/models/return_object.rbi +35 -12
  167. data/rbi/modern_treasury/models/routing_detail.rbi +4 -113
  168. data/rbi/modern_treasury/models/routing_number_lookup_request.rbi +4 -87
  169. data/rbi/modern_treasury/models/transaction.rbi +14 -103
  170. data/rbi/modern_treasury/models/transactions/transaction_line_item.rbi +0 -5
  171. data/rbi/modern_treasury/models/virtual_account_create_params.rbi +4 -203
  172. data/rbi/modern_treasury/models.rbi +36 -6
  173. data/rbi/modern_treasury/resources/bulk_requests.rbi +2 -2
  174. data/rbi/modern_treasury/resources/counterparties.rbi +20 -12
  175. data/rbi/modern_treasury/resources/documents.rbi +2 -2
  176. data/rbi/modern_treasury/resources/expected_payments.rbi +9 -1
  177. data/rbi/modern_treasury/resources/external_accounts.rbi +29 -22
  178. data/rbi/modern_treasury/resources/internal_accounts.rbi +24 -0
  179. data/rbi/modern_treasury/resources/invoices.rbi +2 -8
  180. data/rbi/modern_treasury/resources/ledger_account_categories.rbi +7 -3
  181. data/rbi/modern_treasury/resources/ledger_accounts.rbi +1 -1
  182. data/rbi/modern_treasury/resources/ledger_entries.rbi +9 -2
  183. data/rbi/modern_treasury/resources/ledger_transactions.rbi +13 -13
  184. data/rbi/modern_treasury/resources/legal_entities.rbi +4 -8
  185. data/rbi/modern_treasury/resources/legal_entity_associations.rbi +1 -2
  186. data/rbi/modern_treasury/resources/payment_orders/reversals.rbi +1 -1
  187. data/rbi/modern_treasury/resources/payment_orders.rbi +5 -8
  188. data/rbi/modern_treasury/resources/returns.rbi +2 -2
  189. data/rbi/modern_treasury/resources/virtual_accounts.rbi +1 -2
  190. data/sig/modern_treasury/client.rbs +0 -6
  191. data/sig/modern_treasury/internal/transport/base_client.rbs +1 -1
  192. data/sig/modern_treasury/models/accounting.rbs +15 -0
  193. data/sig/modern_treasury/models/address.rbs +70 -0
  194. data/sig/modern_treasury/models/address_request.rbs +45 -0
  195. data/sig/modern_treasury/models/bulk_request_create_params.rbs +88 -1089
  196. data/sig/modern_treasury/models/child_legal_entity_create.rbs +220 -0
  197. data/sig/modern_treasury/models/connection_legal_entity_create_params.rbs +21 -548
  198. data/sig/modern_treasury/models/contact_detail.rbs +67 -0
  199. data/sig/modern_treasury/models/contact_detail_create_request.rbs +43 -0
  200. data/sig/modern_treasury/models/counterparty.rbs +20 -141
  201. data/sig/modern_treasury/models/counterparty_create_params.rbs +49 -737
  202. data/sig/modern_treasury/models/counterparty_list_params.rbs +7 -0
  203. data/sig/modern_treasury/models/document.rbs +0 -4
  204. data/sig/modern_treasury/models/document_create_params.rbs +0 -4
  205. data/sig/modern_treasury/models/document_list_params.rbs +0 -4
  206. data/sig/modern_treasury/models/expected_payment.rbs +5 -0
  207. data/sig/modern_treasury/models/expected_payment_create_params.rbs +11 -173
  208. data/sig/modern_treasury/models/expected_payment_list_params.rbs +7 -0
  209. data/sig/modern_treasury/models/expected_payment_update_params.rbs +5 -0
  210. data/sig/modern_treasury/models/external_account.rbs +13 -139
  211. data/sig/modern_treasury/models/external_account_create_params.rbs +23 -189
  212. data/sig/modern_treasury/models/external_account_list_params.rbs +7 -0
  213. data/sig/modern_treasury/models/external_account_update_params.rbs +6 -48
  214. data/sig/modern_treasury/models/foreign_exchange_quote.rbs +4 -51
  215. data/sig/modern_treasury/models/foreign_exchange_rate.rbs +50 -0
  216. data/sig/modern_treasury/models/identification_create_request.rbs +93 -0
  217. data/sig/modern_treasury/models/internal_account.rbs +4 -71
  218. data/sig/modern_treasury/models/internal_account_update_account_capability_params.rbs +28 -0
  219. data/sig/modern_treasury/models/internal_account_update_account_capability_response.rbs +137 -0
  220. data/sig/modern_treasury/models/invoice.rbs +4 -68
  221. data/sig/modern_treasury/models/invoice_create_params.rbs +6 -70
  222. data/sig/modern_treasury/models/invoice_update_params.rbs +6 -70
  223. data/sig/modern_treasury/models/ledger_account.rbs +12 -123
  224. data/sig/modern_treasury/models/ledger_account_balance_monitor.rbs +4 -142
  225. data/sig/modern_treasury/models/ledger_account_category.rbs +4 -142
  226. data/sig/modern_treasury/models/ledger_account_category_list_params.rbs +5 -5
  227. data/sig/modern_treasury/models/ledger_account_create_params.rbs +4 -84
  228. data/sig/modern_treasury/models/ledger_account_create_request.rbs +89 -0
  229. data/sig/modern_treasury/models/ledger_account_statement_create_response.rbs +8 -284
  230. data/sig/modern_treasury/models/ledger_account_statement_retrieve_response.rbs +8 -284
  231. data/sig/modern_treasury/models/ledger_balance.rbs +40 -0
  232. data/sig/modern_treasury/models/ledger_balances.rbs +30 -0
  233. data/sig/modern_treasury/models/ledger_entry.rbs +4 -142
  234. data/sig/modern_treasury/models/ledger_entry_create_request.rbs +62 -0
  235. data/sig/modern_treasury/models/ledger_entry_list_params.rbs +21 -3
  236. data/sig/modern_treasury/models/ledger_transaction.rbs +5 -2
  237. data/sig/modern_treasury/models/ledger_transaction_create_params.rbs +4 -165
  238. data/sig/modern_treasury/models/ledger_transaction_create_request.rbs +109 -0
  239. data/sig/modern_treasury/models/ledger_transaction_create_reversal_params.rbs +0 -2
  240. data/sig/modern_treasury/models/ledger_transaction_list_params.rbs +21 -5
  241. data/sig/modern_treasury/models/ledger_transaction_update_params.rbs +6 -67
  242. data/sig/modern_treasury/models/ledger_transactions/ledger_transaction_version.rbs +9 -144
  243. data/sig/modern_treasury/models/legal_entity_address_create_request.rbs +68 -0
  244. data/sig/modern_treasury/models/legal_entity_association.rbs +3 -1
  245. data/sig/modern_treasury/models/legal_entity_association_create_params.rbs +9 -380
  246. data/sig/modern_treasury/models/legal_entity_create_params.rbs +21 -548
  247. data/sig/modern_treasury/models/legal_entity_update_params.rbs +12 -168
  248. data/sig/modern_treasury/models/line_item.rbs +4 -16
  249. data/sig/modern_treasury/models/payment_action_list_params.rbs +2 -1
  250. data/sig/modern_treasury/models/payment_order.rbs +22 -69
  251. data/sig/modern_treasury/models/payment_order_create_async_params.rbs +35 -380
  252. data/sig/modern_treasury/models/payment_order_create_params.rbs +35 -384
  253. data/sig/modern_treasury/models/payment_order_update_params.rbs +29 -207
  254. data/sig/modern_treasury/models/payment_orders/reversal_create_params.rbs +6 -173
  255. data/sig/modern_treasury/models/payment_reference.rbs +14 -2
  256. data/sig/modern_treasury/models/return_list_params.rbs +1 -6
  257. data/sig/modern_treasury/models/return_object.rbs +15 -10
  258. data/sig/modern_treasury/models/routing_detail.rbs +4 -71
  259. data/sig/modern_treasury/models/routing_number_lookup_request.rbs +6 -48
  260. data/sig/modern_treasury/models/transaction.rbs +8 -53
  261. data/sig/modern_treasury/models/transactions/transaction_line_item.rbs +0 -2
  262. data/sig/modern_treasury/models/virtual_account_create_params.rbs +6 -95
  263. data/sig/modern_treasury/models.rbs +30 -6
  264. data/sig/modern_treasury/resources/counterparties.rbs +2 -0
  265. data/sig/modern_treasury/resources/expected_payments.rbs +4 -1
  266. data/sig/modern_treasury/resources/external_accounts.rbs +6 -4
  267. data/sig/modern_treasury/resources/internal_accounts.rbs +7 -0
  268. data/sig/modern_treasury/resources/invoices.rbs +2 -2
  269. data/sig/modern_treasury/resources/ledger_account_categories.rbs +1 -1
  270. data/sig/modern_treasury/resources/ledger_accounts.rbs +1 -1
  271. data/sig/modern_treasury/resources/ledger_transactions.rbs +4 -4
  272. data/sig/modern_treasury/resources/legal_entities.rbs +4 -4
  273. data/sig/modern_treasury/resources/legal_entity_associations.rbs +1 -1
  274. data/sig/modern_treasury/resources/payment_orders/reversals.rbs +1 -1
  275. data/sig/modern_treasury/resources/payment_orders.rbs +5 -5
  276. data/sig/modern_treasury/resources/virtual_accounts.rbs +1 -1
  277. metadata +52 -22
  278. data/lib/modern_treasury/models/paper_item.rb +0 -178
  279. data/lib/modern_treasury/models/paper_item_list_params.rb +0 -56
  280. data/lib/modern_treasury/models/paper_item_retrieve_params.rb +0 -14
  281. data/lib/modern_treasury/resources/ledger_event_handlers.rb +0 -14
  282. data/lib/modern_treasury/resources/ledgerable_events.rb +0 -14
  283. data/lib/modern_treasury/resources/paper_items.rb +0 -68
  284. data/rbi/modern_treasury/models/paper_item.rbi +0 -204
  285. data/rbi/modern_treasury/models/paper_item_list_params.rbi +0 -88
  286. data/rbi/modern_treasury/models/paper_item_retrieve_params.rbi +0 -32
  287. data/rbi/modern_treasury/resources/ledger_event_handlers.rbi +0 -12
  288. data/rbi/modern_treasury/resources/ledgerable_events.rbi +0 -12
  289. data/rbi/modern_treasury/resources/paper_items.rbi +0 -51
  290. data/sig/modern_treasury/models/paper_item.rbs +0 -122
  291. data/sig/modern_treasury/models/paper_item_list_params.rbs +0 -54
  292. data/sig/modern_treasury/models/paper_item_retrieve_params.rbs +0 -15
  293. data/sig/modern_treasury/resources/ledger_event_handlers.rbs +0 -7
  294. data/sig/modern_treasury/resources/ledgerable_events.rbs +0 -7
  295. data/sig/modern_treasury/resources/paper_items.rbs +0 -21
@@ -16,8 +16,8 @@ module ModernTreasury
16
16
  # available balance is the posted incoming entries minus the sum of the pending
17
17
  # and posted outgoing amounts.
18
18
  #
19
- # @return [ModernTreasury::Models::LedgerAccountCategory::Balances]
20
- required :balances, -> { ModernTreasury::LedgerAccountCategory::Balances }
19
+ # @return [ModernTreasury::Models::LedgerBalances]
20
+ required :balances, -> { ModernTreasury::LedgerBalances }
21
21
 
22
22
  # @!attribute created_at
23
23
  #
@@ -89,7 +89,7 @@ module ModernTreasury
89
89
  #
90
90
  # @param id [String]
91
91
  #
92
- # @param balances [ModernTreasury::Models::LedgerAccountCategory::Balances] The pending, posted, and available balances for this ledger account category. Th
92
+ # @param balances [ModernTreasury::Models::LedgerBalances] The pending, posted, and available balances for this ledger account category. Th
93
93
  #
94
94
  # @param created_at [Time]
95
95
  #
@@ -112,178 +112,6 @@ module ModernTreasury
112
112
  # @param object [String]
113
113
  #
114
114
  # @param updated_at [Time]
115
-
116
- # @see ModernTreasury::Models::LedgerAccountCategory#balances
117
- class Balances < ModernTreasury::Internal::Type::BaseModel
118
- # @!attribute available_balance
119
- # The available_balance is the sum of all posted inbound entries and pending
120
- # outbound entries. For credit normal, available_amount = posted_credits -
121
- # pending_debits; for debit normal, available_amount = posted_debits -
122
- # pending_credits.
123
- #
124
- # @return [ModernTreasury::Models::LedgerAccountCategory::Balances::AvailableBalance]
125
- required :available_balance, -> { ModernTreasury::LedgerAccountCategory::Balances::AvailableBalance }
126
-
127
- # @!attribute pending_balance
128
- # The pending_balance is the sum of all pending and posted entries.
129
- #
130
- # @return [ModernTreasury::Models::LedgerAccountCategory::Balances::PendingBalance]
131
- required :pending_balance, -> { ModernTreasury::LedgerAccountCategory::Balances::PendingBalance }
132
-
133
- # @!attribute posted_balance
134
- # The posted_balance is the sum of all posted entries.
135
- #
136
- # @return [ModernTreasury::Models::LedgerAccountCategory::Balances::PostedBalance]
137
- required :posted_balance, -> { ModernTreasury::LedgerAccountCategory::Balances::PostedBalance }
138
-
139
- # @!method initialize(available_balance:, pending_balance:, posted_balance:)
140
- # Some parameter documentations has been truncated, see
141
- # {ModernTreasury::Models::LedgerAccountCategory::Balances} for more details.
142
- #
143
- # The pending, posted, and available balances for this ledger account category.
144
- # The posted balance is the sum of all posted entries on the account. The pending
145
- # balance is the sum of all pending and posted entries on the account. The
146
- # available balance is the posted incoming entries minus the sum of the pending
147
- # and posted outgoing amounts.
148
- #
149
- # @param available_balance [ModernTreasury::Models::LedgerAccountCategory::Balances::AvailableBalance] The available_balance is the sum of all posted inbound entries and pending outbo
150
- #
151
- # @param pending_balance [ModernTreasury::Models::LedgerAccountCategory::Balances::PendingBalance] The pending_balance is the sum of all pending and posted entries.
152
- #
153
- # @param posted_balance [ModernTreasury::Models::LedgerAccountCategory::Balances::PostedBalance] The posted_balance is the sum of all posted entries.
154
-
155
- # @see ModernTreasury::Models::LedgerAccountCategory::Balances#available_balance
156
- class AvailableBalance < ModernTreasury::Internal::Type::BaseModel
157
- # @!attribute amount
158
- #
159
- # @return [Integer]
160
- required :amount, Integer
161
-
162
- # @!attribute credits
163
- #
164
- # @return [Integer]
165
- required :credits, Integer
166
-
167
- # @!attribute currency
168
- # The currency of the ledger account.
169
- #
170
- # @return [String]
171
- required :currency, String
172
-
173
- # @!attribute currency_exponent
174
- # The currency exponent of the ledger account.
175
- #
176
- # @return [Integer]
177
- required :currency_exponent, Integer
178
-
179
- # @!attribute debits
180
- #
181
- # @return [Integer]
182
- required :debits, Integer
183
-
184
- # @!method initialize(amount:, credits:, currency:, currency_exponent:, debits:)
185
- # The available_balance is the sum of all posted inbound entries and pending
186
- # outbound entries. For credit normal, available_amount = posted_credits -
187
- # pending_debits; for debit normal, available_amount = posted_debits -
188
- # pending_credits.
189
- #
190
- # @param amount [Integer]
191
- #
192
- # @param credits [Integer]
193
- #
194
- # @param currency [String] The currency of the ledger account.
195
- #
196
- # @param currency_exponent [Integer] The currency exponent of the ledger account.
197
- #
198
- # @param debits [Integer]
199
- end
200
-
201
- # @see ModernTreasury::Models::LedgerAccountCategory::Balances#pending_balance
202
- class PendingBalance < ModernTreasury::Internal::Type::BaseModel
203
- # @!attribute amount
204
- #
205
- # @return [Integer]
206
- required :amount, Integer
207
-
208
- # @!attribute credits
209
- #
210
- # @return [Integer]
211
- required :credits, Integer
212
-
213
- # @!attribute currency
214
- # The currency of the ledger account.
215
- #
216
- # @return [String]
217
- required :currency, String
218
-
219
- # @!attribute currency_exponent
220
- # The currency exponent of the ledger account.
221
- #
222
- # @return [Integer]
223
- required :currency_exponent, Integer
224
-
225
- # @!attribute debits
226
- #
227
- # @return [Integer]
228
- required :debits, Integer
229
-
230
- # @!method initialize(amount:, credits:, currency:, currency_exponent:, debits:)
231
- # The pending_balance is the sum of all pending and posted entries.
232
- #
233
- # @param amount [Integer]
234
- #
235
- # @param credits [Integer]
236
- #
237
- # @param currency [String] The currency of the ledger account.
238
- #
239
- # @param currency_exponent [Integer] The currency exponent of the ledger account.
240
- #
241
- # @param debits [Integer]
242
- end
243
-
244
- # @see ModernTreasury::Models::LedgerAccountCategory::Balances#posted_balance
245
- class PostedBalance < ModernTreasury::Internal::Type::BaseModel
246
- # @!attribute amount
247
- #
248
- # @return [Integer]
249
- required :amount, Integer
250
-
251
- # @!attribute credits
252
- #
253
- # @return [Integer]
254
- required :credits, Integer
255
-
256
- # @!attribute currency
257
- # The currency of the ledger account.
258
- #
259
- # @return [String]
260
- required :currency, String
261
-
262
- # @!attribute currency_exponent
263
- # The currency exponent of the ledger account.
264
- #
265
- # @return [Integer]
266
- required :currency_exponent, Integer
267
-
268
- # @!attribute debits
269
- #
270
- # @return [Integer]
271
- required :debits, Integer
272
-
273
- # @!method initialize(amount:, credits:, currency:, currency_exponent:, debits:)
274
- # The posted_balance is the sum of all posted entries.
275
- #
276
- # @param amount [Integer]
277
- #
278
- # @param credits [Integer]
279
- #
280
- # @param currency [String] The currency of the ledger account.
281
- #
282
- # @param currency_exponent [Integer] The currency exponent of the ledger account.
283
- #
284
- # @param debits [Integer]
285
- end
286
- end
287
115
  end
288
116
  end
289
117
  end
@@ -22,7 +22,8 @@ module ModernTreasury
22
22
  # @!attribute balances
23
23
  # For example, if you want the balances as of a particular time (ISO8601), the
24
24
  # encoded query string would be `balances%5Beffective_at%5D=2000-12-31T12:00:00Z`.
25
- # The balances as of a time are inclusive of entries with that exact time.
25
+ # The balances as of a time are inclusive of entries with that exact time, but
26
+ # with respect to the ledger accounts that are currently present in the category.
26
27
  #
27
28
  # @return [ModernTreasury::Models::LedgerAccountCategoryListParams::Balances, nil]
28
29
  optional :balances, -> { ModernTreasury::LedgerAccountCategoryListParams::Balances }
@@ -58,9 +59,11 @@ module ModernTreasury
58
59
  optional :metadata, ModernTreasury::Internal::Type::HashOf[String]
59
60
 
60
61
  # @!attribute name
62
+ # If you have specific names to retrieve in bulk, you can pass them as query
63
+ # parameters delimited with `name[]=`, for example `?name[]=123&name[]=abc`.
61
64
  #
62
- # @return [String, nil]
63
- optional :name, String
65
+ # @return [Array<String>, nil]
66
+ optional :name, ModernTreasury::Internal::Type::ArrayOf[String]
64
67
 
65
68
  # @!attribute parent_ledger_account_category_id
66
69
  # Query categories that are nested underneath a parent category
@@ -93,7 +96,7 @@ module ModernTreasury
93
96
  #
94
97
  # @param metadata [Hash{Symbol=>String}] For example, if you want to query for records with metadata key `Type` and value
95
98
  #
96
- # @param name [String]
99
+ # @param name [Array<String>] If you have specific names to retrieve in bulk, you can pass them as query param
97
100
  #
98
101
  # @param parent_ledger_account_category_id [String] Query categories that are nested underneath a parent category
99
102
  #
@@ -110,7 +113,8 @@ module ModernTreasury
110
113
  # @!method initialize(effective_at: nil)
111
114
  # For example, if you want the balances as of a particular time (ISO8601), the
112
115
  # encoded query string would be `balances%5Beffective_at%5D=2000-12-31T12:00:00Z`.
113
- # The balances as of a time are inclusive of entries with that exact time.
116
+ # The balances as of a time are inclusive of entries with that exact time, but
117
+ # with respect to the ledger accounts that are currently present in the category.
114
118
  #
115
119
  # @param effective_at [Time]
116
120
  end
@@ -10,7 +10,8 @@ module ModernTreasury
10
10
  # @!attribute balances
11
11
  # For example, if you want the balances as of a particular time (ISO8601), the
12
12
  # encoded query string would be `balances%5Beffective_at%5D=2000-12-31T12:00:00Z`.
13
- # The balances as of a time are inclusive of entries with that exact time.
13
+ # The balances as of a time are inclusive of entries with that exact time, but
14
+ # with respect to the ledger accounts that are currently present in the category.
14
15
  #
15
16
  # @return [ModernTreasury::Models::LedgerAccountCategoryRetrieveParams::Balances, nil]
16
17
  optional :balances, -> { ModernTreasury::LedgerAccountCategoryRetrieveParams::Balances }
@@ -37,7 +38,8 @@ module ModernTreasury
37
38
  # @!method initialize(as_of_date: nil, effective_at: nil)
38
39
  # For example, if you want the balances as of a particular time (ISO8601), the
39
40
  # encoded query string would be `balances%5Beffective_at%5D=2000-12-31T12:00:00Z`.
40
- # The balances as of a time are inclusive of entries with that exact time.
41
+ # The balances as of a time are inclusive of entries with that exact time, but
42
+ # with respect to the ledger accounts that are currently present in the category.
41
43
  #
42
44
  # @param as_of_date [Date]
43
45
  # @param effective_at [Time]
@@ -3,115 +3,12 @@
3
3
  module ModernTreasury
4
4
  module Models
5
5
  # @see ModernTreasury::Resources::LedgerAccounts#create
6
- class LedgerAccountCreateParams < ModernTreasury::Internal::Type::BaseModel
6
+ class LedgerAccountCreateParams < ModernTreasury::Models::LedgerAccountCreateRequest
7
7
  extend ModernTreasury::Internal::Type::RequestParameters::Converter
8
8
  include ModernTreasury::Internal::Type::RequestParameters
9
9
 
10
- # @!attribute currency
11
- # The currency of the ledger account.
12
- #
13
- # @return [String]
14
- required :currency, String
15
-
16
- # @!attribute ledger_id
17
- # The id of the ledger that this account belongs to.
18
- #
19
- # @return [String]
20
- required :ledger_id, String
21
-
22
- # @!attribute name
23
- # The name of the ledger account.
24
- #
25
- # @return [String]
26
- required :name, String
27
-
28
- # @!attribute normal_balance
29
- # The normal balance of the ledger account.
30
- #
31
- # @return [Symbol, ModernTreasury::Models::TransactionDirection]
32
- required :normal_balance, enum: -> { ModernTreasury::TransactionDirection }
33
-
34
- # @!attribute currency_exponent
35
- # The currency exponent of the ledger account.
36
- #
37
- # @return [Integer, nil]
38
- optional :currency_exponent, Integer, nil?: true
39
-
40
- # @!attribute description
41
- # The description of the ledger account.
42
- #
43
- # @return [String, nil]
44
- optional :description, String, nil?: true
45
-
46
- # @!attribute ledger_account_category_ids
47
- # The array of ledger account category ids that this ledger account should be a
48
- # child of.
49
- #
50
- # @return [Array<String>, nil]
51
- optional :ledger_account_category_ids, ModernTreasury::Internal::Type::ArrayOf[String]
52
-
53
- # @!attribute ledgerable_id
54
- # If the ledger account links to another object in Modern Treasury, the id will be
55
- # populated here, otherwise null.
56
- #
57
- # @return [String, nil]
58
- optional :ledgerable_id, String
59
-
60
- # @!attribute ledgerable_type
61
- # If the ledger account links to another object in Modern Treasury, the type will
62
- # be populated here, otherwise null. The value is one of internal_account or
63
- # external_account.
64
- #
65
- # @return [Symbol, ModernTreasury::Models::LedgerAccountCreateParams::LedgerableType, nil]
66
- optional :ledgerable_type, enum: -> { ModernTreasury::LedgerAccountCreateParams::LedgerableType }
67
-
68
- # @!attribute metadata
69
- # Additional data represented as key-value pairs. Both the key and value must be
70
- # strings.
71
- #
72
- # @return [Hash{Symbol=>String}, nil]
73
- optional :metadata, ModernTreasury::Internal::Type::HashOf[String]
74
-
75
- # @!method initialize(currency:, ledger_id:, name:, normal_balance:, currency_exponent: nil, description: nil, ledger_account_category_ids: nil, ledgerable_id: nil, ledgerable_type: nil, metadata: nil, request_options: {})
76
- # Some parameter documentations has been truncated, see
77
- # {ModernTreasury::Models::LedgerAccountCreateParams} for more details.
78
- #
79
- # @param currency [String] The currency of the ledger account.
80
- #
81
- # @param ledger_id [String] The id of the ledger that this account belongs to.
82
- #
83
- # @param name [String] The name of the ledger account.
84
- #
85
- # @param normal_balance [Symbol, ModernTreasury::Models::TransactionDirection] The normal balance of the ledger account.
86
- #
87
- # @param currency_exponent [Integer, nil] The currency exponent of the ledger account.
88
- #
89
- # @param description [String, nil] The description of the ledger account.
90
- #
91
- # @param ledger_account_category_ids [Array<String>] The array of ledger account category ids that this ledger account should be a ch
92
- #
93
- # @param ledgerable_id [String] If the ledger account links to another object in Modern Treasury, the id will be
94
- #
95
- # @param ledgerable_type [Symbol, ModernTreasury::Models::LedgerAccountCreateParams::LedgerableType] If the ledger account links to another object in Modern Treasury, the type will
96
- #
97
- # @param metadata [Hash{Symbol=>String}] Additional data represented as key-value pairs. Both the key and value must be s
98
- #
10
+ # @!method initialize(request_options: {})
99
11
  # @param request_options [ModernTreasury::RequestOptions, Hash{Symbol=>Object}]
100
-
101
- # If the ledger account links to another object in Modern Treasury, the type will
102
- # be populated here, otherwise null. The value is one of internal_account or
103
- # external_account.
104
- module LedgerableType
105
- extend ModernTreasury::Internal::Type::Enum
106
-
107
- COUNTERPARTY = :counterparty
108
- EXTERNAL_ACCOUNT = :external_account
109
- INTERNAL_ACCOUNT = :internal_account
110
- VIRTUAL_ACCOUNT = :virtual_account
111
-
112
- # @!method self.values
113
- # @return [Array<Symbol>]
114
- end
115
12
  end
116
13
  end
117
14
  end
@@ -0,0 +1,113 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ModernTreasury
4
+ module Models
5
+ class LedgerAccountCreateRequest < ModernTreasury::Internal::Type::BaseModel
6
+ # @!attribute currency
7
+ # The currency of the ledger account.
8
+ #
9
+ # @return [String]
10
+ required :currency, String
11
+
12
+ # @!attribute ledger_id
13
+ # The id of the ledger that this account belongs to.
14
+ #
15
+ # @return [String]
16
+ required :ledger_id, String
17
+
18
+ # @!attribute name
19
+ # The name of the ledger account.
20
+ #
21
+ # @return [String]
22
+ required :name, String
23
+
24
+ # @!attribute normal_balance
25
+ # The normal balance of the ledger account.
26
+ #
27
+ # @return [Symbol, ModernTreasury::Models::TransactionDirection]
28
+ required :normal_balance, enum: -> { ModernTreasury::TransactionDirection }
29
+
30
+ # @!attribute currency_exponent
31
+ # The currency exponent of the ledger account.
32
+ #
33
+ # @return [Integer, nil]
34
+ optional :currency_exponent, Integer, nil?: true
35
+
36
+ # @!attribute description
37
+ # The description of the ledger account.
38
+ #
39
+ # @return [String, nil]
40
+ optional :description, String, nil?: true
41
+
42
+ # @!attribute ledger_account_category_ids
43
+ # The array of ledger account category ids that this ledger account should be a
44
+ # child of.
45
+ #
46
+ # @return [Array<String>, nil]
47
+ optional :ledger_account_category_ids, ModernTreasury::Internal::Type::ArrayOf[String]
48
+
49
+ # @!attribute ledgerable_id
50
+ # If the ledger account links to another object in Modern Treasury, the id will be
51
+ # populated here, otherwise null.
52
+ #
53
+ # @return [String, nil]
54
+ optional :ledgerable_id, String
55
+
56
+ # @!attribute ledgerable_type
57
+ # If the ledger account links to another object in Modern Treasury, the type will
58
+ # be populated here, otherwise null. The value is one of internal_account or
59
+ # external_account.
60
+ #
61
+ # @return [Symbol, ModernTreasury::Models::LedgerAccountCreateRequest::LedgerableType, nil]
62
+ optional :ledgerable_type, enum: -> { ModernTreasury::LedgerAccountCreateRequest::LedgerableType }
63
+
64
+ # @!attribute metadata
65
+ # Additional data represented as key-value pairs. Both the key and value must be
66
+ # strings.
67
+ #
68
+ # @return [Hash{Symbol=>String}, nil]
69
+ optional :metadata, ModernTreasury::Internal::Type::HashOf[String]
70
+
71
+ # @!method initialize(currency:, ledger_id:, name:, normal_balance:, currency_exponent: nil, description: nil, ledger_account_category_ids: nil, ledgerable_id: nil, ledgerable_type: nil, metadata: nil)
72
+ # Some parameter documentations has been truncated, see
73
+ # {ModernTreasury::Models::LedgerAccountCreateRequest} for more details.
74
+ #
75
+ # @param currency [String] The currency of the ledger account.
76
+ #
77
+ # @param ledger_id [String] The id of the ledger that this account belongs to.
78
+ #
79
+ # @param name [String] The name of the ledger account.
80
+ #
81
+ # @param normal_balance [Symbol, ModernTreasury::Models::TransactionDirection] The normal balance of the ledger account.
82
+ #
83
+ # @param currency_exponent [Integer, nil] The currency exponent of the ledger account.
84
+ #
85
+ # @param description [String, nil] The description of the ledger account.
86
+ #
87
+ # @param ledger_account_category_ids [Array<String>] The array of ledger account category ids that this ledger account should be a ch
88
+ #
89
+ # @param ledgerable_id [String] If the ledger account links to another object in Modern Treasury, the id will be
90
+ #
91
+ # @param ledgerable_type [Symbol, ModernTreasury::Models::LedgerAccountCreateRequest::LedgerableType] If the ledger account links to another object in Modern Treasury, the type will
92
+ #
93
+ # @param metadata [Hash{Symbol=>String}] Additional data represented as key-value pairs. Both the key and value must be s
94
+
95
+ # If the ledger account links to another object in Modern Treasury, the type will
96
+ # be populated here, otherwise null. The value is one of internal_account or
97
+ # external_account.
98
+ #
99
+ # @see ModernTreasury::Models::LedgerAccountCreateRequest#ledgerable_type
100
+ module LedgerableType
101
+ extend ModernTreasury::Internal::Type::Enum
102
+
103
+ COUNTERPARTY = :counterparty
104
+ EXTERNAL_ACCOUNT = :external_account
105
+ INTERNAL_ACCOUNT = :internal_account
106
+ VIRTUAL_ACCOUNT = :virtual_account
107
+
108
+ # @!method self.values
109
+ # @return [Array<Symbol>]
110
+ end
111
+ end
112
+ end
113
+ end