modern_treasury 0.10.0 → 0.12.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 +40 -0
  3. data/README.md +10 -1
  4. data/lib/modern_treasury/client.rb +12 -0
  5. data/lib/modern_treasury/internal/transport/pooled_net_requester.rb +12 -10
  6. data/lib/modern_treasury/internal/util.rb +7 -2
  7. data/lib/modern_treasury/models/bulk_request_create_params.rb +146 -2
  8. data/lib/modern_treasury/models/child_legal_entity.rb +609 -0
  9. data/lib/modern_treasury/models/child_legal_entity_create.rb +63 -1
  10. data/lib/modern_treasury/models/connection_legal_entity.rb +2 -0
  11. data/lib/modern_treasury/models/connection_legal_entity_create_params.rb +54 -63
  12. data/lib/modern_treasury/models/connection_legal_entity_list_params.rb +2 -0
  13. data/lib/modern_treasury/models/counterparty_create_params.rb +54 -59
  14. data/lib/modern_treasury/models/expected_payment.rb +69 -1
  15. data/lib/modern_treasury/models/expected_payment_create_params.rb +65 -1
  16. data/lib/modern_treasury/models/expected_payment_update_params.rb +65 -1
  17. data/lib/modern_treasury/models/hold_create_params.rb +74 -0
  18. data/lib/modern_treasury/models/hold_create_response.rb +143 -0
  19. data/lib/modern_treasury/models/hold_list_params.rb +89 -0
  20. data/lib/modern_treasury/models/hold_list_response.rb +143 -0
  21. data/lib/modern_treasury/models/hold_retrieve_params.rb +14 -0
  22. data/lib/modern_treasury/models/hold_retrieve_response.rb +143 -0
  23. data/lib/modern_treasury/models/hold_update_params.rb +40 -0
  24. data/lib/modern_treasury/models/hold_update_response.rb +143 -0
  25. data/lib/modern_treasury/models/incoming_payment_detail.rb +5 -0
  26. data/lib/modern_treasury/models/incoming_payment_detail_create_async_params.rb +5 -0
  27. data/lib/modern_treasury/models/incoming_payment_detail_list_params.rb +5 -0
  28. data/lib/modern_treasury/models/internal_account.rb +10 -1
  29. data/lib/modern_treasury/models/internal_account_request_closure_params.rb +14 -0
  30. data/lib/modern_treasury/models/internal_account_update_params.rb +9 -1
  31. data/lib/modern_treasury/models/invoice.rb +2 -0
  32. data/lib/modern_treasury/models/invoice_create_params.rb +1 -19
  33. data/lib/modern_treasury/models/invoice_update_params.rb +1 -19
  34. data/lib/modern_treasury/models/journal_entry_list_params.rb +38 -0
  35. data/lib/modern_treasury/models/journal_entry_retrieve_params.rb +14 -0
  36. data/lib/modern_treasury/models/journal_report_list_params.rb +14 -0
  37. data/lib/modern_treasury/models/journal_report_retrieve_params.rb +14 -0
  38. data/lib/modern_treasury/models/journal_report_update_params.rb +26 -0
  39. data/lib/modern_treasury/models/ledger_entry.rb +10 -1
  40. data/lib/modern_treasury/models/ledger_entry_create_request.rb +10 -1
  41. data/lib/modern_treasury/models/ledger_transactions/ledger_transaction_version.rb +10 -1
  42. data/lib/modern_treasury/models/legal_entity.rb +61 -11
  43. data/lib/modern_treasury/models/legal_entity_association.rb +3 -559
  44. data/lib/modern_treasury/models/legal_entity_association_inline_create.rb +60 -0
  45. data/lib/modern_treasury/models/legal_entity_create_params.rb +54 -59
  46. data/lib/modern_treasury/models/legal_entity_update_params.rb +51 -1
  47. data/lib/modern_treasury/models/payment_order.rb +5 -1
  48. data/lib/modern_treasury/models/payment_order_subtype.rb +0 -1
  49. data/lib/modern_treasury/models/payment_reference.rb +5 -1
  50. data/lib/modern_treasury/models/return_object.rb +6 -1
  51. data/lib/modern_treasury/models/transaction.rb +2 -1
  52. data/lib/modern_treasury/models.rb +24 -0
  53. data/lib/modern_treasury/resources/expected_payments.rb +18 -2
  54. data/lib/modern_treasury/resources/holds.rb +126 -0
  55. data/lib/modern_treasury/resources/internal_accounts.rb +23 -1
  56. data/lib/modern_treasury/resources/invoices.rb +2 -10
  57. data/lib/modern_treasury/resources/journal_entries.rb +60 -0
  58. data/lib/modern_treasury/resources/journal_reports.rb +78 -0
  59. data/lib/modern_treasury/resources/ledger_accounts.rb +3 -3
  60. data/lib/modern_treasury/resources/ledger_transactions.rb +5 -2
  61. data/lib/modern_treasury/resources/legal_entities.rb +27 -3
  62. data/lib/modern_treasury/version.rb +1 -1
  63. data/lib/modern_treasury.rb +20 -0
  64. data/manifest.yaml +1 -0
  65. data/rbi/modern_treasury/client.rbi +9 -0
  66. data/rbi/modern_treasury/models/bulk_request_create_params.rbi +272 -0
  67. data/rbi/modern_treasury/models/child_legal_entity.rbi +969 -0
  68. data/rbi/modern_treasury/models/child_legal_entity_create.rbi +78 -0
  69. data/rbi/modern_treasury/models/connection_legal_entity.rbi +10 -0
  70. data/rbi/modern_treasury/models/connection_legal_entity_create_params.rbi +61 -135
  71. data/rbi/modern_treasury/models/connection_legal_entity_list_params.rbi +10 -0
  72. data/rbi/modern_treasury/models/counterparty_create_params.rbi +61 -135
  73. data/rbi/modern_treasury/models/expected_payment.rbi +136 -0
  74. data/rbi/modern_treasury/models/expected_payment_create_params.rbi +136 -0
  75. data/rbi/modern_treasury/models/expected_payment_update_params.rbi +136 -0
  76. data/rbi/modern_treasury/models/hold_create_params.rbi +125 -0
  77. data/rbi/modern_treasury/models/hold_create_response.rbi +232 -0
  78. data/rbi/modern_treasury/models/hold_list_params.rbi +150 -0
  79. data/rbi/modern_treasury/models/hold_list_response.rbi +225 -0
  80. data/rbi/modern_treasury/models/hold_retrieve_params.rbi +32 -0
  81. data/rbi/modern_treasury/models/hold_retrieve_response.rbi +234 -0
  82. data/rbi/modern_treasury/models/hold_update_params.rbi +79 -0
  83. data/rbi/modern_treasury/models/hold_update_response.rbi +232 -0
  84. data/rbi/modern_treasury/models/incoming_payment_detail.rbi +25 -0
  85. data/rbi/modern_treasury/models/incoming_payment_detail_create_async_params.rbi +25 -0
  86. data/rbi/modern_treasury/models/incoming_payment_detail_list_params.rbi +25 -0
  87. data/rbi/modern_treasury/models/internal_account.rbi +10 -0
  88. data/rbi/modern_treasury/models/internal_account_request_closure_params.rbi +32 -0
  89. data/rbi/modern_treasury/models/internal_account_update_params.rbi +11 -0
  90. data/rbi/modern_treasury/models/invoice_create_params.rbi +0 -20
  91. data/rbi/modern_treasury/models/invoice_update_params.rbi +0 -20
  92. data/rbi/modern_treasury/models/journal_entry_list_params.rbi +68 -0
  93. data/rbi/modern_treasury/models/journal_entry_retrieve_params.rbi +32 -0
  94. data/rbi/modern_treasury/models/journal_report_list_params.rbi +32 -0
  95. data/rbi/modern_treasury/models/journal_report_retrieve_params.rbi +32 -0
  96. data/rbi/modern_treasury/models/journal_report_update_params.rbi +52 -0
  97. data/rbi/modern_treasury/models/ledger_entry.rbi +10 -0
  98. data/rbi/modern_treasury/models/ledger_entry_create_request.rbi +13 -0
  99. data/rbi/modern_treasury/models/ledger_transactions/ledger_transaction_version.rbi +10 -0
  100. data/rbi/modern_treasury/models/legal_entity.rbi +67 -15
  101. data/rbi/modern_treasury/models/legal_entity_association.rbi +4 -962
  102. data/rbi/modern_treasury/models/legal_entity_association_inline_create.rbi +130 -0
  103. data/rbi/modern_treasury/models/legal_entity_create_params.rbi +61 -134
  104. data/rbi/modern_treasury/models/legal_entity_update_params.rbi +58 -0
  105. data/rbi/modern_treasury/models/payment_order.rbi +22 -2
  106. data/rbi/modern_treasury/models/payment_order_subtype.rbi +0 -1
  107. data/rbi/modern_treasury/models/payment_reference.rbi +22 -2
  108. data/rbi/modern_treasury/models/return_object.rbi +24 -2
  109. data/rbi/modern_treasury/models/transaction.rbi +7 -2
  110. data/rbi/modern_treasury/models.rbi +28 -0
  111. data/rbi/modern_treasury/resources/expected_payments.rbi +44 -0
  112. data/rbi/modern_treasury/resources/holds.rbi +108 -0
  113. data/rbi/modern_treasury/resources/internal_accounts.rbi +17 -0
  114. data/rbi/modern_treasury/resources/invoices.rbi +0 -16
  115. data/rbi/modern_treasury/resources/journal_entries.rbi +46 -0
  116. data/rbi/modern_treasury/resources/journal_reports.rbi +51 -0
  117. data/rbi/modern_treasury/resources/ledger_accounts.rbi +3 -3
  118. data/rbi/modern_treasury/resources/ledger_transactions.rbi +3 -2
  119. data/rbi/modern_treasury/resources/legal_entities.rbi +41 -1
  120. data/sig/modern_treasury/client.rbs +6 -0
  121. data/sig/modern_treasury/models/bulk_request_create_params.rbs +84 -0
  122. data/sig/modern_treasury/models/child_legal_entity.rbs +469 -0
  123. data/sig/modern_treasury/models/child_legal_entity_create.rbs +39 -0
  124. data/sig/modern_treasury/models/connection_legal_entity.rbs +4 -1
  125. data/sig/modern_treasury/models/connection_legal_entity_create_params.rbs +38 -60
  126. data/sig/modern_treasury/models/connection_legal_entity_list_params.rbs +4 -1
  127. data/sig/modern_treasury/models/counterparty_create_params.rbs +38 -60
  128. data/sig/modern_treasury/models/expected_payment.rbs +42 -0
  129. data/sig/modern_treasury/models/expected_payment_create_params.rbs +42 -0
  130. data/sig/modern_treasury/models/expected_payment_update_params.rbs +42 -0
  131. data/sig/modern_treasury/models/hold_create_params.rbs +66 -0
  132. data/sig/modern_treasury/models/hold_create_response.rbs +108 -0
  133. data/sig/modern_treasury/models/hold_list_params.rbs +76 -0
  134. data/sig/modern_treasury/models/hold_list_response.rbs +108 -0
  135. data/sig/modern_treasury/models/hold_retrieve_params.rbs +15 -0
  136. data/sig/modern_treasury/models/hold_retrieve_response.rbs +108 -0
  137. data/sig/modern_treasury/models/hold_update_params.rbs +41 -0
  138. data/sig/modern_treasury/models/hold_update_response.rbs +108 -0
  139. data/sig/modern_treasury/models/incoming_payment_detail.rbs +10 -0
  140. data/sig/modern_treasury/models/incoming_payment_detail_create_async_params.rbs +10 -0
  141. data/sig/modern_treasury/models/incoming_payment_detail_list_params.rbs +10 -0
  142. data/sig/modern_treasury/models/internal_account.rbs +5 -0
  143. data/sig/modern_treasury/models/internal_account_request_closure_params.rbs +15 -0
  144. data/sig/modern_treasury/models/internal_account_update_params.rbs +7 -0
  145. data/sig/modern_treasury/models/invoice_create_params.rbs +0 -10
  146. data/sig/modern_treasury/models/invoice_update_params.rbs +0 -10
  147. data/sig/modern_treasury/models/journal_entry_list_params.rbs +36 -0
  148. data/sig/modern_treasury/models/journal_entry_retrieve_params.rbs +15 -0
  149. data/sig/modern_treasury/models/journal_report_list_params.rbs +15 -0
  150. data/sig/modern_treasury/models/journal_report_retrieve_params.rbs +15 -0
  151. data/sig/modern_treasury/models/journal_report_update_params.rbs +32 -0
  152. data/sig/modern_treasury/models/ledger_entry.rbs +5 -0
  153. data/sig/modern_treasury/models/ledger_entry_create_request.rbs +7 -0
  154. data/sig/modern_treasury/models/ledger_transactions/ledger_transaction_version.rbs +5 -0
  155. data/sig/modern_treasury/models/legal_entity.rbs +38 -8
  156. data/sig/modern_treasury/models/legal_entity_association.rbs +4 -435
  157. data/sig/modern_treasury/models/legal_entity_association_inline_create.rbs +59 -0
  158. data/sig/modern_treasury/models/legal_entity_create_params.rbs +38 -60
  159. data/sig/modern_treasury/models/legal_entity_update_params.rbs +34 -0
  160. data/sig/modern_treasury/models/payment_order.rbs +10 -2
  161. data/sig/modern_treasury/models/payment_order_subtype.rbs +0 -2
  162. data/sig/modern_treasury/models/payment_reference.rbs +10 -2
  163. data/sig/modern_treasury/models/return_object.rbs +12 -2
  164. data/sig/modern_treasury/models/transaction.rbs +4 -2
  165. data/sig/modern_treasury/models.rbs +24 -0
  166. data/sig/modern_treasury/resources/expected_payments.rbs +8 -0
  167. data/sig/modern_treasury/resources/holds.rbs +38 -0
  168. data/sig/modern_treasury/resources/internal_accounts.rbs +6 -0
  169. data/sig/modern_treasury/resources/invoices.rbs +0 -4
  170. data/sig/modern_treasury/resources/journal_entries.rbs +19 -0
  171. data/sig/modern_treasury/resources/journal_reports.rbs +21 -0
  172. data/sig/modern_treasury/resources/legal_entities.rbs +13 -1
  173. metadata +59 -2
@@ -15,15 +15,10 @@ module ModernTreasury
15
15
  attr_accessor :id
16
16
 
17
17
  # The child legal entity.
18
- sig { returns(ModernTreasury::LegalEntityAssociation::ChildLegalEntity) }
18
+ sig { returns(ModernTreasury::ChildLegalEntity) }
19
19
  attr_reader :child_legal_entity
20
20
 
21
- sig do
22
- params(
23
- child_legal_entity:
24
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::OrHash
25
- ).void
26
- end
21
+ sig { params(child_legal_entity: ModernTreasury::ChildLegalEntity).void }
27
22
  attr_writer :child_legal_entity
28
23
 
29
24
  sig { returns(Time) }
@@ -68,8 +63,7 @@ module ModernTreasury
68
63
  sig do
69
64
  params(
70
65
  id: String,
71
- child_legal_entity:
72
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::OrHash,
66
+ child_legal_entity: ModernTreasury::ChildLegalEntity,
73
67
  created_at: Time,
74
68
  discarded_at: T.nilable(Time),
75
69
  live_mode: T::Boolean,
@@ -110,8 +104,7 @@ module ModernTreasury
110
104
  override.returns(
111
105
  {
112
106
  id: String,
113
- child_legal_entity:
114
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity,
107
+ child_legal_entity: ModernTreasury::ChildLegalEntity,
115
108
  created_at: Time,
116
109
  discarded_at: T.nilable(Time),
117
110
  live_mode: T::Boolean,
@@ -130,957 +123,6 @@ module ModernTreasury
130
123
  def to_hash
131
124
  end
132
125
 
133
- class ChildLegalEntity < ModernTreasury::Internal::Type::BaseModel
134
- OrHash =
135
- T.type_alias do
136
- T.any(
137
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity,
138
- ModernTreasury::Internal::AnyHash
139
- )
140
- end
141
-
142
- sig { returns(String) }
143
- attr_accessor :id
144
-
145
- # A list of addresses for the entity.
146
- sig do
147
- returns(
148
- T::Array[
149
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::Address
150
- ]
151
- )
152
- end
153
- attr_accessor :addresses
154
-
155
- sig { returns(T.nilable(ModernTreasury::LegalEntityBankSettings)) }
156
- attr_reader :bank_settings
157
-
158
- sig do
159
- params(
160
- bank_settings:
161
- T.nilable(ModernTreasury::LegalEntityBankSettings::OrHash)
162
- ).void
163
- end
164
- attr_writer :bank_settings
165
-
166
- # The business's legal business name.
167
- sig { returns(T.nilable(String)) }
168
- attr_accessor :business_name
169
-
170
- # The country of citizenship for an individual.
171
- sig { returns(T.nilable(String)) }
172
- attr_accessor :citizenship_country
173
-
174
- sig { returns(T.nilable(ModernTreasury::LegalEntityComplianceDetail)) }
175
- attr_reader :compliance_details
176
-
177
- sig do
178
- params(
179
- compliance_details:
180
- T.nilable(ModernTreasury::LegalEntityComplianceDetail::OrHash)
181
- ).void
182
- end
183
- attr_writer :compliance_details
184
-
185
- sig { returns(Time) }
186
- attr_accessor :created_at
187
-
188
- # A business's formation date (YYYY-MM-DD).
189
- sig { returns(T.nilable(Date)) }
190
- attr_accessor :date_formed
191
-
192
- # An individual's date of birth (YYYY-MM-DD).
193
- sig { returns(T.nilable(Date)) }
194
- attr_accessor :date_of_birth
195
-
196
- sig { returns(T.nilable(Time)) }
197
- attr_accessor :discarded_at
198
-
199
- sig { returns(T::Array[String]) }
200
- attr_accessor :doing_business_as_names
201
-
202
- # The entity's primary email.
203
- sig { returns(T.nilable(String)) }
204
- attr_accessor :email
205
-
206
- # An individual's first name.
207
- sig { returns(T.nilable(String)) }
208
- attr_accessor :first_name
209
-
210
- # A list of identifications for the legal entity.
211
- sig do
212
- returns(
213
- T::Array[
214
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::Identification
215
- ]
216
- )
217
- end
218
- attr_accessor :identifications
219
-
220
- # A list of industry classifications for the legal entity.
221
- sig do
222
- returns(T::Array[ModernTreasury::LegalEntityIndustryClassification])
223
- end
224
- attr_accessor :industry_classifications
225
-
226
- # An individual's last name.
227
- sig { returns(T.nilable(String)) }
228
- attr_accessor :last_name
229
-
230
- # The type of legal entity.
231
- sig do
232
- returns(
233
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::LegalEntityType::TaggedSymbol
234
- )
235
- end
236
- attr_accessor :legal_entity_type
237
-
238
- # The business's legal structure.
239
- sig do
240
- returns(
241
- T.nilable(
242
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::LegalStructure::TaggedSymbol
243
- )
244
- )
245
- end
246
- attr_accessor :legal_structure
247
-
248
- # This field will be true if this object exists in the live environment or false
249
- # if it exists in the test environment.
250
- sig { returns(T::Boolean) }
251
- attr_accessor :live_mode
252
-
253
- # Additional data represented as key-value pairs. Both the key and value must be
254
- # strings.
255
- sig { returns(T::Hash[Symbol, String]) }
256
- attr_accessor :metadata
257
-
258
- # An individual's middle name.
259
- sig { returns(T.nilable(String)) }
260
- attr_accessor :middle_name
261
-
262
- sig { returns(String) }
263
- attr_accessor :object
264
-
265
- sig do
266
- returns(
267
- T::Array[
268
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::PhoneNumber
269
- ]
270
- )
271
- end
272
- attr_accessor :phone_numbers
273
-
274
- # Whether the individual is a politically exposed person.
275
- sig { returns(T.nilable(T::Boolean)) }
276
- attr_accessor :politically_exposed_person
277
-
278
- # An individual's preferred name.
279
- sig { returns(T.nilable(String)) }
280
- attr_accessor :preferred_name
281
-
282
- # An individual's prefix.
283
- sig { returns(T.nilable(String)) }
284
- attr_accessor :prefix
285
-
286
- # The risk rating of the legal entity. One of low, medium, high.
287
- sig do
288
- returns(
289
- T.nilable(
290
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::RiskRating::TaggedSymbol
291
- )
292
- )
293
- end
294
- attr_accessor :risk_rating
295
-
296
- # An individual's suffix.
297
- sig { returns(T.nilable(String)) }
298
- attr_accessor :suffix
299
-
300
- sig { returns(Time) }
301
- attr_accessor :updated_at
302
-
303
- sig do
304
- returns(T.nilable(ModernTreasury::LegalEntityWealthEmploymentDetail))
305
- end
306
- attr_reader :wealth_and_employment_details
307
-
308
- sig do
309
- params(
310
- wealth_and_employment_details:
311
- T.nilable(
312
- ModernTreasury::LegalEntityWealthEmploymentDetail::OrHash
313
- )
314
- ).void
315
- end
316
- attr_writer :wealth_and_employment_details
317
-
318
- # The entity's primary website URL.
319
- sig { returns(T.nilable(String)) }
320
- attr_accessor :website
321
-
322
- # The child legal entity.
323
- sig do
324
- params(
325
- id: String,
326
- addresses:
327
- T::Array[
328
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::Address::OrHash
329
- ],
330
- bank_settings:
331
- T.nilable(ModernTreasury::LegalEntityBankSettings::OrHash),
332
- business_name: T.nilable(String),
333
- citizenship_country: T.nilable(String),
334
- compliance_details:
335
- T.nilable(ModernTreasury::LegalEntityComplianceDetail::OrHash),
336
- created_at: Time,
337
- date_formed: T.nilable(Date),
338
- date_of_birth: T.nilable(Date),
339
- discarded_at: T.nilable(Time),
340
- doing_business_as_names: T::Array[String],
341
- email: T.nilable(String),
342
- first_name: T.nilable(String),
343
- identifications:
344
- T::Array[
345
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::Identification::OrHash
346
- ],
347
- industry_classifications:
348
- T::Array[
349
- ModernTreasury::LegalEntityIndustryClassification::OrHash
350
- ],
351
- last_name: T.nilable(String),
352
- legal_entity_type:
353
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::LegalEntityType::OrSymbol,
354
- legal_structure:
355
- T.nilable(
356
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::LegalStructure::OrSymbol
357
- ),
358
- live_mode: T::Boolean,
359
- metadata: T::Hash[Symbol, String],
360
- middle_name: T.nilable(String),
361
- object: String,
362
- phone_numbers:
363
- T::Array[
364
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::PhoneNumber::OrHash
365
- ],
366
- politically_exposed_person: T.nilable(T::Boolean),
367
- preferred_name: T.nilable(String),
368
- prefix: T.nilable(String),
369
- risk_rating:
370
- T.nilable(
371
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::RiskRating::OrSymbol
372
- ),
373
- suffix: T.nilable(String),
374
- updated_at: Time,
375
- wealth_and_employment_details:
376
- T.nilable(
377
- ModernTreasury::LegalEntityWealthEmploymentDetail::OrHash
378
- ),
379
- website: T.nilable(String)
380
- ).returns(T.attached_class)
381
- end
382
- def self.new(
383
- id:,
384
- # A list of addresses for the entity.
385
- addresses:,
386
- bank_settings:,
387
- # The business's legal business name.
388
- business_name:,
389
- # The country of citizenship for an individual.
390
- citizenship_country:,
391
- compliance_details:,
392
- created_at:,
393
- # A business's formation date (YYYY-MM-DD).
394
- date_formed:,
395
- # An individual's date of birth (YYYY-MM-DD).
396
- date_of_birth:,
397
- discarded_at:,
398
- doing_business_as_names:,
399
- # The entity's primary email.
400
- email:,
401
- # An individual's first name.
402
- first_name:,
403
- # A list of identifications for the legal entity.
404
- identifications:,
405
- # A list of industry classifications for the legal entity.
406
- industry_classifications:,
407
- # An individual's last name.
408
- last_name:,
409
- # The type of legal entity.
410
- legal_entity_type:,
411
- # The business's legal structure.
412
- legal_structure:,
413
- # This field will be true if this object exists in the live environment or false
414
- # if it exists in the test environment.
415
- live_mode:,
416
- # Additional data represented as key-value pairs. Both the key and value must be
417
- # strings.
418
- metadata:,
419
- # An individual's middle name.
420
- middle_name:,
421
- object:,
422
- phone_numbers:,
423
- # Whether the individual is a politically exposed person.
424
- politically_exposed_person:,
425
- # An individual's preferred name.
426
- preferred_name:,
427
- # An individual's prefix.
428
- prefix:,
429
- # The risk rating of the legal entity. One of low, medium, high.
430
- risk_rating:,
431
- # An individual's suffix.
432
- suffix:,
433
- updated_at:,
434
- wealth_and_employment_details:,
435
- # The entity's primary website URL.
436
- website:
437
- )
438
- end
439
-
440
- sig do
441
- override.returns(
442
- {
443
- id: String,
444
- addresses:
445
- T::Array[
446
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::Address
447
- ],
448
- bank_settings: T.nilable(ModernTreasury::LegalEntityBankSettings),
449
- business_name: T.nilable(String),
450
- citizenship_country: T.nilable(String),
451
- compliance_details:
452
- T.nilable(ModernTreasury::LegalEntityComplianceDetail),
453
- created_at: Time,
454
- date_formed: T.nilable(Date),
455
- date_of_birth: T.nilable(Date),
456
- discarded_at: T.nilable(Time),
457
- doing_business_as_names: T::Array[String],
458
- email: T.nilable(String),
459
- first_name: T.nilable(String),
460
- identifications:
461
- T::Array[
462
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::Identification
463
- ],
464
- industry_classifications:
465
- T::Array[ModernTreasury::LegalEntityIndustryClassification],
466
- last_name: T.nilable(String),
467
- legal_entity_type:
468
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::LegalEntityType::TaggedSymbol,
469
- legal_structure:
470
- T.nilable(
471
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::LegalStructure::TaggedSymbol
472
- ),
473
- live_mode: T::Boolean,
474
- metadata: T::Hash[Symbol, String],
475
- middle_name: T.nilable(String),
476
- object: String,
477
- phone_numbers:
478
- T::Array[
479
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::PhoneNumber
480
- ],
481
- politically_exposed_person: T.nilable(T::Boolean),
482
- preferred_name: T.nilable(String),
483
- prefix: T.nilable(String),
484
- risk_rating:
485
- T.nilable(
486
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::RiskRating::TaggedSymbol
487
- ),
488
- suffix: T.nilable(String),
489
- updated_at: Time,
490
- wealth_and_employment_details:
491
- T.nilable(ModernTreasury::LegalEntityWealthEmploymentDetail),
492
- website: T.nilable(String)
493
- }
494
- )
495
- end
496
- def to_hash
497
- end
498
-
499
- class Address < ModernTreasury::Internal::Type::BaseModel
500
- OrHash =
501
- T.type_alias do
502
- T.any(
503
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::Address,
504
- ModernTreasury::Internal::AnyHash
505
- )
506
- end
507
-
508
- sig { returns(String) }
509
- attr_accessor :id
510
-
511
- # The types of this address.
512
- sig do
513
- returns(
514
- T::Array[
515
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::Address::AddressType::TaggedSymbol
516
- ]
517
- )
518
- end
519
- attr_accessor :address_types
520
-
521
- # Country code conforms to [ISO 3166-1 alpha-2]
522
- sig { returns(T.nilable(String)) }
523
- attr_accessor :country
524
-
525
- sig { returns(Time) }
526
- attr_accessor :created_at
527
-
528
- sig { returns(T.nilable(Time)) }
529
- attr_accessor :discarded_at
530
-
531
- sig { returns(T.nilable(String)) }
532
- attr_accessor :line1
533
-
534
- sig { returns(T.nilable(String)) }
535
- attr_accessor :line2
536
-
537
- # This field will be true if this object exists in the live environment or false
538
- # if it exists in the test environment.
539
- sig { returns(T::Boolean) }
540
- attr_accessor :live_mode
541
-
542
- # Locality or City.
543
- sig { returns(T.nilable(String)) }
544
- attr_accessor :locality
545
-
546
- sig { returns(String) }
547
- attr_accessor :object
548
-
549
- # The postal code of the address.
550
- sig { returns(T.nilable(String)) }
551
- attr_accessor :postal_code
552
-
553
- # Region or State.
554
- sig { returns(T.nilable(String)) }
555
- attr_accessor :region
556
-
557
- sig { returns(Time) }
558
- attr_accessor :updated_at
559
-
560
- sig do
561
- params(
562
- id: String,
563
- address_types:
564
- T::Array[
565
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::Address::AddressType::OrSymbol
566
- ],
567
- country: T.nilable(String),
568
- created_at: Time,
569
- discarded_at: T.nilable(Time),
570
- line1: T.nilable(String),
571
- line2: T.nilable(String),
572
- live_mode: T::Boolean,
573
- locality: T.nilable(String),
574
- object: String,
575
- postal_code: T.nilable(String),
576
- region: T.nilable(String),
577
- updated_at: Time
578
- ).returns(T.attached_class)
579
- end
580
- def self.new(
581
- id:,
582
- # The types of this address.
583
- address_types:,
584
- # Country code conforms to [ISO 3166-1 alpha-2]
585
- country:,
586
- created_at:,
587
- discarded_at:,
588
- line1:,
589
- line2:,
590
- # This field will be true if this object exists in the live environment or false
591
- # if it exists in the test environment.
592
- live_mode:,
593
- # Locality or City.
594
- locality:,
595
- object:,
596
- # The postal code of the address.
597
- postal_code:,
598
- # Region or State.
599
- region:,
600
- updated_at:
601
- )
602
- end
603
-
604
- sig do
605
- override.returns(
606
- {
607
- id: String,
608
- address_types:
609
- T::Array[
610
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::Address::AddressType::TaggedSymbol
611
- ],
612
- country: T.nilable(String),
613
- created_at: Time,
614
- discarded_at: T.nilable(Time),
615
- line1: T.nilable(String),
616
- line2: T.nilable(String),
617
- live_mode: T::Boolean,
618
- locality: T.nilable(String),
619
- object: String,
620
- postal_code: T.nilable(String),
621
- region: T.nilable(String),
622
- updated_at: Time
623
- }
624
- )
625
- end
626
- def to_hash
627
- end
628
-
629
- module AddressType
630
- extend ModernTreasury::Internal::Type::Enum
631
-
632
- TaggedSymbol =
633
- T.type_alias do
634
- T.all(
635
- Symbol,
636
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::Address::AddressType
637
- )
638
- end
639
- OrSymbol = T.type_alias { T.any(Symbol, String) }
640
-
641
- BUSINESS =
642
- T.let(
643
- :business,
644
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::Address::AddressType::TaggedSymbol
645
- )
646
- MAILING =
647
- T.let(
648
- :mailing,
649
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::Address::AddressType::TaggedSymbol
650
- )
651
- OTHER =
652
- T.let(
653
- :other,
654
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::Address::AddressType::TaggedSymbol
655
- )
656
- PO_BOX =
657
- T.let(
658
- :po_box,
659
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::Address::AddressType::TaggedSymbol
660
- )
661
- RESIDENTIAL =
662
- T.let(
663
- :residential,
664
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::Address::AddressType::TaggedSymbol
665
- )
666
-
667
- sig do
668
- override.returns(
669
- T::Array[
670
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::Address::AddressType::TaggedSymbol
671
- ]
672
- )
673
- end
674
- def self.values
675
- end
676
- end
677
- end
678
-
679
- class Identification < ModernTreasury::Internal::Type::BaseModel
680
- OrHash =
681
- T.type_alias do
682
- T.any(
683
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::Identification,
684
- ModernTreasury::Internal::AnyHash
685
- )
686
- end
687
-
688
- sig { returns(String) }
689
- attr_accessor :id
690
-
691
- sig { returns(Time) }
692
- attr_accessor :created_at
693
-
694
- sig { returns(T.nilable(Time)) }
695
- attr_accessor :discarded_at
696
-
697
- # The date when the Identification is no longer considered valid by the issuing
698
- # authority.
699
- sig { returns(T.nilable(Date)) }
700
- attr_accessor :expiration_date
701
-
702
- # The type of ID number.
703
- sig do
704
- returns(
705
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::Identification::IDType::TaggedSymbol
706
- )
707
- end
708
- attr_accessor :id_type
709
-
710
- # The ISO 3166-1 alpha-2 country code of the country that issued the
711
- # identification
712
- sig { returns(T.nilable(String)) }
713
- attr_accessor :issuing_country
714
-
715
- # The region in which the identifcation was issued.
716
- sig { returns(T.nilable(String)) }
717
- attr_accessor :issuing_region
718
-
719
- # This field will be true if this object exists in the live environment or false
720
- # if it exists in the test environment.
721
- sig { returns(T::Boolean) }
722
- attr_accessor :live_mode
723
-
724
- sig { returns(String) }
725
- attr_accessor :object
726
-
727
- sig { returns(Time) }
728
- attr_accessor :updated_at
729
-
730
- sig do
731
- params(
732
- id: String,
733
- created_at: Time,
734
- discarded_at: T.nilable(Time),
735
- expiration_date: T.nilable(Date),
736
- id_type:
737
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::Identification::IDType::OrSymbol,
738
- issuing_country: T.nilable(String),
739
- issuing_region: T.nilable(String),
740
- live_mode: T::Boolean,
741
- object: String,
742
- updated_at: Time
743
- ).returns(T.attached_class)
744
- end
745
- def self.new(
746
- id:,
747
- created_at:,
748
- discarded_at:,
749
- # The date when the Identification is no longer considered valid by the issuing
750
- # authority.
751
- expiration_date:,
752
- # The type of ID number.
753
- id_type:,
754
- # The ISO 3166-1 alpha-2 country code of the country that issued the
755
- # identification
756
- issuing_country:,
757
- # The region in which the identifcation was issued.
758
- issuing_region:,
759
- # This field will be true if this object exists in the live environment or false
760
- # if it exists in the test environment.
761
- live_mode:,
762
- object:,
763
- updated_at:
764
- )
765
- end
766
-
767
- sig do
768
- override.returns(
769
- {
770
- id: String,
771
- created_at: Time,
772
- discarded_at: T.nilable(Time),
773
- expiration_date: T.nilable(Date),
774
- id_type:
775
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::Identification::IDType::TaggedSymbol,
776
- issuing_country: T.nilable(String),
777
- issuing_region: T.nilable(String),
778
- live_mode: T::Boolean,
779
- object: String,
780
- updated_at: Time
781
- }
782
- )
783
- end
784
- def to_hash
785
- end
786
-
787
- # The type of ID number.
788
- module IDType
789
- extend ModernTreasury::Internal::Type::Enum
790
-
791
- TaggedSymbol =
792
- T.type_alias do
793
- T.all(
794
- Symbol,
795
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::Identification::IDType
796
- )
797
- end
798
- OrSymbol = T.type_alias { T.any(Symbol, String) }
799
-
800
- AR_CUIL =
801
- T.let(
802
- :ar_cuil,
803
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::Identification::IDType::TaggedSymbol
804
- )
805
- AR_CUIT =
806
- T.let(
807
- :ar_cuit,
808
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::Identification::IDType::TaggedSymbol
809
- )
810
- BR_CNPJ =
811
- T.let(
812
- :br_cnpj,
813
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::Identification::IDType::TaggedSymbol
814
- )
815
- BR_CPF =
816
- T.let(
817
- :br_cpf,
818
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::Identification::IDType::TaggedSymbol
819
- )
820
- CL_RUN =
821
- T.let(
822
- :cl_run,
823
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::Identification::IDType::TaggedSymbol
824
- )
825
- CL_RUT =
826
- T.let(
827
- :cl_rut,
828
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::Identification::IDType::TaggedSymbol
829
- )
830
- CO_CEDULAS =
831
- T.let(
832
- :co_cedulas,
833
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::Identification::IDType::TaggedSymbol
834
- )
835
- CO_NIT =
836
- T.let(
837
- :co_nit,
838
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::Identification::IDType::TaggedSymbol
839
- )
840
- DRIVERS_LICENSE =
841
- T.let(
842
- :drivers_license,
843
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::Identification::IDType::TaggedSymbol
844
- )
845
- HN_ID =
846
- T.let(
847
- :hn_id,
848
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::Identification::IDType::TaggedSymbol
849
- )
850
- HN_RTN =
851
- T.let(
852
- :hn_rtn,
853
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::Identification::IDType::TaggedSymbol
854
- )
855
- IN_LEI =
856
- T.let(
857
- :in_lei,
858
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::Identification::IDType::TaggedSymbol
859
- )
860
- KR_BRN =
861
- T.let(
862
- :kr_brn,
863
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::Identification::IDType::TaggedSymbol
864
- )
865
- KR_CRN =
866
- T.let(
867
- :kr_crn,
868
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::Identification::IDType::TaggedSymbol
869
- )
870
- KR_RRN =
871
- T.let(
872
- :kr_rrn,
873
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::Identification::IDType::TaggedSymbol
874
- )
875
- PASSPORT =
876
- T.let(
877
- :passport,
878
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::Identification::IDType::TaggedSymbol
879
- )
880
- SA_TIN =
881
- T.let(
882
- :sa_tin,
883
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::Identification::IDType::TaggedSymbol
884
- )
885
- SA_VAT =
886
- T.let(
887
- :sa_vat,
888
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::Identification::IDType::TaggedSymbol
889
- )
890
- US_EIN =
891
- T.let(
892
- :us_ein,
893
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::Identification::IDType::TaggedSymbol
894
- )
895
- US_ITIN =
896
- T.let(
897
- :us_itin,
898
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::Identification::IDType::TaggedSymbol
899
- )
900
- US_SSN =
901
- T.let(
902
- :us_ssn,
903
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::Identification::IDType::TaggedSymbol
904
- )
905
- VN_TIN =
906
- T.let(
907
- :vn_tin,
908
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::Identification::IDType::TaggedSymbol
909
- )
910
-
911
- sig do
912
- override.returns(
913
- T::Array[
914
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::Identification::IDType::TaggedSymbol
915
- ]
916
- )
917
- end
918
- def self.values
919
- end
920
- end
921
- end
922
-
923
- # The type of legal entity.
924
- module LegalEntityType
925
- extend ModernTreasury::Internal::Type::Enum
926
-
927
- TaggedSymbol =
928
- T.type_alias do
929
- T.all(
930
- Symbol,
931
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::LegalEntityType
932
- )
933
- end
934
- OrSymbol = T.type_alias { T.any(Symbol, String) }
935
-
936
- BUSINESS =
937
- T.let(
938
- :business,
939
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::LegalEntityType::TaggedSymbol
940
- )
941
- INDIVIDUAL =
942
- T.let(
943
- :individual,
944
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::LegalEntityType::TaggedSymbol
945
- )
946
- JOINT =
947
- T.let(
948
- :joint,
949
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::LegalEntityType::TaggedSymbol
950
- )
951
-
952
- sig do
953
- override.returns(
954
- T::Array[
955
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::LegalEntityType::TaggedSymbol
956
- ]
957
- )
958
- end
959
- def self.values
960
- end
961
- end
962
-
963
- # The business's legal structure.
964
- module LegalStructure
965
- extend ModernTreasury::Internal::Type::Enum
966
-
967
- TaggedSymbol =
968
- T.type_alias do
969
- T.all(
970
- Symbol,
971
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::LegalStructure
972
- )
973
- end
974
- OrSymbol = T.type_alias { T.any(Symbol, String) }
975
-
976
- CORPORATION =
977
- T.let(
978
- :corporation,
979
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::LegalStructure::TaggedSymbol
980
- )
981
- LLC =
982
- T.let(
983
- :llc,
984
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::LegalStructure::TaggedSymbol
985
- )
986
- NON_PROFIT =
987
- T.let(
988
- :non_profit,
989
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::LegalStructure::TaggedSymbol
990
- )
991
- PARTNERSHIP =
992
- T.let(
993
- :partnership,
994
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::LegalStructure::TaggedSymbol
995
- )
996
- SOLE_PROPRIETORSHIP =
997
- T.let(
998
- :sole_proprietorship,
999
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::LegalStructure::TaggedSymbol
1000
- )
1001
- TRUST =
1002
- T.let(
1003
- :trust,
1004
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::LegalStructure::TaggedSymbol
1005
- )
1006
-
1007
- sig do
1008
- override.returns(
1009
- T::Array[
1010
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::LegalStructure::TaggedSymbol
1011
- ]
1012
- )
1013
- end
1014
- def self.values
1015
- end
1016
- end
1017
-
1018
- class PhoneNumber < ModernTreasury::Internal::Type::BaseModel
1019
- OrHash =
1020
- T.type_alias do
1021
- T.any(
1022
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::PhoneNumber,
1023
- ModernTreasury::Internal::AnyHash
1024
- )
1025
- end
1026
-
1027
- sig { returns(T.nilable(String)) }
1028
- attr_reader :phone_number
1029
-
1030
- sig { params(phone_number: String).void }
1031
- attr_writer :phone_number
1032
-
1033
- # A list of phone numbers in E.164 format.
1034
- sig { params(phone_number: String).returns(T.attached_class) }
1035
- def self.new(phone_number: nil)
1036
- end
1037
-
1038
- sig { override.returns({ phone_number: String }) }
1039
- def to_hash
1040
- end
1041
- end
1042
-
1043
- # The risk rating of the legal entity. One of low, medium, high.
1044
- module RiskRating
1045
- extend ModernTreasury::Internal::Type::Enum
1046
-
1047
- TaggedSymbol =
1048
- T.type_alias do
1049
- T.all(
1050
- Symbol,
1051
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::RiskRating
1052
- )
1053
- end
1054
- OrSymbol = T.type_alias { T.any(Symbol, String) }
1055
-
1056
- LOW =
1057
- T.let(
1058
- :low,
1059
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::RiskRating::TaggedSymbol
1060
- )
1061
- MEDIUM =
1062
- T.let(
1063
- :medium,
1064
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::RiskRating::TaggedSymbol
1065
- )
1066
- HIGH =
1067
- T.let(
1068
- :high,
1069
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::RiskRating::TaggedSymbol
1070
- )
1071
-
1072
- sig do
1073
- override.returns(
1074
- T::Array[
1075
- ModernTreasury::LegalEntityAssociation::ChildLegalEntity::RiskRating::TaggedSymbol
1076
- ]
1077
- )
1078
- end
1079
- def self.values
1080
- end
1081
- end
1082
- end
1083
-
1084
126
  # A list of relationship types for how the child entity relates to parent entity.
1085
127
  module RelationshipType
1086
128
  extend ModernTreasury::Internal::Type::Enum