merge_hris_client 3.0.0 → 3.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +33 -9
- data/docs/AccountIntegration.md +6 -2
- data/docs/AsyncPassthroughApi.md +155 -0
- data/docs/AsyncPassthroughReciept.md +18 -0
- data/docs/BankInfo.md +9 -5
- data/docs/BankInfoApi.md +17 -13
- data/docs/Benefit.md +15 -5
- data/docs/BenefitPlanTypeEnum.md +15 -0
- data/docs/BenefitsApi.md +6 -6
- data/docs/CommonModelScopeData.md +20 -0
- data/docs/CommonModelScopes.md +20 -0
- data/docs/CommonModelScopesApi.md +157 -0
- data/docs/CommonModelScopesBodyRequest.md +22 -0
- data/docs/CommonModelScopesDisabledModels.md +26 -0
- data/docs/CommonModelScopesDisabledModelsEnabledActionsEnum.md +15 -0
- data/docs/CommonModelScopesPostInnerDeserializerRequest.md +22 -0
- data/docs/CommonModelScopesUpdateSerializer.md +18 -0
- data/docs/CompaniesApi.md +4 -4
- data/docs/Company.md +7 -3
- data/docs/ConditionSchema.md +30 -0
- data/docs/ConditionTypeEnum.md +15 -0
- data/docs/DataPassthroughRequest.md +1 -1
- data/docs/Deduction.md +11 -5
- data/docs/DeleteAccountApi.md +9 -9
- data/docs/Dependent.md +50 -0
- data/docs/DependentsApi.md +181 -0
- data/docs/Earning.md +10 -2
- data/docs/Employee.md +19 -15
- data/docs/EmployeePayrollRun.md +11 -7
- data/docs/EmployeePayrollRunsApi.md +4 -4
- data/docs/EmployeeRequest.md +16 -18
- data/docs/EmployeesApi.md +31 -18
- data/docs/EmployerBenefit.md +36 -0
- data/docs/EmployerBenefitsApi.md +177 -0
- data/docs/Employment.md +14 -10
- data/docs/EmploymentsApi.md +15 -11
- data/docs/EnabledActionsEnum.md +15 -0
- data/docs/EndUserDetailsRequest.md +6 -4
- data/docs/ForceResyncApi.md +1 -1
- data/docs/Group.md +8 -4
- data/docs/GroupsApi.md +15 -9
- data/docs/Issue.md +10 -8
- data/docs/IssuesApi.md +6 -6
- data/docs/LinkToken.md +1 -1
- data/docs/LinkedAccountCondition.md +28 -0
- data/docs/LinkedAccountConditionRequest.md +22 -0
- data/docs/LinkedAccountSelectiveSyncConfiguration.md +18 -0
- data/docs/LinkedAccountSelectiveSyncConfigurationListRequest.md +18 -0
- data/docs/LinkedAccountSelectiveSyncConfigurationRequest.md +18 -0
- data/docs/LinkedAccountsApi.md +2 -2
- data/docs/Location.md +10 -6
- data/docs/LocationsApi.md +13 -9
- data/docs/MetaResponse.md +2 -0
- data/docs/MultipartFormFieldRequest.md +1 -1
- data/docs/OperatorSchema.md +20 -0
- data/docs/PaginatedConditionSchemaList.md +22 -0
- data/docs/PaginatedDependentList.md +22 -0
- data/docs/PaginatedEmployerBenefitList.md +22 -0
- data/docs/PayGroup.md +7 -3
- data/docs/PayGroupsApi.md +4 -4
- data/docs/PayrollRun.md +9 -5
- data/docs/PayrollRunsApi.md +14 -10
- data/docs/RelationshipEnum.md +15 -0
- data/docs/RemoteData.md +1 -1
- data/docs/SelectiveSyncApi.md +233 -0
- data/docs/SelectiveSyncConfigurationsUsageEnum.md +15 -0
- data/docs/SyncStatus.md +5 -3
- data/docs/SyncStatusApi.md +1 -1
- data/docs/Tax.md +9 -1
- data/docs/Team.md +8 -4
- data/docs/TeamsApi.md +4 -4
- data/docs/TimeOff.md +13 -9
- data/docs/TimeOffApi.md +16 -12
- data/docs/TimeOffBalance.md +10 -6
- data/docs/TimeOffBalancesApi.md +15 -11
- data/docs/TimeOffRequest.md +11 -9
- data/lib/merge_hris_client/api/async_passthrough_api.rb +160 -0
- data/lib/merge_hris_client/api/bank_info_api.rb +26 -12
- data/lib/merge_hris_client/api/benefits_api.rb +6 -6
- data/lib/merge_hris_client/api/common_model_scopes_api.rb +146 -0
- data/lib/merge_hris_client/api/companies_api.rb +4 -4
- data/lib/merge_hris_client/api/delete_account_api.rb +7 -7
- data/lib/merge_hris_client/api/dependents_api.rb +188 -0
- data/lib/merge_hris_client/api/employee_payroll_runs_api.rb +4 -4
- data/lib/merge_hris_client/api/employees_api.rb +44 -17
- data/lib/merge_hris_client/api/employer_benefits_api.rb +182 -0
- data/lib/merge_hris_client/api/employments_api.rb +24 -10
- data/lib/merge_hris_client/api/force_resync_api.rb +2 -2
- data/lib/merge_hris_client/api/groups_api.rb +25 -8
- data/lib/merge_hris_client/api/issues_api.rb +6 -6
- data/lib/merge_hris_client/api/linked_accounts_api.rb +3 -3
- data/lib/merge_hris_client/api/locations_api.rb +22 -8
- data/lib/merge_hris_client/api/pay_groups_api.rb +4 -4
- data/lib/merge_hris_client/api/payroll_runs_api.rb +24 -10
- data/lib/merge_hris_client/api/selective_sync_api.rb +225 -0
- data/lib/merge_hris_client/api/sync_status_api.rb +2 -2
- data/lib/merge_hris_client/api/teams_api.rb +4 -4
- data/lib/merge_hris_client/api/time_off_api.rb +26 -12
- data/lib/merge_hris_client/api/time_off_balances_api.rb +24 -10
- data/lib/merge_hris_client/models/account_integration.rb +30 -8
- data/lib/merge_hris_client/models/async_passthrough_reciept.rb +223 -0
- data/lib/merge_hris_client/models/bank_info.rb +39 -16
- data/lib/merge_hris_client/models/benefit.rb +70 -14
- data/lib/merge_hris_client/models/benefit_plan_type_enum.rb +48 -0
- data/lib/merge_hris_client/models/categories_enum.rb +3 -1
- data/lib/merge_hris_client/models/category_enum.rb +3 -1
- data/lib/merge_hris_client/models/common_model_scope_data.rb +234 -0
- data/lib/merge_hris_client/models/common_model_scopes.rb +234 -0
- data/lib/merge_hris_client/models/common_model_scopes_body_request.rb +274 -0
- data/lib/merge_hris_client/models/common_model_scopes_disabled_models.rb +283 -0
- data/lib/merge_hris_client/models/common_model_scopes_disabled_models_enabled_actions_enum.rb +45 -0
- data/lib/merge_hris_client/models/common_model_scopes_post_inner_deserializer_request.rb +274 -0
- data/lib/merge_hris_client/models/common_model_scopes_update_serializer.rb +226 -0
- data/lib/merge_hris_client/models/company.rb +37 -15
- data/lib/merge_hris_client/models/condition_schema.rb +298 -0
- data/lib/merge_hris_client/models/condition_type_enum.rb +50 -0
- data/lib/merge_hris_client/models/data_passthrough_request.rb +1 -0
- data/lib/merge_hris_client/models/deduction.rb +50 -17
- data/lib/merge_hris_client/models/dependent.rb +470 -0
- data/lib/merge_hris_client/models/earning.rb +51 -6
- data/lib/merge_hris_client/models/employee.rb +51 -23
- data/lib/merge_hris_client/models/employee_payroll_run.rb +41 -17
- data/lib/merge_hris_client/models/employee_request.rb +34 -39
- data/lib/merge_hris_client/models/employer_benefit.rb +363 -0
- data/lib/merge_hris_client/models/employment.rb +44 -20
- data/lib/merge_hris_client/models/enabled_actions_enum.rb +45 -0
- data/lib/merge_hris_client/models/end_user_details_request.rb +21 -8
- data/lib/merge_hris_client/models/group.rb +38 -16
- data/lib/merge_hris_client/models/group_type_enum.rb +2 -1
- data/lib/merge_hris_client/models/issue.rb +16 -4
- data/lib/merge_hris_client/models/link_token.rb +0 -5
- data/lib/merge_hris_client/models/linked_account_condition.rb +282 -0
- data/lib/merge_hris_client/models/linked_account_condition_request.rb +269 -0
- data/lib/merge_hris_client/models/linked_account_selective_sync_configuration.rb +221 -0
- data/lib/merge_hris_client/models/linked_account_selective_sync_configuration_list_request.rb +226 -0
- data/lib/merge_hris_client/models/linked_account_selective_sync_configuration_request.rb +226 -0
- data/lib/merge_hris_client/models/location.rb +39 -17
- data/lib/merge_hris_client/models/meta_response.rb +12 -1
- data/lib/merge_hris_client/models/multipart_form_field_request.rb +1 -1
- data/lib/merge_hris_client/models/operator_schema.rb +229 -0
- data/lib/merge_hris_client/models/paginated_condition_schema_list.rb +240 -0
- data/lib/merge_hris_client/models/paginated_dependent_list.rb +240 -0
- data/lib/merge_hris_client/models/paginated_employer_benefit_list.rb +240 -0
- data/lib/merge_hris_client/models/pay_frequency_enum.rb +2 -1
- data/lib/merge_hris_client/models/pay_group.rb +37 -15
- data/lib/merge_hris_client/models/pay_period_enum.rb +2 -1
- data/lib/merge_hris_client/models/payroll_run.rb +39 -17
- data/lib/merge_hris_client/models/relationship_enum.rb +46 -0
- data/lib/merge_hris_client/models/remote_data.rb +3 -4
- data/lib/merge_hris_client/models/selective_sync_configurations_usage_enum.rb +45 -0
- data/lib/merge_hris_client/models/sync_status.rb +13 -4
- data/lib/merge_hris_client/models/sync_status_status_enum.rb +2 -1
- data/lib/merge_hris_client/models/tax.rb +50 -5
- data/lib/merge_hris_client/models/team.rb +38 -15
- data/lib/merge_hris_client/models/time_off.rb +43 -19
- data/lib/merge_hris_client/models/time_off_balance.rb +40 -17
- data/lib/merge_hris_client/models/time_off_request.rb +36 -21
- data/lib/merge_hris_client/version.rb +1 -1
- data/lib/merge_hris_client.rb +31 -0
- data/spec/api/async_passthrough_api_spec.rb +59 -0
- data/spec/api/bank_info_api_spec.rb +8 -6
- data/spec/api/benefits_api_spec.rb +3 -3
- data/spec/api/common_model_scopes_api_spec.rb +58 -0
- data/spec/api/companies_api_spec.rb +2 -2
- data/spec/api/delete_account_api_spec.rb +2 -2
- data/spec/api/dependents_api_spec.rb +70 -0
- data/spec/api/employee_payroll_runs_api_spec.rb +2 -2
- data/spec/api/employees_api_spec.rb +13 -6
- data/spec/api/employer_benefits_api_spec.rb +68 -0
- data/spec/api/employments_api_spec.rb +7 -5
- data/spec/api/force_resync_api_spec.rb +1 -1
- data/spec/api/groups_api_spec.rb +7 -4
- data/spec/api/issues_api_spec.rb +3 -3
- data/spec/api/linked_accounts_api_spec.rb +1 -1
- data/spec/api/locations_api_spec.rb +6 -4
- data/spec/api/pay_groups_api_spec.rb +2 -2
- data/spec/api/payroll_runs_api_spec.rb +7 -5
- data/spec/api/selective_sync_api_spec.rb +72 -0
- data/spec/api/sync_status_api_spec.rb +1 -1
- data/spec/api/teams_api_spec.rb +2 -2
- data/spec/api/time_off_api_spec.rb +8 -6
- data/spec/api/time_off_balances_api_spec.rb +7 -5
- data/spec/models/account_integration_spec.rb +12 -0
- data/spec/models/async_passthrough_reciept_spec.rb +34 -0
- data/spec/models/bank_info_spec.rb +14 -2
- data/spec/models/benefit_plan_type_enum_spec.rb +28 -0
- data/spec/models/benefit_spec.rb +31 -1
- data/spec/models/common_model_scope_data_spec.rb +40 -0
- data/spec/models/common_model_scopes_body_request_spec.rb +46 -0
- data/spec/models/common_model_scopes_disabled_models_enabled_actions_enum_spec.rb +28 -0
- data/spec/models/common_model_scopes_disabled_models_spec.rb +58 -0
- data/spec/models/common_model_scopes_post_inner_deserializer_request_spec.rb +46 -0
- data/spec/models/common_model_scopes_spec.rb +40 -0
- data/spec/models/common_model_scopes_update_serializer_spec.rb +34 -0
- data/spec/models/company_spec.rb +14 -2
- data/spec/models/condition_schema_spec.rb +70 -0
- data/spec/models/condition_type_enum_spec.rb +28 -0
- data/spec/models/deduction_spec.rb +20 -2
- data/spec/models/dependent_spec.rb +130 -0
- data/spec/models/earning_spec.rb +24 -0
- data/spec/models/employee_payroll_run_spec.rb +14 -2
- data/spec/models/employee_request_spec.rb +5 -11
- data/spec/models/employee_spec.rb +15 -3
- data/spec/models/employer_benefit_spec.rb +88 -0
- data/spec/models/employment_spec.rb +14 -2
- data/spec/models/enabled_actions_enum_spec.rb +28 -0
- data/spec/models/end_user_details_request_spec.rb +6 -0
- data/spec/models/group_spec.rb +14 -2
- data/spec/models/issue_spec.rb +6 -0
- data/spec/models/linked_account_condition_request_spec.rb +46 -0
- data/spec/models/linked_account_condition_spec.rb +64 -0
- data/spec/models/linked_account_selective_sync_configuration_list_request_spec.rb +34 -0
- data/spec/models/linked_account_selective_sync_configuration_request_spec.rb +34 -0
- data/spec/models/linked_account_selective_sync_configuration_spec.rb +34 -0
- data/spec/models/location_spec.rb +14 -2
- data/spec/models/meta_response_spec.rb +6 -0
- data/spec/models/operator_schema_spec.rb +40 -0
- data/spec/models/paginated_condition_schema_list_spec.rb +46 -0
- data/spec/models/paginated_dependent_list_spec.rb +46 -0
- data/spec/models/paginated_employer_benefit_list_spec.rb +46 -0
- data/spec/models/pay_group_spec.rb +14 -2
- data/spec/models/payroll_run_spec.rb +14 -2
- data/spec/models/relationship_enum_spec.rb +28 -0
- data/spec/models/selective_sync_configurations_usage_enum_spec.rb +28 -0
- data/spec/models/sync_status_spec.rb +6 -0
- data/spec/models/tax_spec.rb +24 -0
- data/spec/models/team_spec.rb +14 -2
- data/spec/models/time_off_balance_spec.rb +14 -2
- data/spec/models/time_off_request_spec.rb +12 -6
- data/spec/models/time_off_spec.rb +14 -2
- metadata +225 -105
@@ -14,36 +14,47 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module MergeHRISClient
|
17
|
-
# # The Deduction Object ### Description The `Deduction` object is used to represent
|
17
|
+
# # The Deduction Object ### Description The `Deduction` object is used to represent an array of the wages withheld from total earnings for the purpose of paying taxes. ### Usage Example Fetch from the `LIST Deductions` endpoint and filter by `ID` to show all deductions.
|
18
18
|
class Deduction
|
19
19
|
attr_accessor :id
|
20
20
|
|
21
|
+
# The third-party API ID of the matching object.
|
22
|
+
attr_accessor :remote_id
|
23
|
+
|
21
24
|
attr_accessor :employee_payroll_run
|
22
25
|
|
23
26
|
# The deduction's name.
|
24
27
|
attr_accessor :name
|
25
28
|
|
26
|
-
# The amount
|
29
|
+
# The amount of money that is withheld from an employee's gross pay by the employee.
|
27
30
|
attr_accessor :employee_deduction
|
28
31
|
|
29
|
-
# The amount
|
32
|
+
# The amount of money that is withheld on behalf of an employee by the company.
|
30
33
|
attr_accessor :company_deduction
|
31
34
|
|
32
|
-
attr_accessor :remote_data
|
33
|
-
|
34
35
|
# Indicates whether or not this object has been deleted by third party webhooks.
|
35
36
|
attr_accessor :remote_was_deleted
|
36
37
|
|
38
|
+
# This is the datetime that this object was last updated by Merge
|
39
|
+
attr_accessor :modified_at
|
40
|
+
|
41
|
+
attr_accessor :field_mappings
|
42
|
+
|
43
|
+
attr_accessor :remote_data
|
44
|
+
|
37
45
|
# Attribute mapping from ruby-style variable name to JSON key.
|
38
46
|
def self.attribute_map
|
39
47
|
{
|
40
48
|
:'id' => :'id',
|
49
|
+
:'remote_id' => :'remote_id',
|
41
50
|
:'employee_payroll_run' => :'employee_payroll_run',
|
42
51
|
:'name' => :'name',
|
43
52
|
:'employee_deduction' => :'employee_deduction',
|
44
53
|
:'company_deduction' => :'company_deduction',
|
45
|
-
:'
|
46
|
-
:'
|
54
|
+
:'remote_was_deleted' => :'remote_was_deleted',
|
55
|
+
:'modified_at' => :'modified_at',
|
56
|
+
:'field_mappings' => :'field_mappings',
|
57
|
+
:'remote_data' => :'remote_data'
|
47
58
|
}
|
48
59
|
end
|
49
60
|
|
@@ -56,23 +67,28 @@ module MergeHRISClient
|
|
56
67
|
def self.openapi_types
|
57
68
|
{
|
58
69
|
:'id' => :'String',
|
70
|
+
:'remote_id' => :'String',
|
59
71
|
:'employee_payroll_run' => :'String',
|
60
72
|
:'name' => :'String',
|
61
73
|
:'employee_deduction' => :'Float',
|
62
74
|
:'company_deduction' => :'Float',
|
63
|
-
:'
|
64
|
-
:'
|
75
|
+
:'remote_was_deleted' => :'Boolean',
|
76
|
+
:'modified_at' => :'Time',
|
77
|
+
:'field_mappings' => :'Hash<String, Object>',
|
78
|
+
:'remote_data' => :'Array<RemoteData>'
|
65
79
|
}
|
66
80
|
end
|
67
81
|
|
68
82
|
# List of attributes with nullable: true
|
69
83
|
def self.openapi_nullable
|
70
84
|
Set.new([
|
85
|
+
:'remote_id',
|
71
86
|
:'employee_payroll_run',
|
72
87
|
:'name',
|
73
88
|
:'employee_deduction',
|
74
89
|
:'company_deduction',
|
75
|
-
:'
|
90
|
+
:'field_mappings',
|
91
|
+
:'remote_data'
|
76
92
|
])
|
77
93
|
end
|
78
94
|
|
@@ -95,6 +111,10 @@ module MergeHRISClient
|
|
95
111
|
self.id = attributes[:'id']
|
96
112
|
end
|
97
113
|
|
114
|
+
if attributes.key?(:'remote_id')
|
115
|
+
self.remote_id = attributes[:'remote_id']
|
116
|
+
end
|
117
|
+
|
98
118
|
if attributes.key?(:'employee_payroll_run')
|
99
119
|
self.employee_payroll_run = attributes[:'employee_payroll_run']
|
100
120
|
end
|
@@ -111,15 +131,25 @@ module MergeHRISClient
|
|
111
131
|
self.company_deduction = attributes[:'company_deduction']
|
112
132
|
end
|
113
133
|
|
134
|
+
if attributes.key?(:'remote_was_deleted')
|
135
|
+
self.remote_was_deleted = attributes[:'remote_was_deleted']
|
136
|
+
end
|
137
|
+
|
138
|
+
if attributes.key?(:'modified_at')
|
139
|
+
self.modified_at = attributes[:'modified_at']
|
140
|
+
end
|
141
|
+
|
142
|
+
if attributes.key?(:'field_mappings')
|
143
|
+
if (value = attributes[:'field_mappings']).is_a?(Hash)
|
144
|
+
self.field_mappings = value
|
145
|
+
end
|
146
|
+
end
|
147
|
+
|
114
148
|
if attributes.key?(:'remote_data')
|
115
149
|
if (value = attributes[:'remote_data']).is_a?(Array)
|
116
150
|
self.remote_data = value
|
117
151
|
end
|
118
152
|
end
|
119
|
-
|
120
|
-
if attributes.key?(:'remote_was_deleted')
|
121
|
-
self.remote_was_deleted = attributes[:'remote_was_deleted']
|
122
|
-
end
|
123
153
|
end
|
124
154
|
|
125
155
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -141,12 +171,15 @@ module MergeHRISClient
|
|
141
171
|
return true if self.equal?(o)
|
142
172
|
self.class == o.class &&
|
143
173
|
id == o.id &&
|
174
|
+
remote_id == o.remote_id &&
|
144
175
|
employee_payroll_run == o.employee_payroll_run &&
|
145
176
|
name == o.name &&
|
146
177
|
employee_deduction == o.employee_deduction &&
|
147
178
|
company_deduction == o.company_deduction &&
|
148
|
-
|
149
|
-
|
179
|
+
remote_was_deleted == o.remote_was_deleted &&
|
180
|
+
modified_at == o.modified_at &&
|
181
|
+
field_mappings == o.field_mappings &&
|
182
|
+
remote_data == o.remote_data
|
150
183
|
end
|
151
184
|
|
152
185
|
# @see the `==` method
|
@@ -158,7 +191,7 @@ module MergeHRISClient
|
|
158
191
|
# Calculates hash code according to all attributes.
|
159
192
|
# @return [Integer] Hash code
|
160
193
|
def hash
|
161
|
-
[id, employee_payroll_run, name, employee_deduction, company_deduction,
|
194
|
+
[id, remote_id, employee_payroll_run, name, employee_deduction, company_deduction, remote_was_deleted, modified_at, field_mappings, remote_data].hash
|
162
195
|
end
|
163
196
|
|
164
197
|
# Builds the object from hash
|
@@ -0,0 +1,470 @@
|
|
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 Dependent Object ### Description The `Dependent` object is used to represent a dependent (e.g. child, spouse, domestic partner, etc) of an `Employee` ### Usage Example Fetch from the `LIST Dependents` endpoint and filter by `ID` to show all dependents.
|
18
|
+
class Dependent
|
19
|
+
attr_accessor :id
|
20
|
+
|
21
|
+
# The third-party API ID of the matching object.
|
22
|
+
attr_accessor :remote_id
|
23
|
+
|
24
|
+
# The dependents's first name.
|
25
|
+
attr_accessor :first_name
|
26
|
+
|
27
|
+
# The dependents's middle name.
|
28
|
+
attr_accessor :middle_name
|
29
|
+
|
30
|
+
# The dependents's last name.
|
31
|
+
attr_accessor :last_name
|
32
|
+
|
33
|
+
# The dependent's relationship to the employee. * `CHILD` - CHILD * `SPOUSE` - SPOUSE * `DOMESTIC_PARTNER` - DOMESTIC_PARTNER
|
34
|
+
attr_accessor :relationship
|
35
|
+
|
36
|
+
# The employee this person is a dependent of.
|
37
|
+
attr_accessor :employee
|
38
|
+
|
39
|
+
# The dependent's date of birth.
|
40
|
+
attr_accessor :date_of_birth
|
41
|
+
|
42
|
+
# The dependent's gender. * `MALE` - MALE * `FEMALE` - FEMALE * `NON-BINARY` - NON-BINARY * `OTHER` - OTHER * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE
|
43
|
+
attr_accessor :gender
|
44
|
+
|
45
|
+
# The dependent's phone number.
|
46
|
+
attr_accessor :phone_number
|
47
|
+
|
48
|
+
# The dependents's home address.
|
49
|
+
attr_accessor :home_location
|
50
|
+
|
51
|
+
# Whether or not the dependent is a student
|
52
|
+
attr_accessor :is_student
|
53
|
+
|
54
|
+
# The dependents's social security number.
|
55
|
+
attr_accessor :ssn
|
56
|
+
|
57
|
+
# Indicates whether or not this object has been deleted by third party webhooks.
|
58
|
+
attr_accessor :remote_was_deleted
|
59
|
+
|
60
|
+
# This is the datetime that this object was last updated by Merge
|
61
|
+
attr_accessor :modified_at
|
62
|
+
|
63
|
+
attr_accessor :field_mappings
|
64
|
+
|
65
|
+
attr_accessor :remote_data
|
66
|
+
|
67
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
68
|
+
def self.attribute_map
|
69
|
+
{
|
70
|
+
:'id' => :'id',
|
71
|
+
:'remote_id' => :'remote_id',
|
72
|
+
:'first_name' => :'first_name',
|
73
|
+
:'middle_name' => :'middle_name',
|
74
|
+
:'last_name' => :'last_name',
|
75
|
+
:'relationship' => :'relationship',
|
76
|
+
:'employee' => :'employee',
|
77
|
+
:'date_of_birth' => :'date_of_birth',
|
78
|
+
:'gender' => :'gender',
|
79
|
+
:'phone_number' => :'phone_number',
|
80
|
+
:'home_location' => :'home_location',
|
81
|
+
:'is_student' => :'is_student',
|
82
|
+
:'ssn' => :'ssn',
|
83
|
+
:'remote_was_deleted' => :'remote_was_deleted',
|
84
|
+
:'modified_at' => :'modified_at',
|
85
|
+
:'field_mappings' => :'field_mappings',
|
86
|
+
:'remote_data' => :'remote_data'
|
87
|
+
}
|
88
|
+
end
|
89
|
+
|
90
|
+
# Returns all the JSON keys this model knows about
|
91
|
+
def self.acceptable_attributes
|
92
|
+
attribute_map.values
|
93
|
+
end
|
94
|
+
|
95
|
+
# Attribute type mapping.
|
96
|
+
def self.openapi_types
|
97
|
+
{
|
98
|
+
:'id' => :'String',
|
99
|
+
:'remote_id' => :'String',
|
100
|
+
:'first_name' => :'String',
|
101
|
+
:'middle_name' => :'String',
|
102
|
+
:'last_name' => :'String',
|
103
|
+
:'relationship' => :'RelationshipEnum',
|
104
|
+
:'employee' => :'String',
|
105
|
+
:'date_of_birth' => :'Time',
|
106
|
+
:'gender' => :'GenderEnum',
|
107
|
+
:'phone_number' => :'String',
|
108
|
+
:'home_location' => :'String',
|
109
|
+
:'is_student' => :'Boolean',
|
110
|
+
:'ssn' => :'String',
|
111
|
+
:'remote_was_deleted' => :'Boolean',
|
112
|
+
:'modified_at' => :'Time',
|
113
|
+
:'field_mappings' => :'Hash<String, Object>',
|
114
|
+
:'remote_data' => :'Array<RemoteData>'
|
115
|
+
}
|
116
|
+
end
|
117
|
+
|
118
|
+
# List of attributes with nullable: true
|
119
|
+
def self.openapi_nullable
|
120
|
+
Set.new([
|
121
|
+
:'remote_id',
|
122
|
+
:'first_name',
|
123
|
+
:'middle_name',
|
124
|
+
:'last_name',
|
125
|
+
:'relationship',
|
126
|
+
:'employee',
|
127
|
+
:'date_of_birth',
|
128
|
+
:'gender',
|
129
|
+
:'phone_number',
|
130
|
+
:'home_location',
|
131
|
+
:'is_student',
|
132
|
+
:'ssn',
|
133
|
+
:'field_mappings',
|
134
|
+
:'remote_data'
|
135
|
+
])
|
136
|
+
end
|
137
|
+
|
138
|
+
# Initializes the object
|
139
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
140
|
+
def initialize(attributes = {})
|
141
|
+
if (!attributes.is_a?(Hash))
|
142
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MergeHRISClient::Dependent` initialize method"
|
143
|
+
end
|
144
|
+
|
145
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
146
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
147
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
148
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MergeHRISClient::Dependent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
149
|
+
end
|
150
|
+
h[k.to_sym] = v
|
151
|
+
}
|
152
|
+
|
153
|
+
if attributes.key?(:'id')
|
154
|
+
self.id = attributes[:'id']
|
155
|
+
end
|
156
|
+
|
157
|
+
if attributes.key?(:'remote_id')
|
158
|
+
self.remote_id = attributes[:'remote_id']
|
159
|
+
end
|
160
|
+
|
161
|
+
if attributes.key?(:'first_name')
|
162
|
+
self.first_name = attributes[:'first_name']
|
163
|
+
end
|
164
|
+
|
165
|
+
if attributes.key?(:'middle_name')
|
166
|
+
self.middle_name = attributes[:'middle_name']
|
167
|
+
end
|
168
|
+
|
169
|
+
if attributes.key?(:'last_name')
|
170
|
+
self.last_name = attributes[:'last_name']
|
171
|
+
end
|
172
|
+
|
173
|
+
if attributes.key?(:'relationship')
|
174
|
+
self.relationship = attributes[:'relationship']
|
175
|
+
end
|
176
|
+
|
177
|
+
if attributes.key?(:'employee')
|
178
|
+
self.employee = attributes[:'employee']
|
179
|
+
end
|
180
|
+
|
181
|
+
if attributes.key?(:'date_of_birth')
|
182
|
+
self.date_of_birth = attributes[:'date_of_birth']
|
183
|
+
end
|
184
|
+
|
185
|
+
if attributes.key?(:'gender')
|
186
|
+
self.gender = attributes[:'gender']
|
187
|
+
end
|
188
|
+
|
189
|
+
if attributes.key?(:'phone_number')
|
190
|
+
self.phone_number = attributes[:'phone_number']
|
191
|
+
end
|
192
|
+
|
193
|
+
if attributes.key?(:'home_location')
|
194
|
+
self.home_location = attributes[:'home_location']
|
195
|
+
end
|
196
|
+
|
197
|
+
if attributes.key?(:'is_student')
|
198
|
+
self.is_student = attributes[:'is_student']
|
199
|
+
end
|
200
|
+
|
201
|
+
if attributes.key?(:'ssn')
|
202
|
+
self.ssn = attributes[:'ssn']
|
203
|
+
end
|
204
|
+
|
205
|
+
if attributes.key?(:'remote_was_deleted')
|
206
|
+
self.remote_was_deleted = attributes[:'remote_was_deleted']
|
207
|
+
end
|
208
|
+
|
209
|
+
if attributes.key?(:'modified_at')
|
210
|
+
self.modified_at = attributes[:'modified_at']
|
211
|
+
end
|
212
|
+
|
213
|
+
if attributes.key?(:'field_mappings')
|
214
|
+
if (value = attributes[:'field_mappings']).is_a?(Hash)
|
215
|
+
self.field_mappings = value
|
216
|
+
end
|
217
|
+
end
|
218
|
+
|
219
|
+
if attributes.key?(:'remote_data')
|
220
|
+
if (value = attributes[:'remote_data']).is_a?(Array)
|
221
|
+
self.remote_data = value
|
222
|
+
end
|
223
|
+
end
|
224
|
+
end
|
225
|
+
|
226
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
227
|
+
# @return Array for valid properties with the reasons
|
228
|
+
def list_invalid_properties
|
229
|
+
invalid_properties = Array.new
|
230
|
+
if !@first_name.nil? && @first_name.to_s.length > 60
|
231
|
+
invalid_properties.push('invalid value for "first_name", the character length must be smaller than or equal to 60.')
|
232
|
+
end
|
233
|
+
|
234
|
+
if !@middle_name.nil? && @middle_name.to_s.length > 60
|
235
|
+
invalid_properties.push('invalid value for "middle_name", the character length must be smaller than or equal to 60.')
|
236
|
+
end
|
237
|
+
|
238
|
+
if !@last_name.nil? && @last_name.to_s.length > 60
|
239
|
+
invalid_properties.push('invalid value for "last_name", the character length must be smaller than or equal to 60.')
|
240
|
+
end
|
241
|
+
|
242
|
+
if !@phone_number.nil? && @phone_number.to_s.length > 50
|
243
|
+
invalid_properties.push('invalid value for "phone_number", the character length must be smaller than or equal to 50.')
|
244
|
+
end
|
245
|
+
|
246
|
+
if !@ssn.nil? && @ssn.to_s.length > 50
|
247
|
+
invalid_properties.push('invalid value for "ssn", the character length must be smaller than or equal to 50.')
|
248
|
+
end
|
249
|
+
|
250
|
+
invalid_properties
|
251
|
+
end
|
252
|
+
|
253
|
+
# Check to see if the all the properties in the model are valid
|
254
|
+
# @return true if the model is valid
|
255
|
+
def valid?
|
256
|
+
return false if !@first_name.nil? && @first_name.to_s.length > 60
|
257
|
+
return false if !@middle_name.nil? && @middle_name.to_s.length > 60
|
258
|
+
return false if !@last_name.nil? && @last_name.to_s.length > 60
|
259
|
+
return false if !@phone_number.nil? && @phone_number.to_s.length > 50
|
260
|
+
return false if !@ssn.nil? && @ssn.to_s.length > 50
|
261
|
+
true
|
262
|
+
end
|
263
|
+
|
264
|
+
# Custom attribute writer method with validation
|
265
|
+
# @param [Object] first_name Value to be assigned
|
266
|
+
def first_name=(first_name)
|
267
|
+
if !first_name.nil? && first_name.to_s.length > 60
|
268
|
+
fail ArgumentError, 'invalid value for "first_name", the character length must be smaller than or equal to 60.'
|
269
|
+
end
|
270
|
+
|
271
|
+
@first_name = first_name
|
272
|
+
end
|
273
|
+
|
274
|
+
# Custom attribute writer method with validation
|
275
|
+
# @param [Object] middle_name Value to be assigned
|
276
|
+
def middle_name=(middle_name)
|
277
|
+
if !middle_name.nil? && middle_name.to_s.length > 60
|
278
|
+
fail ArgumentError, 'invalid value for "middle_name", the character length must be smaller than or equal to 60.'
|
279
|
+
end
|
280
|
+
|
281
|
+
@middle_name = middle_name
|
282
|
+
end
|
283
|
+
|
284
|
+
# Custom attribute writer method with validation
|
285
|
+
# @param [Object] last_name Value to be assigned
|
286
|
+
def last_name=(last_name)
|
287
|
+
if !last_name.nil? && last_name.to_s.length > 60
|
288
|
+
fail ArgumentError, 'invalid value for "last_name", the character length must be smaller than or equal to 60.'
|
289
|
+
end
|
290
|
+
|
291
|
+
@last_name = last_name
|
292
|
+
end
|
293
|
+
|
294
|
+
# Custom attribute writer method with validation
|
295
|
+
# @param [Object] phone_number Value to be assigned
|
296
|
+
def phone_number=(phone_number)
|
297
|
+
if !phone_number.nil? && phone_number.to_s.length > 50
|
298
|
+
fail ArgumentError, 'invalid value for "phone_number", the character length must be smaller than or equal to 50.'
|
299
|
+
end
|
300
|
+
|
301
|
+
@phone_number = phone_number
|
302
|
+
end
|
303
|
+
|
304
|
+
# Custom attribute writer method with validation
|
305
|
+
# @param [Object] ssn Value to be assigned
|
306
|
+
def ssn=(ssn)
|
307
|
+
if !ssn.nil? && ssn.to_s.length > 50
|
308
|
+
fail ArgumentError, 'invalid value for "ssn", the character length must be smaller than or equal to 50.'
|
309
|
+
end
|
310
|
+
|
311
|
+
@ssn = ssn
|
312
|
+
end
|
313
|
+
|
314
|
+
# Checks equality by comparing each attribute.
|
315
|
+
# @param [Object] Object to be compared
|
316
|
+
def ==(o)
|
317
|
+
return true if self.equal?(o)
|
318
|
+
self.class == o.class &&
|
319
|
+
id == o.id &&
|
320
|
+
remote_id == o.remote_id &&
|
321
|
+
first_name == o.first_name &&
|
322
|
+
middle_name == o.middle_name &&
|
323
|
+
last_name == o.last_name &&
|
324
|
+
relationship == o.relationship &&
|
325
|
+
employee == o.employee &&
|
326
|
+
date_of_birth == o.date_of_birth &&
|
327
|
+
gender == o.gender &&
|
328
|
+
phone_number == o.phone_number &&
|
329
|
+
home_location == o.home_location &&
|
330
|
+
is_student == o.is_student &&
|
331
|
+
ssn == o.ssn &&
|
332
|
+
remote_was_deleted == o.remote_was_deleted &&
|
333
|
+
modified_at == o.modified_at &&
|
334
|
+
field_mappings == o.field_mappings &&
|
335
|
+
remote_data == o.remote_data
|
336
|
+
end
|
337
|
+
|
338
|
+
# @see the `==` method
|
339
|
+
# @param [Object] Object to be compared
|
340
|
+
def eql?(o)
|
341
|
+
self == o
|
342
|
+
end
|
343
|
+
|
344
|
+
# Calculates hash code according to all attributes.
|
345
|
+
# @return [Integer] Hash code
|
346
|
+
def hash
|
347
|
+
[id, remote_id, first_name, middle_name, last_name, relationship, employee, date_of_birth, gender, phone_number, home_location, is_student, ssn, remote_was_deleted, modified_at, field_mappings, remote_data].hash
|
348
|
+
end
|
349
|
+
|
350
|
+
# Builds the object from hash
|
351
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
352
|
+
# @return [Object] Returns the model itself
|
353
|
+
def self.build_from_hash(attributes)
|
354
|
+
new.build_from_hash(attributes)
|
355
|
+
end
|
356
|
+
|
357
|
+
# Builds the object from hash
|
358
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
359
|
+
# @return [Object] Returns the model itself
|
360
|
+
def build_from_hash(attributes)
|
361
|
+
return nil unless attributes.is_a?(Hash)
|
362
|
+
self.class.openapi_types.each_pair do |key, type|
|
363
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
364
|
+
self.send("#{key}=", nil)
|
365
|
+
elsif type =~ /\AArray<(.*)>/i
|
366
|
+
# check to ensure the input is an array given that the attribute
|
367
|
+
# is documented as an array but the input is not
|
368
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
369
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
370
|
+
end
|
371
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
372
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
373
|
+
end
|
374
|
+
end
|
375
|
+
|
376
|
+
self
|
377
|
+
end
|
378
|
+
|
379
|
+
# Deserializes the data based on type
|
380
|
+
# @param string type Data type
|
381
|
+
# @param string value Value to be deserialized
|
382
|
+
# @return [Object] Deserialized data
|
383
|
+
def _deserialize(type, value)
|
384
|
+
case type.to_sym
|
385
|
+
when :Time
|
386
|
+
Time.parse(value)
|
387
|
+
when :Date
|
388
|
+
Date.parse(value)
|
389
|
+
when :String
|
390
|
+
value
|
391
|
+
when :Integer
|
392
|
+
value.to_i
|
393
|
+
when :Float
|
394
|
+
value.to_f
|
395
|
+
when :Boolean
|
396
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
397
|
+
true
|
398
|
+
else
|
399
|
+
false
|
400
|
+
end
|
401
|
+
when :Object
|
402
|
+
# generic object (usually a Hash), return directly
|
403
|
+
value
|
404
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
405
|
+
inner_type = Regexp.last_match[:inner_type]
|
406
|
+
value.map { |v| _deserialize(inner_type, v) }
|
407
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
408
|
+
k_type = Regexp.last_match[:k_type]
|
409
|
+
v_type = Regexp.last_match[:v_type]
|
410
|
+
{}.tap do |hash|
|
411
|
+
value.each do |k, v|
|
412
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
413
|
+
end
|
414
|
+
end
|
415
|
+
else # model
|
416
|
+
# models (e.g. Pet) or oneOf
|
417
|
+
klass = MergeHRISClient.const_get(type)
|
418
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
419
|
+
end
|
420
|
+
end
|
421
|
+
|
422
|
+
# Returns the string representation of the object
|
423
|
+
# @return [String] String presentation of the object
|
424
|
+
def to_s
|
425
|
+
to_hash.to_s
|
426
|
+
end
|
427
|
+
|
428
|
+
# to_body is an alias to to_hash (backward compatibility)
|
429
|
+
# @return [Hash] Returns the object in the form of hash
|
430
|
+
def to_body
|
431
|
+
to_hash
|
432
|
+
end
|
433
|
+
|
434
|
+
# Returns the object in the form of hash
|
435
|
+
# @return [Hash] Returns the object in the form of hash
|
436
|
+
def to_hash
|
437
|
+
hash = {}
|
438
|
+
self.class.attribute_map.each_pair do |attr, param|
|
439
|
+
value = self.send(attr)
|
440
|
+
if value.nil?
|
441
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
442
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
443
|
+
end
|
444
|
+
|
445
|
+
hash[param] = _to_hash(value)
|
446
|
+
end
|
447
|
+
hash
|
448
|
+
end
|
449
|
+
|
450
|
+
# Outputs non-array value in the form of hash
|
451
|
+
# For object, use to_hash. Otherwise, just return the value
|
452
|
+
# @param [Object] value Any valid value
|
453
|
+
# @return [Hash] Returns the value in the form of hash
|
454
|
+
def _to_hash(value)
|
455
|
+
if value.is_a?(Array)
|
456
|
+
value.compact.map { |v| _to_hash(v) }
|
457
|
+
elsif value.is_a?(Hash)
|
458
|
+
{}.tap do |hash|
|
459
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
460
|
+
end
|
461
|
+
elsif value.respond_to? :to_hash
|
462
|
+
value.to_hash
|
463
|
+
else
|
464
|
+
value
|
465
|
+
end
|
466
|
+
end
|
467
|
+
|
468
|
+
end
|
469
|
+
|
470
|
+
end
|