merge_hris_client 1.0.4 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +28 -12
- data/docs/AccountDetails.md +7 -7
- data/docs/AccountDetailsApi.md +2 -2
- data/docs/AccountIntegration.md +4 -4
- data/docs/AccountTokenApi.md +2 -2
- data/docs/AvailableActionsApi.md +2 -2
- data/docs/BankInfo.md +1 -1
- data/docs/BankInfoApi.md +8 -12
- data/docs/Benefit.md +2 -2
- data/docs/BenefitsApi.md +4 -4
- data/docs/CompaniesApi.md +4 -4
- data/docs/DataPassthroughRequest.md +2 -0
- data/docs/DebugModeLog.md +22 -0
- data/docs/DebugModelLogSummary.md +22 -0
- data/docs/Deduction.md +2 -2
- data/docs/DeductionsApi.md +4 -4
- data/docs/DeleteAccountApi.md +3 -2
- data/docs/Earning.md +3 -3
- data/docs/EarningTypeEnum.md +15 -0
- data/docs/Employee.md +9 -7
- data/docs/EmployeeEndpointRequest.md +18 -0
- data/docs/EmployeePayrollRun.md +2 -2
- data/docs/EmployeePayrollRunsApi.md +4 -4
- data/docs/EmployeeRequest.md +70 -0
- data/docs/EmployeeResponse.md +24 -0
- data/docs/EmployeesApi.md +158 -4
- data/docs/Employment.md +1 -1
- data/docs/EmploymentsApi.md +5 -4
- data/docs/EncodingEnum.md +15 -0
- data/docs/EndUserDetailsRequest.md +3 -1
- data/docs/ForceResyncApi.md +2 -2
- data/docs/GenerateKeyApi.md +2 -2
- data/docs/Group.md +28 -0
- data/docs/GroupTypeEnum.md +15 -0
- data/docs/GroupsApi.md +177 -0
- data/docs/IgnoreCommonModel.md +20 -0
- data/docs/IssuesApi.md +5 -4
- data/docs/LinkTokenApi.md +3 -3
- data/docs/LinkedAccountsApi.md +2 -2
- data/docs/Location.md +2 -0
- data/docs/LocationsApi.md +4 -4
- data/docs/MultipartFormFieldRequest.md +26 -0
- data/docs/PaginatedGroupList.md +22 -0
- data/docs/PassthroughApi.md +2 -2
- data/docs/PayGroupsApi.md +4 -4
- data/docs/PayrollRunsApi.md +4 -4
- data/docs/RegenerateKeyApi.md +2 -2
- data/docs/SyncStatusApi.md +0 -1
- data/docs/Tax.md +2 -2
- data/docs/Team.md +1 -1
- data/docs/TeamsApi.md +5 -4
- data/docs/TimeOff.md +2 -2
- data/docs/TimeOffApi.md +8 -6
- data/docs/TimeOffBalance.md +1 -1
- data/docs/TimeOffRequest.md +2 -2
- data/docs/TimeOffResponse.md +3 -1
- data/lib/merge_hris_client/api/bank_info_api.rb +4 -9
- data/lib/merge_hris_client/api/employees_api.rb +147 -2
- data/lib/merge_hris_client/api/groups_api.rb +182 -0
- data/lib/merge_hris_client/api/sync_status_api.rb +0 -62
- data/lib/merge_hris_client/api/time_off_api.rb +3 -0
- data/lib/merge_hris_client/configuration.rb +6 -4
- data/lib/merge_hris_client/models/account_details.rb +1 -1
- data/lib/merge_hris_client/models/account_details_and_actions.rb +1 -1
- data/lib/merge_hris_client/models/account_details_and_actions_integration.rb +1 -1
- data/lib/merge_hris_client/models/account_details_and_actions_status_enum.rb +1 -0
- data/lib/merge_hris_client/models/account_integration.rb +5 -27
- data/lib/merge_hris_client/models/account_token.rb +1 -1
- data/lib/merge_hris_client/models/account_type_enum.rb +1 -0
- data/lib/merge_hris_client/models/available_actions.rb +1 -1
- data/lib/merge_hris_client/models/bank_info.rb +0 -1
- data/lib/merge_hris_client/models/benefit.rb +1 -2
- data/lib/merge_hris_client/models/categories_enum.rb +1 -0
- data/lib/merge_hris_client/models/category_enum.rb +1 -0
- data/lib/merge_hris_client/models/country_enum.rb +1 -0
- data/lib/merge_hris_client/models/data_passthrough_request.rb +16 -3
- data/lib/merge_hris_client/models/debug_mode_log.rb +251 -0
- data/lib/merge_hris_client/models/debug_model_log_summary.rb +251 -0
- data/lib/merge_hris_client/models/deduction.rb +0 -1
- data/lib/merge_hris_client/models/earning.rb +4 -8
- data/lib/merge_hris_client/models/earning_type_enum.rb +38 -0
- data/lib/merge_hris_client/models/employee.rb +13 -8
- data/lib/merge_hris_client/models/employee_endpoint_request.rb +223 -0
- data/lib/merge_hris_client/models/employee_payroll_run.rb +1 -3
- data/lib/merge_hris_client/models/employee_request.rb +564 -0
- data/lib/merge_hris_client/models/employee_response.rb +266 -0
- data/lib/merge_hris_client/models/employment.rb +0 -1
- data/lib/merge_hris_client/models/employment_status_enum.rb +1 -1
- data/lib/merge_hris_client/models/employment_type_enum.rb +1 -1
- data/lib/merge_hris_client/models/encoding_enum.rb +36 -0
- data/lib/merge_hris_client/models/end_user_details_request.rb +40 -27
- data/lib/merge_hris_client/models/error_validation_problem.rb +1 -1
- data/lib/merge_hris_client/models/ethnicity_enum.rb +1 -1
- data/lib/merge_hris_client/models/flsa_status_enum.rb +1 -1
- data/lib/merge_hris_client/models/gender_enum.rb +1 -1
- data/lib/merge_hris_client/models/generate_remote_key_request.rb +1 -1
- data/lib/merge_hris_client/models/group.rb +275 -0
- data/lib/merge_hris_client/models/group_type_enum.rb +38 -0
- data/lib/merge_hris_client/models/ignore_common_model.rb +247 -0
- data/lib/merge_hris_client/models/ignore_common_model_request.rb +256 -0
- data/lib/merge_hris_client/models/issue.rb +1 -1
- data/lib/merge_hris_client/models/issue_status_enum.rb +1 -1
- data/lib/merge_hris_client/models/link_token.rb +1 -1
- data/lib/merge_hris_client/models/location.rb +12 -1
- data/lib/merge_hris_client/models/location_type_enum.rb +36 -0
- data/lib/merge_hris_client/models/marital_status_enum.rb +1 -1
- data/lib/merge_hris_client/models/method_enum.rb +1 -1
- data/lib/merge_hris_client/models/model_operation.rb +1 -1
- data/lib/merge_hris_client/models/multipart_form_field_request.rb +341 -0
- data/lib/merge_hris_client/models/paginated_account_details_and_actions_list.rb +1 -1
- data/lib/merge_hris_client/models/paginated_bank_info_list.rb +1 -1
- data/lib/merge_hris_client/models/paginated_benefit_list.rb +1 -1
- data/lib/merge_hris_client/models/paginated_company_list.rb +1 -1
- data/lib/merge_hris_client/models/paginated_deduction_list.rb +1 -1
- data/lib/merge_hris_client/models/paginated_employee_list.rb +1 -1
- data/lib/merge_hris_client/models/paginated_employee_payroll_run_list.rb +1 -1
- data/lib/merge_hris_client/models/paginated_employment_list.rb +1 -1
- data/lib/merge_hris_client/models/paginated_group_list.rb +240 -0
- data/lib/merge_hris_client/models/paginated_issue_list.rb +1 -1
- data/lib/merge_hris_client/models/paginated_location_list.rb +1 -1
- data/lib/merge_hris_client/models/paginated_pay_group_list.rb +1 -1
- data/lib/merge_hris_client/models/paginated_payroll_run_list.rb +1 -1
- data/lib/merge_hris_client/models/paginated_sync_status_list.rb +1 -1
- data/lib/merge_hris_client/models/paginated_team_list.rb +1 -1
- data/lib/merge_hris_client/models/paginated_time_off_balance_list.rb +1 -1
- data/lib/merge_hris_client/models/paginated_time_off_list.rb +1 -1
- data/lib/merge_hris_client/models/pay_currency_enum.rb +1 -1
- data/lib/merge_hris_client/models/pay_frequency_enum.rb +1 -2
- data/lib/merge_hris_client/models/pay_period_enum.rb +1 -1
- data/lib/merge_hris_client/models/policy_type_enum.rb +1 -0
- data/lib/merge_hris_client/models/reason_enum.rb +37 -0
- data/lib/merge_hris_client/models/remote_data.rb +1 -1
- data/lib/merge_hris_client/models/remote_data_request.rb +1 -1
- data/lib/merge_hris_client/models/remote_key.rb +1 -1
- data/lib/merge_hris_client/models/remote_key_for_regeneration_request.rb +1 -1
- data/lib/merge_hris_client/models/remote_response.rb +1 -1
- data/lib/merge_hris_client/models/request_format_enum.rb +2 -0
- data/lib/merge_hris_client/models/request_type_enum.rb +1 -0
- data/lib/merge_hris_client/models/run_state_enum.rb +1 -1
- data/lib/merge_hris_client/models/run_type_enum.rb +1 -11
- data/lib/merge_hris_client/models/sync_status.rb +1 -1
- data/lib/merge_hris_client/models/sync_status_status_enum.rb +1 -2
- data/lib/merge_hris_client/models/tax.rb +3 -7
- data/lib/merge_hris_client/models/team.rb +0 -1
- data/lib/merge_hris_client/models/time_off.rb +0 -2
- data/lib/merge_hris_client/models/time_off_balance.rb +0 -1
- data/lib/merge_hris_client/models/time_off_endpoint_request.rb +1 -1
- data/lib/merge_hris_client/models/time_off_request.rb +1 -3
- data/lib/merge_hris_client/models/time_off_response.rb +16 -5
- data/lib/merge_hris_client/models/time_off_status_enum.rb +1 -1
- data/lib/merge_hris_client/models/units_enum.rb +1 -1
- data/lib/merge_hris_client/models/validation_problem_source.rb +1 -1
- data/lib/merge_hris_client/models/warning_validation_problem.rb +1 -1
- data/lib/merge_hris_client/version.rb +1 -1
- data/lib/merge_hris_client.rb +16 -2
- data/pull_request_template.md +3 -1
- data/spec/api/bank_info_api_spec.rb +2 -4
- data/spec/api/employees_api_spec.rb +26 -0
- data/spec/api/groups_api_spec.rb +68 -0
- data/spec/api/time_off_api_spec.rb +1 -0
- data/spec/models/data_passthrough_request_spec.rb +6 -0
- data/spec/models/debug_mode_log_spec.rb +46 -0
- data/spec/models/debug_model_log_summary_spec.rb +46 -0
- data/spec/models/earning_type_enum_spec.rb +28 -0
- data/spec/models/employee_endpoint_request_spec.rb +34 -0
- data/spec/models/employee_request_spec.rb +190 -0
- data/spec/models/employee_response_spec.rb +52 -0
- data/spec/models/employee_spec.rb +6 -0
- data/spec/models/encoding_enum_spec.rb +28 -0
- data/spec/models/end_user_details_request_spec.rb +6 -0
- data/spec/models/group_spec.rb +64 -0
- data/spec/models/group_type_enum_spec.rb +28 -0
- data/spec/models/ignore_common_model_spec.rb +40 -0
- data/spec/models/location_spec.rb +6 -0
- data/spec/models/multipart_form_field_request_spec.rb +58 -0
- data/spec/models/paginated_group_list_spec.rb +46 -0
- data/spec/models/time_off_response_spec.rb +6 -0
- metadata +57 -2
@@ -0,0 +1,564 @@
|
|
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
|
+
attr_accessor :company
|
26
|
+
|
27
|
+
# The employee's first name.
|
28
|
+
attr_accessor :first_name
|
29
|
+
|
30
|
+
# The employee's last name.
|
31
|
+
attr_accessor :last_name
|
32
|
+
|
33
|
+
# 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.
|
34
|
+
attr_accessor :display_full_name
|
35
|
+
|
36
|
+
attr_accessor :groups
|
37
|
+
|
38
|
+
# The employee's work email.
|
39
|
+
attr_accessor :work_email
|
40
|
+
|
41
|
+
# The employee's personal email.
|
42
|
+
attr_accessor :personal_email
|
43
|
+
|
44
|
+
# The employee's mobile phone number.
|
45
|
+
attr_accessor :mobile_phone_number
|
46
|
+
|
47
|
+
# Array of `Employment` IDs for this Employee.
|
48
|
+
attr_accessor :employments
|
49
|
+
|
50
|
+
attr_accessor :home_location
|
51
|
+
|
52
|
+
attr_accessor :work_location
|
53
|
+
|
54
|
+
attr_accessor :manager
|
55
|
+
|
56
|
+
attr_accessor :team
|
57
|
+
|
58
|
+
attr_accessor :pay_group
|
59
|
+
|
60
|
+
# The employee's social security number.
|
61
|
+
attr_accessor :ssn
|
62
|
+
|
63
|
+
# The employee's gender.
|
64
|
+
attr_accessor :gender
|
65
|
+
|
66
|
+
# The employee's ethnicity.
|
67
|
+
attr_accessor :ethnicity
|
68
|
+
|
69
|
+
# The employee's marital status.
|
70
|
+
attr_accessor :marital_status
|
71
|
+
|
72
|
+
# The employee's date of birth.
|
73
|
+
attr_accessor :date_of_birth
|
74
|
+
|
75
|
+
# 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.
|
76
|
+
attr_accessor :hire_date
|
77
|
+
|
78
|
+
# The date that the employee started working. If an employee has multiple start dates from previous employments, this represents the most recent start date.
|
79
|
+
attr_accessor :start_date
|
80
|
+
|
81
|
+
# The employment status of the employee.
|
82
|
+
attr_accessor :employment_status
|
83
|
+
|
84
|
+
# The employee's termination date.
|
85
|
+
attr_accessor :termination_date
|
86
|
+
|
87
|
+
# The URL of the employee's avatar image.
|
88
|
+
attr_accessor :avatar
|
89
|
+
|
90
|
+
# Custom fields configured for a given model.
|
91
|
+
attr_accessor :custom_fields
|
92
|
+
|
93
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
94
|
+
def self.attribute_map
|
95
|
+
{
|
96
|
+
:'remote_id' => :'remote_id',
|
97
|
+
:'employee_number' => :'employee_number',
|
98
|
+
:'company' => :'company',
|
99
|
+
:'first_name' => :'first_name',
|
100
|
+
:'last_name' => :'last_name',
|
101
|
+
:'display_full_name' => :'display_full_name',
|
102
|
+
:'groups' => :'groups',
|
103
|
+
:'work_email' => :'work_email',
|
104
|
+
:'personal_email' => :'personal_email',
|
105
|
+
:'mobile_phone_number' => :'mobile_phone_number',
|
106
|
+
:'employments' => :'employments',
|
107
|
+
:'home_location' => :'home_location',
|
108
|
+
:'work_location' => :'work_location',
|
109
|
+
:'manager' => :'manager',
|
110
|
+
:'team' => :'team',
|
111
|
+
:'pay_group' => :'pay_group',
|
112
|
+
:'ssn' => :'ssn',
|
113
|
+
:'gender' => :'gender',
|
114
|
+
:'ethnicity' => :'ethnicity',
|
115
|
+
:'marital_status' => :'marital_status',
|
116
|
+
:'date_of_birth' => :'date_of_birth',
|
117
|
+
:'hire_date' => :'hire_date',
|
118
|
+
:'start_date' => :'start_date',
|
119
|
+
:'employment_status' => :'employment_status',
|
120
|
+
:'termination_date' => :'termination_date',
|
121
|
+
:'avatar' => :'avatar',
|
122
|
+
:'custom_fields' => :'custom_fields'
|
123
|
+
}
|
124
|
+
end
|
125
|
+
|
126
|
+
# Returns all the JSON keys this model knows about
|
127
|
+
def self.acceptable_attributes
|
128
|
+
attribute_map.values
|
129
|
+
end
|
130
|
+
|
131
|
+
# Attribute type mapping.
|
132
|
+
def self.openapi_types
|
133
|
+
{
|
134
|
+
:'remote_id' => :'String',
|
135
|
+
:'employee_number' => :'String',
|
136
|
+
:'company' => :'String',
|
137
|
+
:'first_name' => :'String',
|
138
|
+
:'last_name' => :'String',
|
139
|
+
:'display_full_name' => :'String',
|
140
|
+
:'groups' => :'Array<String>',
|
141
|
+
:'work_email' => :'String',
|
142
|
+
:'personal_email' => :'String',
|
143
|
+
:'mobile_phone_number' => :'String',
|
144
|
+
:'employments' => :'Array<String>',
|
145
|
+
:'home_location' => :'String',
|
146
|
+
:'work_location' => :'String',
|
147
|
+
:'manager' => :'String',
|
148
|
+
:'team' => :'String',
|
149
|
+
:'pay_group' => :'String',
|
150
|
+
:'ssn' => :'String',
|
151
|
+
:'gender' => :'GenderEnum',
|
152
|
+
:'ethnicity' => :'EthnicityEnum',
|
153
|
+
:'marital_status' => :'MaritalStatusEnum',
|
154
|
+
:'date_of_birth' => :'Time',
|
155
|
+
:'hire_date' => :'Time',
|
156
|
+
:'start_date' => :'Time',
|
157
|
+
:'employment_status' => :'EmploymentStatusEnum',
|
158
|
+
:'termination_date' => :'Time',
|
159
|
+
:'avatar' => :'String',
|
160
|
+
:'custom_fields' => :'Hash<String, AnyType>'
|
161
|
+
}
|
162
|
+
end
|
163
|
+
|
164
|
+
# List of attributes with nullable: true
|
165
|
+
def self.openapi_nullable
|
166
|
+
Set.new([
|
167
|
+
:'remote_id',
|
168
|
+
:'employee_number',
|
169
|
+
:'company',
|
170
|
+
:'first_name',
|
171
|
+
:'last_name',
|
172
|
+
:'display_full_name',
|
173
|
+
:'work_email',
|
174
|
+
:'personal_email',
|
175
|
+
:'mobile_phone_number',
|
176
|
+
:'home_location',
|
177
|
+
:'work_location',
|
178
|
+
:'manager',
|
179
|
+
:'team',
|
180
|
+
:'pay_group',
|
181
|
+
:'ssn',
|
182
|
+
:'gender',
|
183
|
+
:'ethnicity',
|
184
|
+
:'marital_status',
|
185
|
+
:'date_of_birth',
|
186
|
+
:'hire_date',
|
187
|
+
:'start_date',
|
188
|
+
:'employment_status',
|
189
|
+
:'termination_date',
|
190
|
+
:'avatar',
|
191
|
+
:'custom_fields'
|
192
|
+
])
|
193
|
+
end
|
194
|
+
|
195
|
+
# Initializes the object
|
196
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
197
|
+
def initialize(attributes = {})
|
198
|
+
if (!attributes.is_a?(Hash))
|
199
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MergeHRISClient::EmployeeRequest` initialize method"
|
200
|
+
end
|
201
|
+
|
202
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
203
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
204
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
205
|
+
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
|
206
|
+
end
|
207
|
+
h[k.to_sym] = v
|
208
|
+
}
|
209
|
+
|
210
|
+
if attributes.key?(:'remote_id')
|
211
|
+
self.remote_id = attributes[:'remote_id']
|
212
|
+
end
|
213
|
+
|
214
|
+
if attributes.key?(:'employee_number')
|
215
|
+
self.employee_number = attributes[:'employee_number']
|
216
|
+
end
|
217
|
+
|
218
|
+
if attributes.key?(:'company')
|
219
|
+
self.company = attributes[:'company']
|
220
|
+
end
|
221
|
+
|
222
|
+
if attributes.key?(:'first_name')
|
223
|
+
self.first_name = attributes[:'first_name']
|
224
|
+
end
|
225
|
+
|
226
|
+
if attributes.key?(:'last_name')
|
227
|
+
self.last_name = attributes[:'last_name']
|
228
|
+
end
|
229
|
+
|
230
|
+
if attributes.key?(:'display_full_name')
|
231
|
+
self.display_full_name = attributes[:'display_full_name']
|
232
|
+
end
|
233
|
+
|
234
|
+
if attributes.key?(:'groups')
|
235
|
+
if (value = attributes[:'groups']).is_a?(Array)
|
236
|
+
self.groups = value
|
237
|
+
end
|
238
|
+
end
|
239
|
+
|
240
|
+
if attributes.key?(:'work_email')
|
241
|
+
self.work_email = attributes[:'work_email']
|
242
|
+
end
|
243
|
+
|
244
|
+
if attributes.key?(:'personal_email')
|
245
|
+
self.personal_email = attributes[:'personal_email']
|
246
|
+
end
|
247
|
+
|
248
|
+
if attributes.key?(:'mobile_phone_number')
|
249
|
+
self.mobile_phone_number = attributes[:'mobile_phone_number']
|
250
|
+
end
|
251
|
+
|
252
|
+
if attributes.key?(:'employments')
|
253
|
+
if (value = attributes[:'employments']).is_a?(Array)
|
254
|
+
self.employments = value
|
255
|
+
end
|
256
|
+
end
|
257
|
+
|
258
|
+
if attributes.key?(:'home_location')
|
259
|
+
self.home_location = attributes[:'home_location']
|
260
|
+
end
|
261
|
+
|
262
|
+
if attributes.key?(:'work_location')
|
263
|
+
self.work_location = attributes[:'work_location']
|
264
|
+
end
|
265
|
+
|
266
|
+
if attributes.key?(:'manager')
|
267
|
+
self.manager = attributes[:'manager']
|
268
|
+
end
|
269
|
+
|
270
|
+
if attributes.key?(:'team')
|
271
|
+
self.team = attributes[:'team']
|
272
|
+
end
|
273
|
+
|
274
|
+
if attributes.key?(:'pay_group')
|
275
|
+
self.pay_group = attributes[:'pay_group']
|
276
|
+
end
|
277
|
+
|
278
|
+
if attributes.key?(:'ssn')
|
279
|
+
self.ssn = attributes[:'ssn']
|
280
|
+
end
|
281
|
+
|
282
|
+
if attributes.key?(:'gender')
|
283
|
+
self.gender = attributes[:'gender']
|
284
|
+
end
|
285
|
+
|
286
|
+
if attributes.key?(:'ethnicity')
|
287
|
+
self.ethnicity = attributes[:'ethnicity']
|
288
|
+
end
|
289
|
+
|
290
|
+
if attributes.key?(:'marital_status')
|
291
|
+
self.marital_status = attributes[:'marital_status']
|
292
|
+
end
|
293
|
+
|
294
|
+
if attributes.key?(:'date_of_birth')
|
295
|
+
self.date_of_birth = attributes[:'date_of_birth']
|
296
|
+
end
|
297
|
+
|
298
|
+
if attributes.key?(:'hire_date')
|
299
|
+
self.hire_date = attributes[:'hire_date']
|
300
|
+
end
|
301
|
+
|
302
|
+
if attributes.key?(:'start_date')
|
303
|
+
self.start_date = attributes[:'start_date']
|
304
|
+
end
|
305
|
+
|
306
|
+
if attributes.key?(:'employment_status')
|
307
|
+
self.employment_status = attributes[:'employment_status']
|
308
|
+
end
|
309
|
+
|
310
|
+
if attributes.key?(:'termination_date')
|
311
|
+
self.termination_date = attributes[:'termination_date']
|
312
|
+
end
|
313
|
+
|
314
|
+
if attributes.key?(:'avatar')
|
315
|
+
self.avatar = attributes[:'avatar']
|
316
|
+
end
|
317
|
+
|
318
|
+
if attributes.key?(:'custom_fields')
|
319
|
+
if (value = attributes[:'custom_fields']).is_a?(Hash)
|
320
|
+
self.custom_fields = value
|
321
|
+
end
|
322
|
+
end
|
323
|
+
end
|
324
|
+
|
325
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
326
|
+
# @return Array for valid properties with the reasons
|
327
|
+
def list_invalid_properties
|
328
|
+
invalid_properties = Array.new
|
329
|
+
if !@work_email.nil? && @work_email.to_s.length > 254
|
330
|
+
invalid_properties.push('invalid value for "work_email", the character length must be smaller than or equal to 254.')
|
331
|
+
end
|
332
|
+
|
333
|
+
if !@personal_email.nil? && @personal_email.to_s.length > 254
|
334
|
+
invalid_properties.push('invalid value for "personal_email", the character length must be smaller than or equal to 254.')
|
335
|
+
end
|
336
|
+
|
337
|
+
if !@ssn.nil? && @ssn.to_s.length > 100
|
338
|
+
invalid_properties.push('invalid value for "ssn", the character length must be smaller than or equal to 100.')
|
339
|
+
end
|
340
|
+
|
341
|
+
if !@avatar.nil? && @avatar.to_s.length > 2000
|
342
|
+
invalid_properties.push('invalid value for "avatar", the character length must be smaller than or equal to 2000.')
|
343
|
+
end
|
344
|
+
|
345
|
+
invalid_properties
|
346
|
+
end
|
347
|
+
|
348
|
+
# Check to see if the all the properties in the model are valid
|
349
|
+
# @return true if the model is valid
|
350
|
+
def valid?
|
351
|
+
return false if !@work_email.nil? && @work_email.to_s.length > 254
|
352
|
+
return false if !@personal_email.nil? && @personal_email.to_s.length > 254
|
353
|
+
return false if !@ssn.nil? && @ssn.to_s.length > 100
|
354
|
+
return false if !@avatar.nil? && @avatar.to_s.length > 2000
|
355
|
+
true
|
356
|
+
end
|
357
|
+
|
358
|
+
# Custom attribute writer method with validation
|
359
|
+
# @param [Object] work_email Value to be assigned
|
360
|
+
def work_email=(work_email)
|
361
|
+
if !work_email.nil? && work_email.to_s.length > 254
|
362
|
+
fail ArgumentError, 'invalid value for "work_email", the character length must be smaller than or equal to 254.'
|
363
|
+
end
|
364
|
+
|
365
|
+
@work_email = work_email
|
366
|
+
end
|
367
|
+
|
368
|
+
# Custom attribute writer method with validation
|
369
|
+
# @param [Object] personal_email Value to be assigned
|
370
|
+
def personal_email=(personal_email)
|
371
|
+
if !personal_email.nil? && personal_email.to_s.length > 254
|
372
|
+
fail ArgumentError, 'invalid value for "personal_email", the character length must be smaller than or equal to 254.'
|
373
|
+
end
|
374
|
+
|
375
|
+
@personal_email = personal_email
|
376
|
+
end
|
377
|
+
|
378
|
+
# Custom attribute writer method with validation
|
379
|
+
# @param [Object] ssn Value to be assigned
|
380
|
+
def ssn=(ssn)
|
381
|
+
if !ssn.nil? && ssn.to_s.length > 100
|
382
|
+
fail ArgumentError, 'invalid value for "ssn", the character length must be smaller than or equal to 100.'
|
383
|
+
end
|
384
|
+
|
385
|
+
@ssn = ssn
|
386
|
+
end
|
387
|
+
|
388
|
+
# Custom attribute writer method with validation
|
389
|
+
# @param [Object] avatar Value to be assigned
|
390
|
+
def avatar=(avatar)
|
391
|
+
if !avatar.nil? && avatar.to_s.length > 2000
|
392
|
+
fail ArgumentError, 'invalid value for "avatar", the character length must be smaller than or equal to 2000.'
|
393
|
+
end
|
394
|
+
|
395
|
+
@avatar = avatar
|
396
|
+
end
|
397
|
+
|
398
|
+
# Checks equality by comparing each attribute.
|
399
|
+
# @param [Object] Object to be compared
|
400
|
+
def ==(o)
|
401
|
+
return true if self.equal?(o)
|
402
|
+
self.class == o.class &&
|
403
|
+
remote_id == o.remote_id &&
|
404
|
+
employee_number == o.employee_number &&
|
405
|
+
company == o.company &&
|
406
|
+
first_name == o.first_name &&
|
407
|
+
last_name == o.last_name &&
|
408
|
+
display_full_name == o.display_full_name &&
|
409
|
+
groups == o.groups &&
|
410
|
+
work_email == o.work_email &&
|
411
|
+
personal_email == o.personal_email &&
|
412
|
+
mobile_phone_number == o.mobile_phone_number &&
|
413
|
+
employments == o.employments &&
|
414
|
+
home_location == o.home_location &&
|
415
|
+
work_location == o.work_location &&
|
416
|
+
manager == o.manager &&
|
417
|
+
team == o.team &&
|
418
|
+
pay_group == o.pay_group &&
|
419
|
+
ssn == o.ssn &&
|
420
|
+
gender == o.gender &&
|
421
|
+
ethnicity == o.ethnicity &&
|
422
|
+
marital_status == o.marital_status &&
|
423
|
+
date_of_birth == o.date_of_birth &&
|
424
|
+
hire_date == o.hire_date &&
|
425
|
+
start_date == o.start_date &&
|
426
|
+
employment_status == o.employment_status &&
|
427
|
+
termination_date == o.termination_date &&
|
428
|
+
avatar == o.avatar &&
|
429
|
+
custom_fields == o.custom_fields
|
430
|
+
end
|
431
|
+
|
432
|
+
# @see the `==` method
|
433
|
+
# @param [Object] Object to be compared
|
434
|
+
def eql?(o)
|
435
|
+
self == o
|
436
|
+
end
|
437
|
+
|
438
|
+
# Calculates hash code according to all attributes.
|
439
|
+
# @return [Integer] Hash code
|
440
|
+
def hash
|
441
|
+
[remote_id, employee_number, company, first_name, last_name, display_full_name, 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, employment_status, termination_date, avatar, custom_fields].hash
|
442
|
+
end
|
443
|
+
|
444
|
+
# Builds the object from hash
|
445
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
446
|
+
# @return [Object] Returns the model itself
|
447
|
+
def self.build_from_hash(attributes)
|
448
|
+
new.build_from_hash(attributes)
|
449
|
+
end
|
450
|
+
|
451
|
+
# Builds the object from hash
|
452
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
453
|
+
# @return [Object] Returns the model itself
|
454
|
+
def build_from_hash(attributes)
|
455
|
+
return nil unless attributes.is_a?(Hash)
|
456
|
+
self.class.openapi_types.each_pair do |key, type|
|
457
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
458
|
+
self.send("#{key}=", nil)
|
459
|
+
elsif type =~ /\AArray<(.*)>/i
|
460
|
+
# check to ensure the input is an array given that the attribute
|
461
|
+
# is documented as an array but the input is not
|
462
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
463
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
464
|
+
end
|
465
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
466
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
467
|
+
end
|
468
|
+
end
|
469
|
+
|
470
|
+
self
|
471
|
+
end
|
472
|
+
|
473
|
+
# Deserializes the data based on type
|
474
|
+
# @param string type Data type
|
475
|
+
# @param string value Value to be deserialized
|
476
|
+
# @return [Object] Deserialized data
|
477
|
+
def _deserialize(type, value)
|
478
|
+
case type.to_sym
|
479
|
+
when :Time
|
480
|
+
Time.parse(value)
|
481
|
+
when :Date
|
482
|
+
Date.parse(value)
|
483
|
+
when :String
|
484
|
+
value
|
485
|
+
when :Integer
|
486
|
+
value.to_i
|
487
|
+
when :Float
|
488
|
+
value.to_f
|
489
|
+
when :Boolean
|
490
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
491
|
+
true
|
492
|
+
else
|
493
|
+
false
|
494
|
+
end
|
495
|
+
when :Object
|
496
|
+
# generic object (usually a Hash), return directly
|
497
|
+
value
|
498
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
499
|
+
inner_type = Regexp.last_match[:inner_type]
|
500
|
+
value.map { |v| _deserialize(inner_type, v) }
|
501
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
502
|
+
k_type = Regexp.last_match[:k_type]
|
503
|
+
v_type = Regexp.last_match[:v_type]
|
504
|
+
{}.tap do |hash|
|
505
|
+
value.each do |k, v|
|
506
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
507
|
+
end
|
508
|
+
end
|
509
|
+
else # model
|
510
|
+
# models (e.g. Pet) or oneOf
|
511
|
+
klass = MergeHRISClient.const_get(type)
|
512
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
513
|
+
end
|
514
|
+
end
|
515
|
+
|
516
|
+
# Returns the string representation of the object
|
517
|
+
# @return [String] String presentation of the object
|
518
|
+
def to_s
|
519
|
+
to_hash.to_s
|
520
|
+
end
|
521
|
+
|
522
|
+
# to_body is an alias to to_hash (backward compatibility)
|
523
|
+
# @return [Hash] Returns the object in the form of hash
|
524
|
+
def to_body
|
525
|
+
to_hash
|
526
|
+
end
|
527
|
+
|
528
|
+
# Returns the object in the form of hash
|
529
|
+
# @return [Hash] Returns the object in the form of hash
|
530
|
+
def to_hash
|
531
|
+
hash = {}
|
532
|
+
self.class.attribute_map.each_pair do |attr, param|
|
533
|
+
value = self.send(attr)
|
534
|
+
if value.nil?
|
535
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
536
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
537
|
+
end
|
538
|
+
|
539
|
+
hash[param] = _to_hash(value)
|
540
|
+
end
|
541
|
+
hash
|
542
|
+
end
|
543
|
+
|
544
|
+
# Outputs non-array value in the form of hash
|
545
|
+
# For object, use to_hash. Otherwise, just return the value
|
546
|
+
# @param [Object] value Any valid value
|
547
|
+
# @return [Hash] Returns the value in the form of hash
|
548
|
+
def _to_hash(value)
|
549
|
+
if value.is_a?(Array)
|
550
|
+
value.compact.map { |v| _to_hash(v) }
|
551
|
+
elsif value.is_a?(Hash)
|
552
|
+
{}.tap do |hash|
|
553
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
554
|
+
end
|
555
|
+
elsif value.respond_to? :to_hash
|
556
|
+
value.to_hash
|
557
|
+
else
|
558
|
+
value
|
559
|
+
end
|
560
|
+
end
|
561
|
+
|
562
|
+
end
|
563
|
+
|
564
|
+
end
|