Class: Increase::Resources::Entities

Inherits:
Object
  • Object
show all
Defined in:
lib/increase/resources/entities.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Entities

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 Entities.

Parameters:



254
255
256
# File 'lib/increase/resources/entities.rb', line 254

def initialize(client:)
  @client = client
end

Instance Method Details

#archive(entity_id, request_options: {}) ⇒ Increase::Models::Entity

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

Archive an Entity

Parameters:

  • entity_id (String)

    The identifier of the Entity to archive. Any accounts associated with an entity

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

Returns:

See Also:



159
160
161
162
163
164
165
166
# File 'lib/increase/resources/entities.rb', line 159

def archive(entity_id, params = {})
  @client.request(
    method: :post,
    path: ["entities/%1$s/archive", entity_id],
    model: Increase::Entity,
    options: params[:request_options]
  )
end

#archive_beneficial_owner(entity_id, beneficial_owner_id:, request_options: {}) ⇒ Increase::Models::Entity

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

Archive a beneficial owner for a corporate Entity

Parameters:

  • entity_id (String)

    The identifier of the Entity associated with the Beneficial Owner that is being

  • beneficial_owner_id (String)

    The identifying details of anyone controlling or owning 25% or more of the corpo

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

Returns:

See Also:



184
185
186
187
188
189
190
191
192
193
# File 'lib/increase/resources/entities.rb', line 184

def archive_beneficial_owner(entity_id, params)
  parsed, options = Increase::EntityArchiveBeneficialOwnerParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["entities/%1$s/archive_beneficial_owner", entity_id],
    body: parsed,
    model: Increase::Entity,
    options: options
  )
end

#create(structure:, corporation: nil, description: nil, government_authority: nil, joint: nil, natural_person: nil, risk_rating: nil, supplemental_documents: nil, terms_agreements: nil, third_party_verification: nil, trust: nil, request_options: {}) ⇒ Increase::Models::Entity

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

Create an Entity

Parameters:

Returns:

See Also:



40
41
42
43
44
45
46
47
48
49
# File 'lib/increase/resources/entities.rb', line 40

def create(params)
  parsed, options = Increase::EntityCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "entities",
    body: parsed,
    model: Increase::Entity,
    options: options
  )
end

#create_beneficial_owner(entity_id, beneficial_owner:, request_options: {}) ⇒ Increase::Models::Entity

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

Create a beneficial owner for a corporate Entity

Parameters:

Returns:

See Also:



211
212
213
214
215
216
217
218
219
220
# File 'lib/increase/resources/entities.rb', line 211

def create_beneficial_owner(entity_id, params)
  parsed, options = Increase::EntityCreateBeneficialOwnerParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["entities/%1$s/create_beneficial_owner", entity_id],
    body: parsed,
    model: Increase::Entity,
    options: options
  )
end

#list(created_at: nil, cursor: nil, idempotency_key: nil, limit: nil, status: nil, request_options: {}) ⇒ Increase::Internal::Page<Increase::Models::Entity>

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

List Entities

Parameters:

Returns:

See Also:



132
133
134
135
136
137
138
139
140
141
142
143
# File 'lib/increase/resources/entities.rb', line 132

def list(params = {})
  parsed, options = Increase::EntityListParams.dump_request(params)
  query = Increase::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: "entities",
    query: query,
    page: Increase::Internal::Page,
    model: Increase::Entity,
    options: options
  )
end

#retrieve(entity_id, request_options: {}) ⇒ Increase::Models::Entity

Retrieve an Entity

Parameters:

  • entity_id (String)

    The identifier of the Entity to retrieve.

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

Returns:

See Also:



62
63
64
65
66
67
68
69
# File 'lib/increase/resources/entities.rb', line 62

def retrieve(entity_id, params = {})
  @client.request(
    method: :get,
    path: ["entities/%1$s", entity_id],
    model: Increase::Entity,
    options: params[:request_options]
  )
end

#update(entity_id, corporation: nil, details_confirmed_at: nil, government_authority: nil, natural_person: nil, risk_rating: nil, third_party_verification: nil, trust: nil, request_options: {}) ⇒ Increase::Models::Entity

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

Update an Entity

Parameters:

Returns:

See Also:



99
100
101
102
103
104
105
106
107
108
# File 'lib/increase/resources/entities.rb', line 99

def update(entity_id, params = {})
  parsed, options = Increase::EntityUpdateParams.dump_request(params)
  @client.request(
    method: :patch,
    path: ["entities/%1$s", entity_id],
    body: parsed,
    model: Increase::Entity,
    options: options
  )
end

#update_beneficial_owner_address(entity_id, address:, beneficial_owner_id:, request_options: {}) ⇒ Increase::Models::Entity

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

Update the address for a beneficial owner belonging to a corporate Entity

Parameters:

Returns:

See Also:



240
241
242
243
244
245
246
247
248
249
# File 'lib/increase/resources/entities.rb', line 240

def update_beneficial_owner_address(entity_id, params)
  parsed, options = Increase::EntityUpdateBeneficialOwnerAddressParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["entities/%1$s/update_beneficial_owner_address", entity_id],
    body: parsed,
    model: Increase::Entity,
    options: options
  )
end