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

Returns a new instance of Employment.

Parameters:



68
69
70
# File 'lib/finch-api/resources/sandbox/employment.rb', line 68

def initialize(client:)
  @client = client
end

Instance Method Details

#update(individual_id, params = {}) ⇒ FinchAPI::Models::Sandbox::EmploymentUpdateResponse

Update sandbox employment

Parameters:

  • individual_id (String)
  • params (FinchAPI::Models::Sandbox::EmploymentUpdateParams, Hash{Symbol=>Object}) (defaults to: {})

    .

    @option params [String, nil] :class_code Worker’s compensation classification code for this employee

    @option params [Array<FinchAPI::Models::Sandbox::EmploymentUpdateParams::CustomField>] :custom_fields Custom fields for the individual. These are fields which are defined by the

    employer in the system. Custom fields are not currently supported for assisted
    connections.
    

    @option params [FinchAPI::Models::Sandbox::EmploymentUpdateParams::Department, nil] :department The department object.

    @option params [FinchAPI::Models::Sandbox::EmploymentUpdateParams::Employment, nil] :employment The employment object.

    @option params [Symbol, FinchAPI::Models::Sandbox::EmploymentUpdateParams::EmploymentStatus, nil] :employment_status The detailed employment status of the individual.

    @option params [String, nil] :end_date

    @option params [String, nil] :first_name The legal first name of the individual.

    @option params [FinchAPI::Models::Income, nil] :income The employee’s income as reported by the provider. This may not always be

    annualized income, but may be in units of bi-weekly, semi-monthly, daily, etc,
    depending on what information the provider returns.
    

    @option params [Array<FinchAPI::Models::Income, nil>, nil] :income_history The array of income history.

    @option params [Boolean, nil] :is_active ‘true` if the individual an an active employee or contractor at the company.

    @option params [String, nil] :last_name The legal last name of the individual.

    @option params [String, nil] :latest_rehire_date

    @option params [FinchAPI::Models::Location, nil] :location

    @option params [FinchAPI::Models::Sandbox::EmploymentUpdateParams::Manager, nil] :manager The manager object representing the manager of the individual within the org.

    @option params [String, nil] :middle_name The legal middle name of the individual.

    @option params [String] :source_id The source system’s unique employment identifier for this individual

    @option params [String, nil] :start_date

    @option params [String, nil] :title The current title of the individual.

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

Returns:



56
57
58
59
60
61
62
63
64
65
# File 'lib/finch-api/resources/sandbox/employment.rb', line 56

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