merge_hris_client 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (141) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +21 -2
  3. data/docs/AccountToken.md +3 -1
  4. data/docs/AvailableActions.md +1 -1
  5. data/docs/BenefitRequest.md +28 -0
  6. data/docs/BenefitsApi.md +78 -0
  7. data/docs/DeleteAccountApi.md +77 -0
  8. data/docs/Employee.md +8 -6
  9. data/docs/EmployeeRequest.md +62 -0
  10. data/docs/EmployeesApi.md +83 -1
  11. data/docs/EmploymentRequest.md +34 -0
  12. data/docs/EmploymentsApi.md +78 -0
  13. data/docs/EndUserDetailsRequest.md +1 -1
  14. data/docs/Issue.md +30 -0
  15. data/docs/IssueStatusEnum.md +15 -0
  16. data/docs/IssuesApi.md +167 -0
  17. data/docs/Location.md +1 -1
  18. data/docs/ModelOperation.md +3 -1
  19. data/docs/PaginatedIssueList.md +22 -0
  20. data/docs/PaginatedSyncStatusList.md +22 -0
  21. data/docs/PaginatedTimeOffBalanceList.md +22 -0
  22. data/docs/RemoteDataRequest.md +20 -0
  23. data/docs/SyncStatus.md +1 -1
  24. data/docs/SyncStatusApi.md +89 -11
  25. data/docs/SyncStatusStatusEnum.md +15 -0
  26. data/docs/Team.md +2 -0
  27. data/docs/TeamsApi.md +2 -0
  28. data/docs/TimeOff.md +4 -0
  29. data/docs/TimeOffBalance.md +28 -0
  30. data/docs/TimeOffBalanceApi.md +181 -0
  31. data/lib/merge_hris_client.rb +15 -4
  32. data/lib/merge_hris_client/api/account_token_api.rb +1 -1
  33. data/lib/merge_hris_client/api/available_actions_api.rb +1 -1
  34. data/lib/merge_hris_client/api/benefits_api.rb +70 -1
  35. data/lib/merge_hris_client/api/companies_api.rb +1 -1
  36. data/lib/merge_hris_client/api/delete_account_api.rb +82 -0
  37. data/lib/merge_hris_client/api/employee_payroll_runs_api.rb +1 -1
  38. data/lib/merge_hris_client/api/employees_api.rb +76 -1
  39. data/lib/merge_hris_client/api/employments_api.rb +70 -1
  40. data/lib/merge_hris_client/api/generate_key_api.rb +1 -1
  41. data/lib/merge_hris_client/api/issues_api.rb +169 -0
  42. data/lib/merge_hris_client/api/link_token_api.rb +1 -1
  43. data/lib/merge_hris_client/api/locations_api.rb +1 -1
  44. data/lib/merge_hris_client/api/passthrough_api.rb +1 -1
  45. data/lib/merge_hris_client/api/payroll_runs_api.rb +1 -1
  46. data/lib/merge_hris_client/api/regenerate_key_api.rb +1 -1
  47. data/lib/merge_hris_client/api/sync_status_api.rb +79 -11
  48. data/lib/merge_hris_client/api/teams_api.rb +4 -1
  49. data/lib/merge_hris_client/api/time_off_api.rb +1 -1
  50. data/lib/merge_hris_client/api/time_off_balance_api.rb +196 -0
  51. data/lib/merge_hris_client/api_client.rb +2 -2
  52. data/lib/merge_hris_client/api_error.rb +1 -1
  53. data/lib/merge_hris_client/configuration.rb +1 -1
  54. data/lib/merge_hris_client/models/account_integration.rb +1 -1
  55. data/lib/merge_hris_client/models/account_token.rb +19 -5
  56. data/lib/merge_hris_client/models/available_actions.rb +1 -1
  57. data/lib/merge_hris_client/models/benefit.rb +1 -1
  58. data/lib/merge_hris_client/models/benefit_plan_type_enum.rb +1 -1
  59. data/lib/merge_hris_client/models/benefit_request.rb +276 -0
  60. data/lib/merge_hris_client/models/company.rb +1 -1
  61. data/lib/merge_hris_client/models/country_enum.rb +1 -1
  62. data/lib/merge_hris_client/models/data_passthrough_request.rb +2 -1
  63. data/lib/merge_hris_client/models/deduction.rb +1 -1
  64. data/lib/merge_hris_client/models/earning.rb +1 -1
  65. data/lib/merge_hris_client/models/employee.rb +32 -20
  66. data/lib/merge_hris_client/models/employee_payroll_run.rb +1 -1
  67. data/lib/merge_hris_client/models/employee_request.rb +523 -0
  68. data/lib/merge_hris_client/models/employment.rb +1 -1
  69. data/lib/merge_hris_client/models/employment_request.rb +309 -0
  70. data/lib/merge_hris_client/models/employment_status_enum.rb +1 -1
  71. data/lib/merge_hris_client/models/employment_type_enum.rb +1 -1
  72. data/lib/merge_hris_client/models/end_user_details_request.rb +2 -6
  73. data/lib/merge_hris_client/models/ethnicity_enum.rb +1 -1
  74. data/lib/merge_hris_client/models/flsa_status_enum.rb +1 -1
  75. data/lib/merge_hris_client/models/gender_enum.rb +1 -1
  76. data/lib/merge_hris_client/models/generate_remote_key_request.rb +1 -1
  77. data/lib/merge_hris_client/models/issue.rb +281 -0
  78. data/lib/merge_hris_client/models/issue_status_enum.rb +36 -0
  79. data/lib/merge_hris_client/models/link_token.rb +1 -1
  80. data/lib/merge_hris_client/models/location.rb +4 -4
  81. data/lib/merge_hris_client/models/method_enum.rb +1 -1
  82. data/lib/merge_hris_client/models/model_operation.rb +21 -5
  83. data/lib/merge_hris_client/models/paginated_benefit_list.rb +1 -1
  84. data/lib/merge_hris_client/models/paginated_company_list.rb +1 -1
  85. data/lib/merge_hris_client/models/paginated_employee_list.rb +1 -1
  86. data/lib/merge_hris_client/models/paginated_employee_payroll_run_list.rb +1 -1
  87. data/lib/merge_hris_client/models/paginated_employment_list.rb +1 -1
  88. data/lib/merge_hris_client/models/paginated_issue_list.rb +240 -0
  89. data/lib/merge_hris_client/models/paginated_location_list.rb +1 -1
  90. data/lib/merge_hris_client/models/paginated_payroll_run_list.rb +1 -1
  91. data/lib/merge_hris_client/models/paginated_sync_status_list.rb +240 -0
  92. data/lib/merge_hris_client/models/paginated_team_list.rb +1 -1
  93. data/lib/merge_hris_client/models/paginated_time_off_balance_list.rb +240 -0
  94. data/lib/merge_hris_client/models/paginated_time_off_list.rb +1 -1
  95. data/lib/merge_hris_client/models/pay_currency_enum.rb +1 -1
  96. data/lib/merge_hris_client/models/pay_frequency_enum.rb +1 -1
  97. data/lib/merge_hris_client/models/pay_period_enum.rb +1 -1
  98. data/lib/merge_hris_client/models/payroll_run.rb +1 -1
  99. data/lib/merge_hris_client/models/remote_data.rb +1 -1
  100. data/lib/merge_hris_client/models/remote_data_request.rb +234 -0
  101. data/lib/merge_hris_client/models/remote_key.rb +1 -1
  102. data/lib/merge_hris_client/models/remote_key_for_regeneration_request.rb +1 -1
  103. data/lib/merge_hris_client/models/remote_response.rb +1 -1
  104. data/lib/merge_hris_client/models/request_type_enum.rb +1 -1
  105. data/lib/merge_hris_client/models/run_state_enum.rb +1 -1
  106. data/lib/merge_hris_client/models/run_type_enum.rb +1 -1
  107. data/lib/merge_hris_client/models/sync_status.rb +2 -2
  108. data/lib/merge_hris_client/models/sync_status_status_enum.rb +37 -0
  109. data/lib/merge_hris_client/models/tax.rb +1 -1
  110. data/lib/merge_hris_client/models/team.rb +13 -2
  111. data/lib/merge_hris_client/models/time_off.rb +24 -2
  112. data/lib/merge_hris_client/models/time_off_balance.rb +275 -0
  113. data/lib/merge_hris_client/models/time_off_status_enum.rb +1 -1
  114. data/lib/merge_hris_client/models/type_enum.rb +1 -1
  115. data/lib/merge_hris_client/models/units_enum.rb +1 -1
  116. data/lib/merge_hris_client/version.rb +2 -2
  117. data/merge_hris_client-1.0.1.gem +0 -0
  118. data/merge_hris_client.gemspec +1 -1
  119. data/spec/api/delete_account_api_spec.rb +46 -0
  120. data/spec/api/generate_key_api_spec.rb +46 -0
  121. data/spec/api/issues_api_spec.rb +65 -0
  122. data/spec/api/sync_status_api_spec.rb +59 -0
  123. data/spec/api/time_off_balance_api_spec.rb +70 -0
  124. data/spec/api_client_spec.rb +1 -1
  125. data/spec/configuration_spec.rb +1 -1
  126. data/spec/models/benefit_request_spec.rb +64 -0
  127. data/spec/models/employee_request_spec.rb +160 -0
  128. data/spec/models/employment_request_spec.rb +82 -0
  129. data/spec/models/generate_remote_key_request_spec.rb +34 -0
  130. data/spec/models/issue_spec.rb +70 -0
  131. data/spec/models/issue_status_enum_spec.rb +28 -0
  132. data/spec/models/paginated_issue_list_spec.rb +46 -0
  133. data/spec/models/paginated_sync_status_list_spec.rb +46 -0
  134. data/spec/models/paginated_time_off_balance_list_spec.rb +46 -0
  135. data/spec/models/remote_data_request_spec.rb +40 -0
  136. data/spec/models/sync_status_spec.rb +64 -0
  137. data/spec/models/sync_status_status_enum_spec.rb +28 -0
  138. data/spec/models/time_off_balance_spec.rb +64 -0
  139. data/spec/spec_helper.rb +1 -1
  140. data/test_ruby.rb +14 -11
  141. metadata +67 -2
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0
7
7
  Contact: hello@merge.dev
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.0.0
9
+ OpenAPI Generator version: 5.1.1
10
10
 
11
11
  =end
12
12
 
@@ -56,6 +56,7 @@ module MergeHRISClient
56
56
  # List of attributes with nullable: true
57
57
  def self.openapi_nullable
58
58
  Set.new([
59
+ :'base_url_override',
59
60
  :'data',
60
61
  :'headers'
61
62
  ])
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0
7
7
  Contact: hello@merge.dev
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.0.0
9
+ OpenAPI Generator version: 5.1.1
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0
7
7
  Contact: hello@merge.dev
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.0.0
9
+ OpenAPI Generator version: 5.1.1
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0
7
7
  Contact: hello@merge.dev
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.0.0
9
+ OpenAPI Generator version: 5.1.1
10
10
 
11
11
  =end
12
12
 
@@ -21,7 +21,10 @@ module MergeHRISClient
21
21
  # The third-party API ID of the matching object.
22
22
  attr_accessor :remote_id
23
23
 
24
- # The ID of the Employee's company.
24
+ # The employee's number that appears in the remote UI. Note: This is distinct from the remote_id field, which is a unique identifier for the employee set by the remote API, and is not exposed to the user.
25
+ attr_accessor :employee_number
26
+
27
+ # The ID of the employee's company.
25
28
  attr_accessor :company
26
29
 
27
30
  # The employee's first name.
@@ -42,6 +45,7 @@ module MergeHRISClient
42
45
  # The employee's mobile phone number.
43
46
  attr_accessor :mobile_phone_number
44
47
 
48
+ # Array of `Employment` IDs for this Employee.
45
49
  attr_accessor :employments
46
50
 
47
51
  # The employee's home address.
@@ -71,9 +75,12 @@ module MergeHRISClient
71
75
  # The employee's date of birth.
72
76
  attr_accessor :date_of_birth
73
77
 
74
- # The employee's hire date.
78
+ # The employee's hire date. If an employee has multiple hire dates from previous employments, this represents the most recent hire date.
75
79
  attr_accessor :hire_date
76
80
 
81
+ # The employee's start date.
82
+ attr_accessor :start_date
83
+
77
84
  # The employment status of the employee.
78
85
  attr_accessor :employment_status
79
86
 
@@ -83,9 +90,6 @@ module MergeHRISClient
83
90
  # The URL of the employee's avatar image.
84
91
  attr_accessor :avatar
85
92
 
86
- # The identification number for the employee.
87
- attr_accessor :employee_number
88
-
89
93
  attr_accessor :remote_data
90
94
 
91
95
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -93,6 +97,7 @@ module MergeHRISClient
93
97
  {
94
98
  :'id' => :'id',
95
99
  :'remote_id' => :'remote_id',
100
+ :'employee_number' => :'employee_number',
96
101
  :'company' => :'company',
97
102
  :'first_name' => :'first_name',
98
103
  :'last_name' => :'last_name',
@@ -111,10 +116,10 @@ module MergeHRISClient
111
116
  :'marital_status' => :'marital_status',
112
117
  :'date_of_birth' => :'date_of_birth',
113
118
  :'hire_date' => :'hire_date',
119
+ :'start_date' => :'start_date',
114
120
  :'employment_status' => :'employment_status',
115
121
  :'termination_date' => :'termination_date',
116
122
  :'avatar' => :'avatar',
117
- :'employee_number' => :'employee_number',
118
123
  :'remote_data' => :'remote_data'
119
124
  }
120
125
  end
@@ -129,6 +134,7 @@ module MergeHRISClient
129
134
  {
130
135
  :'id' => :'String',
131
136
  :'remote_id' => :'String',
137
+ :'employee_number' => :'String',
132
138
  :'company' => :'String',
133
139
  :'first_name' => :'String',
134
140
  :'last_name' => :'String',
@@ -147,10 +153,10 @@ module MergeHRISClient
147
153
  :'marital_status' => :'MaritalStatusEnum',
148
154
  :'date_of_birth' => :'Time',
149
155
  :'hire_date' => :'Time',
156
+ :'start_date' => :'Time',
150
157
  :'employment_status' => :'EmploymentStatusEnum',
151
158
  :'termination_date' => :'Time',
152
159
  :'avatar' => :'String',
153
- :'employee_number' => :'String',
154
160
  :'remote_data' => :'Array<RemoteData>'
155
161
  }
156
162
  end
@@ -159,6 +165,7 @@ module MergeHRISClient
159
165
  def self.openapi_nullable
160
166
  Set.new([
161
167
  :'remote_id',
168
+ :'employee_number',
162
169
  :'company',
163
170
  :'first_name',
164
171
  :'last_name',
@@ -176,10 +183,10 @@ module MergeHRISClient
176
183
  :'marital_status',
177
184
  :'date_of_birth',
178
185
  :'hire_date',
186
+ :'start_date',
179
187
  :'employment_status',
180
188
  :'termination_date',
181
189
  :'avatar',
182
- :'employee_number',
183
190
  :'remote_data'
184
191
  ])
185
192
  end
@@ -207,6 +214,10 @@ module MergeHRISClient
207
214
  self.remote_id = attributes[:'remote_id']
208
215
  end
209
216
 
217
+ if attributes.key?(:'employee_number')
218
+ self.employee_number = attributes[:'employee_number']
219
+ end
220
+
210
221
  if attributes.key?(:'company')
211
222
  self.company = attributes[:'company']
212
223
  end
@@ -281,6 +292,10 @@ module MergeHRISClient
281
292
  self.hire_date = attributes[:'hire_date']
282
293
  end
283
294
 
295
+ if attributes.key?(:'start_date')
296
+ self.start_date = attributes[:'start_date']
297
+ end
298
+
284
299
  if attributes.key?(:'employment_status')
285
300
  self.employment_status = attributes[:'employment_status']
286
301
  end
@@ -293,10 +308,6 @@ module MergeHRISClient
293
308
  self.avatar = attributes[:'avatar']
294
309
  end
295
310
 
296
- if attributes.key?(:'employee_number')
297
- self.employee_number = attributes[:'employee_number']
298
- end
299
-
300
311
  if attributes.key?(:'remote_data')
301
312
  if (value = attributes[:'remote_data']).is_a?(Array)
302
313
  self.remote_data = value
@@ -320,8 +331,8 @@ module MergeHRISClient
320
331
  invalid_properties.push('invalid value for "ssn", the character length must be smaller than or equal to 100.')
321
332
  end
322
333
 
323
- if !@avatar.nil? && @avatar.to_s.length > 700
324
- invalid_properties.push('invalid value for "avatar", the character length must be smaller than or equal to 700.')
334
+ if !@avatar.nil? && @avatar.to_s.length > 2000
335
+ invalid_properties.push('invalid value for "avatar", the character length must be smaller than or equal to 2000.')
325
336
  end
326
337
 
327
338
  invalid_properties
@@ -333,7 +344,7 @@ module MergeHRISClient
333
344
  return false if !@work_email.nil? && @work_email.to_s.length > 254
334
345
  return false if !@personal_email.nil? && @personal_email.to_s.length > 254
335
346
  return false if !@ssn.nil? && @ssn.to_s.length > 100
336
- return false if !@avatar.nil? && @avatar.to_s.length > 700
347
+ return false if !@avatar.nil? && @avatar.to_s.length > 2000
337
348
  true
338
349
  end
339
350
 
@@ -370,8 +381,8 @@ module MergeHRISClient
370
381
  # Custom attribute writer method with validation
371
382
  # @param [Object] avatar Value to be assigned
372
383
  def avatar=(avatar)
373
- if !avatar.nil? && avatar.to_s.length > 700
374
- fail ArgumentError, 'invalid value for "avatar", the character length must be smaller than or equal to 700.'
384
+ if !avatar.nil? && avatar.to_s.length > 2000
385
+ fail ArgumentError, 'invalid value for "avatar", the character length must be smaller than or equal to 2000.'
375
386
  end
376
387
 
377
388
  @avatar = avatar
@@ -384,6 +395,7 @@ module MergeHRISClient
384
395
  self.class == o.class &&
385
396
  id == o.id &&
386
397
  remote_id == o.remote_id &&
398
+ employee_number == o.employee_number &&
387
399
  company == o.company &&
388
400
  first_name == o.first_name &&
389
401
  last_name == o.last_name &&
@@ -402,10 +414,10 @@ module MergeHRISClient
402
414
  marital_status == o.marital_status &&
403
415
  date_of_birth == o.date_of_birth &&
404
416
  hire_date == o.hire_date &&
417
+ start_date == o.start_date &&
405
418
  employment_status == o.employment_status &&
406
419
  termination_date == o.termination_date &&
407
420
  avatar == o.avatar &&
408
- employee_number == o.employee_number &&
409
421
  remote_data == o.remote_data
410
422
  end
411
423
 
@@ -418,7 +430,7 @@ module MergeHRISClient
418
430
  # Calculates hash code according to all attributes.
419
431
  # @return [Integer] Hash code
420
432
  def hash
421
- [id, remote_id, company, first_name, last_name, display_full_name, work_email, personal_email, mobile_phone_number, employments, home_location, work_location, manager, team, ssn, gender, ethnicity, marital_status, date_of_birth, hire_date, employment_status, termination_date, avatar, employee_number, remote_data].hash
433
+ [id, remote_id, employee_number, company, first_name, last_name, display_full_name, work_email, personal_email, mobile_phone_number, employments, home_location, work_location, manager, team, ssn, gender, ethnicity, marital_status, date_of_birth, hire_date, start_date, employment_status, termination_date, avatar, remote_data].hash
422
434
  end
423
435
 
424
436
  # Builds the object from hash
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0
7
7
  Contact: hello@merge.dev
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.0.0
9
+ OpenAPI Generator version: 5.1.1
10
10
 
11
11
  =end
12
12
 
@@ -0,0 +1,523 @@
1
+ =begin
2
+ #Merge HRIS API
3
+
4
+ #The unified API for building rich integrations with multiple HR Information System platforms.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: hello@merge.dev
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.1.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module MergeHRISClient
17
+ # # The Employee Object ### Description The `Employee` object is used to represent an Employee for a company. ### Usage Example Fetch from the `LIST Employee` endpoint and filter by `ID` to show all employees.
18
+ class EmployeeRequest
19
+ # The third-party API ID of the matching object.
20
+ attr_accessor :remote_id
21
+
22
+ # The employee's number that appears in the remote UI. Note: This is distinct from the remote_id field, which is a unique identifier for the employee set by the remote API, and is not exposed to the user.
23
+ attr_accessor :employee_number
24
+
25
+ # The ID of the employee's company.
26
+ attr_accessor :company
27
+
28
+ # The employee's first name.
29
+ attr_accessor :first_name
30
+
31
+ # The employee's last name.
32
+ attr_accessor :last_name
33
+
34
+ # The employee's full name, to use for display purposes.
35
+ attr_accessor :display_full_name
36
+
37
+ # The employee's work email.
38
+ attr_accessor :work_email
39
+
40
+ # The employee's personal email.
41
+ attr_accessor :personal_email
42
+
43
+ # The employee's mobile phone number.
44
+ attr_accessor :mobile_phone_number
45
+
46
+ # The employee's home address.
47
+ attr_accessor :home_location
48
+
49
+ # The employee's work address.
50
+ attr_accessor :work_location
51
+
52
+ # The employee ID of the employee's manager.
53
+ attr_accessor :manager
54
+
55
+ # The employee's team.
56
+ attr_accessor :team
57
+
58
+ # The employee's social security number.
59
+ attr_accessor :ssn
60
+
61
+ # The employee's gender.
62
+ attr_accessor :gender
63
+
64
+ # The employee's ethnicity.
65
+ attr_accessor :ethnicity
66
+
67
+ # The employee's marital status.
68
+ attr_accessor :marital_status
69
+
70
+ # The employee's date of birth.
71
+ attr_accessor :date_of_birth
72
+
73
+ # The employee's hire date. If an employee has multiple hire dates from previous employments, this represents the most recent hire date.
74
+ attr_accessor :hire_date
75
+
76
+ # The employee's start date.
77
+ attr_accessor :start_date
78
+
79
+ # The employment status of the employee.
80
+ attr_accessor :employment_status
81
+
82
+ # The employee's termination date.
83
+ attr_accessor :termination_date
84
+
85
+ # The URL of the employee's avatar image.
86
+ attr_accessor :avatar
87
+
88
+ # Attribute mapping from ruby-style variable name to JSON key.
89
+ def self.attribute_map
90
+ {
91
+ :'remote_id' => :'remote_id',
92
+ :'employee_number' => :'employee_number',
93
+ :'company' => :'company',
94
+ :'first_name' => :'first_name',
95
+ :'last_name' => :'last_name',
96
+ :'display_full_name' => :'display_full_name',
97
+ :'work_email' => :'work_email',
98
+ :'personal_email' => :'personal_email',
99
+ :'mobile_phone_number' => :'mobile_phone_number',
100
+ :'home_location' => :'home_location',
101
+ :'work_location' => :'work_location',
102
+ :'manager' => :'manager',
103
+ :'team' => :'team',
104
+ :'ssn' => :'ssn',
105
+ :'gender' => :'gender',
106
+ :'ethnicity' => :'ethnicity',
107
+ :'marital_status' => :'marital_status',
108
+ :'date_of_birth' => :'date_of_birth',
109
+ :'hire_date' => :'hire_date',
110
+ :'start_date' => :'start_date',
111
+ :'employment_status' => :'employment_status',
112
+ :'termination_date' => :'termination_date',
113
+ :'avatar' => :'avatar'
114
+ }
115
+ end
116
+
117
+ # Returns all the JSON keys this model knows about
118
+ def self.acceptable_attributes
119
+ attribute_map.values
120
+ end
121
+
122
+ # Attribute type mapping.
123
+ def self.openapi_types
124
+ {
125
+ :'remote_id' => :'String',
126
+ :'employee_number' => :'String',
127
+ :'company' => :'String',
128
+ :'first_name' => :'String',
129
+ :'last_name' => :'String',
130
+ :'display_full_name' => :'String',
131
+ :'work_email' => :'String',
132
+ :'personal_email' => :'String',
133
+ :'mobile_phone_number' => :'String',
134
+ :'home_location' => :'String',
135
+ :'work_location' => :'String',
136
+ :'manager' => :'String',
137
+ :'team' => :'String',
138
+ :'ssn' => :'String',
139
+ :'gender' => :'GenderEnum',
140
+ :'ethnicity' => :'EthnicityEnum',
141
+ :'marital_status' => :'MaritalStatusEnum',
142
+ :'date_of_birth' => :'Time',
143
+ :'hire_date' => :'Time',
144
+ :'start_date' => :'Time',
145
+ :'employment_status' => :'EmploymentStatusEnum',
146
+ :'termination_date' => :'Time',
147
+ :'avatar' => :'String'
148
+ }
149
+ end
150
+
151
+ # List of attributes with nullable: true
152
+ def self.openapi_nullable
153
+ Set.new([
154
+ :'remote_id',
155
+ :'employee_number',
156
+ :'company',
157
+ :'first_name',
158
+ :'last_name',
159
+ :'display_full_name',
160
+ :'work_email',
161
+ :'personal_email',
162
+ :'mobile_phone_number',
163
+ :'home_location',
164
+ :'work_location',
165
+ :'manager',
166
+ :'team',
167
+ :'ssn',
168
+ :'gender',
169
+ :'ethnicity',
170
+ :'marital_status',
171
+ :'date_of_birth',
172
+ :'hire_date',
173
+ :'start_date',
174
+ :'employment_status',
175
+ :'termination_date',
176
+ :'avatar'
177
+ ])
178
+ end
179
+
180
+ # Initializes the object
181
+ # @param [Hash] attributes Model attributes in the form of hash
182
+ def initialize(attributes = {})
183
+ if (!attributes.is_a?(Hash))
184
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MergeHRISClient::EmployeeRequest` initialize method"
185
+ end
186
+
187
+ # check to see if the attribute exists and convert string to symbol for hash key
188
+ attributes = attributes.each_with_object({}) { |(k, v), h|
189
+ if (!self.class.attribute_map.key?(k.to_sym))
190
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MergeHRISClient::EmployeeRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
191
+ end
192
+ h[k.to_sym] = v
193
+ }
194
+
195
+ if attributes.key?(:'remote_id')
196
+ self.remote_id = attributes[:'remote_id']
197
+ end
198
+
199
+ if attributes.key?(:'employee_number')
200
+ self.employee_number = attributes[:'employee_number']
201
+ end
202
+
203
+ if attributes.key?(:'company')
204
+ self.company = attributes[:'company']
205
+ end
206
+
207
+ if attributes.key?(:'first_name')
208
+ self.first_name = attributes[:'first_name']
209
+ end
210
+
211
+ if attributes.key?(:'last_name')
212
+ self.last_name = attributes[:'last_name']
213
+ end
214
+
215
+ if attributes.key?(:'display_full_name')
216
+ self.display_full_name = attributes[:'display_full_name']
217
+ end
218
+
219
+ if attributes.key?(:'work_email')
220
+ self.work_email = attributes[:'work_email']
221
+ end
222
+
223
+ if attributes.key?(:'personal_email')
224
+ self.personal_email = attributes[:'personal_email']
225
+ end
226
+
227
+ if attributes.key?(:'mobile_phone_number')
228
+ self.mobile_phone_number = attributes[:'mobile_phone_number']
229
+ end
230
+
231
+ if attributes.key?(:'home_location')
232
+ self.home_location = attributes[:'home_location']
233
+ end
234
+
235
+ if attributes.key?(:'work_location')
236
+ self.work_location = attributes[:'work_location']
237
+ end
238
+
239
+ if attributes.key?(:'manager')
240
+ self.manager = attributes[:'manager']
241
+ end
242
+
243
+ if attributes.key?(:'team')
244
+ self.team = attributes[:'team']
245
+ end
246
+
247
+ if attributes.key?(:'ssn')
248
+ self.ssn = attributes[:'ssn']
249
+ end
250
+
251
+ if attributes.key?(:'gender')
252
+ self.gender = attributes[:'gender']
253
+ end
254
+
255
+ if attributes.key?(:'ethnicity')
256
+ self.ethnicity = attributes[:'ethnicity']
257
+ end
258
+
259
+ if attributes.key?(:'marital_status')
260
+ self.marital_status = attributes[:'marital_status']
261
+ end
262
+
263
+ if attributes.key?(:'date_of_birth')
264
+ self.date_of_birth = attributes[:'date_of_birth']
265
+ end
266
+
267
+ if attributes.key?(:'hire_date')
268
+ self.hire_date = attributes[:'hire_date']
269
+ end
270
+
271
+ if attributes.key?(:'start_date')
272
+ self.start_date = attributes[:'start_date']
273
+ end
274
+
275
+ if attributes.key?(:'employment_status')
276
+ self.employment_status = attributes[:'employment_status']
277
+ end
278
+
279
+ if attributes.key?(:'termination_date')
280
+ self.termination_date = attributes[:'termination_date']
281
+ end
282
+
283
+ if attributes.key?(:'avatar')
284
+ self.avatar = attributes[:'avatar']
285
+ end
286
+ end
287
+
288
+ # Show invalid properties with the reasons. Usually used together with valid?
289
+ # @return Array for valid properties with the reasons
290
+ def list_invalid_properties
291
+ invalid_properties = Array.new
292
+ if !@work_email.nil? && @work_email.to_s.length > 254
293
+ invalid_properties.push('invalid value for "work_email", the character length must be smaller than or equal to 254.')
294
+ end
295
+
296
+ if !@personal_email.nil? && @personal_email.to_s.length > 254
297
+ invalid_properties.push('invalid value for "personal_email", the character length must be smaller than or equal to 254.')
298
+ end
299
+
300
+ if !@ssn.nil? && @ssn.to_s.length > 100
301
+ invalid_properties.push('invalid value for "ssn", the character length must be smaller than or equal to 100.')
302
+ end
303
+
304
+ if !@avatar.nil? && @avatar.to_s.length > 2000
305
+ invalid_properties.push('invalid value for "avatar", the character length must be smaller than or equal to 2000.')
306
+ end
307
+
308
+ invalid_properties
309
+ end
310
+
311
+ # Check to see if the all the properties in the model are valid
312
+ # @return true if the model is valid
313
+ def valid?
314
+ return false if !@work_email.nil? && @work_email.to_s.length > 254
315
+ return false if !@personal_email.nil? && @personal_email.to_s.length > 254
316
+ return false if !@ssn.nil? && @ssn.to_s.length > 100
317
+ return false if !@avatar.nil? && @avatar.to_s.length > 2000
318
+ true
319
+ end
320
+
321
+ # Custom attribute writer method with validation
322
+ # @param [Object] work_email Value to be assigned
323
+ def work_email=(work_email)
324
+ if !work_email.nil? && work_email.to_s.length > 254
325
+ fail ArgumentError, 'invalid value for "work_email", the character length must be smaller than or equal to 254.'
326
+ end
327
+
328
+ @work_email = work_email
329
+ end
330
+
331
+ # Custom attribute writer method with validation
332
+ # @param [Object] personal_email Value to be assigned
333
+ def personal_email=(personal_email)
334
+ if !personal_email.nil? && personal_email.to_s.length > 254
335
+ fail ArgumentError, 'invalid value for "personal_email", the character length must be smaller than or equal to 254.'
336
+ end
337
+
338
+ @personal_email = personal_email
339
+ end
340
+
341
+ # Custom attribute writer method with validation
342
+ # @param [Object] ssn Value to be assigned
343
+ def ssn=(ssn)
344
+ if !ssn.nil? && ssn.to_s.length > 100
345
+ fail ArgumentError, 'invalid value for "ssn", the character length must be smaller than or equal to 100.'
346
+ end
347
+
348
+ @ssn = ssn
349
+ end
350
+
351
+ # Custom attribute writer method with validation
352
+ # @param [Object] avatar Value to be assigned
353
+ def avatar=(avatar)
354
+ if !avatar.nil? && avatar.to_s.length > 2000
355
+ fail ArgumentError, 'invalid value for "avatar", the character length must be smaller than or equal to 2000.'
356
+ end
357
+
358
+ @avatar = avatar
359
+ end
360
+
361
+ # Checks equality by comparing each attribute.
362
+ # @param [Object] Object to be compared
363
+ def ==(o)
364
+ return true if self.equal?(o)
365
+ self.class == o.class &&
366
+ remote_id == o.remote_id &&
367
+ employee_number == o.employee_number &&
368
+ company == o.company &&
369
+ first_name == o.first_name &&
370
+ last_name == o.last_name &&
371
+ display_full_name == o.display_full_name &&
372
+ work_email == o.work_email &&
373
+ personal_email == o.personal_email &&
374
+ mobile_phone_number == o.mobile_phone_number &&
375
+ home_location == o.home_location &&
376
+ work_location == o.work_location &&
377
+ manager == o.manager &&
378
+ team == o.team &&
379
+ ssn == o.ssn &&
380
+ gender == o.gender &&
381
+ ethnicity == o.ethnicity &&
382
+ marital_status == o.marital_status &&
383
+ date_of_birth == o.date_of_birth &&
384
+ hire_date == o.hire_date &&
385
+ start_date == o.start_date &&
386
+ employment_status == o.employment_status &&
387
+ termination_date == o.termination_date &&
388
+ avatar == o.avatar
389
+ end
390
+
391
+ # @see the `==` method
392
+ # @param [Object] Object to be compared
393
+ def eql?(o)
394
+ self == o
395
+ end
396
+
397
+ # Calculates hash code according to all attributes.
398
+ # @return [Integer] Hash code
399
+ def hash
400
+ [remote_id, employee_number, company, first_name, last_name, display_full_name, work_email, personal_email, mobile_phone_number, home_location, work_location, manager, team, ssn, gender, ethnicity, marital_status, date_of_birth, hire_date, start_date, employment_status, termination_date, avatar].hash
401
+ end
402
+
403
+ # Builds the object from hash
404
+ # @param [Hash] attributes Model attributes in the form of hash
405
+ # @return [Object] Returns the model itself
406
+ def self.build_from_hash(attributes)
407
+ new.build_from_hash(attributes)
408
+ end
409
+
410
+ # Builds the object from hash
411
+ # @param [Hash] attributes Model attributes in the form of hash
412
+ # @return [Object] Returns the model itself
413
+ def build_from_hash(attributes)
414
+ return nil unless attributes.is_a?(Hash)
415
+ self.class.openapi_types.each_pair do |key, type|
416
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
417
+ self.send("#{key}=", nil)
418
+ elsif type =~ /\AArray<(.*)>/i
419
+ # check to ensure the input is an array given that the attribute
420
+ # is documented as an array but the input is not
421
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
422
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
423
+ end
424
+ elsif !attributes[self.class.attribute_map[key]].nil?
425
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
426
+ end
427
+ end
428
+
429
+ self
430
+ end
431
+
432
+ # Deserializes the data based on type
433
+ # @param string type Data type
434
+ # @param string value Value to be deserialized
435
+ # @return [Object] Deserialized data
436
+ def _deserialize(type, value)
437
+ case type.to_sym
438
+ when :Time
439
+ Time.parse(value)
440
+ when :Date
441
+ Date.parse(value)
442
+ when :String
443
+ value.to_s
444
+ when :Integer
445
+ value.to_i
446
+ when :Float
447
+ value.to_f
448
+ when :Boolean
449
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
450
+ true
451
+ else
452
+ false
453
+ end
454
+ when :Object
455
+ # generic object (usually a Hash), return directly
456
+ value
457
+ when /\AArray<(?<inner_type>.+)>\z/
458
+ inner_type = Regexp.last_match[:inner_type]
459
+ value.map { |v| _deserialize(inner_type, v) }
460
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
461
+ k_type = Regexp.last_match[:k_type]
462
+ v_type = Regexp.last_match[:v_type]
463
+ {}.tap do |hash|
464
+ value.each do |k, v|
465
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
466
+ end
467
+ end
468
+ else # model
469
+ # models (e.g. Pet) or oneOf
470
+ klass = MergeHRISClient.const_get(type)
471
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
472
+ end
473
+ end
474
+
475
+ # Returns the string representation of the object
476
+ # @return [String] String presentation of the object
477
+ def to_s
478
+ to_hash.to_s
479
+ end
480
+
481
+ # to_body is an alias to to_hash (backward compatibility)
482
+ # @return [Hash] Returns the object in the form of hash
483
+ def to_body
484
+ to_hash
485
+ end
486
+
487
+ # Returns the object in the form of hash
488
+ # @return [Hash] Returns the object in the form of hash
489
+ def to_hash
490
+ hash = {}
491
+ self.class.attribute_map.each_pair do |attr, param|
492
+ value = self.send(attr)
493
+ if value.nil?
494
+ is_nullable = self.class.openapi_nullable.include?(attr)
495
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
496
+ end
497
+
498
+ hash[param] = _to_hash(value)
499
+ end
500
+ hash
501
+ end
502
+
503
+ # Outputs non-array value in the form of hash
504
+ # For object, use to_hash. Otherwise, just return the value
505
+ # @param [Object] value Any valid value
506
+ # @return [Hash] Returns the value in the form of hash
507
+ def _to_hash(value)
508
+ if value.is_a?(Array)
509
+ value.compact.map { |v| _to_hash(v) }
510
+ elsif value.is_a?(Hash)
511
+ {}.tap do |hash|
512
+ value.each { |k, v| hash[k] = _to_hash(v) }
513
+ end
514
+ elsif value.respond_to? :to_hash
515
+ value.to_hash
516
+ else
517
+ value
518
+ end
519
+ end
520
+
521
+ end
522
+
523
+ end