Class: ModernTreasury::Models::ConnectionLegalEntityCreateParams::LegalEntity

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/modern_treasury/models/connection_legal_entity_create_params.rb

Defined Under Namespace

Modules: LegalEntityType, LegalStructure, RiskRating Classes: LegalEntityAssociation, PhoneNumber

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(phone_number: nil) ⇒ Object

A list of phone numbers in E.164 format.

Parameters:

  • phone_number (String) (defaults to: nil)


37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
# File 'lib/modern_treasury/models/connection_legal_entity_create_params.rb', line 37

class LegalEntity < ModernTreasury::Internal::Type::BaseModel
  # @!attribute addresses
  #   A list of addresses for the entity.
  #
  #   @return [Array<ModernTreasury::Models::LegalEntityAddressCreateRequest>, nil]
  optional :addresses,
           -> { ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::LegalEntityAddressCreateRequest] }

  # @!attribute bank_settings
  #
  #   @return [ModernTreasury::Models::LegalEntityBankSettings, nil]
  optional :bank_settings, -> { ModernTreasury::LegalEntityBankSettings }, nil?: true

  # @!attribute business_name
  #   The business's legal business name.
  #
  #   @return [String, nil]
  optional :business_name, String, nil?: true

  # @!attribute citizenship_country
  #   The country of citizenship for an individual.
  #
  #   @return [String, nil]
  optional :citizenship_country, String, nil?: true

  # @!attribute compliance_details
  #
  #   @return [ModernTreasury::Models::LegalEntityComplianceDetail, nil]
  optional :compliance_details, -> { ModernTreasury::LegalEntityComplianceDetail }, nil?: true

  # @!attribute date_formed
  #   A business's formation date (YYYY-MM-DD).
  #
  #   @return [Date, nil]
  optional :date_formed, Date, nil?: true

  # @!attribute date_of_birth
  #   An individual's date of birth (YYYY-MM-DD).
  #
  #   @return [Date, nil]
  optional :date_of_birth, Date, nil?: true

  # @!attribute doing_business_as_names
  #
  #   @return [Array<String>, nil]
  optional :doing_business_as_names, ModernTreasury::Internal::Type::ArrayOf[String]

  # @!attribute email
  #   The entity's primary email.
  #
  #   @return [String, nil]
  optional :email, String, nil?: true

  # @!attribute first_name
  #   An individual's first name.
  #
  #   @return [String, nil]
  optional :first_name, String, nil?: true

  # @!attribute identifications
  #   A list of identifications for the legal entity.
  #
  #   @return [Array<ModernTreasury::Models::IdentificationCreateRequest>, nil]
  optional :identifications,
           -> { ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::IdentificationCreateRequest] }

  # @!attribute industry_classifications
  #   A list of industry classifications for the legal entity.
  #
  #   @return [Array<ModernTreasury::Models::LegalEntityIndustryClassification>, nil]
  optional :industry_classifications,
           -> { ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::LegalEntityIndustryClassification] }

  # @!attribute last_name
  #   An individual's last name.
  #
  #   @return [String, nil]
  optional :last_name, String, nil?: true

  # @!attribute legal_entity_associations
  #   The legal entity associations and its child legal entities.
  #
  #   @return [Array<ModernTreasury::Models::ConnectionLegalEntityCreateParams::LegalEntity::LegalEntityAssociation>, nil]
  optional :legal_entity_associations,
           -> {
             ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::ConnectionLegalEntityCreateParams::LegalEntity::LegalEntityAssociation]
           },
           nil?: true

  # @!attribute legal_entity_type
  #   The type of legal entity.
  #
  #   @return [Symbol, ModernTreasury::Models::ConnectionLegalEntityCreateParams::LegalEntity::LegalEntityType, nil]
  optional :legal_entity_type,
           enum: -> { ModernTreasury::ConnectionLegalEntityCreateParams::LegalEntity::LegalEntityType }

  # @!attribute legal_structure
  #   The business's legal structure.
  #
  #   @return [Symbol, ModernTreasury::Models::ConnectionLegalEntityCreateParams::LegalEntity::LegalStructure, nil]
  optional :legal_structure,
           enum: -> { ModernTreasury::ConnectionLegalEntityCreateParams::LegalEntity::LegalStructure },
           nil?: true

  # @!attribute metadata
  #   Additional data represented as key-value pairs. Both the key and value must be
  #   strings.
  #
  #   @return [Hash{Symbol=>String}, nil]
  optional :metadata, ModernTreasury::Internal::Type::HashOf[String]

  # @!attribute middle_name
  #   An individual's middle name.
  #
  #   @return [String, nil]
  optional :middle_name, String, nil?: true

  # @!attribute phone_numbers
  #
  #   @return [Array<ModernTreasury::Models::ConnectionLegalEntityCreateParams::LegalEntity::PhoneNumber>, nil]
  optional :phone_numbers,
           -> { ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::ConnectionLegalEntityCreateParams::LegalEntity::PhoneNumber] }

  # @!attribute politically_exposed_person
  #   Whether the individual is a politically exposed person.
  #
  #   @return [Boolean, nil]
  optional :politically_exposed_person, ModernTreasury::Internal::Type::Boolean, nil?: true

  # @!attribute preferred_name
  #   An individual's preferred name.
  #
  #   @return [String, nil]
  optional :preferred_name, String, nil?: true

  # @!attribute prefix
  #   An individual's prefix.
  #
  #   @return [String, nil]
  optional :prefix, String, nil?: true

  # @!attribute risk_rating
  #   The risk rating of the legal entity. One of low, medium, high.
  #
  #   @return [Symbol, ModernTreasury::Models::ConnectionLegalEntityCreateParams::LegalEntity::RiskRating, nil]
  optional :risk_rating,
           enum: -> { ModernTreasury::ConnectionLegalEntityCreateParams::LegalEntity::RiskRating },
           nil?: true

  # @!attribute suffix
  #   An individual's suffix.
  #
  #   @return [String, nil]
  optional :suffix, String, nil?: true

  # @!attribute wealth_and_employment_details
  #
  #   @return [ModernTreasury::Models::LegalEntityWealthEmploymentDetail, nil]
  optional :wealth_and_employment_details,
           -> { ModernTreasury::LegalEntityWealthEmploymentDetail },
           nil?: true

  # @!attribute website
  #   The entity's primary website URL.
  #
  #   @return [String, nil]
  optional :website, String, nil?: true

  # @!method initialize(addresses: nil, bank_settings: nil, business_name: nil, citizenship_country: nil, compliance_details: nil, date_formed: nil, date_of_birth: nil, doing_business_as_names: nil, email: nil, first_name: nil, identifications: nil, industry_classifications: nil, last_name: nil, legal_entity_associations: nil, legal_entity_type: nil, legal_structure: nil, metadata: nil, middle_name: nil, phone_numbers: nil, politically_exposed_person: nil, preferred_name: nil, prefix: nil, risk_rating: nil, suffix: nil, wealth_and_employment_details: nil, website: nil)
  #   Some parameter documentations has been truncated, see
  #   {ModernTreasury::Models::ConnectionLegalEntityCreateParams::LegalEntity} for
  #   more details.
  #
  #   The legal entity.
  #
  #   @param addresses [Array<ModernTreasury::Models::LegalEntityAddressCreateRequest>] A list of addresses for the entity.
  #
  #   @param bank_settings [ModernTreasury::Models::LegalEntityBankSettings, nil]
  #
  #   @param business_name [String, nil] The business's legal business name.
  #
  #   @param citizenship_country [String, nil] The country of citizenship for an individual.
  #
  #   @param compliance_details [ModernTreasury::Models::LegalEntityComplianceDetail, nil]
  #
  #   @param date_formed [Date, nil] A business's formation date (YYYY-MM-DD).
  #
  #   @param date_of_birth [Date, nil] An individual's date of birth (YYYY-MM-DD).
  #
  #   @param doing_business_as_names [Array<String>]
  #
  #   @param email [String, nil] The entity's primary email.
  #
  #   @param first_name [String, nil] An individual's first name.
  #
  #   @param identifications [Array<ModernTreasury::Models::IdentificationCreateRequest>] A list of identifications for the legal entity.
  #
  #   @param industry_classifications [Array<ModernTreasury::Models::LegalEntityIndustryClassification>] A list of industry classifications for the legal entity.
  #
  #   @param last_name [String, nil] An individual's last name.
  #
  #   @param legal_entity_associations [Array<ModernTreasury::Models::ConnectionLegalEntityCreateParams::LegalEntity::LegalEntityAssociation>, nil] The legal entity associations and its child legal entities.
  #
  #   @param legal_entity_type [Symbol, ModernTreasury::Models::ConnectionLegalEntityCreateParams::LegalEntity::LegalEntityType] The type of legal entity.
  #
  #   @param legal_structure [Symbol, ModernTreasury::Models::ConnectionLegalEntityCreateParams::LegalEntity::LegalStructure, nil] The business's legal structure.
  #
  #   @param metadata [Hash{Symbol=>String}] Additional data represented as key-value pairs. Both the key and value must be s
  #
  #   @param middle_name [String, nil] An individual's middle name.
  #
  #   @param phone_numbers [Array<ModernTreasury::Models::ConnectionLegalEntityCreateParams::LegalEntity::PhoneNumber>]
  #
  #   @param politically_exposed_person [Boolean, nil] Whether the individual is a politically exposed person.
  #
  #   @param preferred_name [String, nil] An individual's preferred name.
  #
  #   @param prefix [String, nil] An individual's prefix.
  #
  #   @param risk_rating [Symbol, ModernTreasury::Models::ConnectionLegalEntityCreateParams::LegalEntity::RiskRating, nil] The risk rating of the legal entity. One of low, medium, high.
  #
  #   @param suffix [String, nil] An individual's suffix.
  #
  #   @param wealth_and_employment_details [ModernTreasury::Models::LegalEntityWealthEmploymentDetail, nil]
  #
  #   @param website [String, nil] The entity's primary website URL.

  class LegalEntityAssociation < ModernTreasury::Internal::Type::BaseModel
    # @!attribute relationship_types
    #
    #   @return [Array<Symbol, ModernTreasury::Models::ConnectionLegalEntityCreateParams::LegalEntity::LegalEntityAssociation::RelationshipType>]
    required :relationship_types,
             -> do
               ModernTreasury::Internal::Type::ArrayOf[
                 enum: ModernTreasury::ConnectionLegalEntityCreateParams::LegalEntity::LegalEntityAssociation::RelationshipType
               ]
             end

    # @!attribute child_legal_entity
    #   The child legal entity.
    #
    #   @return [ModernTreasury::Models::ChildLegalEntityCreate, nil]
    optional :child_legal_entity, -> { ModernTreasury::ChildLegalEntityCreate }

    # @!attribute child_legal_entity_id
    #   The ID of the child legal entity.
    #
    #   @return [String, nil]
    optional :child_legal_entity_id, String

    # @!attribute ownership_percentage
    #   The child entity's ownership percentage iff they are a beneficial owner.
    #
    #   @return [Integer, nil]
    optional :ownership_percentage, Integer, nil?: true

    # @!attribute title
    #   The job title of the child entity at the parent entity.
    #
    #   @return [String, nil]
    optional :title, String, nil?: true

    # @!method initialize(relationship_types:, child_legal_entity: nil, child_legal_entity_id: nil, ownership_percentage: nil, title: nil)
    #   @param relationship_types [Array<Symbol, ModernTreasury::Models::ConnectionLegalEntityCreateParams::LegalEntity::LegalEntityAssociation::RelationshipType>]
    #
    #   @param child_legal_entity [ModernTreasury::Models::ChildLegalEntityCreate] The child legal entity.
    #
    #   @param child_legal_entity_id [String] The ID of the child legal entity.
    #
    #   @param ownership_percentage [Integer, nil] The child entity's ownership percentage iff they are a beneficial owner.
    #
    #   @param title [String, nil] The job title of the child entity at the parent entity.

    # A list of relationship types for how the child entity relates to parent entity.
    module RelationshipType
      extend ModernTreasury::Internal::Type::Enum

      AUTHORIZED_SIGNER = :authorized_signer
      BENEFICIAL_OWNER = :beneficial_owner
      CONTROL_PERSON = :control_person

      # @!method self.values
      #   @return [Array<Symbol>]
    end
  end

  # The type of legal entity.
  #
  # @see ModernTreasury::Models::ConnectionLegalEntityCreateParams::LegalEntity#legal_entity_type
  module LegalEntityType
    extend ModernTreasury::Internal::Type::Enum

    BUSINESS = :business
    INDIVIDUAL = :individual

    # @!method self.values
    #   @return [Array<Symbol>]
  end

  # The business's legal structure.
  #
  # @see ModernTreasury::Models::ConnectionLegalEntityCreateParams::LegalEntity#legal_structure
  module LegalStructure
    extend ModernTreasury::Internal::Type::Enum

    CORPORATION = :corporation
    LLC = :llc
    NON_PROFIT = :non_profit
    PARTNERSHIP = :partnership
    SOLE_PROPRIETORSHIP = :sole_proprietorship
    TRUST = :trust

    # @!method self.values
    #   @return [Array<Symbol>]
  end

  class PhoneNumber < ModernTreasury::Internal::Type::BaseModel
    # @!attribute phone_number
    #
    #   @return [String, nil]
    optional :phone_number, String

    # @!method initialize(phone_number: nil)
    #   A list of phone numbers in E.164 format.
    #
    #   @param phone_number [String]
  end

  # The risk rating of the legal entity. One of low, medium, high.
  #
  # @see ModernTreasury::Models::ConnectionLegalEntityCreateParams::LegalEntity#risk_rating
  module RiskRating
    extend ModernTreasury::Internal::Type::Enum

    LOW = :low
    MEDIUM = :medium
    HIGH = :high

    # @!method self.values
    #   @return [Array<Symbol>]
  end
end

Instance Attribute Details

#addressesArray<ModernTreasury::Models::LegalEntityAddressCreateRequest>?

A list of addresses for the entity.



42
43
# File 'lib/modern_treasury/models/connection_legal_entity_create_params.rb', line 42

optional :addresses,
-> { ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::LegalEntityAddressCreateRequest] }

#bank_settingsModernTreasury::Models::LegalEntityBankSettings?



48
# File 'lib/modern_treasury/models/connection_legal_entity_create_params.rb', line 48

optional :bank_settings, -> { ModernTreasury::LegalEntityBankSettings }, nil?: true

#business_nameString?

The business’s legal business name.

Returns:

  • (String, nil)


54
# File 'lib/modern_treasury/models/connection_legal_entity_create_params.rb', line 54

optional :business_name, String, nil?: true

#citizenship_countryString?

The country of citizenship for an individual.

Returns:

  • (String, nil)


60
# File 'lib/modern_treasury/models/connection_legal_entity_create_params.rb', line 60

optional :citizenship_country, String, nil?: true

#compliance_detailsModernTreasury::Models::LegalEntityComplianceDetail?



65
# File 'lib/modern_treasury/models/connection_legal_entity_create_params.rb', line 65

optional :compliance_details, -> { ModernTreasury::LegalEntityComplianceDetail }, nil?: true

#date_formedDate?

A business’s formation date (YYYY-MM-DD).

Returns:

  • (Date, nil)


71
# File 'lib/modern_treasury/models/connection_legal_entity_create_params.rb', line 71

optional :date_formed, Date, nil?: true

#date_of_birthDate?

An individual’s date of birth (YYYY-MM-DD).

Returns:

  • (Date, nil)


77
# File 'lib/modern_treasury/models/connection_legal_entity_create_params.rb', line 77

optional :date_of_birth, Date, nil?: true

#doing_business_as_namesArray<String>?

Returns:

  • (Array<String>, nil)


82
# File 'lib/modern_treasury/models/connection_legal_entity_create_params.rb', line 82

optional :doing_business_as_names, ModernTreasury::Internal::Type::ArrayOf[String]

#emailString?

The entity’s primary email.

Returns:

  • (String, nil)


88
# File 'lib/modern_treasury/models/connection_legal_entity_create_params.rb', line 88

optional :email, String, nil?: true

#first_nameString?

An individual’s first name.

Returns:

  • (String, nil)


94
# File 'lib/modern_treasury/models/connection_legal_entity_create_params.rb', line 94

optional :first_name, String, nil?: true

#identificationsArray<ModernTreasury::Models::IdentificationCreateRequest>?

A list of identifications for the legal entity.



100
101
# File 'lib/modern_treasury/models/connection_legal_entity_create_params.rb', line 100

optional :identifications,
-> { ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::IdentificationCreateRequest] }

#industry_classificationsArray<ModernTreasury::Models::LegalEntityIndustryClassification>?

A list of industry classifications for the legal entity.



107
108
# File 'lib/modern_treasury/models/connection_legal_entity_create_params.rb', line 107

optional :industry_classifications,
-> { ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::LegalEntityIndustryClassification] }

#last_nameString?

An individual’s last name.

Returns:

  • (String, nil)


114
# File 'lib/modern_treasury/models/connection_legal_entity_create_params.rb', line 114

optional :last_name, String, nil?: true

The legal entity associations and its child legal entities.



120
121
122
123
124
# File 'lib/modern_treasury/models/connection_legal_entity_create_params.rb', line 120

optional :legal_entity_associations,
-> {
  ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::ConnectionLegalEntityCreateParams::LegalEntity::LegalEntityAssociation]
},
nil?: true

The type of legal entity.



130
131
# File 'lib/modern_treasury/models/connection_legal_entity_create_params.rb', line 130

optional :legal_entity_type,
enum: -> { ModernTreasury::ConnectionLegalEntityCreateParams::LegalEntity::LegalEntityType }

The business’s legal structure.



137
138
139
# File 'lib/modern_treasury/models/connection_legal_entity_create_params.rb', line 137

optional :legal_structure,
enum: -> { ModernTreasury::ConnectionLegalEntityCreateParams::LegalEntity::LegalStructure },
nil?: true

#metadataHash{Symbol=>String}?

Additional data represented as key-value pairs. Both the key and value must be strings.

Returns:

  • (Hash{Symbol=>String}, nil)


146
# File 'lib/modern_treasury/models/connection_legal_entity_create_params.rb', line 146

optional :metadata, ModernTreasury::Internal::Type::HashOf[String]

#middle_nameString?

An individual’s middle name.

Returns:

  • (String, nil)


152
# File 'lib/modern_treasury/models/connection_legal_entity_create_params.rb', line 152

optional :middle_name, String, nil?: true

#phone_numbersArray<ModernTreasury::Models::ConnectionLegalEntityCreateParams::LegalEntity::PhoneNumber>?



157
158
# File 'lib/modern_treasury/models/connection_legal_entity_create_params.rb', line 157

optional :phone_numbers,
-> { ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::ConnectionLegalEntityCreateParams::LegalEntity::PhoneNumber] }

#politically_exposed_personBoolean?

Whether the individual is a politically exposed person.

Returns:

  • (Boolean, nil)


164
# File 'lib/modern_treasury/models/connection_legal_entity_create_params.rb', line 164

optional :politically_exposed_person, ModernTreasury::Internal::Type::Boolean, nil?: true

#preferred_nameString?

An individual’s preferred name.

Returns:

  • (String, nil)


170
# File 'lib/modern_treasury/models/connection_legal_entity_create_params.rb', line 170

optional :preferred_name, String, nil?: true

#prefixString?

An individual’s prefix.

Returns:

  • (String, nil)


176
# File 'lib/modern_treasury/models/connection_legal_entity_create_params.rb', line 176

optional :prefix, String, nil?: true

#risk_ratingSymbol, ...

The risk rating of the legal entity. One of low, medium, high.



182
183
184
# File 'lib/modern_treasury/models/connection_legal_entity_create_params.rb', line 182

optional :risk_rating,
enum: -> { ModernTreasury::ConnectionLegalEntityCreateParams::LegalEntity::RiskRating },
nil?: true

#suffixString?

An individual’s suffix.

Returns:

  • (String, nil)


190
# File 'lib/modern_treasury/models/connection_legal_entity_create_params.rb', line 190

optional :suffix, String, nil?: true

#wealth_and_employment_detailsModernTreasury::Models::LegalEntityWealthEmploymentDetail?



195
196
197
# File 'lib/modern_treasury/models/connection_legal_entity_create_params.rb', line 195

optional :wealth_and_employment_details,
-> { ModernTreasury::LegalEntityWealthEmploymentDetail },
nil?: true

#websiteString?

The entity’s primary website URL.

Returns:

  • (String, nil)


203
# File 'lib/modern_treasury/models/connection_legal_entity_create_params.rb', line 203

optional :website, String, nil?: true

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/modern_treasury/models/connection_legal_entity_create_params.rb', line 318