Class: VitableConnect::Models::Employee

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/vitable_connect/models/employee.rb,
sig/vitable_connect/models/employee.rbs

Defined Under Namespace

Modules: CompensationType, Status Classes: Address, Deduction

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(id:, classification_effective_date:, compensation_type:, compensation_type_effective_date:, created_at:, date_of_birth:, deductions:, email:, employee_class:, employer_id:, first_name:, last_name:, member_id:, phone:, start_date:, status:, updated_at:, address: nil, employer_name: nil, gender: nil, reference_id: nil, suffix: nil, termination_date: nil) ⇒ Object

Some parameter documentations has been truncated, see VitableConnect::Models::Employee for more details.

Parameters:

  • id (String)

    Unique employee identifier with 'empl_' prefix

  • classification_effective_date (Date)

    Date the employee's current classification took effect

  • compensation_type (Symbol, VitableConnect::Models::Employee::CompensationType, nil)
    • Salary - Salary
  • compensation_type_effective_date (Date)

    Date the employee's current compensation type took effect

  • created_at (Time)

    Timestamp when the employee was created

  • date_of_birth (Date)

    Date of birth (YYYY-MM-DD)

  • deductions (Array<VitableConnect::Models::Employee::Deduction>)

    Payroll deductions from the most recent statement period. Replaced when a new st

  • email (String)

    Email address

  • employee_class (Symbol, VitableConnect::Models::EmployeeClass)
    • Full Time - Full Time
  • employer_id (String)

    Unique identifier of the employer this employment is with (empr_*)

  • first_name (String)

    Employee's legal first name

  • last_name (String)

    Employee's legal last name

  • member_id (String)

    Unique member identifier with 'mbr_' prefix

  • phone (String, nil)

    Phone number (10-digit US domestic string)

  • start_date (Date)

    Employee's start date with the employer

  • status (Symbol, VitableConnect::Models::Employee::Status)

    Employee status (active or terminated)

  • updated_at (Time)

    Timestamp when the employee was last updated

  • address (VitableConnect::Models::Employee::Address, nil) (defaults to: nil)

    Employee's residential address

  • employer_name (String, nil) (defaults to: nil)

    Name of the employer this employment is with

  • gender (String, nil) (defaults to: nil)

    Gender identity, if provided

  • reference_id (String, nil) (defaults to: nil)

    Partner-assigned reference ID for the employee

  • suffix (String, nil) (defaults to: nil)

    Name suffix (e.g., Jr., Sr., III)

  • termination_date (Date, nil) (defaults to: nil)

    Employee's termination date, if terminated



# File 'lib/vitable_connect/models/employee.rb', line 153

Instance Attribute Details

#addressVitableConnect::Models::Employee::Address?

Employee's residential address

Parameters:

  • value (VitableConnect::Employee::Address, nil)

Returns:



64
# File 'lib/vitable_connect/models/employee.rb', line 64

optional :address, -> { VitableConnect::Employee::Address }, nil?: true

#classification_effective_dateDate

Returns the value of attribute classification_effective_date.

Returns:

  • (Date)


61
62
63
# File 'sig/vitable_connect/models/employee.rbs', line 61

def classification_effective_date
  @classification_effective_date
end

#compensation_typeVitableConnect::Models::Employee::compensation_type?

Returns the value of attribute compensation_type.

Returns:

  • (VitableConnect::Models::Employee::compensation_type, nil)


63
64
65
# File 'sig/vitable_connect/models/employee.rbs', line 63

def compensation_type
  @compensation_type
end

#compensation_type_effective_dateDate

Returns the value of attribute compensation_type_effective_date.

Returns:

  • (Date)


65
66
67
# File 'sig/vitable_connect/models/employee.rbs', line 65

def compensation_type_effective_date
  @compensation_type_effective_date
end

#created_atTime

Timestamp when the employee was created

Parameters:

  • value (Time)

Returns:

  • (Time)


10
# File 'lib/vitable_connect/models/employee.rb', line 10

required :created_at, Time

#date_of_birthDate

Date of birth (YYYY-MM-DD)

Parameters:

  • value (Date)

Returns:

  • (Date)


16
# File 'lib/vitable_connect/models/employee.rb', line 16

required :date_of_birth, Date

#deductionsArray<VitableConnect::Models::Employee::Deduction>

Payroll deductions from the most recent statement period. Replaced when a new statement is generated.

Parameters:

  • value (::Array[VitableConnect::Employee::Deduction])

Returns:



23
# File 'lib/vitable_connect/models/employee.rb', line 23

required :deductions, -> { VitableConnect::Internal::Type::ArrayOf[VitableConnect::Employee::Deduction] }

#emailString

Email address

Parameters:

  • value (String)

Returns:

  • (String)


29
# File 'lib/vitable_connect/models/employee.rb', line 29

required :email, String

#employee_classSymbol, VitableConnect::Models::EmployeeClass

  • Full Time - Full Time
  • Part Time - Part Time
  • Temporary - Temporary
  • Intern - Intern
  • Seasonal - Seasonal
  • Individual Contractor - Individual Contractor

Parameters:

  • value (VitableConnect::Models::employee_class)

Returns:



40
# File 'lib/vitable_connect/models/employee.rb', line 40

required :employee_class, enum: -> { VitableConnect::EmployeeClass }

#employer_idString

Returns the value of attribute employer_id.

Returns:

  • (String)


67
68
69
# File 'sig/vitable_connect/models/employee.rbs', line 67

def employer_id
  @employer_id
end

#employer_nameString?

Name of the employer this employment is with

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


70
# File 'lib/vitable_connect/models/employee.rb', line 70

optional :employer_name, String, nil?: true

#first_nameString

Employee's legal first name

Parameters:

  • value (String)

Returns:

  • (String)


46
# File 'lib/vitable_connect/models/employee.rb', line 46

required :first_name, String

#genderString?

Gender identity, if provided

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


76
# File 'lib/vitable_connect/models/employee.rb', line 76

optional :gender, String, nil?: true

#idString

Returns the value of attribute id.

Returns:

  • (String)


59
60
61
# File 'sig/vitable_connect/models/employee.rbs', line 59

def id
  @id
end

#last_nameString

Employee's legal last name

Parameters:

  • value (String)

Returns:

  • (String)


52
# File 'lib/vitable_connect/models/employee.rb', line 52

required :last_name, String

#member_idString

Returns the value of attribute member_id.

Returns:

  • (String)


69
70
71
# File 'sig/vitable_connect/models/employee.rbs', line 69

def member_id
  @member_id
end

#phoneString?

Returns the value of attribute phone.

Returns:

  • (String, nil)


71
72
73
# File 'sig/vitable_connect/models/employee.rbs', line 71

def phone
  @phone
end

#reference_idString?

Partner-assigned reference ID for the employee

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


82
# File 'lib/vitable_connect/models/employee.rb', line 82

optional :reference_id, String, nil?: true

#start_dateDate

Returns the value of attribute start_date.

Returns:

  • (Date)


73
74
75
# File 'sig/vitable_connect/models/employee.rbs', line 73

def start_date
  @start_date
end

#statusVitableConnect::Models::Employee::status

Returns the value of attribute status.

Returns:

  • (VitableConnect::Models::Employee::status)


75
76
77
# File 'sig/vitable_connect/models/employee.rbs', line 75

def status
  @status
end

#suffixString?

Name suffix (e.g., Jr., Sr., III)

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


88
# File 'lib/vitable_connect/models/employee.rb', line 88

optional :suffix, String, nil?: true

#termination_dateDate?

Employee's termination date, if terminated

Parameters:

  • value (Date, nil)

Returns:

  • (Date, nil)


94
# File 'lib/vitable_connect/models/employee.rb', line 94

optional :termination_date, Date, nil?: true

#updated_atTime

Timestamp when the employee was last updated

Parameters:

  • value (Time)

Returns:

  • (Time)


58
# File 'lib/vitable_connect/models/employee.rb', line 58

required :updated_at, Time

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/vitable_connect/models/employee.rb', line 213

Instance Method Details

#to_hash{

Returns:

  • ({)


103
# File 'sig/vitable_connect/models/employee.rbs', line 103

def to_hash: -> {