Class: FinchAPI::Resources::Sandbox::Company

Inherits:
Object
  • Object
show all
Defined in:
lib/finch_api/resources/sandbox/company.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Company

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

Parameters:



49
50
51
# File 'lib/finch_api/resources/sandbox/company.rb', line 49

def initialize(client:)
  @client = client
end

Instance Method Details

#update(accounts: , departments: , ein: , entity: , legal_name: , locations: , primary_email: , primary_phone_number: , request_options: {}) ⇒ FinchAPI::Models::Sandbox::CompanyUpdateResponse

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

Update a sandbox company’s data

Parameters:

  • accounts (Array<FinchAPI::Sandbox::CompanyUpdateParams::Account>, nil)

    An array of bank account objects associated with the payroll/HRIS system.

  • departments (Array<FinchAPI::Sandbox::CompanyUpdateParams::Department, nil>, nil)

    The array of company departments.

  • ein (String, nil)

    The employer identification number.

  • entity (FinchAPI::Sandbox::CompanyUpdateParams::Entity, nil)

    The entity type object.

  • legal_name (String, nil)

    The legal name of the company.

  • locations (Array<FinchAPI::Location, nil>, nil)
  • primary_email (String, nil)

    The email of the main administrator on the account.

  • primary_phone_number (String, nil)

    The phone number of the main administrator on the account. Format: E.164, with e

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

Returns:

See Also:



35
36
37
38
39
40
41
42
43
44
# File 'lib/finch_api/resources/sandbox/company.rb', line 35

def update(params)
  parsed, options = FinchAPI::Sandbox::CompanyUpdateParams.dump_request(params)
  @client.request(
    method: :put,
    path: "sandbox/company",
    body: parsed,
    model: FinchAPI::Models::Sandbox::CompanyUpdateResponse,
    options: options
  )
end