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
@@ -23,7 +23,7 @@ module ModernTreasury
23
23
  # An array of objects where each object contains the input params for a single
24
24
  # `action_type` request on a `resource_type` resource
25
25
  #
26
- # @return [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest, ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest, ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionCreateRequest, ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerAccountCreateRequest, ModernTreasury::Models::BulkRequestCreateParams::Resource::TransactionCreateRequest, ModernTreasury::Models::BulkRequestCreateParams::Resource::ID, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID, ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentUpdateRequestWithID, ModernTreasury::Models::BulkRequestCreateParams::Resource::TransactionUpdateRequestWithID, ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionUpdateRequestWithID>]
26
+ # @return [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest, ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest, ModernTreasury::Models::LedgerTransactionCreateRequest, ModernTreasury::Models::LedgerAccountCreateRequest, ModernTreasury::Models::BulkRequestCreateParams::Resource::TransactionCreateRequest, ModernTreasury::Models::BulkRequestCreateParams::Resource::ID, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID, ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentUpdateRequestWithID, ModernTreasury::Models::BulkRequestCreateParams::Resource::TransactionUpdateRequestWithID, ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionUpdateRequestWithID>]
27
27
  required :resources,
28
28
  -> {
29
29
  ModernTreasury::Internal::Type::ArrayOf[union: ModernTreasury::BulkRequestCreateParams::Resource]
@@ -44,7 +44,7 @@ module ModernTreasury
44
44
  #
45
45
  # @param resource_type [Symbol, ModernTreasury::Models::BulkRequestCreateParams::ResourceType] One of payment_order, expected_payment, or ledger_transaction.
46
46
  #
47
- # @param resources [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest, ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest, ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionCreateRequest, ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerAccountCreateRequest, ModernTreasury::Models::BulkRequestCreateParams::Resource::TransactionCreateRequest, ModernTreasury::Models::BulkRequestCreateParams::Resource::ID, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID, ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentUpdateRequestWithID, ModernTreasury::Models::BulkRequestCreateParams::Resource::TransactionUpdateRequestWithID, ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionUpdateRequestWithID>] An array of objects where each object contains the input params for a single `ac
47
+ # @param resources [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest, ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest, ModernTreasury::Models::LedgerTransactionCreateRequest, ModernTreasury::Models::LedgerAccountCreateRequest, ModernTreasury::Models::BulkRequestCreateParams::Resource::TransactionCreateRequest, ModernTreasury::Models::BulkRequestCreateParams::Resource::ID, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID, ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentUpdateRequestWithID, ModernTreasury::Models::BulkRequestCreateParams::Resource::TransactionUpdateRequestWithID, ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionUpdateRequestWithID>] An array of objects where each object contains the input params for a single `ac
48
48
  #
49
49
  # @param metadata [Hash{Symbol=>String}] Additional data represented as key-value pairs. Both the key and value must be s
50
50
  #
@@ -85,9 +85,9 @@ module ModernTreasury
85
85
 
86
86
  variant -> { ModernTreasury::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest }
87
87
 
88
- variant -> { ModernTreasury::BulkRequestCreateParams::Resource::LedgerTransactionCreateRequest }
88
+ variant -> { ModernTreasury::LedgerTransactionCreateRequest }
89
89
 
90
- variant -> { ModernTreasury::BulkRequestCreateParams::Resource::LedgerAccountCreateRequest }
90
+ variant -> { ModernTreasury::LedgerAccountCreateRequest }
91
91
 
92
92
  variant -> { ModernTreasury::BulkRequestCreateParams::Resource::TransactionCreateRequest }
93
93
 
@@ -137,11 +137,8 @@ module ModernTreasury
137
137
 
138
138
  # @!attribute accounting
139
139
  #
140
- # @return [ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::Accounting, nil]
141
- optional :accounting,
142
- -> {
143
- ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::Accounting
144
- }
140
+ # @return [ModernTreasury::Models::Accounting, nil]
141
+ optional :accounting, -> { ModernTreasury::Accounting }
145
142
 
146
143
  # @!attribute accounting_category_id
147
144
  # @deprecated
@@ -235,11 +232,8 @@ module ModernTreasury
235
232
  # creation will fail. The resulting ledger transaction will mirror the status of
236
233
  # the payment order.
237
234
  #
238
- # @return [ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::LedgerTransaction, nil]
239
- optional :ledger_transaction,
240
- -> {
241
- ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::LedgerTransaction
242
- }
235
+ # @return [ModernTreasury::Models::LedgerTransactionCreateRequest, nil]
236
+ optional :ledger_transaction, -> { ModernTreasury::LedgerTransactionCreateRequest }
243
237
 
244
238
  # @!attribute ledger_transaction_id
245
239
  # Either ledger_transaction or ledger_transaction_id can be provided. Only a
@@ -409,7 +403,7 @@ module ModernTreasury
409
403
  #
410
404
  # @param type [Symbol, ModernTreasury::Models::PaymentOrderType] One of `ach`, `se_bankgirot`, `eft`, `wire`, `check`, `sen`, `book`, `rtp`, `sep
411
405
  #
412
- # @param accounting [ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::Accounting]
406
+ # @param accounting [ModernTreasury::Models::Accounting]
413
407
  #
414
408
  # @param accounting_category_id [String, nil] The ID of one of your accounting categories. Note that these will only be access
415
409
  #
@@ -431,7 +425,7 @@ module ModernTreasury
431
425
  #
432
426
  # @param foreign_exchange_indicator [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ForeignExchangeIndicator, nil] Indicates the type of FX transfer to initiate, can be either `variable_to_fixed`
433
427
  #
434
- # @param ledger_transaction [ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::LedgerTransaction] Specifies a ledger transaction object that will be created with the payment orde
428
+ # @param ledger_transaction [ModernTreasury::Models::LedgerTransactionCreateRequest] Specifies a ledger transaction object that will be created with the payment orde
435
429
  #
436
430
  # @param ledger_transaction_id [String] Either ledger_transaction or ledger_transaction_id can be provided. Only a pendi
437
431
  #
@@ -487,33 +481,6 @@ module ModernTreasury
487
481
  # @return [Array<Symbol>]
488
482
  end
489
483
 
490
- # @see ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest#accounting
491
- class Accounting < ModernTreasury::Internal::Type::BaseModel
492
- # @!attribute account_id
493
- # The ID of one of your accounting categories. Note that these will only be
494
- # accessible if your accounting system has been connected.
495
- #
496
- # @return [String, nil]
497
- optional :account_id, String, nil?: true
498
-
499
- # @!attribute class_id
500
- # The ID of one of the class objects in your accounting system. Class objects
501
- # track segments of your business independent of client or project. Note that
502
- # these will only be accessible if your accounting system has been connected.
503
- #
504
- # @return [String, nil]
505
- optional :class_id, String, nil?: true
506
-
507
- # @!method initialize(account_id: nil, class_id: nil)
508
- # Some parameter documentations has been truncated, see
509
- # {ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::Accounting}
510
- # for more details.
511
- #
512
- # @param account_id [String, nil] The ID of one of your accounting categories. Note that these will only be access
513
- #
514
- # @param class_id [String, nil] The ID of one of the class objects in your accounting system. Class objects trac
515
- end
516
-
517
484
  # The party that will pay the fees for the payment order. See
518
485
  # https://docs.moderntreasury.com/payments/docs/charge-bearer to understand the
519
486
  # differences between the options.
@@ -559,240 +526,6 @@ module ModernTreasury
559
526
  # @return [Array<Symbol>]
560
527
  end
561
528
 
562
- # @see ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest#ledger_transaction
563
- class LedgerTransaction < ModernTreasury::Internal::Type::BaseModel
564
- # @!attribute ledger_entries
565
- # An array of ledger entry objects.
566
- #
567
- # @return [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::LedgerTransaction::LedgerEntry>]
568
- required :ledger_entries,
569
- -> do
570
- ModernTreasury::Internal::Type::ArrayOf[
571
- ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::LedgerTransaction::LedgerEntry
572
- ]
573
- end
574
-
575
- # @!attribute description
576
- # An optional description for internal use.
577
- #
578
- # @return [String, nil]
579
- optional :description, String, nil?: true
580
-
581
- # @!attribute effective_at
582
- # The timestamp (ISO8601 format) at which the ledger transaction happened for
583
- # reporting purposes.
584
- #
585
- # @return [Time, nil]
586
- optional :effective_at, Time
587
-
588
- # @!attribute effective_date
589
- # The date (YYYY-MM-DD) on which the ledger transaction happened for reporting
590
- # purposes.
591
- #
592
- # @return [Date, nil]
593
- optional :effective_date, Date
594
-
595
- # @!attribute external_id
596
- # A unique string to represent the ledger transaction. Only one pending or posted
597
- # ledger transaction may have this ID in the ledger.
598
- #
599
- # @return [String, nil]
600
- optional :external_id, String
601
-
602
- # @!attribute ledgerable_id
603
- # If the ledger transaction can be reconciled to another object in Modern
604
- # Treasury, the id will be populated here, otherwise null.
605
- #
606
- # @return [String, nil]
607
- optional :ledgerable_id, String
608
-
609
- # @!attribute ledgerable_type
610
- # If the ledger transaction can be reconciled to another object in Modern
611
- # Treasury, the type will be populated here, otherwise null. This can be one of
612
- # payment_order, incoming_payment_detail, expected_payment, return, paper_item, or
613
- # reversal.
614
- #
615
- # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::LedgerTransaction::LedgerableType, nil]
616
- optional :ledgerable_type,
617
- enum: -> {
618
- ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::LedgerTransaction::LedgerableType
619
- }
620
-
621
- # @!attribute metadata
622
- # Additional data represented as key-value pairs. Both the key and value must be
623
- # strings.
624
- #
625
- # @return [Hash{Symbol=>String}, nil]
626
- optional :metadata, ModernTreasury::Internal::Type::HashOf[String]
627
-
628
- # @!attribute status
629
- # To post a ledger transaction at creation, use `posted`.
630
- #
631
- # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::LedgerTransaction::Status, nil]
632
- optional :status,
633
- enum: -> {
634
- ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::LedgerTransaction::Status
635
- }
636
-
637
- # @!method initialize(ledger_entries:, description: nil, effective_at: nil, effective_date: nil, external_id: nil, ledgerable_id: nil, ledgerable_type: nil, metadata: nil, status: nil)
638
- # Some parameter documentations has been truncated, see
639
- # {ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::LedgerTransaction}
640
- # for more details.
641
- #
642
- # Specifies a ledger transaction object that will be created with the payment
643
- # order. If the ledger transaction cannot be created, then the payment order
644
- # creation will fail. The resulting ledger transaction will mirror the status of
645
- # the payment order.
646
- #
647
- # @param ledger_entries [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::LedgerTransaction::LedgerEntry>] An array of ledger entry objects.
648
- #
649
- # @param description [String, nil] An optional description for internal use.
650
- #
651
- # @param effective_at [Time] The timestamp (ISO8601 format) at which the ledger transaction happened for repo
652
- #
653
- # @param effective_date [Date] The date (YYYY-MM-DD) on which the ledger transaction happened for reporting pur
654
- #
655
- # @param external_id [String] A unique string to represent the ledger transaction. Only one pending or posted
656
- #
657
- # @param ledgerable_id [String] If the ledger transaction can be reconciled to another object in Modern Treasury
658
- #
659
- # @param ledgerable_type [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::LedgerTransaction::LedgerableType] If the ledger transaction can be reconciled to another object in Modern Treasury
660
- #
661
- # @param metadata [Hash{Symbol=>String}] Additional data represented as key-value pairs. Both the key and value must be s
662
- #
663
- # @param status [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::LedgerTransaction::Status] To post a ledger transaction at creation, use `posted`.
664
-
665
- class LedgerEntry < ModernTreasury::Internal::Type::BaseModel
666
- # @!attribute amount
667
- # Value in specified currency's smallest unit. e.g. $10 would be represented
668
- # as 1000. Can be any integer up to 36 digits.
669
- #
670
- # @return [Integer]
671
- required :amount, Integer
672
-
673
- # @!attribute direction
674
- # One of `credit`, `debit`. Describes the direction money is flowing in the
675
- # transaction. A `credit` moves money from your account to someone else's. A
676
- # `debit` pulls money from someone else's account to your own. Note that wire,
677
- # rtp, and check payments will always be `credit`.
678
- #
679
- # @return [Symbol, ModernTreasury::Models::TransactionDirection]
680
- required :direction, enum: -> { ModernTreasury::TransactionDirection }
681
-
682
- # @!attribute ledger_account_id
683
- # The ledger account that this ledger entry is associated with.
684
- #
685
- # @return [String]
686
- required :ledger_account_id, String
687
-
688
- # @!attribute available_balance_amount
689
- # Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
690
- # account’s available balance. If any of these conditions would be false after the
691
- # transaction is created, the entire call will fail with error code 422.
692
- #
693
- # @return [Hash{Symbol=>Integer}, nil]
694
- optional :available_balance_amount, ModernTreasury::Internal::Type::HashOf[Integer], nil?: true
695
-
696
- # @!attribute lock_version
697
- # Lock version of the ledger account. This can be passed when creating a ledger
698
- # transaction to only succeed if no ledger transactions have posted since the
699
- # given version. See our post about Designing the Ledgers API with Optimistic
700
- # Locking for more details.
701
- #
702
- # @return [Integer, nil]
703
- optional :lock_version, Integer, nil?: true
704
-
705
- # @!attribute metadata
706
- # Additional data represented as key-value pairs. Both the key and value must be
707
- # strings.
708
- #
709
- # @return [Hash{Symbol=>String}, nil]
710
- optional :metadata, ModernTreasury::Internal::Type::HashOf[String]
711
-
712
- # @!attribute pending_balance_amount
713
- # Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
714
- # account’s pending balance. If any of these conditions would be false after the
715
- # transaction is created, the entire call will fail with error code 422.
716
- #
717
- # @return [Hash{Symbol=>Integer}, nil]
718
- optional :pending_balance_amount, ModernTreasury::Internal::Type::HashOf[Integer], nil?: true
719
-
720
- # @!attribute posted_balance_amount
721
- # Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
722
- # account’s posted balance. If any of these conditions would be false after the
723
- # transaction is created, the entire call will fail with error code 422.
724
- #
725
- # @return [Hash{Symbol=>Integer}, nil]
726
- optional :posted_balance_amount, ModernTreasury::Internal::Type::HashOf[Integer], nil?: true
727
-
728
- # @!attribute show_resulting_ledger_account_balances
729
- # If true, response will include the balance of the associated ledger account for
730
- # the entry.
731
- #
732
- # @return [Boolean, nil]
733
- optional :show_resulting_ledger_account_balances,
734
- ModernTreasury::Internal::Type::Boolean,
735
- nil?: true
736
-
737
- # @!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)
738
- # Some parameter documentations has been truncated, see
739
- # {ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::LedgerTransaction::LedgerEntry}
740
- # for more details.
741
- #
742
- # @param amount [Integer] Value in specified currency's smallest unit. e.g. $10 would be represented as 10
743
- #
744
- # @param direction [Symbol, ModernTreasury::Models::TransactionDirection] One of `credit`, `debit`. Describes the direction money is flowing in the transa
745
- #
746
- # @param ledger_account_id [String] The ledger account that this ledger entry is associated with.
747
- #
748
- # @param available_balance_amount [Hash{Symbol=>Integer}, nil] Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the accou
749
- #
750
- # @param lock_version [Integer, nil] Lock version of the ledger account. This can be passed when creating a ledger tr
751
- #
752
- # @param metadata [Hash{Symbol=>String}] Additional data represented as key-value pairs. Both the key and value must be s
753
- #
754
- # @param pending_balance_amount [Hash{Symbol=>Integer}, nil] Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the accou
755
- #
756
- # @param posted_balance_amount [Hash{Symbol=>Integer}, nil] Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the accou
757
- #
758
- # @param show_resulting_ledger_account_balances [Boolean, nil] If true, response will include the balance of the associated ledger account for
759
- end
760
-
761
- # If the ledger transaction can be reconciled to another object in Modern
762
- # Treasury, the type will be populated here, otherwise null. This can be one of
763
- # payment_order, incoming_payment_detail, expected_payment, return, paper_item, or
764
- # reversal.
765
- #
766
- # @see ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::LedgerTransaction#ledgerable_type
767
- module LedgerableType
768
- extend ModernTreasury::Internal::Type::Enum
769
-
770
- EXPECTED_PAYMENT = :expected_payment
771
- INCOMING_PAYMENT_DETAIL = :incoming_payment_detail
772
- PAPER_ITEM = :paper_item
773
- PAYMENT_ORDER = :payment_order
774
- RETURN = :return
775
- REVERSAL = :reversal
776
-
777
- # @!method self.values
778
- # @return [Array<Symbol>]
779
- end
780
-
781
- # To post a ledger transaction at creation, use `posted`.
782
- #
783
- # @see ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::LedgerTransaction#status
784
- module Status
785
- extend ModernTreasury::Internal::Type::Enum
786
-
787
- ARCHIVED = :archived
788
- PENDING = :pending
789
- POSTED = :posted
790
-
791
- # @!method self.values
792
- # @return [Array<Symbol>]
793
- end
794
- end
795
-
796
529
  class LineItem < ModernTreasury::Internal::Type::BaseModel
797
530
  # @!attribute amount
798
531
  # Value in specified currency's smallest unit. e.g. $10 would be represented
@@ -870,13 +603,17 @@ module ModernTreasury
870
603
 
871
604
  # @!attribute contact_details
872
605
  #
873
- # @return [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::ContactDetail>, nil]
606
+ # @return [Array<ModernTreasury::Models::ContactDetailCreateRequest>, nil]
874
607
  optional :contact_details,
875
- -> do
876
- ModernTreasury::Internal::Type::ArrayOf[
877
- ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::ContactDetail
878
- ]
879
- end
608
+ -> {
609
+ ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::ContactDetailCreateRequest]
610
+ }
611
+
612
+ # @!attribute external_id
613
+ # An optional user-defined 180 character unique identifier.
614
+ #
615
+ # @return [String, nil]
616
+ optional :external_id, String, nil?: true
880
617
 
881
618
  # @!attribute ledger_account
882
619
  # Specifies a ledger account object that will be created with the external
@@ -885,11 +622,8 @@ module ModernTreasury
885
622
  # https://docs.moderntreasury.com/docs/linking-to-other-modern-treasury-objects
886
623
  # for more details.
887
624
  #
888
- # @return [ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::LedgerAccount, nil]
889
- optional :ledger_account,
890
- -> {
891
- ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::LedgerAccount
892
- }
625
+ # @return [ModernTreasury::Models::LedgerAccountCreateRequest, nil]
626
+ optional :ledger_account, -> { ModernTreasury::LedgerAccountCreateRequest }
893
627
 
894
628
  # @!attribute metadata
895
629
  # Additional data represented as key-value pairs. Both the key and value must be
@@ -908,11 +642,8 @@ module ModernTreasury
908
642
  # @!attribute party_address
909
643
  # Required if receiving wire payments.
910
644
  #
911
- # @return [ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::PartyAddress, nil]
912
- optional :party_address,
913
- -> {
914
- ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::PartyAddress
915
- }
645
+ # @return [ModernTreasury::Models::AddressRequest, nil]
646
+ optional :party_address, -> { ModernTreasury::AddressRequest }
916
647
 
917
648
  # @!attribute party_identifier
918
649
  #
@@ -952,7 +683,7 @@ module ModernTreasury
952
683
  ]
953
684
  end
954
685
 
955
- # @!method initialize(account_details: nil, account_type: nil, contact_details: nil, ledger_account: nil, metadata: nil, name: nil, party_address: nil, party_identifier: nil, party_name: nil, party_type: nil, plaid_processor_token: nil, routing_details: nil)
686
+ # @!method initialize(account_details: nil, account_type: nil, contact_details: nil, external_id: nil, ledger_account: nil, metadata: nil, name: nil, party_address: nil, party_identifier: nil, party_name: nil, party_type: nil, plaid_processor_token: nil, routing_details: nil)
956
687
  # Some parameter documentations has been truncated, see
957
688
  # {ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount}
958
689
  # for more details.
@@ -965,15 +696,17 @@ module ModernTreasury
965
696
  #
966
697
  # @param account_type [Symbol, ModernTreasury::Models::ExternalAccountType] Can be `checking`, `savings` or `other`.
967
698
  #
968
- # @param contact_details [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::ContactDetail>]
699
+ # @param contact_details [Array<ModernTreasury::Models::ContactDetailCreateRequest>]
700
+ #
701
+ # @param external_id [String, nil] An optional user-defined 180 character unique identifier.
969
702
  #
970
- # @param ledger_account [ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::LedgerAccount] Specifies a ledger account object that will be created with the external account
703
+ # @param ledger_account [ModernTreasury::Models::LedgerAccountCreateRequest] Specifies a ledger account object that will be created with the external account
971
704
  #
972
705
  # @param metadata [Hash{Symbol=>String}] Additional data represented as key-value pairs. Both the key and value must be s
973
706
  #
974
707
  # @param name [String, nil] A nickname for the external account. This is only for internal usage and won't a
975
708
  #
976
- # @param party_address [ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::PartyAddress] Required if receiving wire payments.
709
+ # @param party_address [ModernTreasury::Models::AddressRequest] Required if receiving wire payments.
977
710
  #
978
711
  # @param party_identifier [String]
979
712
  #
@@ -1027,208 +760,6 @@ module ModernTreasury
1027
760
  end
1028
761
  end
1029
762
 
1030
- class ContactDetail < ModernTreasury::Internal::Type::BaseModel
1031
- # @!attribute contact_identifier
1032
- #
1033
- # @return [String, nil]
1034
- optional :contact_identifier, String
1035
-
1036
- # @!attribute contact_identifier_type
1037
- #
1038
- # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::ContactDetail::ContactIdentifierType, nil]
1039
- optional :contact_identifier_type,
1040
- enum: -> {
1041
- ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::ContactDetail::ContactIdentifierType
1042
- }
1043
-
1044
- # @!method initialize(contact_identifier: nil, contact_identifier_type: nil)
1045
- # @param contact_identifier [String]
1046
- # @param contact_identifier_type [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::ContactDetail::ContactIdentifierType]
1047
-
1048
- # @see ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::ContactDetail#contact_identifier_type
1049
- module ContactIdentifierType
1050
- extend ModernTreasury::Internal::Type::Enum
1051
-
1052
- EMAIL = :email
1053
- PHONE_NUMBER = :phone_number
1054
- WEBSITE = :website
1055
-
1056
- # @!method self.values
1057
- # @return [Array<Symbol>]
1058
- end
1059
- end
1060
-
1061
- # @see ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount#ledger_account
1062
- class LedgerAccount < ModernTreasury::Internal::Type::BaseModel
1063
- # @!attribute currency
1064
- # The currency of the ledger account.
1065
- #
1066
- # @return [String]
1067
- required :currency, String
1068
-
1069
- # @!attribute ledger_id
1070
- # The id of the ledger that this account belongs to.
1071
- #
1072
- # @return [String]
1073
- required :ledger_id, String
1074
-
1075
- # @!attribute name
1076
- # The name of the ledger account.
1077
- #
1078
- # @return [String]
1079
- required :name, String
1080
-
1081
- # @!attribute normal_balance
1082
- # The normal balance of the ledger account.
1083
- #
1084
- # @return [Symbol, ModernTreasury::Models::TransactionDirection]
1085
- required :normal_balance, enum: -> { ModernTreasury::TransactionDirection }
1086
-
1087
- # @!attribute currency_exponent
1088
- # The currency exponent of the ledger account.
1089
- #
1090
- # @return [Integer, nil]
1091
- optional :currency_exponent, Integer, nil?: true
1092
-
1093
- # @!attribute description
1094
- # The description of the ledger account.
1095
- #
1096
- # @return [String, nil]
1097
- optional :description, String, nil?: true
1098
-
1099
- # @!attribute ledger_account_category_ids
1100
- # The array of ledger account category ids that this ledger account should be a
1101
- # child of.
1102
- #
1103
- # @return [Array<String>, nil]
1104
- optional :ledger_account_category_ids, ModernTreasury::Internal::Type::ArrayOf[String]
1105
-
1106
- # @!attribute ledgerable_id
1107
- # If the ledger account links to another object in Modern Treasury, the id will be
1108
- # populated here, otherwise null.
1109
- #
1110
- # @return [String, nil]
1111
- optional :ledgerable_id, String
1112
-
1113
- # @!attribute ledgerable_type
1114
- # If the ledger account links to another object in Modern Treasury, the type will
1115
- # be populated here, otherwise null. The value is one of internal_account or
1116
- # external_account.
1117
- #
1118
- # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::LedgerAccount::LedgerableType, nil]
1119
- optional :ledgerable_type,
1120
- enum: -> {
1121
- ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::LedgerAccount::LedgerableType
1122
- }
1123
-
1124
- # @!attribute metadata
1125
- # Additional data represented as key-value pairs. Both the key and value must be
1126
- # strings.
1127
- #
1128
- # @return [Hash{Symbol=>String}, nil]
1129
- optional :metadata, ModernTreasury::Internal::Type::HashOf[String]
1130
-
1131
- # @!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)
1132
- # Some parameter documentations has been truncated, see
1133
- # {ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::LedgerAccount}
1134
- # for more details.
1135
- #
1136
- # Specifies a ledger account object that will be created with the external
1137
- # account. The resulting ledger account is linked to the external account for
1138
- # auto-ledgering Payment objects. See
1139
- # https://docs.moderntreasury.com/docs/linking-to-other-modern-treasury-objects
1140
- # for more details.
1141
- #
1142
- # @param currency [String] The currency of the ledger account.
1143
- #
1144
- # @param ledger_id [String] The id of the ledger that this account belongs to.
1145
- #
1146
- # @param name [String] The name of the ledger account.
1147
- #
1148
- # @param normal_balance [Symbol, ModernTreasury::Models::TransactionDirection] The normal balance of the ledger account.
1149
- #
1150
- # @param currency_exponent [Integer, nil] The currency exponent of the ledger account.
1151
- #
1152
- # @param description [String, nil] The description of the ledger account.
1153
- #
1154
- # @param ledger_account_category_ids [Array<String>] The array of ledger account category ids that this ledger account should be a ch
1155
- #
1156
- # @param ledgerable_id [String] If the ledger account links to another object in Modern Treasury, the id will be
1157
- #
1158
- # @param ledgerable_type [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::LedgerAccount::LedgerableType] If the ledger account links to another object in Modern Treasury, the type will
1159
- #
1160
- # @param metadata [Hash{Symbol=>String}] Additional data represented as key-value pairs. Both the key and value must be s
1161
-
1162
- # If the ledger account links to another object in Modern Treasury, the type will
1163
- # be populated here, otherwise null. The value is one of internal_account or
1164
- # external_account.
1165
- #
1166
- # @see ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::LedgerAccount#ledgerable_type
1167
- module LedgerableType
1168
- extend ModernTreasury::Internal::Type::Enum
1169
-
1170
- COUNTERPARTY = :counterparty
1171
- EXTERNAL_ACCOUNT = :external_account
1172
- INTERNAL_ACCOUNT = :internal_account
1173
- VIRTUAL_ACCOUNT = :virtual_account
1174
-
1175
- # @!method self.values
1176
- # @return [Array<Symbol>]
1177
- end
1178
- end
1179
-
1180
- # @see ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount#party_address
1181
- class PartyAddress < ModernTreasury::Internal::Type::BaseModel
1182
- # @!attribute country
1183
- # Country code conforms to [ISO 3166-1 alpha-2]
1184
- #
1185
- # @return [String, nil]
1186
- optional :country, String, nil?: true
1187
-
1188
- # @!attribute line1
1189
- #
1190
- # @return [String, nil]
1191
- optional :line1, String, nil?: true
1192
-
1193
- # @!attribute line2
1194
- #
1195
- # @return [String, nil]
1196
- optional :line2, String, nil?: true
1197
-
1198
- # @!attribute locality
1199
- # Locality or City.
1200
- #
1201
- # @return [String, nil]
1202
- optional :locality, String, nil?: true
1203
-
1204
- # @!attribute postal_code
1205
- # The postal code of the address.
1206
- #
1207
- # @return [String, nil]
1208
- optional :postal_code, String, nil?: true
1209
-
1210
- # @!attribute region
1211
- # Region or State.
1212
- #
1213
- # @return [String, nil]
1214
- optional :region, String, nil?: true
1215
-
1216
- # @!method initialize(country: nil, line1: nil, line2: nil, locality: nil, postal_code: nil, region: nil)
1217
- # Required if receiving wire payments.
1218
- #
1219
- # @param country [String, nil] Country code conforms to [ISO 3166-1 alpha-2]
1220
- #
1221
- # @param line1 [String, nil]
1222
- #
1223
- # @param line2 [String, nil]
1224
- #
1225
- # @param locality [String, nil] Locality or City.
1226
- #
1227
- # @param postal_code [String, nil] The postal code of the address.
1228
- #
1229
- # @param region [String, nil] Region or State.
1230
- end
1231
-
1232
763
  # Either `individual` or `business`.
1233
764
  #
1234
765
  # @see ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount#party_type
@@ -1402,6 +933,12 @@ module ModernTreasury
1402
933
  },
1403
934
  nil?: true
1404
935
 
936
+ # @!attribute external_id
937
+ # An optional user-defined 180 character unique identifier.
938
+ #
939
+ # @return [String, nil]
940
+ optional :external_id, String, nil?: true
941
+
1405
942
  # @!attribute internal_account_id
1406
943
  # The ID of the Internal Account for the expected payment.
1407
944
  #
@@ -1414,11 +951,8 @@ module ModernTreasury
1414
951
  # creation will fail. The resulting ledger transaction will mirror the status of
1415
952
  # the expected payment.
1416
953
  #
1417
- # @return [ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest::LedgerTransaction, nil]
1418
- optional :ledger_transaction,
1419
- -> {
1420
- ModernTreasury::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest::LedgerTransaction
1421
- }
954
+ # @return [ModernTreasury::Models::LedgerTransactionCreateRequest, nil]
955
+ optional :ledger_transaction, -> { ModernTreasury::LedgerTransactionCreateRequest }
1422
956
 
1423
957
  # @!attribute ledger_transaction_id
1424
958
  # Either ledger_transaction or ledger_transaction_id can be provided. Only a
@@ -1488,676 +1022,106 @@ module ModernTreasury
1488
1022
  # @return [Symbol, ModernTreasury::Models::ExpectedPaymentType, nil]
1489
1023
  optional :type, enum: -> { ModernTreasury::ExpectedPaymentType }, nil?: true
1490
1024
 
1491
- # @!method initialize(amount_lower_bound: nil, amount_upper_bound: nil, counterparty_id: nil, currency: nil, date_lower_bound: nil, date_upper_bound: nil, description: nil, direction: nil, internal_account_id: nil, ledger_transaction: nil, ledger_transaction_id: nil, line_items: nil, metadata: nil, reconciliation_filters: nil, reconciliation_groups: nil, reconciliation_rule_variables: nil, remittance_information: nil, statement_descriptor: nil, type: nil)
1025
+ # @!method initialize(amount_lower_bound: nil, amount_upper_bound: nil, counterparty_id: nil, currency: nil, date_lower_bound: nil, date_upper_bound: nil, description: nil, direction: nil, external_id: nil, internal_account_id: nil, ledger_transaction: nil, ledger_transaction_id: nil, line_items: nil, metadata: nil, reconciliation_filters: nil, reconciliation_groups: nil, reconciliation_rule_variables: nil, remittance_information: nil, statement_descriptor: nil, type: nil)
1492
1026
  # Some parameter documentations has been truncated, see
1493
1027
  # {ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest}
1494
1028
  # for more details.
1495
1029
  #
1496
1030
  # @param amount_lower_bound [Integer, nil] The lowest amount this expected payment may be equal to. Value in specified curr
1497
1031
  #
1498
- # @param amount_upper_bound [Integer, nil] The highest amount this expected payment may be equal to. Value in specified cur
1499
- #
1500
- # @param counterparty_id [String, nil] The ID of the counterparty you expect for this payment.
1501
- #
1502
- # @param currency [Symbol, ModernTreasury::Models::Currency, nil] Must conform to ISO 4217. Defaults to the currency of the internal account.
1503
- #
1504
- # @param date_lower_bound [Date, nil] The earliest date the payment may come in. Format: yyyy-mm-dd
1505
- #
1506
- # @param date_upper_bound [Date, nil] The latest date the payment may come in. Format: yyyy-mm-dd
1507
- #
1508
- # @param description [String, nil] An optional description for internal use.
1509
- #
1510
- # @param direction [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest::Direction, nil] One of credit or debit. When you are receiving money, use credit. When you are b
1511
- #
1512
- # @param internal_account_id [String, nil] The ID of the Internal Account for the expected payment.
1513
- #
1514
- # @param ledger_transaction [ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest::LedgerTransaction] Specifies a ledger transaction object that will be created with the expected pay
1515
- #
1516
- # @param ledger_transaction_id [String] Either ledger_transaction or ledger_transaction_id can be provided. Only a pendi
1517
- #
1518
- # @param line_items [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest::LineItem>]
1519
- #
1520
- # @param metadata [Hash{Symbol=>String}] Additional data represented as key-value pairs. Both the key and value must be s
1521
- #
1522
- # @param reconciliation_filters [Object, nil] The reconciliation filters you have for this payment.
1523
- #
1524
- # @param reconciliation_groups [Object, nil] The reconciliation groups you have for this payment.
1525
- #
1526
- # @param reconciliation_rule_variables [Array<ModernTreasury::Models::ReconciliationRule>, nil] An array of reconciliation rule variables for this payment.
1527
- #
1528
- # @param remittance_information [String, nil] For `ach`, this field will be passed through on an addenda record. For `wire` pa
1529
- #
1530
- # @param statement_descriptor [String, nil] The statement description you expect to see on the transaction. For ACH payments
1531
- #
1532
- # @param type [Symbol, ModernTreasury::Models::ExpectedPaymentType, nil] One of: ach, au_becs, bacs, book, check, eft, interac, provxchange, rtp, sen, se
1533
-
1534
- # One of credit or debit. When you are receiving money, use credit. When you are
1535
- # being charged, use debit.
1536
- #
1537
- # @see ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest#direction
1538
- module Direction
1539
- extend ModernTreasury::Internal::Type::Enum
1540
-
1541
- CREDIT = :credit
1542
- DEBIT = :debit
1543
-
1544
- # @!method self.values
1545
- # @return [Array<Symbol>]
1546
- end
1547
-
1548
- # @see ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest#ledger_transaction
1549
- class LedgerTransaction < ModernTreasury::Internal::Type::BaseModel
1550
- # @!attribute ledger_entries
1551
- # An array of ledger entry objects.
1552
- #
1553
- # @return [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest::LedgerTransaction::LedgerEntry>]
1554
- required :ledger_entries,
1555
- -> do
1556
- ModernTreasury::Internal::Type::ArrayOf[
1557
- ModernTreasury::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest::LedgerTransaction::LedgerEntry
1558
- ]
1559
- end
1560
-
1561
- # @!attribute description
1562
- # An optional description for internal use.
1563
- #
1564
- # @return [String, nil]
1565
- optional :description, String, nil?: true
1566
-
1567
- # @!attribute effective_at
1568
- # The timestamp (ISO8601 format) at which the ledger transaction happened for
1569
- # reporting purposes.
1570
- #
1571
- # @return [Time, nil]
1572
- optional :effective_at, Time
1573
-
1574
- # @!attribute effective_date
1575
- # The date (YYYY-MM-DD) on which the ledger transaction happened for reporting
1576
- # purposes.
1577
- #
1578
- # @return [Date, nil]
1579
- optional :effective_date, Date
1580
-
1581
- # @!attribute external_id
1582
- # A unique string to represent the ledger transaction. Only one pending or posted
1583
- # ledger transaction may have this ID in the ledger.
1584
- #
1585
- # @return [String, nil]
1586
- optional :external_id, String
1587
-
1588
- # @!attribute ledgerable_id
1589
- # If the ledger transaction can be reconciled to another object in Modern
1590
- # Treasury, the id will be populated here, otherwise null.
1591
- #
1592
- # @return [String, nil]
1593
- optional :ledgerable_id, String
1594
-
1595
- # @!attribute ledgerable_type
1596
- # If the ledger transaction can be reconciled to another object in Modern
1597
- # Treasury, the type will be populated here, otherwise null. This can be one of
1598
- # payment_order, incoming_payment_detail, expected_payment, return, paper_item, or
1599
- # reversal.
1600
- #
1601
- # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest::LedgerTransaction::LedgerableType, nil]
1602
- optional :ledgerable_type,
1603
- enum: -> {
1604
- ModernTreasury::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest::LedgerTransaction::LedgerableType
1605
- }
1606
-
1607
- # @!attribute metadata
1608
- # Additional data represented as key-value pairs. Both the key and value must be
1609
- # strings.
1610
- #
1611
- # @return [Hash{Symbol=>String}, nil]
1612
- optional :metadata, ModernTreasury::Internal::Type::HashOf[String]
1613
-
1614
- # @!attribute status
1615
- # To post a ledger transaction at creation, use `posted`.
1616
- #
1617
- # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest::LedgerTransaction::Status, nil]
1618
- optional :status,
1619
- enum: -> {
1620
- ModernTreasury::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest::LedgerTransaction::Status
1621
- }
1622
-
1623
- # @!method initialize(ledger_entries:, description: nil, effective_at: nil, effective_date: nil, external_id: nil, ledgerable_id: nil, ledgerable_type: nil, metadata: nil, status: nil)
1624
- # Some parameter documentations has been truncated, see
1625
- # {ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest::LedgerTransaction}
1626
- # for more details.
1627
- #
1628
- # Specifies a ledger transaction object that will be created with the expected
1629
- # payment. If the ledger transaction cannot be created, then the expected payment
1630
- # creation will fail. The resulting ledger transaction will mirror the status of
1631
- # the expected payment.
1632
- #
1633
- # @param ledger_entries [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest::LedgerTransaction::LedgerEntry>] An array of ledger entry objects.
1634
- #
1635
- # @param description [String, nil] An optional description for internal use.
1636
- #
1637
- # @param effective_at [Time] The timestamp (ISO8601 format) at which the ledger transaction happened for repo
1638
- #
1639
- # @param effective_date [Date] The date (YYYY-MM-DD) on which the ledger transaction happened for reporting pur
1640
- #
1641
- # @param external_id [String] A unique string to represent the ledger transaction. Only one pending or posted
1642
- #
1643
- # @param ledgerable_id [String] If the ledger transaction can be reconciled to another object in Modern Treasury
1644
- #
1645
- # @param ledgerable_type [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest::LedgerTransaction::LedgerableType] If the ledger transaction can be reconciled to another object in Modern Treasury
1646
- #
1647
- # @param metadata [Hash{Symbol=>String}] Additional data represented as key-value pairs. Both the key and value must be s
1648
- #
1649
- # @param status [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest::LedgerTransaction::Status] To post a ledger transaction at creation, use `posted`.
1650
-
1651
- class LedgerEntry < ModernTreasury::Internal::Type::BaseModel
1652
- # @!attribute amount
1653
- # Value in specified currency's smallest unit. e.g. $10 would be represented
1654
- # as 1000. Can be any integer up to 36 digits.
1655
- #
1656
- # @return [Integer]
1657
- required :amount, Integer
1658
-
1659
- # @!attribute direction
1660
- # One of `credit`, `debit`. Describes the direction money is flowing in the
1661
- # transaction. A `credit` moves money from your account to someone else's. A
1662
- # `debit` pulls money from someone else's account to your own. Note that wire,
1663
- # rtp, and check payments will always be `credit`.
1664
- #
1665
- # @return [Symbol, ModernTreasury::Models::TransactionDirection]
1666
- required :direction, enum: -> { ModernTreasury::TransactionDirection }
1667
-
1668
- # @!attribute ledger_account_id
1669
- # The ledger account that this ledger entry is associated with.
1670
- #
1671
- # @return [String]
1672
- required :ledger_account_id, String
1673
-
1674
- # @!attribute available_balance_amount
1675
- # Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
1676
- # account’s available balance. If any of these conditions would be false after the
1677
- # transaction is created, the entire call will fail with error code 422.
1678
- #
1679
- # @return [Hash{Symbol=>Integer}, nil]
1680
- optional :available_balance_amount, ModernTreasury::Internal::Type::HashOf[Integer], nil?: true
1681
-
1682
- # @!attribute lock_version
1683
- # Lock version of the ledger account. This can be passed when creating a ledger
1684
- # transaction to only succeed if no ledger transactions have posted since the
1685
- # given version. See our post about Designing the Ledgers API with Optimistic
1686
- # Locking for more details.
1687
- #
1688
- # @return [Integer, nil]
1689
- optional :lock_version, Integer, nil?: true
1690
-
1691
- # @!attribute metadata
1692
- # Additional data represented as key-value pairs. Both the key and value must be
1693
- # strings.
1694
- #
1695
- # @return [Hash{Symbol=>String}, nil]
1696
- optional :metadata, ModernTreasury::Internal::Type::HashOf[String]
1697
-
1698
- # @!attribute pending_balance_amount
1699
- # Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
1700
- # account’s pending balance. If any of these conditions would be false after the
1701
- # transaction is created, the entire call will fail with error code 422.
1702
- #
1703
- # @return [Hash{Symbol=>Integer}, nil]
1704
- optional :pending_balance_amount, ModernTreasury::Internal::Type::HashOf[Integer], nil?: true
1705
-
1706
- # @!attribute posted_balance_amount
1707
- # Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
1708
- # account’s posted balance. If any of these conditions would be false after the
1709
- # transaction is created, the entire call will fail with error code 422.
1710
- #
1711
- # @return [Hash{Symbol=>Integer}, nil]
1712
- optional :posted_balance_amount, ModernTreasury::Internal::Type::HashOf[Integer], nil?: true
1713
-
1714
- # @!attribute show_resulting_ledger_account_balances
1715
- # If true, response will include the balance of the associated ledger account for
1716
- # the entry.
1717
- #
1718
- # @return [Boolean, nil]
1719
- optional :show_resulting_ledger_account_balances,
1720
- ModernTreasury::Internal::Type::Boolean,
1721
- nil?: true
1722
-
1723
- # @!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)
1724
- # Some parameter documentations has been truncated, see
1725
- # {ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest::LedgerTransaction::LedgerEntry}
1726
- # for more details.
1727
- #
1728
- # @param amount [Integer] Value in specified currency's smallest unit. e.g. $10 would be represented as 10
1729
- #
1730
- # @param direction [Symbol, ModernTreasury::Models::TransactionDirection] One of `credit`, `debit`. Describes the direction money is flowing in the transa
1731
- #
1732
- # @param ledger_account_id [String] The ledger account that this ledger entry is associated with.
1733
- #
1734
- # @param available_balance_amount [Hash{Symbol=>Integer}, nil] Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the accou
1735
- #
1736
- # @param lock_version [Integer, nil] Lock version of the ledger account. This can be passed when creating a ledger tr
1737
- #
1738
- # @param metadata [Hash{Symbol=>String}] Additional data represented as key-value pairs. Both the key and value must be s
1739
- #
1740
- # @param pending_balance_amount [Hash{Symbol=>Integer}, nil] Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the accou
1741
- #
1742
- # @param posted_balance_amount [Hash{Symbol=>Integer}, nil] Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the accou
1743
- #
1744
- # @param show_resulting_ledger_account_balances [Boolean, nil] If true, response will include the balance of the associated ledger account for
1745
- end
1746
-
1747
- # If the ledger transaction can be reconciled to another object in Modern
1748
- # Treasury, the type will be populated here, otherwise null. This can be one of
1749
- # payment_order, incoming_payment_detail, expected_payment, return, paper_item, or
1750
- # reversal.
1751
- #
1752
- # @see ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest::LedgerTransaction#ledgerable_type
1753
- module LedgerableType
1754
- extend ModernTreasury::Internal::Type::Enum
1755
-
1756
- EXPECTED_PAYMENT = :expected_payment
1757
- INCOMING_PAYMENT_DETAIL = :incoming_payment_detail
1758
- PAPER_ITEM = :paper_item
1759
- PAYMENT_ORDER = :payment_order
1760
- RETURN = :return
1761
- REVERSAL = :reversal
1762
-
1763
- # @!method self.values
1764
- # @return [Array<Symbol>]
1765
- end
1766
-
1767
- # To post a ledger transaction at creation, use `posted`.
1768
- #
1769
- # @see ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest::LedgerTransaction#status
1770
- module Status
1771
- extend ModernTreasury::Internal::Type::Enum
1772
-
1773
- ARCHIVED = :archived
1774
- PENDING = :pending
1775
- POSTED = :posted
1776
-
1777
- # @!method self.values
1778
- # @return [Array<Symbol>]
1779
- end
1780
- end
1781
-
1782
- class LineItem < ModernTreasury::Internal::Type::BaseModel
1783
- # @!attribute amount
1784
- # Value in specified currency's smallest unit. e.g. $10 would be represented
1785
- # as 1000.
1786
- #
1787
- # @return [Integer]
1788
- required :amount, Integer
1789
-
1790
- # @!attribute accounting_category_id
1791
- # The ID of one of your accounting categories. Note that these will only be
1792
- # accessible if your accounting system has been connected.
1793
- #
1794
- # @return [String, nil]
1795
- optional :accounting_category_id, String, nil?: true
1796
-
1797
- # @!attribute description
1798
- # A free-form description of the line item.
1799
- #
1800
- # @return [String, nil]
1801
- optional :description, String, nil?: true
1802
-
1803
- # @!attribute metadata
1804
- # Additional data represented as key-value pairs. Both the key and value must be
1805
- # strings.
1806
- #
1807
- # @return [Hash{Symbol=>String}, nil]
1808
- optional :metadata, ModernTreasury::Internal::Type::HashOf[String]
1809
-
1810
- # @!method initialize(amount:, accounting_category_id: nil, description: nil, metadata: nil)
1811
- # Some parameter documentations has been truncated, see
1812
- # {ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest::LineItem}
1813
- # for more details.
1814
- #
1815
- # @param amount [Integer] Value in specified currency's smallest unit. e.g. $10 would be represented as 10
1816
- #
1817
- # @param accounting_category_id [String, nil] The ID of one of your accounting categories. Note that these will only be access
1818
- #
1819
- # @param description [String, nil] A free-form description of the line item.
1820
- #
1821
- # @param metadata [Hash{Symbol=>String}] Additional data represented as key-value pairs. Both the key and value must be s
1822
- end
1823
- end
1824
-
1825
- class LedgerTransactionCreateRequest < ModernTreasury::Internal::Type::BaseModel
1826
- # @!attribute ledger_entries
1827
- # An array of ledger entry objects.
1828
- #
1829
- # @return [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionCreateRequest::LedgerEntry>]
1830
- required :ledger_entries,
1831
- -> {
1832
- ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::BulkRequestCreateParams::Resource::LedgerTransactionCreateRequest::LedgerEntry]
1833
- }
1834
-
1835
- # @!attribute description
1836
- # An optional description for internal use.
1837
- #
1838
- # @return [String, nil]
1839
- optional :description, String, nil?: true
1840
-
1841
- # @!attribute effective_at
1842
- # The timestamp (ISO8601 format) at which the ledger transaction happened for
1843
- # reporting purposes.
1844
- #
1845
- # @return [Time, nil]
1846
- optional :effective_at, Time
1847
-
1848
- # @!attribute effective_date
1849
- # The date (YYYY-MM-DD) on which the ledger transaction happened for reporting
1850
- # purposes.
1851
- #
1852
- # @return [Date, nil]
1853
- optional :effective_date, Date
1854
-
1855
- # @!attribute external_id
1856
- # A unique string to represent the ledger transaction. Only one pending or posted
1857
- # ledger transaction may have this ID in the ledger.
1858
- #
1859
- # @return [String, nil]
1860
- optional :external_id, String
1861
-
1862
- # @!attribute ledgerable_id
1863
- # If the ledger transaction can be reconciled to another object in Modern
1864
- # Treasury, the id will be populated here, otherwise null.
1865
- #
1866
- # @return [String, nil]
1867
- optional :ledgerable_id, String
1868
-
1869
- # @!attribute ledgerable_type
1870
- # If the ledger transaction can be reconciled to another object in Modern
1871
- # Treasury, the type will be populated here, otherwise null. This can be one of
1872
- # payment_order, incoming_payment_detail, expected_payment, return, paper_item, or
1873
- # reversal.
1874
- #
1875
- # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionCreateRequest::LedgerableType, nil]
1876
- optional :ledgerable_type,
1877
- enum: -> {
1878
- ModernTreasury::BulkRequestCreateParams::Resource::LedgerTransactionCreateRequest::LedgerableType
1879
- }
1880
-
1881
- # @!attribute metadata
1882
- # Additional data represented as key-value pairs. Both the key and value must be
1883
- # strings.
1884
- #
1885
- # @return [Hash{Symbol=>String}, nil]
1886
- optional :metadata, ModernTreasury::Internal::Type::HashOf[String]
1887
-
1888
- # @!attribute status
1889
- # To post a ledger transaction at creation, use `posted`.
1890
- #
1891
- # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionCreateRequest::Status, nil]
1892
- optional :status,
1893
- enum: -> {
1894
- ModernTreasury::BulkRequestCreateParams::Resource::LedgerTransactionCreateRequest::Status
1895
- }
1896
-
1897
- # @!method initialize(ledger_entries:, description: nil, effective_at: nil, effective_date: nil, external_id: nil, ledgerable_id: nil, ledgerable_type: nil, metadata: nil, status: nil)
1898
- # Some parameter documentations has been truncated, see
1899
- # {ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionCreateRequest}
1900
- # for more details.
1901
- #
1902
- # @param ledger_entries [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionCreateRequest::LedgerEntry>] An array of ledger entry objects.
1903
- #
1904
- # @param description [String, nil] An optional description for internal use.
1905
- #
1906
- # @param effective_at [Time] The timestamp (ISO8601 format) at which the ledger transaction happened for repo
1907
- #
1908
- # @param effective_date [Date] The date (YYYY-MM-DD) on which the ledger transaction happened for reporting pur
1909
- #
1910
- # @param external_id [String] A unique string to represent the ledger transaction. Only one pending or posted
1911
- #
1912
- # @param ledgerable_id [String] If the ledger transaction can be reconciled to another object in Modern Treasury
1913
- #
1914
- # @param ledgerable_type [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionCreateRequest::LedgerableType] If the ledger transaction can be reconciled to another object in Modern Treasury
1915
- #
1916
- # @param metadata [Hash{Symbol=>String}] Additional data represented as key-value pairs. Both the key and value must be s
1917
- #
1918
- # @param status [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionCreateRequest::Status] To post a ledger transaction at creation, use `posted`.
1919
-
1920
- class LedgerEntry < ModernTreasury::Internal::Type::BaseModel
1921
- # @!attribute amount
1922
- # Value in specified currency's smallest unit. e.g. $10 would be represented
1923
- # as 1000. Can be any integer up to 36 digits.
1924
- #
1925
- # @return [Integer]
1926
- required :amount, Integer
1927
-
1928
- # @!attribute direction
1929
- # One of `credit`, `debit`. Describes the direction money is flowing in the
1930
- # transaction. A `credit` moves money from your account to someone else's. A
1931
- # `debit` pulls money from someone else's account to your own. Note that wire,
1932
- # rtp, and check payments will always be `credit`.
1933
- #
1934
- # @return [Symbol, ModernTreasury::Models::TransactionDirection]
1935
- required :direction, enum: -> { ModernTreasury::TransactionDirection }
1936
-
1937
- # @!attribute ledger_account_id
1938
- # The ledger account that this ledger entry is associated with.
1939
- #
1940
- # @return [String]
1941
- required :ledger_account_id, String
1942
-
1943
- # @!attribute available_balance_amount
1944
- # Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
1945
- # account’s available balance. If any of these conditions would be false after the
1946
- # transaction is created, the entire call will fail with error code 422.
1947
- #
1948
- # @return [Hash{Symbol=>Integer}, nil]
1949
- optional :available_balance_amount, ModernTreasury::Internal::Type::HashOf[Integer], nil?: true
1950
-
1951
- # @!attribute lock_version
1952
- # Lock version of the ledger account. This can be passed when creating a ledger
1953
- # transaction to only succeed if no ledger transactions have posted since the
1954
- # given version. See our post about Designing the Ledgers API with Optimistic
1955
- # Locking for more details.
1956
- #
1957
- # @return [Integer, nil]
1958
- optional :lock_version, Integer, nil?: true
1959
-
1960
- # @!attribute metadata
1961
- # Additional data represented as key-value pairs. Both the key and value must be
1962
- # strings.
1963
- #
1964
- # @return [Hash{Symbol=>String}, nil]
1965
- optional :metadata, ModernTreasury::Internal::Type::HashOf[String]
1966
-
1967
- # @!attribute pending_balance_amount
1968
- # Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
1969
- # account’s pending balance. If any of these conditions would be false after the
1970
- # transaction is created, the entire call will fail with error code 422.
1971
- #
1972
- # @return [Hash{Symbol=>Integer}, nil]
1973
- optional :pending_balance_amount, ModernTreasury::Internal::Type::HashOf[Integer], nil?: true
1974
-
1975
- # @!attribute posted_balance_amount
1976
- # Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
1977
- # account’s posted balance. If any of these conditions would be false after the
1978
- # transaction is created, the entire call will fail with error code 422.
1979
- #
1980
- # @return [Hash{Symbol=>Integer}, nil]
1981
- optional :posted_balance_amount, ModernTreasury::Internal::Type::HashOf[Integer], nil?: true
1982
-
1983
- # @!attribute show_resulting_ledger_account_balances
1984
- # If true, response will include the balance of the associated ledger account for
1985
- # the entry.
1986
- #
1987
- # @return [Boolean, nil]
1988
- optional :show_resulting_ledger_account_balances,
1989
- ModernTreasury::Internal::Type::Boolean,
1990
- nil?: true
1991
-
1992
- # @!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)
1993
- # Some parameter documentations has been truncated, see
1994
- # {ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionCreateRequest::LedgerEntry}
1995
- # for more details.
1996
- #
1997
- # @param amount [Integer] Value in specified currency's smallest unit. e.g. $10 would be represented as 10
1998
- #
1999
- # @param direction [Symbol, ModernTreasury::Models::TransactionDirection] One of `credit`, `debit`. Describes the direction money is flowing in the transa
2000
- #
2001
- # @param ledger_account_id [String] The ledger account that this ledger entry is associated with.
2002
- #
2003
- # @param available_balance_amount [Hash{Symbol=>Integer}, nil] Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the accou
2004
- #
2005
- # @param lock_version [Integer, nil] Lock version of the ledger account. This can be passed when creating a ledger tr
2006
- #
2007
- # @param metadata [Hash{Symbol=>String}] Additional data represented as key-value pairs. Both the key and value must be s
2008
- #
2009
- # @param pending_balance_amount [Hash{Symbol=>Integer}, nil] Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the accou
2010
- #
2011
- # @param posted_balance_amount [Hash{Symbol=>Integer}, nil] Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the accou
2012
- #
2013
- # @param show_resulting_ledger_account_balances [Boolean, nil] If true, response will include the balance of the associated ledger account for
2014
- end
2015
-
2016
- # If the ledger transaction can be reconciled to another object in Modern
2017
- # Treasury, the type will be populated here, otherwise null. This can be one of
2018
- # payment_order, incoming_payment_detail, expected_payment, return, paper_item, or
2019
- # reversal.
2020
- #
2021
- # @see ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionCreateRequest#ledgerable_type
2022
- module LedgerableType
2023
- extend ModernTreasury::Internal::Type::Enum
2024
-
2025
- EXPECTED_PAYMENT = :expected_payment
2026
- INCOMING_PAYMENT_DETAIL = :incoming_payment_detail
2027
- PAPER_ITEM = :paper_item
2028
- PAYMENT_ORDER = :payment_order
2029
- RETURN = :return
2030
- REVERSAL = :reversal
2031
-
2032
- # @!method self.values
2033
- # @return [Array<Symbol>]
2034
- end
2035
-
2036
- # To post a ledger transaction at creation, use `posted`.
2037
- #
2038
- # @see ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionCreateRequest#status
2039
- module Status
2040
- extend ModernTreasury::Internal::Type::Enum
2041
-
2042
- ARCHIVED = :archived
2043
- PENDING = :pending
2044
- POSTED = :posted
2045
-
2046
- # @!method self.values
2047
- # @return [Array<Symbol>]
2048
- end
2049
- end
2050
-
2051
- class LedgerAccountCreateRequest < ModernTreasury::Internal::Type::BaseModel
2052
- # @!attribute currency
2053
- # The currency of the ledger account.
2054
- #
2055
- # @return [String]
2056
- required :currency, String
2057
-
2058
- # @!attribute ledger_id
2059
- # The id of the ledger that this account belongs to.
2060
- #
2061
- # @return [String]
2062
- required :ledger_id, String
2063
-
2064
- # @!attribute name
2065
- # The name of the ledger account.
1032
+ # @param amount_upper_bound [Integer, nil] The highest amount this expected payment may be equal to. Value in specified cur
2066
1033
  #
2067
- # @return [String]
2068
- required :name, String
2069
-
2070
- # @!attribute normal_balance
2071
- # The normal balance of the ledger account.
1034
+ # @param counterparty_id [String, nil] The ID of the counterparty you expect for this payment.
2072
1035
  #
2073
- # @return [Symbol, ModernTreasury::Models::TransactionDirection]
2074
- required :normal_balance, enum: -> { ModernTreasury::TransactionDirection }
2075
-
2076
- # @!attribute currency_exponent
2077
- # The currency exponent of the ledger account.
1036
+ # @param currency [Symbol, ModernTreasury::Models::Currency, nil] Must conform to ISO 4217. Defaults to the currency of the internal account.
2078
1037
  #
2079
- # @return [Integer, nil]
2080
- optional :currency_exponent, Integer, nil?: true
2081
-
2082
- # @!attribute description
2083
- # The description of the ledger account.
1038
+ # @param date_lower_bound [Date, nil] The earliest date the payment may come in. Format: yyyy-mm-dd
2084
1039
  #
2085
- # @return [String, nil]
2086
- optional :description, String, nil?: true
2087
-
2088
- # @!attribute ledger_account_category_ids
2089
- # The array of ledger account category ids that this ledger account should be a
2090
- # child of.
1040
+ # @param date_upper_bound [Date, nil] The latest date the payment may come in. Format: yyyy-mm-dd
2091
1041
  #
2092
- # @return [Array<String>, nil]
2093
- optional :ledger_account_category_ids, ModernTreasury::Internal::Type::ArrayOf[String]
2094
-
2095
- # @!attribute ledgerable_id
2096
- # If the ledger account links to another object in Modern Treasury, the id will be
2097
- # populated here, otherwise null.
1042
+ # @param description [String, nil] An optional description for internal use.
2098
1043
  #
2099
- # @return [String, nil]
2100
- optional :ledgerable_id, String
2101
-
2102
- # @!attribute ledgerable_type
2103
- # If the ledger account links to another object in Modern Treasury, the type will
2104
- # be populated here, otherwise null. The value is one of internal_account or
2105
- # external_account.
1044
+ # @param direction [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest::Direction, nil] One of credit or debit. When you are receiving money, use credit. When you are b
2106
1045
  #
2107
- # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerAccountCreateRequest::LedgerableType, nil]
2108
- optional :ledgerable_type,
2109
- enum: -> {
2110
- ModernTreasury::BulkRequestCreateParams::Resource::LedgerAccountCreateRequest::LedgerableType
2111
- }
2112
-
2113
- # @!attribute metadata
2114
- # Additional data represented as key-value pairs. Both the key and value must be
2115
- # strings.
1046
+ # @param external_id [String, nil] An optional user-defined 180 character unique identifier.
2116
1047
  #
2117
- # @return [Hash{Symbol=>String}, nil]
2118
- optional :metadata, ModernTreasury::Internal::Type::HashOf[String]
2119
-
2120
- # @!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)
2121
- # Some parameter documentations has been truncated, see
2122
- # {ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerAccountCreateRequest}
2123
- # for more details.
1048
+ # @param internal_account_id [String, nil] The ID of the Internal Account for the expected payment.
2124
1049
  #
2125
- # @param currency [String] The currency of the ledger account.
1050
+ # @param ledger_transaction [ModernTreasury::Models::LedgerTransactionCreateRequest] Specifies a ledger transaction object that will be created with the expected pay
2126
1051
  #
2127
- # @param ledger_id [String] The id of the ledger that this account belongs to.
1052
+ # @param ledger_transaction_id [String] Either ledger_transaction or ledger_transaction_id can be provided. Only a pendi
2128
1053
  #
2129
- # @param name [String] The name of the ledger account.
1054
+ # @param line_items [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest::LineItem>]
2130
1055
  #
2131
- # @param normal_balance [Symbol, ModernTreasury::Models::TransactionDirection] The normal balance of the ledger account.
1056
+ # @param metadata [Hash{Symbol=>String}] Additional data represented as key-value pairs. Both the key and value must be s
2132
1057
  #
2133
- # @param currency_exponent [Integer, nil] The currency exponent of the ledger account.
1058
+ # @param reconciliation_filters [Object, nil] The reconciliation filters you have for this payment.
2134
1059
  #
2135
- # @param description [String, nil] The description of the ledger account.
1060
+ # @param reconciliation_groups [Object, nil] The reconciliation groups you have for this payment.
2136
1061
  #
2137
- # @param ledger_account_category_ids [Array<String>] The array of ledger account category ids that this ledger account should be a ch
1062
+ # @param reconciliation_rule_variables [Array<ModernTreasury::Models::ReconciliationRule>, nil] An array of reconciliation rule variables for this payment.
2138
1063
  #
2139
- # @param ledgerable_id [String] If the ledger account links to another object in Modern Treasury, the id will be
1064
+ # @param remittance_information [String, nil] For `ach`, this field will be passed through on an addenda record. For `wire` pa
2140
1065
  #
2141
- # @param ledgerable_type [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerAccountCreateRequest::LedgerableType] If the ledger account links to another object in Modern Treasury, the type will
1066
+ # @param statement_descriptor [String, nil] The statement description you expect to see on the transaction. For ACH payments
2142
1067
  #
2143
- # @param metadata [Hash{Symbol=>String}] Additional data represented as key-value pairs. Both the key and value must be s
1068
+ # @param type [Symbol, ModernTreasury::Models::ExpectedPaymentType, nil] One of: ach, au_becs, bacs, book, check, eft, interac, provxchange, rtp, sen, se
2144
1069
 
2145
- # If the ledger account links to another object in Modern Treasury, the type will
2146
- # be populated here, otherwise null. The value is one of internal_account or
2147
- # external_account.
1070
+ # One of credit or debit. When you are receiving money, use credit. When you are
1071
+ # being charged, use debit.
2148
1072
  #
2149
- # @see ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerAccountCreateRequest#ledgerable_type
2150
- module LedgerableType
1073
+ # @see ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest#direction
1074
+ module Direction
2151
1075
  extend ModernTreasury::Internal::Type::Enum
2152
1076
 
2153
- COUNTERPARTY = :counterparty
2154
- EXTERNAL_ACCOUNT = :external_account
2155
- INTERNAL_ACCOUNT = :internal_account
2156
- VIRTUAL_ACCOUNT = :virtual_account
1077
+ CREDIT = :credit
1078
+ DEBIT = :debit
2157
1079
 
2158
1080
  # @!method self.values
2159
1081
  # @return [Array<Symbol>]
2160
1082
  end
1083
+
1084
+ class LineItem < ModernTreasury::Internal::Type::BaseModel
1085
+ # @!attribute amount
1086
+ # Value in specified currency's smallest unit. e.g. $10 would be represented
1087
+ # as 1000.
1088
+ #
1089
+ # @return [Integer]
1090
+ required :amount, Integer
1091
+
1092
+ # @!attribute accounting_category_id
1093
+ # The ID of one of your accounting categories. Note that these will only be
1094
+ # accessible if your accounting system has been connected.
1095
+ #
1096
+ # @return [String, nil]
1097
+ optional :accounting_category_id, String, nil?: true
1098
+
1099
+ # @!attribute description
1100
+ # A free-form description of the line item.
1101
+ #
1102
+ # @return [String, nil]
1103
+ optional :description, String, nil?: true
1104
+
1105
+ # @!attribute metadata
1106
+ # Additional data represented as key-value pairs. Both the key and value must be
1107
+ # strings.
1108
+ #
1109
+ # @return [Hash{Symbol=>String}, nil]
1110
+ optional :metadata, ModernTreasury::Internal::Type::HashOf[String]
1111
+
1112
+ # @!method initialize(amount:, accounting_category_id: nil, description: nil, metadata: nil)
1113
+ # Some parameter documentations has been truncated, see
1114
+ # {ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest::LineItem}
1115
+ # for more details.
1116
+ #
1117
+ # @param amount [Integer] Value in specified currency's smallest unit. e.g. $10 would be represented as 10
1118
+ #
1119
+ # @param accounting_category_id [String, nil] The ID of one of your accounting categories. Note that these will only be access
1120
+ #
1121
+ # @param description [String, nil] A free-form description of the line item.
1122
+ #
1123
+ # @param metadata [Hash{Symbol=>String}] Additional data represented as key-value pairs. Both the key and value must be s
1124
+ end
2161
1125
  end
2162
1126
 
2163
1127
  class TransactionCreateRequest < ModernTreasury::Internal::Type::BaseModel
@@ -2332,11 +1296,8 @@ module ModernTreasury
2332
1296
 
2333
1297
  # @!attribute accounting
2334
1298
  #
2335
- # @return [ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::Accounting, nil]
2336
- optional :accounting,
2337
- -> {
2338
- ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::Accounting
2339
- }
1299
+ # @return [ModernTreasury::Models::Accounting, nil]
1300
+ optional :accounting, -> { ModernTreasury::Accounting }
2340
1301
 
2341
1302
  # @!attribute accounting_category_id
2342
1303
  # @deprecated
@@ -2628,7 +1589,7 @@ module ModernTreasury
2628
1589
  #
2629
1590
  # @param id [String]
2630
1591
  #
2631
- # @param accounting [ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::Accounting]
1592
+ # @param accounting [ModernTreasury::Models::Accounting]
2632
1593
  #
2633
1594
  # @param accounting_category_id [String, nil] The ID of one of your accounting categories. Note that these will only be access
2634
1595
  #
@@ -2696,33 +1657,6 @@ module ModernTreasury
2696
1657
  #
2697
1658
  # @param ultimate_receiving_party_name [String, nil] This represents the identifier by which the merchant is known to the person init
2698
1659
 
2699
- # @see ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID#accounting
2700
- class Accounting < ModernTreasury::Internal::Type::BaseModel
2701
- # @!attribute account_id
2702
- # The ID of one of your accounting categories. Note that these will only be
2703
- # accessible if your accounting system has been connected.
2704
- #
2705
- # @return [String, nil]
2706
- optional :account_id, String, nil?: true
2707
-
2708
- # @!attribute class_id
2709
- # The ID of one of the class objects in your accounting system. Class objects
2710
- # track segments of your business independent of client or project. Note that
2711
- # these will only be accessible if your accounting system has been connected.
2712
- #
2713
- # @return [String, nil]
2714
- optional :class_id, String, nil?: true
2715
-
2716
- # @!method initialize(account_id: nil, class_id: nil)
2717
- # Some parameter documentations has been truncated, see
2718
- # {ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::Accounting}
2719
- # for more details.
2720
- #
2721
- # @param account_id [String, nil] The ID of one of your accounting categories. Note that these will only be access
2722
- #
2723
- # @param class_id [String, nil] The ID of one of the class objects in your accounting system. Class objects trac
2724
- end
2725
-
2726
1660
  # The party that will pay the fees for the payment order. See
2727
1661
  # https://docs.moderntreasury.com/payments/docs/charge-bearer to understand the
2728
1662
  # differences between the options.
@@ -2861,13 +1795,17 @@ module ModernTreasury
2861
1795
 
2862
1796
  # @!attribute contact_details
2863
1797
  #
2864
- # @return [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::ContactDetail>, nil]
1798
+ # @return [Array<ModernTreasury::Models::ContactDetailCreateRequest>, nil]
2865
1799
  optional :contact_details,
2866
- -> do
2867
- ModernTreasury::Internal::Type::ArrayOf[
2868
- ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::ContactDetail
2869
- ]
2870
- end
1800
+ -> {
1801
+ ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::ContactDetailCreateRequest]
1802
+ }
1803
+
1804
+ # @!attribute external_id
1805
+ # An optional user-defined 180 character unique identifier.
1806
+ #
1807
+ # @return [String, nil]
1808
+ optional :external_id, String, nil?: true
2871
1809
 
2872
1810
  # @!attribute ledger_account
2873
1811
  # Specifies a ledger account object that will be created with the external
@@ -2876,11 +1814,8 @@ module ModernTreasury
2876
1814
  # https://docs.moderntreasury.com/docs/linking-to-other-modern-treasury-objects
2877
1815
  # for more details.
2878
1816
  #
2879
- # @return [ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::LedgerAccount, nil]
2880
- optional :ledger_account,
2881
- -> {
2882
- ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::LedgerAccount
2883
- }
1817
+ # @return [ModernTreasury::Models::LedgerAccountCreateRequest, nil]
1818
+ optional :ledger_account, -> { ModernTreasury::LedgerAccountCreateRequest }
2884
1819
 
2885
1820
  # @!attribute metadata
2886
1821
  # Additional data represented as key-value pairs. Both the key and value must be
@@ -2899,11 +1834,8 @@ module ModernTreasury
2899
1834
  # @!attribute party_address
2900
1835
  # Required if receiving wire payments.
2901
1836
  #
2902
- # @return [ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::PartyAddress, nil]
2903
- optional :party_address,
2904
- -> {
2905
- ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::PartyAddress
2906
- }
1837
+ # @return [ModernTreasury::Models::AddressRequest, nil]
1838
+ optional :party_address, -> { ModernTreasury::AddressRequest }
2907
1839
 
2908
1840
  # @!attribute party_identifier
2909
1841
  #
@@ -2943,7 +1875,7 @@ module ModernTreasury
2943
1875
  ]
2944
1876
  end
2945
1877
 
2946
- # @!method initialize(account_details: nil, account_type: nil, contact_details: nil, ledger_account: nil, metadata: nil, name: nil, party_address: nil, party_identifier: nil, party_name: nil, party_type: nil, plaid_processor_token: nil, routing_details: nil)
1878
+ # @!method initialize(account_details: nil, account_type: nil, contact_details: nil, external_id: nil, ledger_account: nil, metadata: nil, name: nil, party_address: nil, party_identifier: nil, party_name: nil, party_type: nil, plaid_processor_token: nil, routing_details: nil)
2947
1879
  # Some parameter documentations has been truncated, see
2948
1880
  # {ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount}
2949
1881
  # for more details.
@@ -2956,15 +1888,17 @@ module ModernTreasury
2956
1888
  #
2957
1889
  # @param account_type [Symbol, ModernTreasury::Models::ExternalAccountType] Can be `checking`, `savings` or `other`.
2958
1890
  #
2959
- # @param contact_details [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::ContactDetail>]
1891
+ # @param contact_details [Array<ModernTreasury::Models::ContactDetailCreateRequest>]
2960
1892
  #
2961
- # @param ledger_account [ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::LedgerAccount] Specifies a ledger account object that will be created with the external account
1893
+ # @param external_id [String, nil] An optional user-defined 180 character unique identifier.
1894
+ #
1895
+ # @param ledger_account [ModernTreasury::Models::LedgerAccountCreateRequest] Specifies a ledger account object that will be created with the external account
2962
1896
  #
2963
1897
  # @param metadata [Hash{Symbol=>String}] Additional data represented as key-value pairs. Both the key and value must be s
2964
1898
  #
2965
1899
  # @param name [String, nil] A nickname for the external account. This is only for internal usage and won't a
2966
1900
  #
2967
- # @param party_address [ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::PartyAddress] Required if receiving wire payments.
1901
+ # @param party_address [ModernTreasury::Models::AddressRequest] Required if receiving wire payments.
2968
1902
  #
2969
1903
  # @param party_identifier [String]
2970
1904
  #
@@ -3018,208 +1952,6 @@ module ModernTreasury
3018
1952
  end
3019
1953
  end
3020
1954
 
3021
- class ContactDetail < ModernTreasury::Internal::Type::BaseModel
3022
- # @!attribute contact_identifier
3023
- #
3024
- # @return [String, nil]
3025
- optional :contact_identifier, String
3026
-
3027
- # @!attribute contact_identifier_type
3028
- #
3029
- # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::ContactDetail::ContactIdentifierType, nil]
3030
- optional :contact_identifier_type,
3031
- enum: -> {
3032
- ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::ContactDetail::ContactIdentifierType
3033
- }
3034
-
3035
- # @!method initialize(contact_identifier: nil, contact_identifier_type: nil)
3036
- # @param contact_identifier [String]
3037
- # @param contact_identifier_type [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::ContactDetail::ContactIdentifierType]
3038
-
3039
- # @see ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::ContactDetail#contact_identifier_type
3040
- module ContactIdentifierType
3041
- extend ModernTreasury::Internal::Type::Enum
3042
-
3043
- EMAIL = :email
3044
- PHONE_NUMBER = :phone_number
3045
- WEBSITE = :website
3046
-
3047
- # @!method self.values
3048
- # @return [Array<Symbol>]
3049
- end
3050
- end
3051
-
3052
- # @see ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount#ledger_account
3053
- class LedgerAccount < ModernTreasury::Internal::Type::BaseModel
3054
- # @!attribute currency
3055
- # The currency of the ledger account.
3056
- #
3057
- # @return [String]
3058
- required :currency, String
3059
-
3060
- # @!attribute ledger_id
3061
- # The id of the ledger that this account belongs to.
3062
- #
3063
- # @return [String]
3064
- required :ledger_id, String
3065
-
3066
- # @!attribute name
3067
- # The name of the ledger account.
3068
- #
3069
- # @return [String]
3070
- required :name, String
3071
-
3072
- # @!attribute normal_balance
3073
- # The normal balance of the ledger account.
3074
- #
3075
- # @return [Symbol, ModernTreasury::Models::TransactionDirection]
3076
- required :normal_balance, enum: -> { ModernTreasury::TransactionDirection }
3077
-
3078
- # @!attribute currency_exponent
3079
- # The currency exponent of the ledger account.
3080
- #
3081
- # @return [Integer, nil]
3082
- optional :currency_exponent, Integer, nil?: true
3083
-
3084
- # @!attribute description
3085
- # The description of the ledger account.
3086
- #
3087
- # @return [String, nil]
3088
- optional :description, String, nil?: true
3089
-
3090
- # @!attribute ledger_account_category_ids
3091
- # The array of ledger account category ids that this ledger account should be a
3092
- # child of.
3093
- #
3094
- # @return [Array<String>, nil]
3095
- optional :ledger_account_category_ids, ModernTreasury::Internal::Type::ArrayOf[String]
3096
-
3097
- # @!attribute ledgerable_id
3098
- # If the ledger account links to another object in Modern Treasury, the id will be
3099
- # populated here, otherwise null.
3100
- #
3101
- # @return [String, nil]
3102
- optional :ledgerable_id, String
3103
-
3104
- # @!attribute ledgerable_type
3105
- # If the ledger account links to another object in Modern Treasury, the type will
3106
- # be populated here, otherwise null. The value is one of internal_account or
3107
- # external_account.
3108
- #
3109
- # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::LedgerAccount::LedgerableType, nil]
3110
- optional :ledgerable_type,
3111
- enum: -> {
3112
- ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::LedgerAccount::LedgerableType
3113
- }
3114
-
3115
- # @!attribute metadata
3116
- # Additional data represented as key-value pairs. Both the key and value must be
3117
- # strings.
3118
- #
3119
- # @return [Hash{Symbol=>String}, nil]
3120
- optional :metadata, ModernTreasury::Internal::Type::HashOf[String]
3121
-
3122
- # @!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)
3123
- # Some parameter documentations has been truncated, see
3124
- # {ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::LedgerAccount}
3125
- # for more details.
3126
- #
3127
- # Specifies a ledger account object that will be created with the external
3128
- # account. The resulting ledger account is linked to the external account for
3129
- # auto-ledgering Payment objects. See
3130
- # https://docs.moderntreasury.com/docs/linking-to-other-modern-treasury-objects
3131
- # for more details.
3132
- #
3133
- # @param currency [String] The currency of the ledger account.
3134
- #
3135
- # @param ledger_id [String] The id of the ledger that this account belongs to.
3136
- #
3137
- # @param name [String] The name of the ledger account.
3138
- #
3139
- # @param normal_balance [Symbol, ModernTreasury::Models::TransactionDirection] The normal balance of the ledger account.
3140
- #
3141
- # @param currency_exponent [Integer, nil] The currency exponent of the ledger account.
3142
- #
3143
- # @param description [String, nil] The description of the ledger account.
3144
- #
3145
- # @param ledger_account_category_ids [Array<String>] The array of ledger account category ids that this ledger account should be a ch
3146
- #
3147
- # @param ledgerable_id [String] If the ledger account links to another object in Modern Treasury, the id will be
3148
- #
3149
- # @param ledgerable_type [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::LedgerAccount::LedgerableType] If the ledger account links to another object in Modern Treasury, the type will
3150
- #
3151
- # @param metadata [Hash{Symbol=>String}] Additional data represented as key-value pairs. Both the key and value must be s
3152
-
3153
- # If the ledger account links to another object in Modern Treasury, the type will
3154
- # be populated here, otherwise null. The value is one of internal_account or
3155
- # external_account.
3156
- #
3157
- # @see ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::LedgerAccount#ledgerable_type
3158
- module LedgerableType
3159
- extend ModernTreasury::Internal::Type::Enum
3160
-
3161
- COUNTERPARTY = :counterparty
3162
- EXTERNAL_ACCOUNT = :external_account
3163
- INTERNAL_ACCOUNT = :internal_account
3164
- VIRTUAL_ACCOUNT = :virtual_account
3165
-
3166
- # @!method self.values
3167
- # @return [Array<Symbol>]
3168
- end
3169
- end
3170
-
3171
- # @see ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount#party_address
3172
- class PartyAddress < ModernTreasury::Internal::Type::BaseModel
3173
- # @!attribute country
3174
- # Country code conforms to [ISO 3166-1 alpha-2]
3175
- #
3176
- # @return [String, nil]
3177
- optional :country, String, nil?: true
3178
-
3179
- # @!attribute line1
3180
- #
3181
- # @return [String, nil]
3182
- optional :line1, String, nil?: true
3183
-
3184
- # @!attribute line2
3185
- #
3186
- # @return [String, nil]
3187
- optional :line2, String, nil?: true
3188
-
3189
- # @!attribute locality
3190
- # Locality or City.
3191
- #
3192
- # @return [String, nil]
3193
- optional :locality, String, nil?: true
3194
-
3195
- # @!attribute postal_code
3196
- # The postal code of the address.
3197
- #
3198
- # @return [String, nil]
3199
- optional :postal_code, String, nil?: true
3200
-
3201
- # @!attribute region
3202
- # Region or State.
3203
- #
3204
- # @return [String, nil]
3205
- optional :region, String, nil?: true
3206
-
3207
- # @!method initialize(country: nil, line1: nil, line2: nil, locality: nil, postal_code: nil, region: nil)
3208
- # Required if receiving wire payments.
3209
- #
3210
- # @param country [String, nil] Country code conforms to [ISO 3166-1 alpha-2]
3211
- #
3212
- # @param line1 [String, nil]
3213
- #
3214
- # @param line2 [String, nil]
3215
- #
3216
- # @param locality [String, nil] Locality or City.
3217
- #
3218
- # @param postal_code [String, nil] The postal code of the address.
3219
- #
3220
- # @param region [String, nil] Region or State.
3221
- end
3222
-
3223
1955
  # Either `individual` or `business`.
3224
1956
  #
3225
1957
  # @see ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount#party_type
@@ -3423,6 +2155,12 @@ module ModernTreasury
3423
2155
  },
3424
2156
  nil?: true
3425
2157
 
2158
+ # @!attribute external_id
2159
+ # An optional user-defined 180 character unique identifier.
2160
+ #
2161
+ # @return [String, nil]
2162
+ optional :external_id, String, nil?: true
2163
+
3426
2164
  # @!attribute internal_account_id
3427
2165
  # The ID of the Internal Account for the expected payment.
3428
2166
  #
@@ -3491,7 +2229,7 @@ module ModernTreasury
3491
2229
  # @return [Symbol, ModernTreasury::Models::ExpectedPaymentType, nil]
3492
2230
  optional :type, enum: -> { ModernTreasury::ExpectedPaymentType }, nil?: true
3493
2231
 
3494
- # @!method initialize(id: nil, amount_lower_bound: nil, amount_upper_bound: nil, counterparty_id: nil, currency: nil, date_lower_bound: nil, date_upper_bound: nil, description: nil, direction: nil, internal_account_id: nil, metadata: nil, reconciliation_filters: nil, reconciliation_groups: nil, reconciliation_rule_variables: nil, remittance_information: nil, statement_descriptor: nil, status: nil, type: nil)
2232
+ # @!method initialize(id: nil, amount_lower_bound: nil, amount_upper_bound: nil, counterparty_id: nil, currency: nil, date_lower_bound: nil, date_upper_bound: nil, description: nil, direction: nil, external_id: nil, internal_account_id: nil, metadata: nil, reconciliation_filters: nil, reconciliation_groups: nil, reconciliation_rule_variables: nil, remittance_information: nil, statement_descriptor: nil, status: nil, type: nil)
3495
2233
  # Some parameter documentations has been truncated, see
3496
2234
  # {ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentUpdateRequestWithID}
3497
2235
  # for more details.
@@ -3514,6 +2252,8 @@ module ModernTreasury
3514
2252
  #
3515
2253
  # @param direction [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentUpdateRequestWithID::Direction, nil] One of credit or debit. When you are receiving money, use credit. When you are b
3516
2254
  #
2255
+ # @param external_id [String, nil] An optional user-defined 180 character unique identifier.
2256
+ #
3517
2257
  # @param internal_account_id [String, nil] The ID of the Internal Account for the expected payment.
3518
2258
  #
3519
2259
  # @param metadata [Hash{Symbol=>String}] Additional data represented as key-value pairs. Both the key and value must be s
@@ -3605,11 +2345,9 @@ module ModernTreasury
3605
2345
  # @!attribute ledger_entries
3606
2346
  # An array of ledger entry objects.
3607
2347
  #
3608
- # @return [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionUpdateRequestWithID::LedgerEntry>, nil]
2348
+ # @return [Array<ModernTreasury::Models::LedgerEntryCreateRequest>, nil]
3609
2349
  optional :ledger_entries,
3610
- -> {
3611
- ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::BulkRequestCreateParams::Resource::LedgerTransactionUpdateRequestWithID::LedgerEntry]
3612
- }
2350
+ -> { ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::LedgerEntryCreateRequest] }
3613
2351
 
3614
2352
  # @!attribute ledgerable_id
3615
2353
  # If the ledger transaction can be reconciled to another object in Modern
@@ -3621,8 +2359,7 @@ module ModernTreasury
3621
2359
  # @!attribute ledgerable_type
3622
2360
  # If the ledger transaction can be reconciled to another object in Modern
3623
2361
  # Treasury, the type will be populated here, otherwise null. This can be one of
3624
- # payment_order, incoming_payment_detail, expected_payment, return, paper_item, or
3625
- # reversal.
2362
+ # payment_order, incoming_payment_detail, expected_payment, return, or reversal.
3626
2363
  #
3627
2364
  # @return [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionUpdateRequestWithID::LedgerableType, nil]
3628
2365
  optional :ledgerable_type,
@@ -3657,7 +2394,7 @@ module ModernTreasury
3657
2394
  #
3658
2395
  # @param effective_at [Time] The timestamp (ISO8601 format) at which the ledger transaction happened for repo
3659
2396
  #
3660
- # @param ledger_entries [Array<ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionUpdateRequestWithID::LedgerEntry>] An array of ledger entry objects.
2397
+ # @param ledger_entries [Array<ModernTreasury::Models::LedgerEntryCreateRequest>] An array of ledger entry objects.
3661
2398
  #
3662
2399
  # @param ledgerable_id [String] If the ledger transaction can be reconciled to another object in Modern Treasury
3663
2400
  #
@@ -3667,106 +2404,9 @@ module ModernTreasury
3667
2404
  #
3668
2405
  # @param status [Symbol, ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionUpdateRequestWithID::Status] To post a ledger transaction at creation, use `posted`.
3669
2406
 
3670
- class LedgerEntry < ModernTreasury::Internal::Type::BaseModel
3671
- # @!attribute amount
3672
- # Value in specified currency's smallest unit. e.g. $10 would be represented
3673
- # as 1000. Can be any integer up to 36 digits.
3674
- #
3675
- # @return [Integer]
3676
- required :amount, Integer
3677
-
3678
- # @!attribute direction
3679
- # One of `credit`, `debit`. Describes the direction money is flowing in the
3680
- # transaction. A `credit` moves money from your account to someone else's. A
3681
- # `debit` pulls money from someone else's account to your own. Note that wire,
3682
- # rtp, and check payments will always be `credit`.
3683
- #
3684
- # @return [Symbol, ModernTreasury::Models::TransactionDirection]
3685
- required :direction, enum: -> { ModernTreasury::TransactionDirection }
3686
-
3687
- # @!attribute ledger_account_id
3688
- # The ledger account that this ledger entry is associated with.
3689
- #
3690
- # @return [String]
3691
- required :ledger_account_id, String
3692
-
3693
- # @!attribute available_balance_amount
3694
- # Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
3695
- # account’s available balance. If any of these conditions would be false after the
3696
- # transaction is created, the entire call will fail with error code 422.
3697
- #
3698
- # @return [Hash{Symbol=>Integer}, nil]
3699
- optional :available_balance_amount, ModernTreasury::Internal::Type::HashOf[Integer], nil?: true
3700
-
3701
- # @!attribute lock_version
3702
- # Lock version of the ledger account. This can be passed when creating a ledger
3703
- # transaction to only succeed if no ledger transactions have posted since the
3704
- # given version. See our post about Designing the Ledgers API with Optimistic
3705
- # Locking for more details.
3706
- #
3707
- # @return [Integer, nil]
3708
- optional :lock_version, Integer, nil?: true
3709
-
3710
- # @!attribute metadata
3711
- # Additional data represented as key-value pairs. Both the key and value must be
3712
- # strings.
3713
- #
3714
- # @return [Hash{Symbol=>String}, nil]
3715
- optional :metadata, ModernTreasury::Internal::Type::HashOf[String]
3716
-
3717
- # @!attribute pending_balance_amount
3718
- # Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
3719
- # account’s pending balance. If any of these conditions would be false after the
3720
- # transaction is created, the entire call will fail with error code 422.
3721
- #
3722
- # @return [Hash{Symbol=>Integer}, nil]
3723
- optional :pending_balance_amount, ModernTreasury::Internal::Type::HashOf[Integer], nil?: true
3724
-
3725
- # @!attribute posted_balance_amount
3726
- # Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
3727
- # account’s posted balance. If any of these conditions would be false after the
3728
- # transaction is created, the entire call will fail with error code 422.
3729
- #
3730
- # @return [Hash{Symbol=>Integer}, nil]
3731
- optional :posted_balance_amount, ModernTreasury::Internal::Type::HashOf[Integer], nil?: true
3732
-
3733
- # @!attribute show_resulting_ledger_account_balances
3734
- # If true, response will include the balance of the associated ledger account for
3735
- # the entry.
3736
- #
3737
- # @return [Boolean, nil]
3738
- optional :show_resulting_ledger_account_balances,
3739
- ModernTreasury::Internal::Type::Boolean,
3740
- nil?: true
3741
-
3742
- # @!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)
3743
- # Some parameter documentations has been truncated, see
3744
- # {ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionUpdateRequestWithID::LedgerEntry}
3745
- # for more details.
3746
- #
3747
- # @param amount [Integer] Value in specified currency's smallest unit. e.g. $10 would be represented as 10
3748
- #
3749
- # @param direction [Symbol, ModernTreasury::Models::TransactionDirection] One of `credit`, `debit`. Describes the direction money is flowing in the transa
3750
- #
3751
- # @param ledger_account_id [String] The ledger account that this ledger entry is associated with.
3752
- #
3753
- # @param available_balance_amount [Hash{Symbol=>Integer}, nil] Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the accou
3754
- #
3755
- # @param lock_version [Integer, nil] Lock version of the ledger account. This can be passed when creating a ledger tr
3756
- #
3757
- # @param metadata [Hash{Symbol=>String}] Additional data represented as key-value pairs. Both the key and value must be s
3758
- #
3759
- # @param pending_balance_amount [Hash{Symbol=>Integer}, nil] Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the accou
3760
- #
3761
- # @param posted_balance_amount [Hash{Symbol=>Integer}, nil] Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the accou
3762
- #
3763
- # @param show_resulting_ledger_account_balances [Boolean, nil] If true, response will include the balance of the associated ledger account for
3764
- end
3765
-
3766
2407
  # If the ledger transaction can be reconciled to another object in Modern
3767
2408
  # Treasury, the type will be populated here, otherwise null. This can be one of
3768
- # payment_order, incoming_payment_detail, expected_payment, return, paper_item, or
3769
- # reversal.
2409
+ # payment_order, incoming_payment_detail, expected_payment, return, or reversal.
3770
2410
  #
3771
2411
  # @see ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionUpdateRequestWithID#ledgerable_type
3772
2412
  module LedgerableType
@@ -3774,7 +2414,6 @@ module ModernTreasury
3774
2414
 
3775
2415
  EXPECTED_PAYMENT = :expected_payment
3776
2416
  INCOMING_PAYMENT_DETAIL = :incoming_payment_detail
3777
- PAPER_ITEM = :paper_item
3778
2417
  PAYMENT_ORDER = :payment_order
3779
2418
  RETURN = :return
3780
2419
  REVERSAL = :reversal
@@ -3799,7 +2438,7 @@ module ModernTreasury
3799
2438
  end
3800
2439
 
3801
2440
  # @!method self.variants
3802
- # @return [Array(ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest, ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest, ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionCreateRequest, ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerAccountCreateRequest, ModernTreasury::Models::BulkRequestCreateParams::Resource::TransactionCreateRequest, ModernTreasury::Models::BulkRequestCreateParams::Resource::ID, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID, ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentUpdateRequestWithID, ModernTreasury::Models::BulkRequestCreateParams::Resource::TransactionUpdateRequestWithID, ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionUpdateRequestWithID)]
2441
+ # @return [Array(ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest, ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentCreateRequest, ModernTreasury::Models::LedgerTransactionCreateRequest, ModernTreasury::Models::LedgerAccountCreateRequest, ModernTreasury::Models::BulkRequestCreateParams::Resource::TransactionCreateRequest, ModernTreasury::Models::BulkRequestCreateParams::Resource::ID, ModernTreasury::Models::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID, ModernTreasury::Models::BulkRequestCreateParams::Resource::ExpectedPaymentUpdateRequestWithID, ModernTreasury::Models::BulkRequestCreateParams::Resource::TransactionUpdateRequestWithID, ModernTreasury::Models::BulkRequestCreateParams::Resource::LedgerTransactionUpdateRequestWithID)]
3803
2442
  end
3804
2443
  end
3805
2444
  end