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
@@ -3,13 +3,6 @@
3
3
  module ModernTreasury
4
4
  module Models
5
5
  class LedgerEntryCreateRequest < ModernTreasury::Internal::Type::BaseModel
6
- # @!attribute amount
7
- # Value in specified currency's smallest unit. e.g. $10 would be represented
8
- # as 1000. Can be any integer up to 36 digits.
9
- #
10
- # @return [Integer]
11
- required :amount, Integer
12
-
13
6
  # @!attribute direction
14
7
  # One of `credit`, `debit`. Describes the direction money is flowing in the
15
8
  # transaction. A `credit` moves money from your account to someone else's. A
@@ -25,6 +18,20 @@ module ModernTreasury
25
18
  # @return [String]
26
19
  required :ledger_account_id, String
27
20
 
21
+ # @!attribute amount
22
+ # Value in specified currency's smallest unit. e.g. $10 would be represented
23
+ # as 1000. Can be any integer up to 36 digits.
24
+ #
25
+ # @return [Integer, nil]
26
+ optional :amount, Integer
27
+
28
+ # @!attribute amount_string
29
+ # The amount of the ledger entry as a string, preserving full precision for values
30
+ # that may exceed safe integer limits in some languages.
31
+ #
32
+ # @return [String, nil]
33
+ optional :amount_string, String
34
+
28
35
  # @!attribute available_balance_amount
29
36
  # Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
30
37
  # account’s available balance. If any of these conditions would be false after the
@@ -79,16 +86,18 @@ module ModernTreasury
79
86
  # @return [Boolean, nil]
80
87
  optional :show_resulting_ledger_account_balances, ModernTreasury::Internal::Type::Boolean, nil?: true
81
88
 
82
- # @!method initialize(amount:, direction:, ledger_account_id:, available_balance_amount: nil, effective_at: nil, lock_version: nil, metadata: nil, pending_balance_amount: nil, posted_balance_amount: nil, show_resulting_ledger_account_balances: nil)
89
+ # @!method initialize(direction:, ledger_account_id:, amount: nil, amount_string: nil, available_balance_amount: nil, effective_at: nil, lock_version: nil, metadata: nil, pending_balance_amount: nil, posted_balance_amount: nil, show_resulting_ledger_account_balances: nil)
83
90
  # Some parameter documentations has been truncated, see
84
91
  # {ModernTreasury::Models::LedgerEntryCreateRequest} for more details.
85
92
  #
86
- # @param amount [Integer] Value in specified currency's smallest unit. e.g. $10 would be represented as 10
87
- #
88
93
  # @param direction [Symbol, ModernTreasury::Models::TransactionDirection] One of `credit`, `debit`. Describes the direction money is flowing in the transa
89
94
  #
90
95
  # @param ledger_account_id [String] The ledger account that this ledger entry is associated with.
91
96
  #
97
+ # @param amount [Integer] Value in specified currency's smallest unit. e.g. $10 would be represented as 10
98
+ #
99
+ # @param amount_string [String] The amount of the ledger entry as a string, preserving full precision for values
100
+ #
92
101
  # @param available_balance_amount [Hash{Symbol=>Integer}, nil] Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the accou
93
102
  #
94
103
  # @param effective_at [Time] The timestamp (ISO8601 format) at which the ledger transaction happened for repo
@@ -60,13 +60,6 @@ module ModernTreasury
60
60
  # @param request_options [ModernTreasury::RequestOptions, Hash{Symbol=>Object}]
61
61
 
62
62
  class PostedLedgerEntry < ModernTreasury::Internal::Type::BaseModel
63
- # @!attribute amount
64
- # Value in specified currency's smallest unit. e.g. $10 would be represented
65
- # as 1000. Can be any integer up to 36 digits.
66
- #
67
- # @return [Integer]
68
- required :amount, Integer
69
-
70
63
  # @!attribute direction
71
64
  # One of `credit`, `debit`. Describes the direction money is flowing in the
72
65
  # transaction. A `credit` moves money from your account to someone else's. A
@@ -83,6 +76,37 @@ module ModernTreasury
83
76
  # @return [String]
84
77
  required :ledger_account_id, String
85
78
 
79
+ # @!attribute amount
80
+ # Value in specified currency's smallest unit. e.g. $10 would be represented
81
+ # as 1000. Can be any integer up to 36 digits.
82
+ #
83
+ # @return [Integer, nil]
84
+ optional :amount, Integer
85
+
86
+ # @!attribute amount_string
87
+ # The amount of the ledger entry as a string, preserving full precision for values
88
+ # that may exceed safe integer limits in some languages.
89
+ #
90
+ # @return [String, nil]
91
+ optional :amount_string, String
92
+
93
+ # @!attribute available_balance_amount
94
+ # Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
95
+ # account’s available balance. If any of these conditions would be false after the
96
+ # transaction is created, the entire call will fail with error code 422.
97
+ #
98
+ # @return [Hash{Symbol=>Integer}, nil]
99
+ optional :available_balance_amount, ModernTreasury::Internal::Type::HashOf[Integer], nil?: true
100
+
101
+ # @!attribute lock_version
102
+ # Lock version of the ledger account. This can be passed when creating a ledger
103
+ # transaction to only succeed if no ledger transactions have posted since the
104
+ # given version. See our post about Designing the Ledgers API with Optimistic
105
+ # Locking for more details.
106
+ #
107
+ # @return [Integer, nil]
108
+ optional :lock_version, Integer, nil?: true
109
+
86
110
  # @!attribute metadata
87
111
  # Additional data represented as key-value pairs. Both the key and value must be
88
112
  # strings.
@@ -90,18 +114,53 @@ module ModernTreasury
90
114
  # @return [Hash{Symbol=>String}, nil]
91
115
  optional :metadata, ModernTreasury::Internal::Type::HashOf[String]
92
116
 
93
- # @!method initialize(amount:, direction:, ledger_account_id:, metadata: nil)
117
+ # @!attribute pending_balance_amount
118
+ # Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
119
+ # account’s pending balance. If any of these conditions would be false after the
120
+ # transaction is created, the entire call will fail with error code 422.
121
+ #
122
+ # @return [Hash{Symbol=>Integer}, nil]
123
+ optional :pending_balance_amount, ModernTreasury::Internal::Type::HashOf[Integer], nil?: true
124
+
125
+ # @!attribute posted_balance_amount
126
+ # Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
127
+ # account’s posted balance. If any of these conditions would be false after the
128
+ # transaction is created, the entire call will fail with error code 422.
129
+ #
130
+ # @return [Hash{Symbol=>Integer}, nil]
131
+ optional :posted_balance_amount, ModernTreasury::Internal::Type::HashOf[Integer], nil?: true
132
+
133
+ # @!attribute show_resulting_ledger_account_balances
134
+ # If true, response will include the balance of the associated ledger account for
135
+ # the entry.
136
+ #
137
+ # @return [Boolean, nil]
138
+ optional :show_resulting_ledger_account_balances, ModernTreasury::Internal::Type::Boolean, nil?: true
139
+
140
+ # @!method initialize(direction:, ledger_account_id:, amount: nil, amount_string: nil, available_balance_amount: nil, lock_version: nil, metadata: nil, pending_balance_amount: nil, posted_balance_amount: nil, show_resulting_ledger_account_balances: nil)
94
141
  # Some parameter documentations has been truncated, see
95
142
  # {ModernTreasury::Models::LedgerTransactionCreatePartialPostParams::PostedLedgerEntry}
96
143
  # for more details.
97
144
  #
98
- # @param amount [Integer] Value in specified currency's smallest unit. e.g. $10 would be represented as 10
99
- #
100
145
  # @param direction [Symbol, ModernTreasury::Models::LedgerTransactionCreatePartialPostParams::PostedLedgerEntry::Direction] One of `credit`, `debit`. Describes the direction money is flowing in the transa
101
146
  #
102
147
  # @param ledger_account_id [String] The ledger account that this ledger entry is associated with.
103
148
  #
149
+ # @param amount [Integer] Value in specified currency's smallest unit. e.g. $10 would be represented as 10
150
+ #
151
+ # @param amount_string [String] The amount of the ledger entry as a string, preserving full precision for values
152
+ #
153
+ # @param available_balance_amount [Hash{Symbol=>Integer}, nil] Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the accou
154
+ #
155
+ # @param lock_version [Integer, nil] Lock version of the ledger account. This can be passed when creating a ledger tr
156
+ #
104
157
  # @param metadata [Hash{Symbol=>String}] Additional data represented as key-value pairs. Both the key and value must be s
158
+ #
159
+ # @param pending_balance_amount [Hash{Symbol=>Integer}, nil] Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the accou
160
+ #
161
+ # @param posted_balance_amount [Hash{Symbol=>Integer}, nil] Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the accou
162
+ #
163
+ # @param show_resulting_ledger_account_balances [Boolean, nil] If true, response will include the balance of the associated ledger account for
105
164
 
106
165
  # One of `credit`, `debit`. Describes the direction money is flowing in the
107
166
  # transaction. A `credit` moves money from your account to someone else's. A
@@ -204,6 +204,13 @@ module ModernTreasury
204
204
  # @return [Integer]
205
205
  required :amount, Integer
206
206
 
207
+ # @!attribute amount_string
208
+ # The amount of the ledger entry as a string, preserving full precision for values
209
+ # that may exceed safe integer limits in some languages.
210
+ #
211
+ # @return [String]
212
+ required :amount_string, String
213
+
207
214
  # @!attribute created_at
208
215
  #
209
216
  # @return [Time]
@@ -297,7 +304,7 @@ module ModernTreasury
297
304
  required :status,
298
305
  enum: -> { ModernTreasury::LedgerTransactions::LedgerTransactionVersion::LedgerEntry::Status }
299
306
 
300
- # @!method initialize(id:, amount:, created_at:, direction:, effective_at:, ledger_account_currency:, ledger_account_currency_exponent:, ledger_account_id:, ledger_account_lock_version:, ledger_transaction_id:, live_mode:, metadata:, object:, resulting_ledger_account_balances:, status:)
307
+ # @!method initialize(id:, amount:, amount_string:, created_at:, direction:, effective_at:, ledger_account_currency:, ledger_account_currency_exponent:, ledger_account_id:, ledger_account_lock_version:, ledger_transaction_id:, live_mode:, metadata:, object:, resulting_ledger_account_balances:, status:)
301
308
  # Some parameter documentations has been truncated, see
302
309
  # {ModernTreasury::Models::LedgerTransactions::LedgerTransactionVersion::LedgerEntry}
303
310
  # for more details.
@@ -306,6 +313,8 @@ module ModernTreasury
306
313
  #
307
314
  # @param amount [Integer] Value in specified currency's smallest unit. e.g. $10 would be represented as 10
308
315
  #
316
+ # @param amount_string [String] The amount of the ledger entry as a string, preserving full precision for values
317
+ #
309
318
  # @param created_at [Time]
310
319
  #
311
320
  # @param direction [Symbol, ModernTreasury::Models::TransactionDirection] One of `credit`, `debit`. Describes the direction money is flowing in the transa
@@ -246,6 +246,12 @@ module ModernTreasury
246
246
  # @return [String, nil]
247
247
  required :suffix, String, nil?: true
248
248
 
249
+ # @!attribute terms_of_use
250
+ # Acceptance of terms of use by the legal entity.
251
+ #
252
+ # @return [ModernTreasury::Models::LegalEntity::TermsOfUse, nil]
253
+ required :terms_of_use, -> { ModernTreasury::LegalEntity::TermsOfUse }, nil?: true
254
+
249
255
  # @!attribute third_party_verification
250
256
  # @deprecated
251
257
  #
@@ -293,7 +299,7 @@ module ModernTreasury
293
299
  -> { ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::LegalEntityAssociation] },
294
300
  nil?: true
295
301
 
296
- # @!method initialize(id:, addresses:, bank_settings:, business_description:, business_name:, citizenship_country:, compliance_details:, country_of_incorporation:, created_at:, date_formed:, date_of_birth:, discarded_at:, documents:, doing_business_as_names:, email:, expected_activity_volume:, external_id:, first_name:, identifications:, industry_classifications:, intended_use:, last_name:, legal_entity_type:, legal_structure:, listed_exchange:, live_mode:, metadata:, middle_name:, object:, operating_jurisdictions:, phone_numbers:, politically_exposed_person:, preferred_name:, prefix:, primary_social_media_sites:, regulators:, risk_rating:, service_provider_legal_entity_id:, status:, suffix:, third_party_verification:, third_party_verifications:, ticker_symbol:, updated_at:, wealth_and_employment_details:, website:, legal_entity_associations: nil)
302
+ # @!method initialize(id:, addresses:, bank_settings:, business_description:, business_name:, citizenship_country:, compliance_details:, country_of_incorporation:, created_at:, date_formed:, date_of_birth:, discarded_at:, documents:, doing_business_as_names:, email:, expected_activity_volume:, external_id:, first_name:, identifications:, industry_classifications:, intended_use:, last_name:, legal_entity_type:, legal_structure:, listed_exchange:, live_mode:, metadata:, middle_name:, object:, operating_jurisdictions:, phone_numbers:, politically_exposed_person:, preferred_name:, prefix:, primary_social_media_sites:, regulators:, risk_rating:, service_provider_legal_entity_id:, status:, suffix:, terms_of_use:, third_party_verification:, third_party_verifications:, ticker_symbol:, updated_at:, wealth_and_employment_details:, website:, legal_entity_associations: nil)
297
303
  # Some parameter documentations has been truncated, see
298
304
  # {ModernTreasury::Models::LegalEntity} for more details.
299
305
  #
@@ -377,6 +383,8 @@ module ModernTreasury
377
383
  #
378
384
  # @param suffix [String, nil] An individual's suffix.
379
385
  #
386
+ # @param terms_of_use [ModernTreasury::Models::LegalEntity::TermsOfUse, nil] Acceptance of terms of use by the legal entity.
387
+ #
380
388
  # @param third_party_verification [ModernTreasury::Models::ThirdPartyVerification, nil] Deprecated. Use `third_party_verifications` instead.
381
389
  #
382
390
  # @param third_party_verifications [Array<ModernTreasury::Models::ThirdPartyVerification>] A list of third-party verifications run by external vendors.
@@ -454,6 +462,13 @@ module ModernTreasury
454
462
  # @return [String, nil]
455
463
  required :postal_code, String, nil?: true
456
464
 
465
+ # @!attribute primary
466
+ # Whether this address is the primary address for the legal entity. Optional; when
467
+ # omitted it is inferred from the address types.
468
+ #
469
+ # @return [Boolean, nil]
470
+ required :primary, ModernTreasury::Internal::Type::Boolean, nil?: true
471
+
457
472
  # @!attribute region
458
473
  # Region or State.
459
474
  #
@@ -465,7 +480,7 @@ module ModernTreasury
465
480
  # @return [Time]
466
481
  required :updated_at, Time
467
482
 
468
- # @!method initialize(id:, address_types:, country:, created_at:, discarded_at:, line1:, line2:, live_mode:, locality:, object:, postal_code:, region:, updated_at:)
483
+ # @!method initialize(id:, address_types:, country:, created_at:, discarded_at:, line1:, line2:, live_mode:, locality:, object:, postal_code:, primary:, region:, updated_at:)
469
484
  # Some parameter documentations has been truncated, see
470
485
  # {ModernTreasury::Models::LegalEntity::Address} for more details.
471
486
  #
@@ -491,6 +506,8 @@ module ModernTreasury
491
506
  #
492
507
  # @param postal_code [String, nil] The postal code of the address.
493
508
  #
509
+ # @param primary [Boolean, nil] Whether this address is the primary address for the legal entity. Optional; when
510
+ #
494
511
  # @param region [String, nil] Region or State.
495
512
  #
496
513
  # @param updated_at [Time]
@@ -499,6 +516,7 @@ module ModernTreasury
499
516
  extend ModernTreasury::Internal::Type::Enum
500
517
 
501
518
  BUSINESS = :business
519
+ BUSINESS_PHYSICAL = :business_physical
502
520
  BUSINESS_REGISTERED = :business_registered
503
521
  MAILING = :mailing
504
522
  OTHER = :other
@@ -608,27 +626,102 @@ module ModernTreasury
608
626
 
609
627
  AR_CUIL = :ar_cuil
610
628
  AR_CUIT = :ar_cuit
629
+ AT_ATIN = :at_atin
630
+ AT_VAT = :at_vat
631
+ AU_ABN = :au_abn
632
+ AU_TFN = :au_tfn
633
+ BE_ENT = :be_ent
634
+ BE_NRN = :be_nrn
611
635
  BR_CNPJ = :br_cnpj
612
636
  BR_CPF = :br_cpf
637
+ CA_BN = :ca_bn
613
638
  CA_SIN = :ca_sin
639
+ CH_AHV = :ch_ahv
640
+ CH_UID = :ch_uid
614
641
  CL_RUN = :cl_run
615
642
  CL_RUT = :cl_rut
616
643
  CO_CEDULAS = :co_cedulas
617
644
  CO_NIT = :co_nit
645
+ CY_TIN = :cy_tin
646
+ CZ_ICO = :cz_ico
647
+ CZ_RC = :cz_rc
648
+ DE_STID = :de_stid
649
+ DE_STNR = :de_stnr
650
+ DE_VAT = :de_vat
651
+ DK_CPR = :dk_cpr
652
+ DK_CVR = :dk_cvr
618
653
  DRIVERS_LICENSE = :drivers_license
654
+ EE_IK = :ee_ik
655
+ EE_RK = :ee_rk
656
+ ES_NIE = :es_nie
657
+ ES_NIF = :es_nif
658
+ FI_HETU = :fi_hetu
659
+ FI_YTJ = :fi_ytj
660
+ FR_NIF = :fr_nif
661
+ FR_SIREN = :fr_siren
662
+ FR_VAT = :fr_vat
663
+ GB_NINO = :gb_nino
664
+ GB_UTR = :gb_utr
665
+ GB_VAT = :gb_vat
666
+ GENERIC_INTERNATIONAL = :generic_international
667
+ GR_VAT = :gr_vat
619
668
  HN_ID = :hn_id
620
669
  HN_RTN = :hn_rtn
670
+ HR_OIB = :hr_oib
671
+ HU_ADJ = :hu_adj
672
+ HU_ANUM = :hu_anum
621
673
  IE_PPS = :ie_pps
674
+ IE_TRN = :ie_trn
622
675
  IN_LEI = :in_lei
676
+ IS_KNT = :is_knt
677
+ IT_CF = :it_cf
678
+ IT_PIVA = :it_piva
679
+ JP_HB = :jp_hb
680
+ JP_MN = :jp_mn
623
681
  KR_BRN = :kr_brn
624
682
  KR_CRN = :kr_crn
625
683
  KR_RRN = :kr_rrn
684
+ LI_PEID = :li_peid
685
+ LT_AK = :lt_ak
686
+ LT_JAK = :lt_jak
687
+ LU_MTC = :lu_mtc
688
+ LU_VAT = :lu_vat
689
+ LV_PK = :lv_pk
690
+ LV_RN = :lv_rn
691
+ MT_TIN = :mt_tin
692
+ MT_VAT = :mt_vat
693
+ MX_CURP = :mx_curp
694
+ MX_INE = :mx_ine
695
+ MX_RFC = :mx_rfc
696
+ NATIONAL_ID = :national_id
697
+ NL_BSN = :nl_bsn
698
+ NL_BTW = :nl_btw
699
+ NL_RSIN = :nl_rsin
700
+ NO_FDN = :no_fdn
701
+ NO_MVA = :no_mva
702
+ NO_ORGNR = :no_orgnr
703
+ NZ_IRD = :nz_ird
626
704
  PASSPORT = :passport
705
+ PL_NIP = :pl_nip
706
+ PL_PESEL = :pl_pesel
707
+ PT_NIF = :pt_nif
708
+ RO_CNP = :ro_cnp
709
+ RO_CUI = :ro_cui
627
710
  SA_TIN = :sa_tin
628
711
  SA_VAT = :sa_vat
712
+ SE_ORGNR = :se_orgnr
713
+ SE_PNMR = :se_pnmr
714
+ SG_FIN = :sg_fin
715
+ SG_NRIC = :sg_nric
716
+ SG_UEN = :sg_uen
717
+ SI_DAV = :si_dav
718
+ SI_TIN = :si_tin
719
+ SK_ICO = :sk_ico
720
+ SK_RC = :sk_rc
629
721
  US_EIN = :us_ein
630
722
  US_ITIN = :us_itin
631
723
  US_SSN = :us_ssn
724
+ UY_RUT = :uy_rut
632
725
  VN_TIN = :vn_tin
633
726
 
634
727
  # @!method self.values
@@ -644,7 +737,6 @@ module ModernTreasury
644
737
 
645
738
  BUSINESS = :business
646
739
  INDIVIDUAL = :individual
647
- JOINT = :joint
648
740
 
649
741
  # @!method self.values
650
742
  # @return [Array<Symbol>]
@@ -739,6 +831,32 @@ module ModernTreasury
739
831
  # @!method self.values
740
832
  # @return [Array<Symbol>]
741
833
  end
834
+
835
+ # @see ModernTreasury::Models::LegalEntity#terms_of_use
836
+ class TermsOfUse < ModernTreasury::Internal::Type::BaseModel
837
+ # @!attribute accepted_at
838
+ # The ISO 8601 timestamp indicating when the terms of use were accepted.
839
+ #
840
+ # @return [Time, nil]
841
+ optional :accepted_at, Time
842
+
843
+ # @!attribute ip_address
844
+ # The IP address from which the terms of use were accepted. Supports both IPv4 and
845
+ # IPv6 formats.
846
+ #
847
+ # @return [String, nil]
848
+ optional :ip_address, String
849
+
850
+ # @!method initialize(accepted_at: nil, ip_address: nil)
851
+ # Some parameter documentations has been truncated, see
852
+ # {ModernTreasury::Models::LegalEntity::TermsOfUse} for more details.
853
+ #
854
+ # Acceptance of terms of use by the legal entity.
855
+ #
856
+ # @param accepted_at [Time] The ISO 8601 timestamp indicating when the terms of use were accepted.
857
+ #
858
+ # @param ip_address [String] The IP address from which the terms of use were accepted. Supports both IPv4 and
859
+ end
742
860
  end
743
861
  end
744
862
  end
@@ -44,7 +44,17 @@ module ModernTreasury
44
44
  # @return [String, nil]
45
45
  optional :line2, String, nil?: true
46
46
 
47
- # @!method initialize(country:, line1:, locality:, postal_code:, region:, address_types: nil, line2: nil)
47
+ # @!attribute primary
48
+ # Whether this address is the primary address for the legal entity. Optional; when
49
+ # omitted it is inferred from the address types.
50
+ #
51
+ # @return [Boolean, nil]
52
+ optional :primary, ModernTreasury::Internal::Type::Boolean, nil?: true
53
+
54
+ # @!method initialize(country:, line1:, locality:, postal_code:, region:, address_types: nil, line2: nil, primary: nil)
55
+ # Some parameter documentations has been truncated, see
56
+ # {ModernTreasury::Models::LegalEntityAddressCreateRequest} for more details.
57
+ #
48
58
  # @param country [String, nil] Country code conforms to [ISO 3166-1 alpha-2]
49
59
  #
50
60
  # @param line1 [String, nil]
@@ -58,11 +68,14 @@ module ModernTreasury
58
68
  # @param address_types [Array<Symbol, ModernTreasury::Models::LegalEntityAddressCreateRequest::AddressType>] The types of this address.
59
69
  #
60
70
  # @param line2 [String, nil]
71
+ #
72
+ # @param primary [Boolean, nil] Whether this address is the primary address for the legal entity. Optional; when
61
73
 
62
74
  module AddressType
63
75
  extend ModernTreasury::Internal::Type::Enum
64
76
 
65
77
  BUSINESS = :business
78
+ BUSINESS_PHYSICAL = :business_physical
66
79
  BUSINESS_REGISTERED = :business_registered
67
80
  MAILING = :mailing
68
81
  OTHER = :other
@@ -43,8 +43,7 @@ module ModernTreasury
43
43
  required :ownership_percentage, Integer, nil?: true
44
44
 
45
45
  # @!attribute parent_legal_entity_id
46
- # The ID of the parent legal entity. This must be a business or joint legal
47
- # entity.
46
+ # The ID of the parent legal entity. This must be a business legal entity.
48
47
  #
49
48
  # @return [String]
50
49
  required :parent_legal_entity_id, String
@@ -84,7 +83,7 @@ module ModernTreasury
84
83
  #
85
84
  # @param ownership_percentage [Integer, nil] The child entity's ownership percentage iff they are a beneficial owner.
86
85
  #
87
- # @param parent_legal_entity_id [String] The ID of the parent legal entity. This must be a business or joint legal entity
86
+ # @param parent_legal_entity_id [String] The ID of the parent legal entity. This must be a business legal entity.
88
87
  #
89
88
  # @param relationship_types [Array<Symbol, ModernTreasury::Models::LegalEntityAssociation::RelationshipType>]
90
89
  #
@@ -243,6 +243,12 @@ module ModernTreasury
243
243
  # @return [String, nil]
244
244
  optional :suffix, String, nil?: true
245
245
 
246
+ # @!attribute terms_of_use
247
+ # Acceptance of terms of use by the legal entity.
248
+ #
249
+ # @return [ModernTreasury::Models::LegalEntityCreateParams::TermsOfUse, nil]
250
+ optional :terms_of_use, -> { ModernTreasury::LegalEntityCreateParams::TermsOfUse }, nil?: true
251
+
246
252
  # @!attribute third_party_verification
247
253
  # @deprecated
248
254
  #
@@ -277,7 +283,7 @@ module ModernTreasury
277
283
  # @return [String, nil]
278
284
  optional :website, String, nil?: true
279
285
 
280
- # @!method initialize(legal_entity_type:, addresses: nil, bank_settings: nil, business_description: nil, business_name: nil, citizenship_country: nil, compliance_details: nil, connection_id: nil, country_of_incorporation: nil, date_formed: nil, date_of_birth: nil, documents: nil, doing_business_as_names: nil, email: nil, expected_activity_volume: nil, external_id: nil, first_name: nil, identifications: nil, industry_classifications: nil, intended_use: nil, last_name: nil, legal_entity_associations: nil, legal_structure: nil, listed_exchange: nil, metadata: nil, middle_name: nil, operating_jurisdictions: nil, phone_numbers: nil, politically_exposed_person: nil, preferred_name: nil, prefix: nil, primary_social_media_sites: nil, regulators: nil, risk_rating: nil, service_provider_legal_entity_id: nil, suffix: nil, third_party_verification: nil, third_party_verifications: nil, ticker_symbol: nil, wealth_and_employment_details: nil, website: nil, request_options: {})
286
+ # @!method initialize(legal_entity_type:, addresses: nil, bank_settings: nil, business_description: nil, business_name: nil, citizenship_country: nil, compliance_details: nil, connection_id: nil, country_of_incorporation: nil, date_formed: nil, date_of_birth: nil, documents: nil, doing_business_as_names: nil, email: nil, expected_activity_volume: nil, external_id: nil, first_name: nil, identifications: nil, industry_classifications: nil, intended_use: nil, last_name: nil, legal_entity_associations: nil, legal_structure: nil, listed_exchange: nil, metadata: nil, middle_name: nil, operating_jurisdictions: nil, phone_numbers: nil, politically_exposed_person: nil, preferred_name: nil, prefix: nil, primary_social_media_sites: nil, regulators: nil, risk_rating: nil, service_provider_legal_entity_id: nil, suffix: nil, terms_of_use: nil, third_party_verification: nil, third_party_verifications: nil, ticker_symbol: nil, wealth_and_employment_details: nil, website: nil, request_options: {})
281
287
  # Some parameter documentations has been truncated, see
282
288
  # {ModernTreasury::Models::LegalEntityCreateParams} for more details.
283
289
  #
@@ -353,6 +359,8 @@ module ModernTreasury
353
359
  #
354
360
  # @param suffix [String, nil] An individual's suffix.
355
361
  #
362
+ # @param terms_of_use [ModernTreasury::Models::LegalEntityCreateParams::TermsOfUse, nil] Acceptance of terms of use by the legal entity.
363
+ #
356
364
  # @param third_party_verification [ModernTreasury::Models::ThirdPartyVerification, nil] Deprecated. Use `third_party_verifications` instead.
357
365
  #
358
366
  # @param third_party_verifications [Array<ModernTreasury::Models::ThirdPartyVerification>] A list of third-party verifications run by external vendors.
@@ -490,6 +498,31 @@ module ModernTreasury
490
498
  # @!method self.values
491
499
  # @return [Array<Symbol>]
492
500
  end
501
+
502
+ class TermsOfUse < ModernTreasury::Internal::Type::BaseModel
503
+ # @!attribute accepted_at
504
+ # The ISO 8601 timestamp indicating when the terms of use were accepted.
505
+ #
506
+ # @return [Time, nil]
507
+ optional :accepted_at, Time
508
+
509
+ # @!attribute ip_address
510
+ # The IP address from which the terms of use were accepted. Supports both IPv4 and
511
+ # IPv6 formats.
512
+ #
513
+ # @return [String, nil]
514
+ optional :ip_address, String
515
+
516
+ # @!method initialize(accepted_at: nil, ip_address: nil)
517
+ # Some parameter documentations has been truncated, see
518
+ # {ModernTreasury::Models::LegalEntityCreateParams::TermsOfUse} for more details.
519
+ #
520
+ # Acceptance of terms of use by the legal entity.
521
+ #
522
+ # @param accepted_at [Time] The ISO 8601 timestamp indicating when the terms of use were accepted.
523
+ #
524
+ # @param ip_address [String] The IP address from which the terms of use were accepted. Supports both IPv4 and
525
+ end
493
526
  end
494
527
  end
495
528
  end
@@ -208,6 +208,12 @@ module ModernTreasury
208
208
  # @return [String, nil]
209
209
  optional :suffix, String, nil?: true
210
210
 
211
+ # @!attribute terms_of_use
212
+ # Acceptance of terms of use by the legal entity.
213
+ #
214
+ # @return [ModernTreasury::Models::LegalEntityUpdateParams::TermsOfUse, nil]
215
+ optional :terms_of_use, -> { ModernTreasury::LegalEntityUpdateParams::TermsOfUse }, nil?: true
216
+
211
217
  # @!attribute third_party_verification
212
218
  # @deprecated
213
219
  #
@@ -242,7 +248,7 @@ module ModernTreasury
242
248
  # @return [String, nil]
243
249
  optional :website, String, nil?: true
244
250
 
245
- # @!method initialize(id:, addresses: nil, bank_settings: nil, business_description: nil, business_name: nil, citizenship_country: nil, country_of_incorporation: nil, date_formed: nil, date_of_birth: nil, doing_business_as_names: nil, email: nil, expected_activity_volume: nil, external_id: nil, first_name: nil, identifications: nil, industry_classifications: nil, intended_use: nil, last_name: nil, legal_structure: nil, listed_exchange: nil, metadata: nil, middle_name: nil, operating_jurisdictions: nil, phone_numbers: nil, politically_exposed_person: nil, preferred_name: nil, prefix: nil, primary_social_media_sites: nil, regulators: nil, risk_rating: nil, service_provider_legal_entity_id: nil, suffix: nil, third_party_verification: nil, third_party_verifications: nil, ticker_symbol: nil, wealth_and_employment_details: nil, website: nil, request_options: {})
251
+ # @!method initialize(id:, addresses: nil, bank_settings: nil, business_description: nil, business_name: nil, citizenship_country: nil, country_of_incorporation: nil, date_formed: nil, date_of_birth: nil, doing_business_as_names: nil, email: nil, expected_activity_volume: nil, external_id: nil, first_name: nil, identifications: nil, industry_classifications: nil, intended_use: nil, last_name: nil, legal_structure: nil, listed_exchange: nil, metadata: nil, middle_name: nil, operating_jurisdictions: nil, phone_numbers: nil, politically_exposed_person: nil, preferred_name: nil, prefix: nil, primary_social_media_sites: nil, regulators: nil, risk_rating: nil, service_provider_legal_entity_id: nil, suffix: nil, terms_of_use: nil, third_party_verification: nil, third_party_verifications: nil, ticker_symbol: nil, wealth_and_employment_details: nil, website: nil, request_options: {})
246
252
  # Some parameter documentations has been truncated, see
247
253
  # {ModernTreasury::Models::LegalEntityUpdateParams} for more details.
248
254
  #
@@ -310,6 +316,8 @@ module ModernTreasury
310
316
  #
311
317
  # @param suffix [String, nil] An individual's suffix.
312
318
  #
319
+ # @param terms_of_use [ModernTreasury::Models::LegalEntityUpdateParams::TermsOfUse, nil] Acceptance of terms of use by the legal entity.
320
+ #
313
321
  # @param third_party_verification [ModernTreasury::Models::ThirdPartyVerification, nil] Deprecated. Use `third_party_verifications` instead.
314
322
  #
315
323
  # @param third_party_verifications [Array<ModernTreasury::Models::ThirdPartyVerification>] A list of third-party verifications run by external vendors.
@@ -391,6 +399,31 @@ module ModernTreasury
391
399
  # @!method self.values
392
400
  # @return [Array<Symbol>]
393
401
  end
402
+
403
+ class TermsOfUse < ModernTreasury::Internal::Type::BaseModel
404
+ # @!attribute accepted_at
405
+ # The ISO 8601 timestamp indicating when the terms of use were accepted.
406
+ #
407
+ # @return [Time, nil]
408
+ optional :accepted_at, Time
409
+
410
+ # @!attribute ip_address
411
+ # The IP address from which the terms of use were accepted. Supports both IPv4 and
412
+ # IPv6 formats.
413
+ #
414
+ # @return [String, nil]
415
+ optional :ip_address, String
416
+
417
+ # @!method initialize(accepted_at: nil, ip_address: nil)
418
+ # Some parameter documentations has been truncated, see
419
+ # {ModernTreasury::Models::LegalEntityUpdateParams::TermsOfUse} for more details.
420
+ #
421
+ # Acceptance of terms of use by the legal entity.
422
+ #
423
+ # @param accepted_at [Time] The ISO 8601 timestamp indicating when the terms of use were accepted.
424
+ #
425
+ # @param ip_address [String] The IP address from which the terms of use were accepted. Supports both IPv4 and
426
+ end
394
427
  end
395
428
  end
396
429
  end
@@ -0,0 +1,46 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ModernTreasury
4
+ module Models
5
+ # @see ModernTreasury::Resources::LegalEntities#update_status
6
+ class LegalEntityUpdateStatusParams < ModernTreasury::Internal::Type::BaseModel
7
+ extend ModernTreasury::Internal::Type::RequestParameters::Converter
8
+ include ModernTreasury::Internal::Type::RequestParameters
9
+
10
+ # @!attribute id
11
+ #
12
+ # @return [String]
13
+ required :id, String
14
+
15
+ # @!attribute status
16
+ # The target status for the legal entity. One of `active`, `suspended`, or
17
+ # `denied`. Valid transitions depend on the current status.
18
+ #
19
+ # @return [Symbol, ModernTreasury::Models::LegalEntityUpdateStatusParams::Status]
20
+ required :status, enum: -> { ModernTreasury::LegalEntityUpdateStatusParams::Status }
21
+
22
+ # @!method initialize(id:, status:, request_options: {})
23
+ # Some parameter documentations has been truncated, see
24
+ # {ModernTreasury::Models::LegalEntityUpdateStatusParams} for more details.
25
+ #
26
+ # @param id [String]
27
+ #
28
+ # @param status [Symbol, ModernTreasury::Models::LegalEntityUpdateStatusParams::Status] The target status for the legal entity. One of `active`, `suspended`, or `denied
29
+ #
30
+ # @param request_options [ModernTreasury::RequestOptions, Hash{Symbol=>Object}]
31
+
32
+ # The target status for the legal entity. One of `active`, `suspended`, or
33
+ # `denied`. Valid transitions depend on the current status.
34
+ module Status
35
+ extend ModernTreasury::Internal::Type::Enum
36
+
37
+ ACTIVE = :active
38
+ SUSPENDED = :suspended
39
+ DENIED = :denied
40
+
41
+ # @!method self.values
42
+ # @return [Array<Symbol>]
43
+ end
44
+ end
45
+ end
46
+ end