Class: MergeHRISClient::Employee

Inherits:
Object
  • Object
show all
Defined in:
lib/merge_hris_client/models/employee.rb

Overview

# The Employee Object ### Description The ‘Employee` object is used to represent any person who has been employed by a company. ### Usage Example Fetch from the `LIST Employee` endpoint and filter by `ID` to show all employees.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Employee

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
# File 'lib/merge_hris_client/models/employee.rb', line 238

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `MergeHRISClient::Employee` initialize method"
  end

  # check to see if the attribute exists and convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h|
    if (!self.class.attribute_map.key?(k.to_sym))
      fail ArgumentError, "`#{k}` is not a valid attribute in `MergeHRISClient::Employee`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
    end
    h[k.to_sym] = v
  }

  if attributes.key?(:'id')
    self.id = attributes[:'id']
  end

  if attributes.key?(:'remote_id')
    self.remote_id = attributes[:'remote_id']
  end

  if attributes.key?(:'employee_number')
    self.employee_number = attributes[:'employee_number']
  end

  if attributes.key?(:'company')
    self.company = attributes[:'company']
  end

  if attributes.key?(:'first_name')
    self.first_name = attributes[:'first_name']
  end

  if attributes.key?(:'last_name')
    self.last_name = attributes[:'last_name']
  end

  if attributes.key?(:'display_full_name')
    self.display_full_name = attributes[:'display_full_name']
  end

  if attributes.key?(:'username')
    self.username = attributes[:'username']
  end

  if attributes.key?(:'groups')
    if (value = attributes[:'groups']).is_a?(Array)
      self.groups = value
    end
  end

  if attributes.key?(:'work_email')
    self.work_email = attributes[:'work_email']
  end

  if attributes.key?(:'personal_email')
    self.personal_email = attributes[:'personal_email']
  end

  if attributes.key?(:'mobile_phone_number')
    self.mobile_phone_number = attributes[:'mobile_phone_number']
  end

  if attributes.key?(:'employments')
    if (value = attributes[:'employments']).is_a?(Array)
      self.employments = value
    end
  end

  if attributes.key?(:'home_location')
    self.home_location = attributes[:'home_location']
  end

  if attributes.key?(:'work_location')
    self.work_location = attributes[:'work_location']
  end

  if attributes.key?(:'manager')
    self.manager = attributes[:'manager']
  end

  if attributes.key?(:'team')
    self.team = attributes[:'team']
  end

  if attributes.key?(:'pay_group')
    self.pay_group = attributes[:'pay_group']
  end

  if attributes.key?(:'ssn')
    self.ssn = attributes[:'ssn']
  end

  if attributes.key?(:'gender')
    self.gender = attributes[:'gender']
  end

  if attributes.key?(:'ethnicity')
    self.ethnicity = attributes[:'ethnicity']
  end

  if attributes.key?(:'marital_status')
    self.marital_status = attributes[:'marital_status']
  end

  if attributes.key?(:'date_of_birth')
    self.date_of_birth = attributes[:'date_of_birth']
  end

  if attributes.key?(:'hire_date')
    self.hire_date = attributes[:'hire_date']
  end

  if attributes.key?(:'start_date')
    self.start_date = attributes[:'start_date']
  end

  if attributes.key?(:'remote_created_at')
    self.remote_created_at = attributes[:'remote_created_at']
  end

  if attributes.key?(:'employment_status')
    self.employment_status = attributes[:'employment_status']
  end

  if attributes.key?(:'termination_date')
    self.termination_date = attributes[:'termination_date']
  end

  if attributes.key?(:'avatar')
    self.avatar = attributes[:'avatar']
  end

  if attributes.key?(:'custom_fields')
    if (value = attributes[:'custom_fields']).is_a?(Hash)
      self.custom_fields = value
    end
  end

  if attributes.key?(:'remote_was_deleted')
    self.remote_was_deleted = attributes[:'remote_was_deleted']
  end

  if attributes.key?(:'modified_at')
    self.modified_at = attributes[:'modified_at']
  end

  if attributes.key?(:'field_mappings')
    if (value = attributes[:'field_mappings']).is_a?(Hash)
      self.field_mappings = value
    end
  end

  if attributes.key?(:'remote_data')
    if (value = attributes[:'remote_data']).is_a?(Array)
      self.remote_data = value
    end
  end
end

Instance Attribute Details

#avatarObject

The URL of the employee’s avatar image.



102
103
104
# File 'lib/merge_hris_client/models/employee.rb', line 102

def avatar
  @avatar
end

#companyObject

The ID of the employee’s company.



28
29
30
# File 'lib/merge_hris_client/models/employee.rb', line 28

def company
  @company
end

#custom_fieldsObject

Custom fields configured for a given model.



105
106
107
# File 'lib/merge_hris_client/models/employee.rb', line 105

def custom_fields
  @custom_fields
end

#date_of_birthObject

The employee’s date of birth.



84
85
86
# File 'lib/merge_hris_client/models/employee.rb', line 84

def date_of_birth
  @date_of_birth
end

#display_full_nameObject

The employee’s full name, to use for display purposes. If a preferred first name is available, the full name will include the preferred first name.



37
38
39
# File 'lib/merge_hris_client/models/employee.rb', line 37

def display_full_name
  @display_full_name
end

#employee_numberObject

The employee’s number that appears in the third-party integration’s UI.



25
26
27
# File 'lib/merge_hris_client/models/employee.rb', line 25

def employee_number
  @employee_number
end

#employment_statusObject

The employment status of the employee. * ‘ACTIVE` - ACTIVE * `PENDING` - PENDING * `INACTIVE` - INACTIVE



96
97
98
# File 'lib/merge_hris_client/models/employee.rb', line 96

def employment_status
  @employment_status
end

#employmentsObject

Array of ‘Employment` IDs for this Employee.



54
55
56
# File 'lib/merge_hris_client/models/employee.rb', line 54

def employments
  @employments
end

#ethnicityObject

The employee’s ethnicity. * ‘AMERICAN_INDIAN_OR_ALASKA_NATIVE` - AMERICAN_INDIAN_OR_ALASKA_NATIVE * `ASIAN_OR_INDIAN_SUBCONTINENT` - ASIAN_OR_INDIAN_SUBCONTINENT * `BLACK_OR_AFRICAN_AMERICAN` - BLACK_OR_AFRICAN_AMERICAN * `HISPANIC_OR_LATINO` - HISPANIC_OR_LATINO * `NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER` - NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER * `TWO_OR_MORE_RACES` - TWO_OR_MORE_RACES * `WHITE` - WHITE * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE



78
79
80
# File 'lib/merge_hris_client/models/employee.rb', line 78

def ethnicity
  @ethnicity
end

#field_mappingsObject

Returns the value of attribute field_mappings.



112
113
114
# File 'lib/merge_hris_client/models/employee.rb', line 112

def field_mappings
  @field_mappings
end

#first_nameObject

The employee’s first name.



31
32
33
# File 'lib/merge_hris_client/models/employee.rb', line 31

def first_name
  @first_name
end

#genderObject

The employee’s gender. * ‘MALE` - MALE * `FEMALE` - FEMALE * `NON-BINARY` - NON-BINARY * `OTHER` - OTHER * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE



75
76
77
# File 'lib/merge_hris_client/models/employee.rb', line 75

def gender
  @gender
end

#groupsObject

Returns the value of attribute groups.



42
43
44
# File 'lib/merge_hris_client/models/employee.rb', line 42

def groups
  @groups
end

#hire_dateObject

The date that the employee was hired, usually the day that an offer letter is signed. If an employee has multiple hire dates from previous employments, this represents the most recent hire date. Note: If you’re looking for the employee’s start date, refer to the start_date field.



87
88
89
# File 'lib/merge_hris_client/models/employee.rb', line 87

def hire_date
  @hire_date
end

#home_locationObject

The employee’s home address.



57
58
59
# File 'lib/merge_hris_client/models/employee.rb', line 57

def home_location
  @home_location
end

#idObject

Returns the value of attribute id.



19
20
21
# File 'lib/merge_hris_client/models/employee.rb', line 19

def id
  @id
end

#last_nameObject

The employee’s last name.



34
35
36
# File 'lib/merge_hris_client/models/employee.rb', line 34

def last_name
  @last_name
end

#managerObject

The employee ID of the employee’s manager.



63
64
65
# File 'lib/merge_hris_client/models/employee.rb', line 63

def manager
  @manager
end

#marital_statusObject

The employee’s filing status as related to marital status. * ‘SINGLE` - SINGLE * `MARRIED_FILING_JOINTLY` - MARRIED_FILING_JOINTLY * `MARRIED_FILING_SEPARATELY` - MARRIED_FILING_SEPARATELY * `HEAD_OF_HOUSEHOLD` - HEAD_OF_HOUSEHOLD * `QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD` - QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD



81
82
83
# File 'lib/merge_hris_client/models/employee.rb', line 81

def marital_status
  @marital_status
end

#mobile_phone_numberObject

The employee’s mobile phone number.



51
52
53
# File 'lib/merge_hris_client/models/employee.rb', line 51

def mobile_phone_number
  @mobile_phone_number
end

#modified_atObject

This is the datetime that this object was last updated by Merge



110
111
112
# File 'lib/merge_hris_client/models/employee.rb', line 110

def modified_at
  @modified_at
end

#pay_groupObject

The employee’s pay group



69
70
71
# File 'lib/merge_hris_client/models/employee.rb', line 69

def pay_group
  @pay_group
end

#personal_emailObject

The employee’s personal email.



48
49
50
# File 'lib/merge_hris_client/models/employee.rb', line 48

def personal_email
  @personal_email
end

#remote_created_atObject

When the third party’s employee was created.



93
94
95
# File 'lib/merge_hris_client/models/employee.rb', line 93

def remote_created_at
  @remote_created_at
end

#remote_dataObject

Returns the value of attribute remote_data.



114
115
116
# File 'lib/merge_hris_client/models/employee.rb', line 114

def remote_data
  @remote_data
end

#remote_idObject

The third-party API ID of the matching object.



22
23
24
# File 'lib/merge_hris_client/models/employee.rb', line 22

def remote_id
  @remote_id
end

#remote_was_deletedObject

Returns the value of attribute remote_was_deleted.



107
108
109
# File 'lib/merge_hris_client/models/employee.rb', line 107

def remote_was_deleted
  @remote_was_deleted
end

#ssnObject

The employee’s social security number.



72
73
74
# File 'lib/merge_hris_client/models/employee.rb', line 72

def ssn
  @ssn
end

#start_dateObject

The date that the employee started working. If an employee was rehired, the most recent start date will be returned.



90
91
92
# File 'lib/merge_hris_client/models/employee.rb', line 90

def start_date
  @start_date
end

#teamObject

The employee’s team.



66
67
68
# File 'lib/merge_hris_client/models/employee.rb', line 66

def team
  @team
end

#termination_dateObject

The employee’s termination date.



99
100
101
# File 'lib/merge_hris_client/models/employee.rb', line 99

def termination_date
  @termination_date
end

#usernameObject

The employee’s username that appears in the remote UI.



40
41
42
# File 'lib/merge_hris_client/models/employee.rb', line 40

def username
  @username
end

#work_emailObject

The employee’s work email.



45
46
47
# File 'lib/merge_hris_client/models/employee.rb', line 45

def work_email
  @work_email
end

#work_locationObject

The employee’s work address.



60
61
62
# File 'lib/merge_hris_client/models/employee.rb', line 60

def work_location
  @work_location
end

Class Method Details

.acceptable_attributesObject

Returns all the JSON keys this model knows about



157
158
159
# File 'lib/merge_hris_client/models/employee.rb', line 157

def self.acceptable_attributes
  attribute_map.values
end

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
# File 'lib/merge_hris_client/models/employee.rb', line 117

def self.attribute_map
  {
    :'id' => :'id',
    :'remote_id' => :'remote_id',
    :'employee_number' => :'employee_number',
    :'company' => :'company',
    :'first_name' => :'first_name',
    :'last_name' => :'last_name',
    :'display_full_name' => :'display_full_name',
    :'username' => :'username',
    :'groups' => :'groups',
    :'work_email' => :'work_email',
    :'personal_email' => :'personal_email',
    :'mobile_phone_number' => :'mobile_phone_number',
    :'employments' => :'employments',
    :'home_location' => :'home_location',
    :'work_location' => :'work_location',
    :'manager' => :'manager',
    :'team' => :'team',
    :'pay_group' => :'pay_group',
    :'ssn' => :'ssn',
    :'gender' => :'gender',
    :'ethnicity' => :'ethnicity',
    :'marital_status' => :'marital_status',
    :'date_of_birth' => :'date_of_birth',
    :'hire_date' => :'hire_date',
    :'start_date' => :'start_date',
    :'remote_created_at' => :'remote_created_at',
    :'employment_status' => :'employment_status',
    :'termination_date' => :'termination_date',
    :'avatar' => :'avatar',
    :'custom_fields' => :'custom_fields',
    :'remote_was_deleted' => :'remote_was_deleted',
    :'modified_at' => :'modified_at',
    :'field_mappings' => :'field_mappings',
    :'remote_data' => :'remote_data'
  }
end

.build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



527
528
529
# File 'lib/merge_hris_client/models/employee.rb', line 527

def self.build_from_hash(attributes)
  new.build_from_hash(attributes)
end

.openapi_nullableObject

List of attributes with nullable: true



202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/merge_hris_client/models/employee.rb', line 202

def self.openapi_nullable
  Set.new([
    :'remote_id',
    :'employee_number',
    :'company',
    :'first_name',
    :'last_name',
    :'display_full_name',
    :'username',
    :'work_email',
    :'personal_email',
    :'mobile_phone_number',
    :'home_location',
    :'work_location',
    :'manager',
    :'team',
    :'pay_group',
    :'ssn',
    :'gender',
    :'ethnicity',
    :'marital_status',
    :'date_of_birth',
    :'hire_date',
    :'start_date',
    :'remote_created_at',
    :'employment_status',
    :'termination_date',
    :'avatar',
    :'custom_fields',
    :'field_mappings',
    :'remote_data'
  ])
end

.openapi_typesObject

Attribute type mapping.



162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
# File 'lib/merge_hris_client/models/employee.rb', line 162

def self.openapi_types
  {
    :'id' => :'String',
    :'remote_id' => :'String',
    :'employee_number' => :'String',
    :'company' => :'String',
    :'first_name' => :'String',
    :'last_name' => :'String',
    :'display_full_name' => :'String',
    :'username' => :'String',
    :'groups' => :'Array<String>',
    :'work_email' => :'String',
    :'personal_email' => :'String',
    :'mobile_phone_number' => :'String',
    :'employments' => :'Array<String>',
    :'home_location' => :'String',
    :'work_location' => :'String',
    :'manager' => :'String',
    :'team' => :'String',
    :'pay_group' => :'String',
    :'ssn' => :'String',
    :'gender' => :'GenderEnum',
    :'ethnicity' => :'EthnicityEnum',
    :'marital_status' => :'MaritalStatusEnum',
    :'date_of_birth' => :'Time',
    :'hire_date' => :'Time',
    :'start_date' => :'Time',
    :'remote_created_at' => :'Time',
    :'employment_status' => :'EmploymentStatusEnum',
    :'termination_date' => :'Time',
    :'avatar' => :'String',
    :'custom_fields' => :'Hash<String, Object>',
    :'remote_was_deleted' => :'Boolean',
    :'modified_at' => :'Time',
    :'field_mappings' => :'Hash<String, Object>',
    :'remote_data' => :'Array<RemoteData>'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
# File 'lib/merge_hris_client/models/employee.rb', line 473

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      id == o.id &&
      remote_id == o.remote_id &&
      employee_number == o.employee_number &&
      company == o.company &&
      first_name == o.first_name &&
      last_name == o.last_name &&
      display_full_name == o.display_full_name &&
      username == o.username &&
      groups == o.groups &&
      work_email == o.work_email &&
      personal_email == o.personal_email &&
      mobile_phone_number == o.mobile_phone_number &&
      employments == o.employments &&
      home_location == o.home_location &&
      work_location == o.work_location &&
      manager == o.manager &&
      team == o.team &&
      pay_group == o.pay_group &&
      ssn == o.ssn &&
      gender == o.gender &&
      ethnicity == o.ethnicity &&
      marital_status == o.marital_status &&
      date_of_birth == o.date_of_birth &&
      hire_date == o.hire_date &&
      start_date == o.start_date &&
      remote_created_at == o.remote_created_at &&
      employment_status == o.employment_status &&
      termination_date == o.termination_date &&
      avatar == o.avatar &&
      custom_fields == o.custom_fields &&
      remote_was_deleted == o.remote_was_deleted &&
      modified_at == o.modified_at &&
      field_mappings == o.field_mappings &&
      remote_data == o.remote_data
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
# File 'lib/merge_hris_client/models/employee.rb', line 557

def _deserialize(type, value)
  case type.to_sym
  when :Time
    Time.parse(value)
  when :Date
    Date.parse(value)
  when :String
    value
  when :Integer
    value.to_i
  when :Float
    value.to_f
  when :Boolean
    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
      true
    else
      false
    end
  when :Object
    # generic object (usually a Hash), return directly
    value
  when /\AArray<(?<inner_type>.+)>\z/
    inner_type = Regexp.last_match[:inner_type]
    value.map { |v| _deserialize(inner_type, v) }
  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
    k_type = Regexp.last_match[:k_type]
    v_type = Regexp.last_match[:v_type]
    {}.tap do |hash|
      value.each do |k, v|
        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
      end
    end
  else # model
    # models (e.g. Pet) or oneOf
    klass = MergeHRISClient.const_get(type)
    klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
  end
end

#_to_hash(value) ⇒ Hash

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



628
629
630
631
632
633
634
635
636
637
638
639
640
# File 'lib/merge_hris_client/models/employee.rb', line 628

def _to_hash(value)
  if value.is_a?(Array)
    value.compact.map { |v| _to_hash(v) }
  elsif value.is_a?(Hash)
    {}.tap do |hash|
      value.each { |k, v| hash[k] = _to_hash(v) }
    end
  elsif value.respond_to? :to_hash
    value.to_hash
  else
    value
  end
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
# File 'lib/merge_hris_client/models/employee.rb', line 534

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  self.class.openapi_types.each_pair do |key, type|
    if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
      self.send("#{key}=", nil)
    elsif type =~ /\AArray<(.*)>/i
      # check to ensure the input is an array given that the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
    end
  end

  self
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


514
515
516
# File 'lib/merge_hris_client/models/employee.rb', line 514

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



520
521
522
# File 'lib/merge_hris_client/models/employee.rb', line 520

def hash
  [id, remote_id, employee_number, company, first_name, last_name, display_full_name, username, groups, work_email, personal_email, mobile_phone_number, employments, home_location, work_location, manager, team, pay_group, ssn, gender, ethnicity, marital_status, date_of_birth, hire_date, start_date, remote_created_at, employment_status, termination_date, avatar, custom_fields, remote_was_deleted, modified_at, field_mappings, remote_data].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
# File 'lib/merge_hris_client/models/employee.rb', line 400

def list_invalid_properties
  invalid_properties = Array.new
  if !@work_email.nil? && @work_email.to_s.length > 254
    invalid_properties.push('invalid value for "work_email", the character length must be smaller than or equal to 254.')
  end

  if !@personal_email.nil? && @personal_email.to_s.length > 254
    invalid_properties.push('invalid value for "personal_email", the character length must be smaller than or equal to 254.')
  end

  if !@ssn.nil? && @ssn.to_s.length > 100
    invalid_properties.push('invalid value for "ssn", the character length must be smaller than or equal to 100.')
  end

  if !@avatar.nil? && @avatar.to_s.length > 2000
    invalid_properties.push('invalid value for "avatar", the character length must be smaller than or equal to 2000.')
  end

  invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



604
605
606
# File 'lib/merge_hris_client/models/employee.rb', line 604

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



610
611
612
613
614
615
616
617
618
619
620
621
622
# File 'lib/merge_hris_client/models/employee.rb', line 610

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    if value.nil?
      is_nullable = self.class.openapi_nullable.include?(attr)
      next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
    end

    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



598
599
600
# File 'lib/merge_hris_client/models/employee.rb', line 598

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



423
424
425
426
427
428
429
# File 'lib/merge_hris_client/models/employee.rb', line 423

def valid?
  return false if !@work_email.nil? && @work_email.to_s.length > 254
  return false if !@personal_email.nil? && @personal_email.to_s.length > 254
  return false if !@ssn.nil? && @ssn.to_s.length > 100
  return false if !@avatar.nil? && @avatar.to_s.length > 2000
  true
end