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

Returns a new instance of Company.

Parameters:



42
43
44
# File 'lib/finch-api/resources/sandbox/company.rb', line 42

def initialize(client:)
  @client = client
end

Instance Method Details

#update(params) ⇒ FinchAPI::Models::Sandbox::CompanyUpdateResponse

Update a sandbox company’s data

Parameters:

  • params (FinchAPI::Models::Sandbox::CompanyUpdateParams, Hash{Symbol=>Object})

    .

    @option params [Array<FinchAPI::Models::Sandbox::CompanyUpdateParams::Account>, nil] :accounts An array of bank account objects associated with the payroll/HRIS system.

    @option params [Array<FinchAPI::Models::Sandbox::CompanyUpdateParams::Department, nil>, nil] :departments The array of company departments.

    @option params [String, nil] :ein The employer identification number.

    @option params [FinchAPI::Models::Sandbox::CompanyUpdateParams::Entity, nil] :entity The entity type object.

    @option params [String, nil] :legal_name The legal name of the company.

    @option params [Array<FinchAPI::Models::Location, nil>, nil] :locations

    @option params [String, nil] :primary_email The email of the main administrator on the account.

    @option params [String, nil] :primary_phone_number The phone number of the main administrator on the account. Format: ‘XXXXXXXXXX`

    @option params [FinchAPI::RequestOptions, HashSymbol=>Object, nil] :request_options

Returns:



30
31
32
33
34
35
36
37
38
39
# File 'lib/finch-api/resources/sandbox/company.rb', line 30

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