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:



334
335
336
# File 'lib/increase/resources/entities.rb', line 334

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:



156
157
158
159
160
161
162
163
# File 'lib/increase/resources/entities.rb', line 156

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:



181
182
183
184
185
186
187
188
189
190
# File 'lib/increase/resources/entities.rb', line 181

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

#confirm(entity_id, confirmed_at: nil, request_options: {}) ⇒ Increase::Models::Entity

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

Depending on your program, you may be required to re-confirm an Entity’s details on a recurring basis. After making any required updates, call this endpoint to record that your user confirmed their details.

Parameters:

  • entity_id (String)

    The identifier of the Entity to confirm the details of.

  • confirmed_at (Time)

    When your user confirmed the Entity’s details. If not provided, the current time

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

Returns:

See Also:



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

def confirm(entity_id, params = {})
  parsed, options = Increase::EntityConfirmParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["entities/%1$s/confirm", 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, 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:



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

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:



237
238
239
240
241
242
243
244
245
246
# File 'lib/increase/resources/entities.rb', line 237

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:



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

def list(params = {})
  parsed, options = Increase::EntityListParams.dump_request(params)
  @client.request(
    method: :get,
    path: "entities",
    query: parsed,
    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:



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

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:



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

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_address(entity_id, address: , request_options: {}) ⇒ Increase::Models::Entity

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

Update a Natural Person or Corporation’s address

Parameters:

Returns:

See Also:



264
265
266
267
268
269
270
271
272
273
# File 'lib/increase/resources/entities.rb', line 264

def update_address(entity_id, params)
  parsed, options = Increase::EntityUpdateAddressParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["entities/%1$s/update_address", 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:



293
294
295
296
297
298
299
300
301
302
# File 'lib/increase/resources/entities.rb', line 293

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

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

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

Update the industry code for a corporate Entity

Parameters:

  • entity_id (String)

    The identifier of the Entity to update. This endpoint only accepts ‘corporation`

  • industry_code (String)

    The North American Industry Classification System (NAICS) code for the corporati

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

Returns:

See Also:



320
321
322
323
324
325
326
327
328
329
# File 'lib/increase/resources/entities.rb', line 320

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