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

Returns a new instance of Entities.



6
7
8
# File 'lib/increase/resources/entities.rb', line 6

def initialize(client:)
  @client = client
end

Instance Method Details

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

Archive an Entity

Parameters:

  • entity_id (String)

    The identifier of the Entity to archive. Any accounts associated with an entity must be closed before the entity can be archived.

  • opts (Hash|RequestOptions) (defaults to: {})

    Options to specify HTTP behaviour for this request.

Returns:



88
89
90
91
92
93
94
# File 'lib/increase/resources/entities.rb', line 88

def archive(entity_id, opts = {})
  req = {}
  req[:method] = :post
  req[:path] = "/entities/#{entity_id}/archive"
  req[:model] = Increase::Models::Entity
  @client.request(req, opts)
end

#archive_beneficial_owner(entity_id, params = {}, opts = {}) ⇒ Increase::Models::Entity

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

  • params (Hash) (defaults to: {})

    Attributes to send in this request.

  • opts (Hash|RequestOptions) (defaults to: {})

    Options to specify HTTP behaviour for this request.

Options Hash (params):

  • :beneficial_owner_id (String)

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

Returns:



108
109
110
111
112
113
114
115
# File 'lib/increase/resources/entities.rb', line 108

def archive_beneficial_owner(entity_id, params = {}, opts = {})
  req = {}
  req[:method] = :post
  req[:path] = "/entities/#{entity_id}/archive_beneficial_owner"
  req[:body] = params
  req[:model] = Increase::Models::Entity
  @client.request(req, opts)
end

#confirm(entity_id, params = {}, opts = {}) ⇒ Increase::Models::Entity

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.

  • params (Hash) (defaults to: {})

    Attributes to send in this request.

  • opts (Hash|RequestOptions) (defaults to: {})

    Options to specify HTTP behaviour for this request.

Options Hash (params):

  • :confirmed_at (String)

    When your user confirmed the Entity's details. If not provided, the current time will be used.

Returns:



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

def confirm(entity_id, params = {}, opts = {})
  req = {}
  req[:method] = :post
  req[:path] = "/entities/#{entity_id}/confirm"
  req[:body] = params
  req[:model] = Increase::Models::Entity
  @client.request(req, opts)
end

#create(params = {}, opts = {}) ⇒ Increase::Models::Entity

Create an Entity

Parameters:

  • params (Hash) (defaults to: {})

    Attributes to send in this request.

  • opts (Hash|RequestOptions) (defaults to: {})

    Options to specify HTTP behaviour for this request.

Options Hash (params):

  • :structure (Symbol)

    The type of Entity to create.

  • :corporation (Corporation)

    Details of the corporation entity to create. Required if structure is equal to corporation.

  • :description (String)

    The description you choose to give the entity.

  • :government_authority (GovernmentAuthority)

    Details of the Government Authority entity to create. Required if structure is equal to Government Authority.

  • :joint (Joint)

    Details of the joint entity to create. Required if structure is equal to joint.

  • :natural_person (NaturalPerson)

    Details of the natural person entity to create. Required if structure is equal to natural_person. Natural people entities should be submitted with social_security_number or individual_taxpayer_identification_number identification methods.

  • :supplemental_documents (Array<SupplementalDocument>)

    Additional documentation associated with the entity.

  • :trust (Trust)

    Details of the trust entity to create. Required if structure is equal to trust.

Returns:



32
33
34
35
36
37
38
39
# File 'lib/increase/resources/entities.rb', line 32

def create(params = {}, opts = {})
  req = {}
  req[:method] = :post
  req[:path] = "/entities"
  req[:body] = params
  req[:model] = Increase::Models::Entity
  @client.request(req, opts)
end

#create_beneficial_owner(entity_id, params = {}, opts = {}) ⇒ Increase::Models::Entity

Create a beneficial owner for a corporate Entity

Parameters:

  • entity_id (String)

    The identifier of the Entity to associate with the new Beneficial Owner.

  • params (Hash) (defaults to: {})

    Attributes to send in this request.

  • opts (Hash|RequestOptions) (defaults to: {})

    Options to specify HTTP behaviour for this request.

Options Hash (params):

  • :beneficial_owner (BeneficialOwner)

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

Returns:



150
151
152
153
154
155
156
157
# File 'lib/increase/resources/entities.rb', line 150

def create_beneficial_owner(entity_id, params = {}, opts = {})
  req = {}
  req[:method] = :post
  req[:path] = "/entities/#{entity_id}/create_beneficial_owner"
  req[:body] = params
  req[:model] = Increase::Models::Entity
  @client.request(req, opts)
end

#list(params = {}, opts = {}) ⇒ Increase::Page<Increase::Models::Entity>

List Entities

Parameters:

  • params (Hash) (defaults to: {})

    Attributes to send in this request.

  • opts (Hash|RequestOptions) (defaults to: {})

    Options to specify HTTP behaviour for this request.

Options Hash (params):

  • :created_at (CreatedAt)
  • :cursor (String)

    Return the page of entries after this one.

  • :idempotency_key (String)

    Filter records to the one with the specified idempotency_key you chose for that object. This value is unique across Increase and is used to ensure that a request is only processed once. Learn more about idempotency.

  • :limit (Integer)

    Limit the size of the list that is returned. The default (and maximum) is 100 objects.

  • :status (Status)

Returns:



71
72
73
74
75
76
77
78
79
# File 'lib/increase/resources/entities.rb', line 71

def list(params = {}, opts = {})
  req = {}
  req[:method] = :get
  req[:path] = "/entities"
  req[:query] = params
  req[:page] = Increase::Page
  req[:model] = Increase::Models::Entity
  @client.request(req, opts)
end

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

Retrieve an Entity

Parameters:

  • entity_id (String)

    The identifier of the Entity to retrieve.

  • opts (Hash|RequestOptions) (defaults to: {})

    Options to specify HTTP behaviour for this request.

Returns:



47
48
49
50
51
52
53
# File 'lib/increase/resources/entities.rb', line 47

def retrieve(entity_id, opts = {})
  req = {}
  req[:method] = :get
  req[:path] = "/entities/#{entity_id}"
  req[:model] = Increase::Models::Entity
  @client.request(req, opts)
end

#update_address(entity_id, params = {}, opts = {}) ⇒ Increase::Models::Entity

Update a Natural Person or Corporation's address

Parameters:

  • entity_id (String)

    The identifier of the Entity whose address is being updated.

  • params (Hash) (defaults to: {})

    Attributes to send in this request.

  • opts (Hash|RequestOptions) (defaults to: {})

    Options to specify HTTP behaviour for this request.

Options Hash (params):

  • :address (Address)

    The entity's physical address. Mail receiving locations like PO Boxes and PMB's are disallowed.

Returns:



170
171
172
173
174
175
176
177
# File 'lib/increase/resources/entities.rb', line 170

def update_address(entity_id, params = {}, opts = {})
  req = {}
  req[:method] = :post
  req[:path] = "/entities/#{entity_id}/update_address"
  req[:body] = params
  req[:model] = Increase::Models::Entity
  @client.request(req, opts)
end

#update_beneficial_owner_address(entity_id, params = {}, opts = {}) ⇒ Increase::Models::Entity

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

Parameters:

  • entity_id (String)

    The identifier of the Entity associated with the Beneficial Owner whose address is being updated.

  • params (Hash) (defaults to: {})

    Attributes to send in this request.

  • opts (Hash|RequestOptions) (defaults to: {})

    Options to specify HTTP behaviour for this request.

Options Hash (params):

  • :address (Address)

    The individual's physical address. Mail receiving locations like PO Boxes and PMB's are disallowed.

  • :beneficial_owner_id (String)

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

Returns:



193
194
195
196
197
198
199
200
# File 'lib/increase/resources/entities.rb', line 193

def update_beneficial_owner_address(entity_id, params = {}, opts = {})
  req = {}
  req[:method] = :post
  req[:path] = "/entities/#{entity_id}/update_beneficial_owner_address"
  req[:body] = params
  req[:model] = Increase::Models::Entity
  @client.request(req, opts)
end

#update_industry_code(entity_id, params = {}, opts = {}) ⇒ Increase::Models::Entity

Update the industry code for a corporate Entity

Parameters:

  • entity_id (String)

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

  • params (Hash) (defaults to: {})

    Attributes to send in this request.

  • opts (Hash|RequestOptions) (defaults to: {})

    Options to specify HTTP behaviour for this request.

Options Hash (params):

  • :industry_code (String)

    The North American Industry Classification System (NAICS) code for the corporation's primary line of business. This is a number, like 5132 for Software Publishers. A full list of classification codes is available here.

Returns:



216
217
218
219
220
221
222
223
# File 'lib/increase/resources/entities.rb', line 216

def update_industry_code(entity_id, params = {}, opts = {})
  req = {}
  req[:method] = :post
  req[:path] = "/entities/#{entity_id}/update_industry_code"
  req[:body] = params
  req[:model] = Increase::Models::Entity
  @client.request(req, opts)
end