Class: ModernTreasury::Resources::LegalEntities

Inherits:
Object
  • Object
show all
Defined in:
lib/modern_treasury/resources/legal_entities.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ LegalEntities

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of LegalEntities.

Parameters:



270
271
272
# File 'lib/modern_treasury/resources/legal_entities.rb', line 270

def initialize(client:)
  @client = client
end

Instance Method Details

#create(legal_entity_type:, addresses: nil, bank_settings: nil, business_description: nil, business_name: nil, citizenship_country: nil, compliance_details: nil, connection_id: nil, country_of_incorporation: nil, date_formed: nil, date_of_birth: nil, documents: nil, doing_business_as_names: nil, email: nil, expected_activity_volume: nil, external_id: nil, first_name: nil, identifications: nil, industry_classifications: nil, intended_use: nil, last_name: nil, legal_entity_associations: nil, legal_structure: nil, listed_exchange: nil, metadata: nil, middle_name: nil, operating_jurisdictions: nil, phone_numbers: nil, politically_exposed_person: nil, preferred_name: nil, prefix: nil, primary_social_media_sites: nil, regulators: nil, risk_rating: nil, service_provider_legal_entity_id: nil, suffix: nil, third_party_verification: nil, third_party_verifications: nil, ticker_symbol: nil, wealth_and_employment_details: nil, website: nil, request_options: {}) ⇒ ModernTreasury::Models::LegalEntity

Some parameter documentations has been truncated, see Models::LegalEntityCreateParams for more details.

create legal_entity

Parameters:

Returns:

See Also:



100
101
102
103
104
105
106
107
108
109
# File 'lib/modern_treasury/resources/legal_entities.rb', line 100

def create(params)
  parsed, options = ModernTreasury::LegalEntityCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "api/legal_entities",
    body: parsed,
    model: ModernTreasury::LegalEntity,
    options: options
  )
end

#list(after_cursor: nil, external_id: nil, legal_entity_type: nil, metadata: nil, per_page: nil, show_deleted: nil, status: nil, request_options: {}) ⇒ ModernTreasury::Internal::Page<ModernTreasury::Models::LegalEntity>

Some parameter documentations has been truncated, see Models::LegalEntityListParams for more details.

Get a list of all legal entities.

Parameters:

Returns:

See Also:



254
255
256
257
258
259
260
261
262
263
264
265
# File 'lib/modern_treasury/resources/legal_entities.rb', line 254

def list(params = {})
  parsed, options = ModernTreasury::LegalEntityListParams.dump_request(params)
  query = ModernTreasury::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: "api/legal_entities",
    query: query,
    page: ModernTreasury::Internal::Page,
    model: ModernTreasury::LegalEntity,
    options: options
  )
end

#retrieve(id, request_options: {}) ⇒ ModernTreasury::Models::LegalEntity

Get details on a single legal entity.

Parameters:

Returns:

See Also:



122
123
124
125
126
127
128
129
# File 'lib/modern_treasury/resources/legal_entities.rb', line 122

def retrieve(id, params = {})
  @client.request(
    method: :get,
    path: ["api/legal_entities/%1$s", id],
    model: ModernTreasury::LegalEntity,
    options: params[:request_options]
  )
end

#update(id, addresses: nil, bank_settings: nil, business_description: nil, business_name: nil, citizenship_country: nil, country_of_incorporation: nil, date_formed: nil, date_of_birth: nil, doing_business_as_names: nil, email: nil, expected_activity_volume: nil, external_id: nil, first_name: nil, identifications: nil, industry_classifications: nil, intended_use: nil, last_name: nil, legal_structure: nil, listed_exchange: nil, metadata: nil, middle_name: nil, operating_jurisdictions: nil, phone_numbers: nil, politically_exposed_person: nil, preferred_name: nil, prefix: nil, primary_social_media_sites: nil, regulators: nil, risk_rating: nil, service_provider_legal_entity_id: nil, suffix: nil, third_party_verification: nil, third_party_verifications: nil, ticker_symbol: nil, wealth_and_employment_details: nil, website: nil, request_options: {}) ⇒ ModernTreasury::Models::LegalEntity

Some parameter documentations has been truncated, see Models::LegalEntityUpdateParams for more details.

Update a legal entity.

Parameters:

  • id (String)

    id

  • addresses (Array<ModernTreasury::Models::LegalEntityAddressCreateRequest>)

    A list of addresses for the entity.

  • bank_settings (ModernTreasury::Models::LegalEntityBankSettings, nil)
  • business_description (String, nil)

    A description of the business.

  • business_name (String, nil)

    The business’s legal business name.

  • citizenship_country (String, nil)

    The country of citizenship for an individual.

  • country_of_incorporation (String, nil)

    The country code where the business is incorporated in the ISO 3166-1 alpha-2 or

  • date_formed (Date, nil)

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

  • date_of_birth (Date, nil)

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

  • doing_business_as_names (Array<String>)
  • email (String, nil)

    The entity’s primary email.

  • expected_activity_volume (Integer, nil)

    Monthly expected transaction volume in USD.

  • external_id (String, nil)

    An optional user-defined 180 character unique identifier.

  • first_name (String, nil)

    An individual’s first name.

  • identifications (Array<ModernTreasury::Models::IdentificationCreateRequest>)

    A list of identifications for the legal entity.

  • industry_classifications (Array<ModernTreasury::Models::LegalEntityIndustryClassification>)

    A list of industry classifications for the legal entity.

  • intended_use (String, nil)

    A description of the intended use of the legal entity.

  • last_name (String, nil)

    An individual’s last name.

  • legal_structure (Symbol, ModernTreasury::Models::LegalEntityUpdateParams::LegalStructure, nil)

    The business’s legal structure.

  • listed_exchange (String, nil)

    ISO 10383 market identifier code.

  • metadata (Hash{Symbol=>String})

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

  • middle_name (String, nil)

    An individual’s middle name.

  • operating_jurisdictions (Array<String>)

    A list of countries where the business operates (ISO 3166-1 alpha-2 or alpha-3 c

  • phone_numbers (Array<ModernTreasury::Models::LegalEntityUpdateParams::PhoneNumber>)
  • politically_exposed_person (Boolean, nil)

    Whether the individual is a politically exposed person.

  • preferred_name (String, nil)

    An individual’s preferred name.

  • prefix (String, nil)

    An individual’s prefix.

  • primary_social_media_sites (Array<String>)

    A list of primary social media URLs for the business.

  • regulators (Array<ModernTreasury::Models::LegalEntityUpdateParams::Regulator>, nil)

    Array of regulatory bodies overseeing this institution.

  • risk_rating (Symbol, ModernTreasury::Models::LegalEntityUpdateParams::RiskRating, nil)

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

  • service_provider_legal_entity_id (String, nil)

    The UUID of the parent legal entity in the service provider tree.

  • suffix (String, nil)

    An individual’s suffix.

  • third_party_verification (ModernTreasury::Models::ThirdPartyVerification, nil)

    Deprecated. Use ‘third_party_verifications` instead.

  • third_party_verifications (Array<ModernTreasury::Models::ThirdPartyVerification>)

    A list of third-party verifications run by external vendors.

  • ticker_symbol (String, nil)

    Stock ticker symbol for publicly traded companies.

  • wealth_and_employment_details (ModernTreasury::Models::LegalEntityWealthEmploymentDetail, nil)
  • website (String, nil)

    The entity’s primary website URL.

  • request_options (ModernTreasury::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



217
218
219
220
221
222
223
224
225
226
# File 'lib/modern_treasury/resources/legal_entities.rb', line 217

def update(id, params = {})
  parsed, options = ModernTreasury::LegalEntityUpdateParams.dump_request(params)
  @client.request(
    method: :patch,
    path: ["api/legal_entities/%1$s", id],
    body: parsed,
    model: ModernTreasury::LegalEntity,
    options: options
  )
end