Class: FinchAPI::Resources::Sandbox::Employment

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

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Employment

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

Parameters:



71
72
73
# File 'lib/finch_api/resources/sandbox/employment.rb', line 71

def initialize(client:)
  @client = client
end

Instance Method Details

#update(individual_id, class_code: nil, custom_fields: nil, department: nil, employment: nil, employment_status: nil, end_date: nil, first_name: nil, income: nil, income_history: nil, is_active: nil, last_name: nil, latest_rehire_date: nil, location: nil, manager: nil, middle_name: nil, source_id: nil, start_date: nil, title: nil, request_options: {}) ⇒ FinchAPI::Models::Sandbox::EmploymentUpdateResponse

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

Update sandbox employment

Parameters:

  • individual_id (String)
  • class_code (String, nil)

    Worker’s compensation classification code for this employee

  • custom_fields (Array<FinchAPI::Sandbox::EmploymentUpdateParams::CustomField>, nil)

    Custom fields for the individual. These are fields which are defined by the empl

  • department (FinchAPI::Sandbox::EmploymentUpdateParams::Department, nil)

    The department object.

  • employment (FinchAPI::Sandbox::EmploymentUpdateParams::Employment, nil)

    The employment object.

  • employment_status (Symbol, FinchAPI::Sandbox::EmploymentUpdateParams::EmploymentStatus, nil)

    The detailed employment status of the individual. Available options: ‘active`, `

  • end_date (String, nil)
  • first_name (String, nil)

    The legal first name of the individual.

  • income (FinchAPI::Income, nil)

    The employee’s income as reported by the provider. This may not always be annual

  • income_history (Array<FinchAPI::Income, nil>, nil)

    The array of income history.

  • is_active (Boolean, nil)

    ‘true` if the individual an an active employee or contractor at the company.

  • last_name (String, nil)

    The legal last name of the individual.

  • latest_rehire_date (String, nil)
  • location (FinchAPI::Location, nil)
  • manager (FinchAPI::Sandbox::EmploymentUpdateParams::Manager, nil)

    The manager object representing the manager of the individual within the org.

  • middle_name (String, nil)

    The legal middle name of the individual.

  • source_id (String, nil)

    The source system’s unique employment identifier for this individual

  • start_date (String, nil)
  • title (String, nil)

    The current title of the individual.

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

Returns:

See Also:



57
58
59
60
61
62
63
64
65
66
# File 'lib/finch_api/resources/sandbox/employment.rb', line 57

def update(individual_id, params = {})
  parsed, options = FinchAPI::Sandbox::EmploymentUpdateParams.dump_request(params)
  @client.request(
    method: :put,
    path: ["sandbox/employment/%1$s", individual_id],
    body: parsed,
    model: FinchAPI::Models::Sandbox::EmploymentUpdateResponse,
    options: options
  )
end