Class: GustoEmbedded::Models::Shared::HistoricalEmployeeBody

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Includes:
Crystalline::MetadataFields
Defined in:
lib/gusto_embedded/models/shared/historical_employee_body.rb

Overview

Request body for creating or updating a **historical employee**—someone who already separated from the company and must appear on year-to-date or tax filings without receiving ongoing payroll.

Send this object under the JSON root key ‘employee`. All dates are ISO 8601 (`YYYY-MM-DD`). Use a `work_address.location_uuid` returned from your company locations API for an active work site.

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

#field, #fields, included, #marshal_single, #to_dict, #to_json

Constructor Details

#initialize(first_name:, last_name:, date_of_birth:, ssn:, work_address:, home_address:, termination:, job:, middle_initial: nil, preferred_first_name: nil, email: nil, employee_state_taxes: nil) ⇒ HistoricalEmployeeBody

Returns a new instance of HistoricalEmployeeBody.



45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/gusto_embedded/models/shared/historical_employee_body.rb', line 45

def initialize(first_name:, last_name:, date_of_birth:, ssn:, work_address:, home_address:, termination:, job:, middle_initial: nil, preferred_first_name: nil, email: nil, employee_state_taxes: nil)
  @first_name = first_name
  @last_name = last_name
  @date_of_birth = date_of_birth
  @ssn = ssn
  @work_address = work_address
  @home_address = home_address
  @termination = termination
  @job = job
  @middle_initial = middle_initial
  @preferred_first_name = preferred_first_name
  @email = email
  @employee_state_taxes = employee_state_taxes
end

Instance Method Details

#==(other) ⇒ Object



61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# File 'lib/gusto_embedded/models/shared/historical_employee_body.rb', line 61

def ==(other)
  return false unless other.is_a? self.class
  return false unless @first_name == other.first_name
  return false unless @last_name == other.last_name
  return false unless @date_of_birth == other.date_of_birth
  return false unless @ssn == other.ssn
  return false unless @work_address == other.work_address
  return false unless @home_address == other.home_address
  return false unless @termination == other.termination
  return false unless @job == other.job
  return false unless @middle_initial == other.middle_initial
  return false unless @preferred_first_name == other.preferred_first_name
  return false unless @email == other.email
  return false unless @employee_state_taxes == other.employee_state_taxes
  true
end