modern_treasury 0.26.0 → 0.28.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 (216) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +71 -0
  3. data/README.md +4 -4
  4. data/lib/modern_treasury/client.rb +14 -0
  5. data/lib/modern_treasury/internal/transport/base_client.rb +5 -0
  6. data/lib/modern_treasury/internal/util.rb +3 -1
  7. data/lib/modern_treasury/models/bulk_request_create_params.rb +65 -202
  8. data/lib/modern_treasury/models/child_legal_entity.rb +121 -3
  9. data/lib/modern_treasury/models/child_legal_entity_create.rb +35 -1
  10. data/lib/modern_treasury/models/connection_legal_entity_create_params.rb +38 -1
  11. data/lib/modern_treasury/models/counterparty_collect_account_params.rb +0 -2
  12. data/lib/modern_treasury/models/counterparty_create_params.rb +38 -14
  13. data/lib/modern_treasury/models/currency.rb +0 -3
  14. data/lib/modern_treasury/models/document.rb +1 -73
  15. data/lib/modern_treasury/models/document_create_params.rb +11 -11
  16. data/lib/modern_treasury/models/document_list_params.rb +11 -11
  17. data/lib/modern_treasury/models/expected_payment.rb +2 -3
  18. data/lib/modern_treasury/models/expected_payment_create_params.rb +2 -3
  19. data/lib/modern_treasury/models/expected_payment_list_params.rb +3 -16
  20. data/lib/modern_treasury/models/expected_payment_type.rb +1 -13
  21. data/lib/modern_treasury/models/expected_payment_update_params.rb +2 -3
  22. data/lib/modern_treasury/models/external_account_create_params.rb +0 -13
  23. data/lib/modern_treasury/models/external_account_verify_params.rb +0 -11
  24. data/lib/modern_treasury/models/external_account_verify_response.rb +0 -11
  25. data/lib/modern_treasury/models/hold_list_params.rb +8 -11
  26. data/lib/modern_treasury/models/identification_create_request.rb +75 -0
  27. data/lib/modern_treasury/models/incoming_payment_detail.rb +15 -14
  28. data/lib/modern_treasury/models/incoming_payment_detail_create_async_params.rb +11 -7
  29. data/lib/modern_treasury/models/incoming_payment_detail_list_params.rb +15 -12
  30. data/lib/modern_treasury/models/internal_account.rb +12 -12
  31. data/lib/modern_treasury/models/internal_account_create_params.rb +37 -33
  32. data/lib/modern_treasury/models/internal_account_list_params.rb +0 -11
  33. data/lib/modern_treasury/models/internal_account_update_account_capability_response.rb +0 -11
  34. data/lib/modern_treasury/models/internal_accounts/balance_report.rb +15 -6
  35. data/lib/modern_treasury/models/internal_accounts/balance_report_create_params.rb +20 -11
  36. data/lib/modern_treasury/models/invoice.rb +25 -1
  37. data/lib/modern_treasury/models/invoice_create_params.rb +3 -4
  38. data/lib/modern_treasury/models/invoice_update_params.rb +3 -4
  39. data/lib/modern_treasury/models/ledger_account_settlement_update_params.rb +10 -1
  40. data/lib/modern_treasury/models/ledger_balance.rb +22 -1
  41. data/lib/modern_treasury/models/ledger_entry.rb +10 -1
  42. data/lib/modern_treasury/models/ledger_entry_create_request.rb +19 -10
  43. data/lib/modern_treasury/models/ledger_transaction_create_partial_post_params.rb +69 -10
  44. data/lib/modern_treasury/models/ledger_transactions/ledger_transaction_version.rb +10 -1
  45. data/lib/modern_treasury/models/legal_entity.rb +121 -3
  46. data/lib/modern_treasury/models/legal_entity_address_create_request.rb +14 -1
  47. data/lib/modern_treasury/models/legal_entity_association.rb +2 -3
  48. data/lib/modern_treasury/models/legal_entity_create_params.rb +34 -1
  49. data/lib/modern_treasury/models/legal_entity_update_params.rb +34 -1
  50. data/lib/modern_treasury/models/legal_entity_update_status_params.rb +46 -0
  51. data/lib/modern_treasury/models/payment_order.rb +9 -10
  52. data/lib/modern_treasury/models/payment_order_create_async_params.rb +4 -18
  53. data/lib/modern_treasury/models/payment_order_create_params.rb +15 -29
  54. data/lib/modern_treasury/models/payment_order_list_params.rb +0 -11
  55. data/lib/modern_treasury/models/payment_order_subtype.rb +2 -3
  56. data/lib/modern_treasury/models/payment_order_type.rb +2 -14
  57. data/lib/modern_treasury/models/payment_order_update_params.rb +4 -18
  58. data/lib/modern_treasury/models/payment_reference.rb +5 -5
  59. data/lib/modern_treasury/models/reconciliation_rule.rb +3 -16
  60. data/lib/modern_treasury/models/return_object.rb +11 -8
  61. data/lib/modern_treasury/models/routing_detail.rb +0 -13
  62. data/lib/modern_treasury/models/routing_detail_create_params.rb +0 -13
  63. data/lib/modern_treasury/models/routing_number_lookup_request.rb +0 -11
  64. data/lib/modern_treasury/models/third_party_verification.rb +2 -0
  65. data/lib/modern_treasury/models/transaction.rb +17 -20
  66. data/lib/modern_treasury/models/transaction_create_params.rb +23 -25
  67. data/lib/modern_treasury/models/validation_validate_routing_number_params.rb +0 -2
  68. data/lib/modern_treasury/models/virtual_account_create_params.rb +0 -13
  69. data/lib/modern_treasury/models.rb +2 -0
  70. data/lib/modern_treasury/resources/bulk_requests.rb +1 -1
  71. data/lib/modern_treasury/resources/expected_payments.rb +3 -3
  72. data/lib/modern_treasury/resources/holds.rb +3 -3
  73. data/lib/modern_treasury/resources/incoming_payment_details.rb +7 -3
  74. data/lib/modern_treasury/resources/internal_accounts.rb +8 -6
  75. data/lib/modern_treasury/resources/invoices.rb +2 -2
  76. data/lib/modern_treasury/resources/ledger_account_settlements.rb +3 -1
  77. data/lib/modern_treasury/resources/legal_entities.rb +33 -2
  78. data/lib/modern_treasury/resources/payment_orders.rb +3 -3
  79. data/lib/modern_treasury/resources/transactions.rb +5 -3
  80. data/lib/modern_treasury/version.rb +1 -1
  81. data/lib/modern_treasury.rb +1 -0
  82. data/rbi/modern_treasury/models/bulk_request_create_params.rbi +104 -522
  83. data/rbi/modern_treasury/models/child_legal_entity.rbi +452 -5
  84. data/rbi/modern_treasury/models/child_legal_entity_create.rbi +68 -0
  85. data/rbi/modern_treasury/models/connection_legal_entity_create_params.rbi +74 -0
  86. data/rbi/modern_treasury/models/counterparty_collect_account_params.rbi +0 -10
  87. data/rbi/modern_treasury/models/counterparty_create_params.rbi +74 -65
  88. data/rbi/modern_treasury/models/currency.rbi +0 -3
  89. data/rbi/modern_treasury/models/document.rbi +0 -87
  90. data/rbi/modern_treasury/models/document_create_params.rbi +22 -22
  91. data/rbi/modern_treasury/models/document_list_params.rbi +22 -22
  92. data/rbi/modern_treasury/models/expected_payment.rbi +2 -4
  93. data/rbi/modern_treasury/models/expected_payment_create_params.rbi +2 -4
  94. data/rbi/modern_treasury/models/expected_payment_list_params.rbi +3 -61
  95. data/rbi/modern_treasury/models/expected_payment_type.rbi +1 -18
  96. data/rbi/modern_treasury/models/expected_payment_update_params.rbi +2 -4
  97. data/rbi/modern_treasury/models/external_account_create_params.rbi +0 -65
  98. data/rbi/modern_treasury/models/external_account_verify_params.rbi +0 -55
  99. data/rbi/modern_treasury/models/external_account_verify_response.rbi +0 -55
  100. data/rbi/modern_treasury/models/hold_list_params.rbi +8 -13
  101. data/rbi/modern_treasury/models/identification_create_request.rbi +375 -0
  102. data/rbi/modern_treasury/models/incoming_payment_detail.rbi +17 -43
  103. data/rbi/modern_treasury/models/incoming_payment_detail_create_async_params.rbi +12 -27
  104. data/rbi/modern_treasury/models/incoming_payment_detail_list_params.rbi +20 -33
  105. data/rbi/modern_treasury/models/internal_account.rbi +14 -55
  106. data/rbi/modern_treasury/models/internal_account_create_params.rbi +60 -77
  107. data/rbi/modern_treasury/models/internal_account_list_params.rbi +0 -55
  108. data/rbi/modern_treasury/models/internal_account_update_account_capability_response.rbi +0 -55
  109. data/rbi/modern_treasury/models/internal_accounts/balance_report.rbi +17 -7
  110. data/rbi/modern_treasury/models/internal_accounts/balance_report_create_params.rbi +31 -15
  111. data/rbi/modern_treasury/models/invoice.rbi +27 -3
  112. data/rbi/modern_treasury/models/invoice_create_params.rbi +4 -6
  113. data/rbi/modern_treasury/models/invoice_update_params.rbi +4 -6
  114. data/rbi/modern_treasury/models/ledger_account_settlement_update_params.rbi +10 -0
  115. data/rbi/modern_treasury/models/ledger_balance.rbi +21 -3
  116. data/rbi/modern_treasury/models/ledger_entry.rbi +10 -0
  117. data/rbi/modern_treasury/models/ledger_entry_create_request.rbi +26 -10
  118. data/rbi/modern_treasury/models/ledger_transaction_create_partial_post_params.rbi +89 -13
  119. data/rbi/modern_treasury/models/ledger_transactions/ledger_transaction_version.rbi +10 -0
  120. data/rbi/modern_treasury/models/legal_entity.rbi +451 -5
  121. data/rbi/modern_treasury/models/legal_entity_address_create_request.rbi +18 -3
  122. data/rbi/modern_treasury/models/legal_entity_association.rbi +2 -4
  123. data/rbi/modern_treasury/models/legal_entity_create_params.rbi +68 -0
  124. data/rbi/modern_treasury/models/legal_entity_update_params.rbi +68 -0
  125. data/rbi/modern_treasury/models/legal_entity_update_status_params.rbi +96 -0
  126. data/rbi/modern_treasury/models/payment_order.rbi +30 -32
  127. data/rbi/modern_treasury/models/payment_order_create_async_params.rbi +6 -73
  128. data/rbi/modern_treasury/models/payment_order_create_params.rbi +28 -95
  129. data/rbi/modern_treasury/models/payment_order_list_params.rbi +0 -55
  130. data/rbi/modern_treasury/models/payment_order_subtype.rbi +3 -4
  131. data/rbi/modern_treasury/models/payment_order_type.rbi +2 -16
  132. data/rbi/modern_treasury/models/payment_order_update_params.rbi +6 -73
  133. data/rbi/modern_treasury/models/payment_reference.rbi +24 -24
  134. data/rbi/modern_treasury/models/reconciliation_rule.rbi +3 -43
  135. data/rbi/modern_treasury/models/return_object.rbi +33 -29
  136. data/rbi/modern_treasury/models/routing_detail.rbi +0 -59
  137. data/rbi/modern_treasury/models/routing_detail_create_params.rbi +0 -65
  138. data/rbi/modern_treasury/models/routing_number_lookup_request.rbi +0 -55
  139. data/rbi/modern_treasury/models/third_party_verification.rbi +10 -0
  140. data/rbi/modern_treasury/models/transaction.rbi +24 -35
  141. data/rbi/modern_treasury/models/transaction_create_params.rbi +33 -72
  142. data/rbi/modern_treasury/models/validation_validate_routing_number_params.rbi +0 -10
  143. data/rbi/modern_treasury/models/virtual_account_create_params.rbi +0 -65
  144. data/rbi/modern_treasury/models.rbi +3 -0
  145. data/rbi/modern_treasury/resources/bulk_requests.rbi +3 -2
  146. data/rbi/modern_treasury/resources/expected_payments.rbi +3 -6
  147. data/rbi/modern_treasury/resources/holds.rbi +3 -5
  148. data/rbi/modern_treasury/resources/incoming_payment_details.rbi +10 -2
  149. data/rbi/modern_treasury/resources/internal_accounts.rbi +15 -8
  150. data/rbi/modern_treasury/resources/invoices.rbi +4 -6
  151. data/rbi/modern_treasury/resources/ledger_account_settlements.rbi +4 -0
  152. data/rbi/modern_treasury/resources/legal_entities.rbi +31 -0
  153. data/rbi/modern_treasury/resources/payment_orders.rbi +9 -12
  154. data/rbi/modern_treasury/resources/transactions.rbi +11 -7
  155. data/sig/modern_treasury/models/bulk_request_create_params.rbs +45 -207
  156. data/sig/modern_treasury/models/child_legal_entity.rbs +179 -2
  157. data/sig/modern_treasury/models/child_legal_entity_create.rbs +21 -0
  158. data/sig/modern_treasury/models/connection_legal_entity_create_params.rbs +21 -0
  159. data/sig/modern_treasury/models/counterparty_collect_account_params.rbs +0 -4
  160. data/sig/modern_treasury/models/counterparty_create_params.rbs +21 -26
  161. data/sig/modern_treasury/models/currency.rbs +0 -6
  162. data/sig/modern_treasury/models/document.rbs +0 -57
  163. data/sig/modern_treasury/models/document_create_params.rbs +22 -22
  164. data/sig/modern_treasury/models/document_list_params.rbs +22 -22
  165. data/sig/modern_treasury/models/expected_payment_list_params.rbs +0 -22
  166. data/sig/modern_treasury/models/expected_payment_type.rbs +0 -22
  167. data/sig/modern_treasury/models/external_account_create_params.rbs +0 -26
  168. data/sig/modern_treasury/models/external_account_verify_params.rbs +0 -22
  169. data/sig/modern_treasury/models/external_account_verify_response.rbs +0 -22
  170. data/sig/modern_treasury/models/identification_create_request.rbs +150 -0
  171. data/sig/modern_treasury/models/incoming_payment_detail.rbs +7 -16
  172. data/sig/modern_treasury/models/incoming_payment_detail_create_async_params.rbs +7 -12
  173. data/sig/modern_treasury/models/incoming_payment_detail_list_params.rbs +9 -12
  174. data/sig/modern_treasury/models/internal_account.rbs +5 -22
  175. data/sig/modern_treasury/models/internal_account_create_params.rbs +22 -33
  176. data/sig/modern_treasury/models/internal_account_list_params.rbs +0 -22
  177. data/sig/modern_treasury/models/internal_account_update_account_capability_response.rbs +0 -22
  178. data/sig/modern_treasury/models/internal_accounts/balance_report.rbs +9 -4
  179. data/sig/modern_treasury/models/internal_accounts/balance_report_create_params.rbs +17 -8
  180. data/sig/modern_treasury/models/invoice.rbs +18 -3
  181. data/sig/modern_treasury/models/ledger_account_settlement_update_params.rbs +5 -0
  182. data/sig/modern_treasury/models/ledger_balance.rbs +18 -3
  183. data/sig/modern_treasury/models/ledger_entry.rbs +5 -0
  184. data/sig/modern_treasury/models/ledger_entry_create_request.rbs +14 -5
  185. data/sig/modern_treasury/models/ledger_transaction_create_partial_post_params.rbs +42 -8
  186. data/sig/modern_treasury/models/ledger_transactions/ledger_transaction_version.rbs +5 -0
  187. data/sig/modern_treasury/models/legal_entity.rbs +179 -2
  188. data/sig/modern_treasury/models/legal_entity_address_create_request.rbs +10 -3
  189. data/sig/modern_treasury/models/legal_entity_create_params.rbs +21 -0
  190. data/sig/modern_treasury/models/legal_entity_update_params.rbs +21 -0
  191. data/sig/modern_treasury/models/legal_entity_update_status_params.rbs +43 -0
  192. data/sig/modern_treasury/models/payment_order.rbs +10 -10
  193. data/sig/modern_treasury/models/payment_order_create_async_params.rbs +0 -26
  194. data/sig/modern_treasury/models/payment_order_create_params.rbs +22 -48
  195. data/sig/modern_treasury/models/payment_order_list_params.rbs +0 -22
  196. data/sig/modern_treasury/models/payment_order_subtype.rbs +4 -6
  197. data/sig/modern_treasury/models/payment_order_type.rbs +0 -22
  198. data/sig/modern_treasury/models/payment_order_update_params.rbs +0 -26
  199. data/sig/modern_treasury/models/payment_reference.rbs +10 -10
  200. data/sig/modern_treasury/models/reconciliation_rule.rbs +0 -22
  201. data/sig/modern_treasury/models/return_object.rbs +18 -12
  202. data/sig/modern_treasury/models/routing_detail.rbs +0 -26
  203. data/sig/modern_treasury/models/routing_detail_create_params.rbs +0 -26
  204. data/sig/modern_treasury/models/routing_number_lookup_request.rbs +0 -22
  205. data/sig/modern_treasury/models/third_party_verification.rbs +4 -1
  206. data/sig/modern_treasury/models/transaction.rbs +7 -26
  207. data/sig/modern_treasury/models/transaction_create_params.rbs +14 -27
  208. data/sig/modern_treasury/models/validation_validate_routing_number_params.rbs +0 -4
  209. data/sig/modern_treasury/models/virtual_account_create_params.rbs +0 -26
  210. data/sig/modern_treasury/models.rbs +2 -0
  211. data/sig/modern_treasury/resources/incoming_payment_details.rbs +2 -0
  212. data/sig/modern_treasury/resources/internal_accounts.rbs +3 -2
  213. data/sig/modern_treasury/resources/ledger_account_settlements.rbs +1 -0
  214. data/sig/modern_treasury/resources/legal_entities.rbs +8 -0
  215. data/sig/modern_treasury/resources/transactions.rbs +2 -1
  216. metadata +5 -2
@@ -11,46 +11,51 @@ module ModernTreasury
11
11
  # create internal account
12
12
  sig do
13
13
  params(
14
- connection_id: String,
15
14
  currency:
16
15
  ModernTreasury::InternalAccountCreateParams::Currency::OrSymbol,
17
16
  name: String,
18
- party_name: String,
19
17
  account_capabilities:
20
18
  T::Array[
21
19
  ModernTreasury::InternalAccountCreateParams::AccountCapability::OrHash
22
20
  ],
23
21
  account_type:
24
22
  ModernTreasury::InternalAccountCreateParams::AccountType::OrSymbol,
23
+ connection_id: String,
25
24
  counterparty_id: String,
25
+ debitable: T.nilable(T::Boolean),
26
26
  external_id: T.nilable(String),
27
27
  legal_entity_id: String,
28
28
  metadata: T::Hash[Symbol, String],
29
29
  parent_account_id: String,
30
30
  party_address:
31
31
  ModernTreasury::InternalAccountCreateParams::PartyAddress::OrHash,
32
+ party_name: T.nilable(String),
32
33
  vendor_attributes: T::Hash[Symbol, String],
33
34
  request_options: ModernTreasury::RequestOptions::OrHash
34
35
  ).returns(ModernTreasury::InternalAccount)
35
36
  end
36
37
  def create(
37
- # The identifier of the financial institution the account belongs to.
38
- connection_id:,
39
- # Either "USD" or "CAD". Internal accounts created at Increase only supports
40
- # "USD".
38
+ # The currency of the internal account. Supports fiat and stablecoin currencies.
41
39
  currency:,
42
40
  # The nickname of the account.
43
41
  name:,
44
- # The legal name of the entity which owns the account.
45
- party_name:,
46
42
  # An array of AccountCapability objects that list the originating abilities of the
47
43
  # internal account and any relevant information for them.
48
44
  account_capabilities: nil,
49
45
  # The account type, used to provision the appropriate account at the financial
50
46
  # institution.
51
47
  account_type: nil,
48
+ # The identifier of the financial institution the account belongs to. If not
49
+ # provided, defaults to the default connection, or the sole connection if only one
50
+ # exists.
51
+ connection_id: nil,
52
52
  # The Counterparty associated to this account.
53
53
  counterparty_id: nil,
54
+ # Whether this account can receive ACH debits. Only applicable to accounts created
55
+ # under a Modern Treasury PSP connection, or `null` for Bring Your Own Bank
56
+ # accounts. Defaults to `false`. Configurable only on creation. Please reach out
57
+ # to your customer success manager to enable this capability for your connection.
58
+ debitable: nil,
54
59
  # An optional user-defined 180 character unique identifier.
55
60
  external_id: nil,
56
61
  # The LegalEntity associated to this account.
@@ -62,6 +67,8 @@ module ModernTreasury
62
67
  parent_account_id: nil,
63
68
  # The address associated with the owner or null.
64
69
  party_address: nil,
70
+ # The legal name of the entity which owns the account.
71
+ party_name: nil,
65
72
  # A hash of vendor specific attributes that will be used when creating the account
66
73
  # at the vendor specified by the given connection.
67
74
  vendor_attributes: nil,
@@ -105,9 +105,8 @@ module ModernTreasury
105
105
  # invoice amount is negative, the automatically initiated payment order's
106
106
  # direction will be credit. One of `manual`, `ui`, or `automatic`.
107
107
  payment_method: nil,
108
- # One of `ach`, `se_bankgirot`, `eft`, `wire`, `check`, `sen`, `book`, `rtp`,
109
- # `sepa`, `bacs`, `au_becs`, `interac`, `neft`, `nics`,
110
- # `nz_national_clearing_code`, `sic`, `signet`, `provexchange`, `zengin`.
108
+ # One of `ach`, `se_bankgirot`, `eft`, `wire`, `check`, `book`, `rtp`, `sepa`,
109
+ # `bacs`, `au_becs`, `neft`, `nics`, `nz_national_clearing_code`, `sic`, `zengin`.
111
110
  payment_type: nil,
112
111
  # The receiving account ID. Can be an `external_account`.
113
112
  receiving_account_id: nil,
@@ -238,9 +237,8 @@ module ModernTreasury
238
237
  # invoice amount is negative, the automatically initiated payment order's
239
238
  # direction will be credit. One of `manual`, `ui`, or `automatic`.
240
239
  payment_method: nil,
241
- # One of `ach`, `se_bankgirot`, `eft`, `wire`, `check`, `sen`, `book`, `rtp`,
242
- # `sepa`, `bacs`, `au_becs`, `interac`, `neft`, `nics`,
243
- # `nz_national_clearing_code`, `sic`, `signet`, `provexchange`, `zengin`.
240
+ # One of `ach`, `se_bankgirot`, `eft`, `wire`, `check`, `book`, `rtp`, `sepa`,
241
+ # `bacs`, `au_becs`, `neft`, `nics`, `nz_national_clearing_code`, `sic`, `zengin`.
244
242
  payment_type: nil,
245
243
  # The receiving account ID. Can be an `external_account`.
246
244
  receiving_account_id: nil,
@@ -77,6 +77,7 @@ module ModernTreasury
77
77
  id: String,
78
78
  description: T.nilable(String),
79
79
  metadata: T::Hash[Symbol, String],
80
+ skip_settlement_ledger_transaction: T.nilable(T::Boolean),
80
81
  status:
81
82
  ModernTreasury::LedgerAccountSettlementUpdateParams::Status::OrSymbol,
82
83
  request_options: ModernTreasury::RequestOptions::OrHash
@@ -90,6 +91,9 @@ module ModernTreasury
90
91
  # Additional data represented as key-value pairs. Both the key and value must be
91
92
  # strings.
92
93
  metadata: nil,
94
+ # It is set to `false` by default. It should be set to `true` when migrating
95
+ # existing settlements.
96
+ skip_settlement_ledger_transaction: nil,
93
97
  # To post a pending ledger account settlement, use `posted`. To archive a pending
94
98
  # ledger transaction, use `archived`.
95
99
  status: nil,
@@ -67,6 +67,10 @@ module ModernTreasury
67
67
  ),
68
68
  service_provider_legal_entity_id: T.nilable(String),
69
69
  suffix: T.nilable(String),
70
+ terms_of_use:
71
+ T.nilable(
72
+ ModernTreasury::LegalEntityCreateParams::TermsOfUse::OrHash
73
+ ),
70
74
  third_party_verification:
71
75
  T.nilable(ModernTreasury::ThirdPartyVerification::OrHash),
72
76
  third_party_verifications:
@@ -157,6 +161,8 @@ module ModernTreasury
157
161
  service_provider_legal_entity_id: nil,
158
162
  # An individual's suffix.
159
163
  suffix: nil,
164
+ # Acceptance of terms of use by the legal entity.
165
+ terms_of_use: nil,
160
166
  # Deprecated. Use `third_party_verifications` instead.
161
167
  third_party_verification: nil,
162
168
  # A list of third-party verifications run by external vendors.
@@ -237,6 +243,10 @@ module ModernTreasury
237
243
  ),
238
244
  service_provider_legal_entity_id: T.nilable(String),
239
245
  suffix: T.nilable(String),
246
+ terms_of_use:
247
+ T.nilable(
248
+ ModernTreasury::LegalEntityUpdateParams::TermsOfUse::OrHash
249
+ ),
240
250
  third_party_verification:
241
251
  T.nilable(ModernTreasury::ThirdPartyVerification::OrHash),
242
252
  third_party_verifications:
@@ -315,6 +325,8 @@ module ModernTreasury
315
325
  service_provider_legal_entity_id: nil,
316
326
  # An individual's suffix.
317
327
  suffix: nil,
328
+ # Acceptance of terms of use by the legal entity.
329
+ terms_of_use: nil,
318
330
  # Deprecated. Use `third_party_verifications` instead.
319
331
  third_party_verification: nil,
320
332
  # A list of third-party verifications run by external vendors.
@@ -358,6 +370,25 @@ module ModernTreasury
358
370
  )
359
371
  end
360
372
 
373
+ # Update Legal Entity Status (sandbox only)
374
+ sig do
375
+ params(
376
+ id: String,
377
+ status:
378
+ ModernTreasury::LegalEntityUpdateStatusParams::Status::OrSymbol,
379
+ request_options: ModernTreasury::RequestOptions::OrHash
380
+ ).returns(ModernTreasury::LegalEntity)
381
+ end
382
+ def update_status(
383
+ # Legal entity ID
384
+ id,
385
+ # The target status for the legal entity. One of `active`, `suspended`, or
386
+ # `denied`. Valid transitions depend on the current status.
387
+ status:,
388
+ request_options: {}
389
+ )
390
+ end
391
+
361
392
  # @api private
362
393
  sig { params(client: ModernTreasury::Client).returns(T.attached_class) }
363
394
  def self.new(client:)
@@ -77,7 +77,7 @@ module ModernTreasury
77
77
  end
78
78
  def create(
79
79
  # Value in specified currency's smallest unit. e.g. $10 would be represented as
80
- # 1000 (cents). For RTP, the maximum amount allowed by the network is $100,000.
80
+ # 1000 (cents). For RTP, the maximum amount allowed by the network is $10,000,000.
81
81
  amount:,
82
82
  # One of `credit`, `debit`. Describes the direction money is flowing in the
83
83
  # transaction. A `credit` moves money from your account to someone else's. A
@@ -86,9 +86,8 @@ module ModernTreasury
86
86
  direction:,
87
87
  # The ID of one of your organization's internal accounts.
88
88
  originating_account_id:,
89
- # One of `ach`, `se_bankgirot`, `eft`, `wire`, `check`, `sen`, `book`, `rtp`,
90
- # `sepa`, `bacs`, `au_becs`, `interac`, `neft`, `nics`,
91
- # `nz_national_clearing_code`, `sic`, `signet`, `provexchange`, `zengin`.
89
+ # One of `ach`, `se_bankgirot`, `eft`, `wire`, `check`, `book`, `rtp`, `sepa`,
90
+ # `bacs`, `au_becs`, `neft`, `nics`, `nz_national_clearing_code`, `sic`, `zengin`.
92
91
  type:,
93
92
  accounting: nil,
94
93
  # The ID of one of your accounting categories. Note that these will only be
@@ -294,7 +293,7 @@ module ModernTreasury
294
293
  # accessible if your accounting system has been connected.
295
294
  accounting_ledger_class_id: nil,
296
295
  # Value in specified currency's smallest unit. e.g. $10 would be represented as
297
- # 1000 (cents). For RTP, the maximum amount allowed by the network is $100,000.
296
+ # 1000 (cents). For RTP, the maximum amount allowed by the network is $10,000,000.
298
297
  amount: nil,
299
298
  # The party that will pay the fees for the payment order. See
300
299
  # https://docs.moderntreasury.com/payments/docs/charge-bearer to understand the
@@ -392,9 +391,8 @@ module ModernTreasury
392
391
  # payment orders, the `subtype` represents the SEC code. We currently support
393
392
  # `CCD`, `PPD`, `IAT`, `CTX`, `WEB`, `CIE`, and `TEL`.
394
393
  subtype: nil,
395
- # One of `ach`, `se_bankgirot`, `eft`, `wire`, `check`, `sen`, `book`, `rtp`,
396
- # `sepa`, `bacs`, `au_becs`, `interac`, `neft`, `nics`,
397
- # `nz_national_clearing_code`, `sic`, `signet`, `provexchange`, `zengin`.
394
+ # One of `ach`, `se_bankgirot`, `eft`, `wire`, `check`, `book`, `rtp`, `sepa`,
395
+ # `bacs`, `au_becs`, `neft`, `nics`, `nz_national_clearing_code`, `sic`, `zengin`.
398
396
  type: nil,
399
397
  # This represents the identifier by which the person is known to the receiver when
400
398
  # using the CIE subtype for ACH payments. Only the first 22 characters of this
@@ -544,7 +542,7 @@ module ModernTreasury
544
542
  end
545
543
  def create_async(
546
544
  # Value in specified currency's smallest unit. e.g. $10 would be represented as
547
- # 1000 (cents). For RTP, the maximum amount allowed by the network is $100,000.
545
+ # 1000 (cents). For RTP, the maximum amount allowed by the network is $10,000,000.
548
546
  amount:,
549
547
  # One of `credit`, `debit`. Describes the direction money is flowing in the
550
548
  # transaction. A `credit` moves money from your account to someone else's. A
@@ -553,9 +551,8 @@ module ModernTreasury
553
551
  direction:,
554
552
  # The ID of one of your organization's internal accounts.
555
553
  originating_account_id:,
556
- # One of `ach`, `se_bankgirot`, `eft`, `wire`, `check`, `sen`, `book`, `rtp`,
557
- # `sepa`, `bacs`, `au_becs`, `interac`, `neft`, `nics`,
558
- # `nz_national_clearing_code`, `sic`, `signet`, `provexchange`, `zengin`.
554
+ # One of `ach`, `se_bankgirot`, `eft`, `wire`, `check`, `book`, `rtp`, `sepa`,
555
+ # `bacs`, `au_becs`, `neft`, `nics`, `nz_national_clearing_code`, `sic`, `zengin`.
559
556
  type:,
560
557
  accounting: nil,
561
558
  # The ID of one of your accounting categories. Note that these will only be
@@ -9,12 +9,13 @@ module ModernTreasury
9
9
  # create transaction
10
10
  sig do
11
11
  params(
12
- amount: Integer,
13
12
  as_of_date: T.nilable(Date),
14
13
  direction: String,
15
14
  internal_account_id: String,
16
15
  vendor_code: T.nilable(String),
17
16
  vendor_code_type: T.nilable(String),
17
+ amount: Integer,
18
+ amount_string: String,
18
19
  metadata: T::Hash[Symbol, String],
19
20
  posted: T::Boolean,
20
21
  type:
@@ -25,9 +26,6 @@ module ModernTreasury
25
26
  ).returns(ModernTreasury::Transaction)
26
27
  end
27
28
  def create(
28
- # Value in specified currency's smallest unit. e.g. $10 would be represented
29
- # as 1000.
30
- amount:,
31
29
  # The date on which the transaction occurred.
32
30
  as_of_date:,
33
31
  # Either `credit` or `debit`.
@@ -39,16 +37,22 @@ module ModernTreasury
39
37
  vendor_code:,
40
38
  # The type of `vendor_code` being reported. Can be one of `bai2`, `bankprov`,
41
39
  # `bnk_dev`, `cleartouch`, `currencycloud`, `cross_river`, `dc_bank`, `dwolla`,
42
- # `evolve`, `goldman_sachs`, `iso20022`, `jpmc`, `mx`, `signet`, `silvergate`,
43
- # `swift`, `us_bank`, or others.
40
+ # `evolve`, `goldman_sachs`, `iso20022`, `jpmc`, `mx`, `silvergate`, `swift`,
41
+ # `us_bank`, or others.
44
42
  vendor_code_type:,
43
+ # Value in specified currency's smallest unit. e.g. $10 would be represented
44
+ # as 1000.
45
+ amount: nil,
46
+ # The transaction amount as a string, preserving full precision for values that
47
+ # may exceed safe integer limits in some languages.
48
+ amount_string: nil,
45
49
  # Additional data represented as key-value pairs. Both the key and value must be
46
50
  # strings.
47
51
  metadata: nil,
48
52
  # This field will be `true` if the transaction has posted to the account.
49
53
  posted: nil,
50
54
  # The type of the transaction. Examples could be
51
- # `card, `ach`, `wire`, `check`, `rtp`, `book`, or `sen`.
55
+ # `card, `ach`, `wire`, `check`, `rtp`, or `book`.
52
56
  type: nil,
53
57
  # An identifier given to this transaction by the bank, often `null`.
54
58
  vendor_customer_id: nil,