modern_treasury 0.3.0 → 0.5.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 (173) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +31 -0
  3. data/README.md +1 -1
  4. data/lib/modern_treasury/internal/transport/base_client.rb +1 -4
  5. data/lib/modern_treasury/internal/transport/pooled_net_requester.rb +1 -9
  6. data/lib/modern_treasury/internal/type/base_model.rb +6 -12
  7. data/lib/modern_treasury/internal/util.rb +1 -1
  8. data/lib/modern_treasury/models/account_collection_flow.rb +2 -6
  9. data/lib/modern_treasury/models/account_collection_flow_create_params.rb +1 -3
  10. data/lib/modern_treasury/models/bulk_request_create_params.rb +28 -107
  11. data/lib/modern_treasury/models/bulk_result.rb +1 -3
  12. data/lib/modern_treasury/models/child_legal_entity_create.rb +10 -12
  13. data/lib/modern_treasury/models/connection_legal_entity_create_params.rb +11 -15
  14. data/lib/modern_treasury/models/counterparty.rb +4 -16
  15. data/lib/modern_treasury/models/counterparty_collect_account_params.rb +1 -3
  16. data/lib/modern_treasury/models/counterparty_create_params.rb +18 -33
  17. data/lib/modern_treasury/models/expected_payment_create_params.rb +1 -3
  18. data/lib/modern_treasury/models/expected_payment_list_params.rb +1 -0
  19. data/lib/modern_treasury/models/expected_payment_type.rb +1 -0
  20. data/lib/modern_treasury/models/external_account_create_params.rb +3 -6
  21. data/lib/modern_treasury/models/external_account_verify_params.rb +1 -0
  22. data/lib/modern_treasury/models/external_account_verify_response.rb +1 -0
  23. data/lib/modern_treasury/models/internal_account.rb +2 -3
  24. data/lib/modern_treasury/models/internal_account_create_params.rb +2 -3
  25. data/lib/modern_treasury/models/internal_account_list_params.rb +1 -0
  26. data/lib/modern_treasury/models/internal_account_update_account_capability_response.rb +1 -0
  27. data/lib/modern_treasury/models/internal_accounts/balance_report.rb +2 -7
  28. data/lib/modern_treasury/models/internal_accounts/balance_report_create_params.rb +2 -6
  29. data/lib/modern_treasury/models/internal_accounts/balance_report_retrieve_params.rb +1 -3
  30. data/lib/modern_treasury/models/ledger_account_balance_monitor_create_params.rb +1 -4
  31. data/lib/modern_treasury/models/ledger_account_list_params.rb +1 -4
  32. data/lib/modern_treasury/models/ledger_account_settlement.rb +3 -3
  33. data/lib/modern_treasury/models/ledger_entry_list_params.rb +46 -4
  34. data/lib/modern_treasury/models/ledger_transaction_create_partial_post_params.rb +2 -6
  35. data/lib/modern_treasury/models/ledger_transaction_list_params.rb +45 -1
  36. data/lib/modern_treasury/models/ledger_transactions/ledger_transaction_version.rb +2 -6
  37. data/lib/modern_treasury/models/legal_entity.rb +11 -16
  38. data/lib/modern_treasury/models/legal_entity_address_create_request.rb +1 -3
  39. data/lib/modern_treasury/models/legal_entity_association.rb +15 -27
  40. data/lib/modern_treasury/models/legal_entity_association_create_params.rb +1 -3
  41. data/lib/modern_treasury/models/legal_entity_bank_settings.rb +91 -0
  42. data/lib/modern_treasury/models/legal_entity_create_params.rb +11 -15
  43. data/lib/modern_treasury/models/legal_entity_update_params.rb +10 -12
  44. data/lib/modern_treasury/models/legal_entity_wealth_employment_detail.rb +312 -0
  45. data/lib/modern_treasury/models/line_item.rb +1 -18
  46. data/lib/modern_treasury/models/payment_action_create_response.rb +1 -1
  47. data/lib/modern_treasury/models/payment_action_list_params.rb +1 -2
  48. data/lib/modern_treasury/models/payment_action_list_response.rb +1 -1
  49. data/lib/modern_treasury/models/payment_action_retrieve_response.rb +1 -1
  50. data/lib/modern_treasury/models/payment_action_update_params.rb +1 -0
  51. data/lib/modern_treasury/models/payment_action_update_response.rb +1 -1
  52. data/lib/modern_treasury/models/payment_flow.rb +1 -4
  53. data/lib/modern_treasury/models/payment_order.rb +2 -19
  54. data/lib/modern_treasury/models/payment_order_create_async_params.rb +8 -37
  55. data/lib/modern_treasury/models/payment_order_create_params.rb +9 -40
  56. data/lib/modern_treasury/models/payment_order_list_params.rb +1 -0
  57. data/lib/modern_treasury/models/payment_order_type.rb +1 -0
  58. data/lib/modern_treasury/models/payment_order_update_params.rb +8 -37
  59. data/lib/modern_treasury/models/payment_reference.rb +1 -0
  60. data/lib/modern_treasury/models/reconciliation_rule.rb +1 -0
  61. data/lib/modern_treasury/models/return_object.rb +1 -0
  62. data/lib/modern_treasury/models/routing_detail.rb +1 -0
  63. data/lib/modern_treasury/models/routing_detail_create_params.rb +1 -0
  64. data/lib/modern_treasury/models/routing_number_lookup_request.rb +3 -7
  65. data/lib/modern_treasury/models/transaction.rb +1 -0
  66. data/lib/modern_treasury/models/transaction_create_params.rb +1 -0
  67. data/lib/modern_treasury/models/virtual_account_create_params.rb +3 -6
  68. data/lib/modern_treasury/models.rb +4 -2
  69. data/lib/modern_treasury/resources/ledger_entries.rb +3 -1
  70. data/lib/modern_treasury/resources/ledger_transactions.rb +3 -1
  71. data/lib/modern_treasury/resources/legal_entities.rb +4 -4
  72. data/lib/modern_treasury/resources/payment_orders.rb +3 -15
  73. data/lib/modern_treasury/version.rb +1 -1
  74. data/lib/modern_treasury.rb +2 -1
  75. data/rbi/modern_treasury/errors.rbi +2 -2
  76. data/rbi/modern_treasury/models/bulk_request_create_params.rbi +15 -38
  77. data/rbi/modern_treasury/models/child_legal_entity_create.rbi +14 -8
  78. data/rbi/modern_treasury/models/connection_legal_entity_create_params.rbi +16 -8
  79. data/rbi/modern_treasury/models/counterparty_create_params.rbi +21 -8
  80. data/rbi/modern_treasury/models/expected_payment_list_params.rbi +5 -0
  81. data/rbi/modern_treasury/models/expected_payment_type.rbi +1 -0
  82. data/rbi/modern_treasury/models/external_account_create_params.rbi +5 -0
  83. data/rbi/modern_treasury/models/external_account_verify_params.rbi +5 -0
  84. data/rbi/modern_treasury/models/external_account_verify_response.rbi +5 -0
  85. data/rbi/modern_treasury/models/internal_account.rbi +5 -0
  86. data/rbi/modern_treasury/models/internal_account_create_params.rbi +5 -0
  87. data/rbi/modern_treasury/models/internal_account_list_params.rbi +5 -0
  88. data/rbi/modern_treasury/models/internal_account_update_account_capability_response.rbi +5 -0
  89. data/rbi/modern_treasury/models/ledger_account_settlement.rbi +3 -3
  90. data/rbi/modern_treasury/models/ledger_entry_list_params.rbi +82 -0
  91. data/rbi/modern_treasury/models/ledger_transaction_list_params.rbi +84 -0
  92. data/rbi/modern_treasury/models/legal_entity.rbi +14 -8
  93. data/rbi/modern_treasury/models/legal_entity_association.rbi +16 -8
  94. data/rbi/modern_treasury/models/legal_entity_bank_settings.rbi +112 -0
  95. data/rbi/modern_treasury/models/legal_entity_create_params.rbi +14 -8
  96. data/rbi/modern_treasury/models/legal_entity_update_params.rbi +14 -8
  97. data/rbi/modern_treasury/models/legal_entity_wealth_employment_detail.rbi +815 -0
  98. data/rbi/modern_treasury/models/line_item.rbi +0 -21
  99. data/rbi/modern_treasury/models/payment_action_create_response.rbi +2 -2
  100. data/rbi/modern_treasury/models/payment_action_list_params.rbi +5 -10
  101. data/rbi/modern_treasury/models/payment_action_list_response.rbi +2 -2
  102. data/rbi/modern_treasury/models/payment_action_retrieve_response.rbi +2 -2
  103. data/rbi/modern_treasury/models/payment_action_update_params.rbi +5 -0
  104. data/rbi/modern_treasury/models/payment_action_update_response.rbi +2 -2
  105. data/rbi/modern_treasury/models/payment_order.rbi +5 -19
  106. data/rbi/modern_treasury/models/payment_order_create_async_params.rbi +5 -19
  107. data/rbi/modern_treasury/models/payment_order_create_params.rbi +5 -19
  108. data/rbi/modern_treasury/models/payment_order_list_params.rbi +5 -0
  109. data/rbi/modern_treasury/models/payment_order_type.rbi +1 -0
  110. data/rbi/modern_treasury/models/payment_order_update_params.rbi +5 -19
  111. data/rbi/modern_treasury/models/payment_reference.rbi +5 -0
  112. data/rbi/modern_treasury/models/reconciliation_rule.rbi +2 -0
  113. data/rbi/modern_treasury/models/return_object.rbi +5 -0
  114. data/rbi/modern_treasury/models/routing_detail.rbi +5 -0
  115. data/rbi/modern_treasury/models/routing_detail_create_params.rbi +5 -0
  116. data/rbi/modern_treasury/models/routing_number_lookup_request.rbi +5 -0
  117. data/rbi/modern_treasury/models/transaction.rbi +1 -0
  118. data/rbi/modern_treasury/models/transaction_create_params.rbi +5 -0
  119. data/rbi/modern_treasury/models/virtual_account_create_params.rbi +5 -0
  120. data/rbi/modern_treasury/models.rbi +5 -2
  121. data/rbi/modern_treasury/resources/ledger_entries.rbi +3 -0
  122. data/rbi/modern_treasury/resources/ledger_transactions.rbi +3 -0
  123. data/rbi/modern_treasury/resources/legal_entities.rbi +10 -4
  124. data/rbi/modern_treasury/resources/payment_orders.rbi +0 -18
  125. data/sig/modern_treasury/models/bulk_request_create_params.rbs +6 -28
  126. data/sig/modern_treasury/models/child_legal_entity_create.rbs +8 -8
  127. data/sig/modern_treasury/models/connection_legal_entity_create_params.rbs +8 -8
  128. data/sig/modern_treasury/models/counterparty_create_params.rbs +10 -8
  129. data/sig/modern_treasury/models/expected_payment_list_params.rbs +2 -0
  130. data/sig/modern_treasury/models/expected_payment_type.rbs +2 -0
  131. data/sig/modern_treasury/models/external_account_create_params.rbs +2 -0
  132. data/sig/modern_treasury/models/external_account_verify_params.rbs +2 -0
  133. data/sig/modern_treasury/models/external_account_verify_response.rbs +2 -0
  134. data/sig/modern_treasury/models/internal_account.rbs +2 -0
  135. data/sig/modern_treasury/models/internal_account_create_params.rbs +2 -0
  136. data/sig/modern_treasury/models/internal_account_list_params.rbs +2 -0
  137. data/sig/modern_treasury/models/internal_account_update_account_capability_response.rbs +2 -0
  138. data/sig/modern_treasury/models/ledger_account_settlement.rbs +4 -4
  139. data/sig/modern_treasury/models/ledger_entry_list_params.rbs +50 -0
  140. data/sig/modern_treasury/models/ledger_transaction_list_params.rbs +50 -0
  141. data/sig/modern_treasury/models/legal_entity.rbs +8 -8
  142. data/sig/modern_treasury/models/legal_entity_association.rbs +8 -8
  143. data/sig/modern_treasury/models/legal_entity_bank_settings.rbs +65 -0
  144. data/sig/modern_treasury/models/legal_entity_create_params.rbs +8 -8
  145. data/sig/modern_treasury/models/legal_entity_update_params.rbs +8 -8
  146. data/sig/modern_treasury/models/legal_entity_wealth_employment_detail.rbs +325 -0
  147. data/sig/modern_treasury/models/line_item.rbs +0 -10
  148. data/sig/modern_treasury/models/payment_action_list_params.rbs +9 -5
  149. data/sig/modern_treasury/models/payment_action_update_params.rbs +8 -1
  150. data/sig/modern_treasury/models/payment_order.rbs +2 -10
  151. data/sig/modern_treasury/models/payment_order_create_async_params.rbs +2 -14
  152. data/sig/modern_treasury/models/payment_order_create_params.rbs +2 -14
  153. data/sig/modern_treasury/models/payment_order_list_params.rbs +2 -0
  154. data/sig/modern_treasury/models/payment_order_type.rbs +2 -0
  155. data/sig/modern_treasury/models/payment_order_update_params.rbs +2 -14
  156. data/sig/modern_treasury/models/payment_reference.rbs +2 -0
  157. data/sig/modern_treasury/models/reconciliation_rule.rbs +2 -0
  158. data/sig/modern_treasury/models/return_object.rbs +2 -0
  159. data/sig/modern_treasury/models/routing_detail.rbs +2 -0
  160. data/sig/modern_treasury/models/routing_detail_create_params.rbs +2 -0
  161. data/sig/modern_treasury/models/routing_number_lookup_request.rbs +2 -0
  162. data/sig/modern_treasury/models/transaction.rbs +2 -0
  163. data/sig/modern_treasury/models/transaction_create_params.rbs +2 -0
  164. data/sig/modern_treasury/models/virtual_account_create_params.rbs +2 -0
  165. data/sig/modern_treasury/models.rbs +4 -2
  166. data/sig/modern_treasury/resources/ledger_entries.rbs +1 -0
  167. data/sig/modern_treasury/resources/ledger_transactions.rbs +1 -0
  168. data/sig/modern_treasury/resources/legal_entities.rbs +4 -4
  169. data/sig/modern_treasury/resources/payment_orders.rbs +0 -6
  170. metadata +8 -5
  171. data/lib/modern_treasury/models/accounting.rb +0 -30
  172. data/rbi/modern_treasury/models/accounting.rbi +0 -48
  173. data/sig/modern_treasury/models/accounting.rbs +0 -15
@@ -19,6 +19,12 @@ module ModernTreasury
19
19
  # @return [String, nil]
20
20
  optional :after_cursor, String, nil?: true
21
21
 
22
+ # @!attribute amount
23
+ # Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to filter by amount.
24
+ #
25
+ # @return [ModernTreasury::Models::LedgerTransactionListParams::Amount, nil]
26
+ optional :amount, -> { ModernTreasury::LedgerTransactionListParams::Amount }
27
+
22
28
  # @!attribute effective_at
23
29
  # Use "gt" (>), "gte" (>=), "lt" (<), "lte" (<=), or "eq" (=) to filter by
24
30
  # effective at. For example, for all transactions after Jan 1 2000, use
@@ -122,7 +128,7 @@ module ModernTreasury
122
128
  # @return [Hash{Symbol=>Time}, nil]
123
129
  optional :updated_at, ModernTreasury::Internal::Type::HashOf[Time]
124
130
 
125
- # @!method initialize(id: nil, after_cursor: nil, effective_at: nil, effective_date: nil, external_id: nil, ledger_account_category_id: nil, ledger_account_id: nil, ledger_account_settlement_id: nil, ledger_id: nil, ledgerable_id: nil, ledgerable_type: nil, metadata: nil, order_by: nil, partially_posts_ledger_transaction_id: nil, per_page: nil, posted_at: nil, reverses_ledger_transaction_id: nil, status: nil, updated_at: nil, request_options: {})
131
+ # @!method initialize(id: nil, after_cursor: nil, amount: nil, effective_at: nil, effective_date: nil, external_id: nil, ledger_account_category_id: nil, ledger_account_id: nil, ledger_account_settlement_id: nil, ledger_id: nil, ledgerable_id: nil, ledgerable_type: nil, metadata: nil, order_by: nil, partially_posts_ledger_transaction_id: nil, per_page: nil, posted_at: nil, reverses_ledger_transaction_id: nil, status: nil, updated_at: nil, request_options: {})
126
132
  # Some parameter documentations has been truncated, see
127
133
  # {ModernTreasury::Models::LedgerTransactionListParams} for more details.
128
134
  #
@@ -130,6 +136,8 @@ module ModernTreasury
130
136
  #
131
137
  # @param after_cursor [String, nil]
132
138
  #
139
+ # @param amount [ModernTreasury::Models::LedgerTransactionListParams::Amount] Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to filter by amount.
140
+ #
133
141
  # @param effective_at [Hash{Symbol=>Time}] Use "gt" (>), "gte" (>=), "lt" (<), "lte" (<=), or "eq" (=) to filter by effecti
134
142
  #
135
143
  # @param effective_date [Hash{Symbol=>Time}] Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to filter by effecti
@@ -166,6 +174,42 @@ module ModernTreasury
166
174
  #
167
175
  # @param request_options [ModernTreasury::RequestOptions, Hash{Symbol=>Object}]
168
176
 
177
+ class Amount < ModernTreasury::Internal::Type::BaseModel
178
+ # @!attribute eq
179
+ #
180
+ # @return [Integer, nil]
181
+ optional :eq, Integer
182
+
183
+ # @!attribute gt
184
+ #
185
+ # @return [Integer, nil]
186
+ optional :gt, Integer
187
+
188
+ # @!attribute gte
189
+ #
190
+ # @return [Integer, nil]
191
+ optional :gte, Integer
192
+
193
+ # @!attribute lt
194
+ #
195
+ # @return [Integer, nil]
196
+ optional :lt, Integer
197
+
198
+ # @!attribute lte
199
+ #
200
+ # @return [Integer, nil]
201
+ optional :lte, Integer
202
+
203
+ # @!method initialize(eq: nil, gt: nil, gte: nil, lt: nil, lte: nil)
204
+ # Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to filter by amount.
205
+ #
206
+ # @param eq [Integer]
207
+ # @param gt [Integer]
208
+ # @param gte [Integer]
209
+ # @param lt [Integer]
210
+ # @param lte [Integer]
211
+ end
212
+
169
213
  module LedgerableType
170
214
  extend ModernTreasury::Internal::Type::Enum
171
215
 
@@ -56,9 +56,7 @@ module ModernTreasury
56
56
  #
57
57
  # @return [Array<ModernTreasury::Models::LedgerTransactions::LedgerTransactionVersion::LedgerEntry>]
58
58
  required :ledger_entries,
59
- -> {
60
- ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::LedgerTransactions::LedgerTransactionVersion::LedgerEntry]
61
- }
59
+ -> { ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::LedgerTransactions::LedgerTransactionVersion::LedgerEntry] }
62
60
 
63
61
  # @!attribute ledger_id
64
62
  # The ID of the ledger this ledger transaction belongs to.
@@ -290,9 +288,7 @@ module ModernTreasury
290
288
  #
291
289
  # @return [Symbol, ModernTreasury::Models::LedgerTransactions::LedgerTransactionVersion::LedgerEntry::Status]
292
290
  required :status,
293
- enum: -> {
294
- ModernTreasury::LedgerTransactions::LedgerTransactionVersion::LedgerEntry::Status
295
- }
291
+ enum: -> { ModernTreasury::LedgerTransactions::LedgerTransactionVersion::LedgerEntry::Status }
296
292
 
297
293
  # @!method initialize(id:, amount:, created_at:, direction:, 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:)
298
294
  # Some parameter documentations has been truncated, see
@@ -13,15 +13,12 @@ module ModernTreasury
13
13
  # A list of addresses for the entity.
14
14
  #
15
15
  # @return [Array<ModernTreasury::Models::LegalEntity::Address>]
16
- required :addresses,
17
- -> {
18
- ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::LegalEntity::Address]
19
- }
16
+ required :addresses, -> { ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::LegalEntity::Address] }
20
17
 
21
18
  # @!attribute bank_settings
22
19
  #
23
- # @return [ModernTreasury::Models::BankSettings, nil]
24
- required :bank_settings, -> { ModernTreasury::BankSettings }, nil?: true
20
+ # @return [ModernTreasury::Models::LegalEntityBankSettings, nil]
21
+ required :bank_settings, -> { ModernTreasury::LegalEntityBankSettings }, nil?: true
25
22
 
26
23
  # @!attribute business_name
27
24
  # The business's legal business name.
@@ -91,9 +88,7 @@ module ModernTreasury
91
88
  #
92
89
  # @return [Array<ModernTreasury::Models::LegalEntityIndustryClassification>]
93
90
  required :industry_classifications,
94
- -> {
95
- ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::LegalEntityIndustryClassification]
96
- }
91
+ -> { ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::LegalEntityIndustryClassification] }
97
92
 
98
93
  # @!attribute last_name
99
94
  # An individual's last name.
@@ -189,8 +184,10 @@ module ModernTreasury
189
184
 
190
185
  # @!attribute wealth_and_employment_details
191
186
  #
192
- # @return [ModernTreasury::Models::WealthAndEmploymentDetails, nil]
193
- required :wealth_and_employment_details, -> { ModernTreasury::WealthAndEmploymentDetails }, nil?: true
187
+ # @return [ModernTreasury::Models::LegalEntityWealthEmploymentDetail, nil]
188
+ required :wealth_and_employment_details,
189
+ -> { ModernTreasury::LegalEntityWealthEmploymentDetail },
190
+ nil?: true
194
191
 
195
192
  # @!attribute website
196
193
  # The entity's primary website URL.
@@ -206,7 +203,7 @@ module ModernTreasury
206
203
  #
207
204
  # @param addresses [Array<ModernTreasury::Models::LegalEntity::Address>] A list of addresses for the entity.
208
205
  #
209
- # @param bank_settings [ModernTreasury::Models::BankSettings, nil]
206
+ # @param bank_settings [ModernTreasury::Models::LegalEntityBankSettings, nil]
210
207
  #
211
208
  # @param business_name [String, nil] The business's legal business name.
212
209
  #
@@ -262,7 +259,7 @@ module ModernTreasury
262
259
  #
263
260
  # @param updated_at [Time]
264
261
  #
265
- # @param wealth_and_employment_details [ModernTreasury::Models::WealthAndEmploymentDetails, nil]
262
+ # @param wealth_and_employment_details [ModernTreasury::Models::LegalEntityWealthEmploymentDetail, nil]
266
263
  #
267
264
  # @param website [String, nil] The entity's primary website URL.
268
265
 
@@ -277,9 +274,7 @@ module ModernTreasury
277
274
  #
278
275
  # @return [Array<Symbol, ModernTreasury::Models::LegalEntity::Address::AddressType>]
279
276
  required :address_types,
280
- -> {
281
- ModernTreasury::Internal::Type::ArrayOf[enum: ModernTreasury::LegalEntity::Address::AddressType]
282
- }
277
+ -> { ModernTreasury::Internal::Type::ArrayOf[enum: ModernTreasury::LegalEntity::Address::AddressType] }
283
278
 
284
279
  # @!attribute country
285
280
  # Country code conforms to [ISO 3166-1 alpha-2]
@@ -37,9 +37,7 @@ module ModernTreasury
37
37
  #
38
38
  # @return [Array<Symbol, ModernTreasury::Models::LegalEntityAddressCreateRequest::AddressType>, nil]
39
39
  optional :address_types,
40
- -> {
41
- ModernTreasury::Internal::Type::ArrayOf[enum: ModernTreasury::LegalEntityAddressCreateRequest::AddressType]
42
- }
40
+ -> { ModernTreasury::Internal::Type::ArrayOf[enum: ModernTreasury::LegalEntityAddressCreateRequest::AddressType] }
43
41
 
44
42
  # @!attribute line2
45
43
  #
@@ -54,9 +54,7 @@ module ModernTreasury
54
54
  #
55
55
  # @return [Array<Symbol, ModernTreasury::Models::LegalEntityAssociation::RelationshipType>]
56
56
  required :relationship_types,
57
- -> {
58
- ModernTreasury::Internal::Type::ArrayOf[enum: ModernTreasury::LegalEntityAssociation::RelationshipType]
59
- }
57
+ -> { ModernTreasury::Internal::Type::ArrayOf[enum: ModernTreasury::LegalEntityAssociation::RelationshipType] }
60
58
 
61
59
  # @!attribute title
62
60
  # The job title of the child entity at the parent entity.
@@ -107,14 +105,12 @@ module ModernTreasury
107
105
  #
108
106
  # @return [Array<ModernTreasury::Models::LegalEntityAssociation::ChildLegalEntity::Address>]
109
107
  required :addresses,
110
- -> {
111
- ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::LegalEntityAssociation::ChildLegalEntity::Address]
112
- }
108
+ -> { ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::LegalEntityAssociation::ChildLegalEntity::Address] }
113
109
 
114
110
  # @!attribute bank_settings
115
111
  #
116
- # @return [ModernTreasury::Models::BankSettings, nil]
117
- required :bank_settings, -> { ModernTreasury::BankSettings }, nil?: true
112
+ # @return [ModernTreasury::Models::LegalEntityBankSettings, nil]
113
+ required :bank_settings, -> { ModernTreasury::LegalEntityBankSettings }, nil?: true
118
114
 
119
115
  # @!attribute business_name
120
116
  # The business's legal business name.
@@ -177,18 +173,14 @@ module ModernTreasury
177
173
  #
178
174
  # @return [Array<ModernTreasury::Models::LegalEntityAssociation::ChildLegalEntity::Identification>]
179
175
  required :identifications,
180
- -> {
181
- ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::LegalEntityAssociation::ChildLegalEntity::Identification]
182
- }
176
+ -> { ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::LegalEntityAssociation::ChildLegalEntity::Identification] }
183
177
 
184
178
  # @!attribute industry_classifications
185
179
  # A list of industry classifications for the legal entity.
186
180
  #
187
181
  # @return [Array<ModernTreasury::Models::LegalEntityIndustryClassification>]
188
182
  required :industry_classifications,
189
- -> {
190
- ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::LegalEntityIndustryClassification]
191
- }
183
+ -> { ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::LegalEntityIndustryClassification] }
192
184
 
193
185
  # @!attribute last_name
194
186
  # An individual's last name.
@@ -240,9 +232,7 @@ module ModernTreasury
240
232
  #
241
233
  # @return [Array<ModernTreasury::Models::LegalEntityAssociation::ChildLegalEntity::PhoneNumber>]
242
234
  required :phone_numbers,
243
- -> {
244
- ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::LegalEntityAssociation::ChildLegalEntity::PhoneNumber]
245
- }
235
+ -> { ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::LegalEntityAssociation::ChildLegalEntity::PhoneNumber] }
246
236
 
247
237
  # @!attribute politically_exposed_person
248
238
  # Whether the individual is a politically exposed person.
@@ -283,8 +273,10 @@ module ModernTreasury
283
273
 
284
274
  # @!attribute wealth_and_employment_details
285
275
  #
286
- # @return [ModernTreasury::Models::WealthAndEmploymentDetails, nil]
287
- required :wealth_and_employment_details, -> { ModernTreasury::WealthAndEmploymentDetails }, nil?: true
276
+ # @return [ModernTreasury::Models::LegalEntityWealthEmploymentDetail, nil]
277
+ required :wealth_and_employment_details,
278
+ -> { ModernTreasury::LegalEntityWealthEmploymentDetail },
279
+ nil?: true
288
280
 
289
281
  # @!attribute website
290
282
  # The entity's primary website URL.
@@ -303,7 +295,7 @@ module ModernTreasury
303
295
  #
304
296
  # @param addresses [Array<ModernTreasury::Models::LegalEntityAssociation::ChildLegalEntity::Address>] A list of addresses for the entity.
305
297
  #
306
- # @param bank_settings [ModernTreasury::Models::BankSettings, nil]
298
+ # @param bank_settings [ModernTreasury::Models::LegalEntityBankSettings, nil]
307
299
  #
308
300
  # @param business_name [String, nil] The business's legal business name.
309
301
  #
@@ -357,7 +349,7 @@ module ModernTreasury
357
349
  #
358
350
  # @param updated_at [Time]
359
351
  #
360
- # @param wealth_and_employment_details [ModernTreasury::Models::WealthAndEmploymentDetails, nil]
352
+ # @param wealth_and_employment_details [ModernTreasury::Models::LegalEntityWealthEmploymentDetail, nil]
361
353
  #
362
354
  # @param website [String, nil] The entity's primary website URL.
363
355
 
@@ -372,9 +364,7 @@ module ModernTreasury
372
364
  #
373
365
  # @return [Array<Symbol, ModernTreasury::Models::LegalEntityAssociation::ChildLegalEntity::Address::AddressType>]
374
366
  required :address_types,
375
- -> {
376
- ModernTreasury::Internal::Type::ArrayOf[enum: ModernTreasury::LegalEntityAssociation::ChildLegalEntity::Address::AddressType]
377
- }
367
+ -> { ModernTreasury::Internal::Type::ArrayOf[enum: ModernTreasury::LegalEntityAssociation::ChildLegalEntity::Address::AddressType] }
378
368
 
379
369
  # @!attribute country
380
370
  # Country code conforms to [ISO 3166-1 alpha-2]
@@ -510,9 +500,7 @@ module ModernTreasury
510
500
  #
511
501
  # @return [Symbol, ModernTreasury::Models::LegalEntityAssociation::ChildLegalEntity::Identification::IDType]
512
502
  required :id_type,
513
- enum: -> {
514
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::Identification::IDType
515
- }
503
+ enum: -> { ModernTreasury::LegalEntityAssociation::ChildLegalEntity::Identification::IDType }
516
504
 
517
505
  # @!attribute issuing_country
518
506
  # The ISO 3166-1 alpha-2 country code of the country that issued the
@@ -18,9 +18,7 @@ module ModernTreasury
18
18
  #
19
19
  # @return [Array<Symbol, ModernTreasury::Models::LegalEntityAssociationCreateParams::RelationshipType>]
20
20
  required :relationship_types,
21
- -> {
22
- ModernTreasury::Internal::Type::ArrayOf[enum: ModernTreasury::LegalEntityAssociationCreateParams::RelationshipType]
23
- }
21
+ -> { ModernTreasury::Internal::Type::ArrayOf[enum: ModernTreasury::LegalEntityAssociationCreateParams::RelationshipType] }
24
22
 
25
23
  # @!attribute child_legal_entity
26
24
  # The child legal entity.
@@ -0,0 +1,91 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ModernTreasury
4
+ module Models
5
+ class LegalEntityBankSettings < ModernTreasury::Internal::Type::BaseModel
6
+ # @!attribute id
7
+ #
8
+ # @return [String]
9
+ required :id, String
10
+
11
+ # @!attribute backup_withholding_percentage
12
+ # The percentage of backup withholding to apply to the legal entity.
13
+ #
14
+ # @return [Integer, nil]
15
+ required :backup_withholding_percentage, Integer, nil?: true
16
+
17
+ # @!attribute created_at
18
+ #
19
+ # @return [Time]
20
+ required :created_at, Time
21
+
22
+ # @!attribute discarded_at
23
+ #
24
+ # @return [Time, nil]
25
+ required :discarded_at, Time, nil?: true
26
+
27
+ # @!attribute enable_backup_withholding
28
+ # Whether backup withholding is enabled. See more here -
29
+ # https://www.irs.gov/businesses/small-businesses-self-employed/backup-withholding.
30
+ #
31
+ # @return [Boolean, nil]
32
+ required :enable_backup_withholding, ModernTreasury::Internal::Type::Boolean, nil?: true
33
+
34
+ # @!attribute live_mode
35
+ # This field will be true if this object exists in the live environment or false
36
+ # if it exists in the test environment.
37
+ #
38
+ # @return [Boolean]
39
+ required :live_mode, ModernTreasury::Internal::Type::Boolean
40
+
41
+ # @!attribute object
42
+ #
43
+ # @return [String]
44
+ required :object, String
45
+
46
+ # @!attribute privacy_opt_out
47
+ # Cross River Bank specific setting to opt out of privacy policy.
48
+ #
49
+ # @return [Boolean, nil]
50
+ required :privacy_opt_out, ModernTreasury::Internal::Type::Boolean, nil?: true
51
+
52
+ # @!attribute regulation_o
53
+ # It covers, among other types of insider loans, extensions of credit by a member
54
+ # bank to an executive officer, director, or principal shareholder of the member
55
+ # bank; a bank holding company of which the member bank is a subsidiary; and any
56
+ # other subsidiary of that bank holding company.
57
+ #
58
+ # @return [Boolean, nil]
59
+ required :regulation_o, ModernTreasury::Internal::Type::Boolean, nil?: true
60
+
61
+ # @!attribute updated_at
62
+ #
63
+ # @return [Time]
64
+ required :updated_at, Time
65
+
66
+ # @!method initialize(id:, backup_withholding_percentage:, created_at:, discarded_at:, enable_backup_withholding:, live_mode:, object:, privacy_opt_out:, regulation_o:, updated_at:)
67
+ # Some parameter documentations has been truncated, see
68
+ # {ModernTreasury::Models::LegalEntityBankSettings} for more details.
69
+ #
70
+ # @param id [String]
71
+ #
72
+ # @param backup_withholding_percentage [Integer, nil] The percentage of backup withholding to apply to the legal entity.
73
+ #
74
+ # @param created_at [Time]
75
+ #
76
+ # @param discarded_at [Time, nil]
77
+ #
78
+ # @param enable_backup_withholding [Boolean, nil] Whether backup withholding is enabled. See more here - https://www.irs.gov/busin
79
+ #
80
+ # @param live_mode [Boolean] This field will be true if this object exists in the live environment or false i
81
+ #
82
+ # @param object [String]
83
+ #
84
+ # @param privacy_opt_out [Boolean, nil] Cross River Bank specific setting to opt out of privacy policy.
85
+ #
86
+ # @param regulation_o [Boolean, nil] It covers, among other types of insider loans, extensions of credit by a member
87
+ #
88
+ # @param updated_at [Time]
89
+ end
90
+ end
91
+ end
@@ -22,8 +22,8 @@ module ModernTreasury
22
22
 
23
23
  # @!attribute bank_settings
24
24
  #
25
- # @return [ModernTreasury::Models::BankSettings, nil]
26
- optional :bank_settings, -> { ModernTreasury::BankSettings }, nil?: true
25
+ # @return [ModernTreasury::Models::LegalEntityBankSettings, nil]
26
+ optional :bank_settings, -> { ModernTreasury::LegalEntityBankSettings }, nil?: true
27
27
 
28
28
  # @!attribute business_name
29
29
  # The business's legal business name.
@@ -83,9 +83,7 @@ module ModernTreasury
83
83
  #
84
84
  # @return [Array<ModernTreasury::Models::LegalEntityIndustryClassification>, nil]
85
85
  optional :industry_classifications,
86
- -> {
87
- ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::LegalEntityIndustryClassification]
88
- }
86
+ -> { ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::LegalEntityIndustryClassification] }
89
87
 
90
88
  # @!attribute last_name
91
89
  # An individual's last name.
@@ -128,9 +126,7 @@ module ModernTreasury
128
126
  #
129
127
  # @return [Array<ModernTreasury::Models::LegalEntityCreateParams::PhoneNumber>, nil]
130
128
  optional :phone_numbers,
131
- -> {
132
- ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::LegalEntityCreateParams::PhoneNumber]
133
- }
129
+ -> { ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::LegalEntityCreateParams::PhoneNumber] }
134
130
 
135
131
  # @!attribute politically_exposed_person
136
132
  # Whether the individual is a politically exposed person.
@@ -164,8 +160,10 @@ module ModernTreasury
164
160
 
165
161
  # @!attribute wealth_and_employment_details
166
162
  #
167
- # @return [ModernTreasury::Models::WealthAndEmploymentDetails, nil]
168
- optional :wealth_and_employment_details, -> { ModernTreasury::WealthAndEmploymentDetails }, nil?: true
163
+ # @return [ModernTreasury::Models::LegalEntityWealthEmploymentDetail, nil]
164
+ optional :wealth_and_employment_details,
165
+ -> { ModernTreasury::LegalEntityWealthEmploymentDetail },
166
+ nil?: true
169
167
 
170
168
  # @!attribute website
171
169
  # The entity's primary website URL.
@@ -181,7 +179,7 @@ module ModernTreasury
181
179
  #
182
180
  # @param addresses [Array<ModernTreasury::Models::LegalEntityAddressCreateRequest>] A list of addresses for the entity.
183
181
  #
184
- # @param bank_settings [ModernTreasury::Models::BankSettings, nil]
182
+ # @param bank_settings [ModernTreasury::Models::LegalEntityBankSettings, nil]
185
183
  #
186
184
  # @param business_name [String, nil] The business's legal business name.
187
185
  #
@@ -225,7 +223,7 @@ module ModernTreasury
225
223
  #
226
224
  # @param suffix [String, nil] An individual's suffix.
227
225
  #
228
- # @param wealth_and_employment_details [ModernTreasury::Models::WealthAndEmploymentDetails, nil]
226
+ # @param wealth_and_employment_details [ModernTreasury::Models::LegalEntityWealthEmploymentDetail, nil]
229
227
  #
230
228
  # @param website [String, nil] The entity's primary website URL.
231
229
  #
@@ -247,9 +245,7 @@ module ModernTreasury
247
245
  #
248
246
  # @return [Array<Symbol, ModernTreasury::Models::LegalEntityCreateParams::LegalEntityAssociation::RelationshipType>]
249
247
  required :relationship_types,
250
- -> {
251
- ModernTreasury::Internal::Type::ArrayOf[enum: ModernTreasury::LegalEntityCreateParams::LegalEntityAssociation::RelationshipType]
252
- }
248
+ -> { ModernTreasury::Internal::Type::ArrayOf[enum: ModernTreasury::LegalEntityCreateParams::LegalEntityAssociation::RelationshipType] }
253
249
 
254
250
  # @!attribute child_legal_entity
255
251
  # The child legal entity.
@@ -16,8 +16,8 @@ module ModernTreasury
16
16
 
17
17
  # @!attribute bank_settings
18
18
  #
19
- # @return [ModernTreasury::Models::BankSettings, nil]
20
- optional :bank_settings, -> { ModernTreasury::BankSettings }, nil?: true
19
+ # @return [ModernTreasury::Models::LegalEntityBankSettings, nil]
20
+ optional :bank_settings, -> { ModernTreasury::LegalEntityBankSettings }, nil?: true
21
21
 
22
22
  # @!attribute business_name
23
23
  # The business's legal business name.
@@ -77,9 +77,7 @@ module ModernTreasury
77
77
  #
78
78
  # @return [Array<ModernTreasury::Models::LegalEntityIndustryClassification>, nil]
79
79
  optional :industry_classifications,
80
- -> {
81
- ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::LegalEntityIndustryClassification]
82
- }
80
+ -> { ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::LegalEntityIndustryClassification] }
83
81
 
84
82
  # @!attribute last_name
85
83
  # An individual's last name.
@@ -112,9 +110,7 @@ module ModernTreasury
112
110
  #
113
111
  # @return [Array<ModernTreasury::Models::LegalEntityUpdateParams::PhoneNumber>, nil]
114
112
  optional :phone_numbers,
115
- -> {
116
- ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::LegalEntityUpdateParams::PhoneNumber]
117
- }
113
+ -> { ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::LegalEntityUpdateParams::PhoneNumber] }
118
114
 
119
115
  # @!attribute politically_exposed_person
120
116
  # Whether the individual is a politically exposed person.
@@ -148,8 +144,10 @@ module ModernTreasury
148
144
 
149
145
  # @!attribute wealth_and_employment_details
150
146
  #
151
- # @return [ModernTreasury::Models::WealthAndEmploymentDetails, nil]
152
- optional :wealth_and_employment_details, -> { ModernTreasury::WealthAndEmploymentDetails }, nil?: true
147
+ # @return [ModernTreasury::Models::LegalEntityWealthEmploymentDetail, nil]
148
+ optional :wealth_and_employment_details,
149
+ -> { ModernTreasury::LegalEntityWealthEmploymentDetail },
150
+ nil?: true
153
151
 
154
152
  # @!attribute website
155
153
  # The entity's primary website URL.
@@ -163,7 +161,7 @@ module ModernTreasury
163
161
  #
164
162
  # @param addresses [Array<ModernTreasury::Models::LegalEntityAddressCreateRequest>] A list of addresses for the entity.
165
163
  #
166
- # @param bank_settings [ModernTreasury::Models::BankSettings, nil]
164
+ # @param bank_settings [ModernTreasury::Models::LegalEntityBankSettings, nil]
167
165
  #
168
166
  # @param business_name [String, nil] The business's legal business name.
169
167
  #
@@ -205,7 +203,7 @@ module ModernTreasury
205
203
  #
206
204
  # @param suffix [String, nil] An individual's suffix.
207
205
  #
208
- # @param wealth_and_employment_details [ModernTreasury::Models::WealthAndEmploymentDetails, nil]
206
+ # @param wealth_and_employment_details [ModernTreasury::Models::LegalEntityWealthEmploymentDetail, nil]
209
207
  #
210
208
  # @param website [String, nil] The entity's primary website URL.
211
209
  #