merge_hris_client 3.1.0 → 3.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +18 -13
- data/docs/AsyncPassthroughApi.md +155 -0
- data/docs/AsyncPassthroughReciept.md +18 -0
- data/docs/BankInfo.md +2 -2
- data/docs/BankInfoApi.md +2 -2
- data/docs/Benefit.md +9 -3
- data/docs/BenefitPlanTypeEnum.md +15 -0
- data/docs/Company.md +2 -2
- data/docs/Deduction.md +2 -2
- data/docs/DeleteAccountApi.md +9 -9
- data/docs/Dependent.md +50 -0
- data/docs/DependentsApi.md +181 -0
- data/docs/Earning.md +2 -2
- data/docs/Employee.md +2 -2
- data/docs/EmployeePayrollRun.md +2 -2
- data/docs/EmployerBenefit.md +36 -0
- data/docs/EmployerBenefitsApi.md +177 -0
- data/docs/Employment.md +2 -2
- data/docs/EmploymentsApi.md +2 -2
- data/docs/EndUserDetailsRequest.md +1 -1
- data/docs/Group.md +2 -2
- data/docs/LinkedAccountsApi.md +2 -2
- data/docs/Location.md +3 -3
- data/docs/PaginatedDependentList.md +22 -0
- data/docs/PaginatedEmployerBenefitList.md +22 -0
- data/docs/PayGroup.md +2 -2
- data/docs/PayrollRun.md +2 -2
- data/docs/RelationshipEnum.md +15 -0
- data/docs/RemoteData.md +1 -1
- data/docs/SyncStatusApi.md +1 -1
- data/docs/Tax.md +2 -2
- data/docs/Team.md +2 -2
- data/docs/TimeOff.md +2 -2
- data/docs/TimeOffBalance.md +2 -2
- data/lib/merge_hris_client/api/async_passthrough_api.rb +160 -0
- data/lib/merge_hris_client/api/bank_info_api.rb +2 -2
- 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/employer_benefits_api.rb +182 -0
- data/lib/merge_hris_client/api/employments_api.rb +2 -2
- data/lib/merge_hris_client/api/linked_accounts_api.rb +2 -2
- data/lib/merge_hris_client/api/sync_status_api.rb +2 -2
- data/lib/merge_hris_client/models/async_passthrough_reciept.rb +223 -0
- data/lib/merge_hris_client/models/bank_info.rb +10 -10
- data/lib/merge_hris_client/models/benefit.rb +42 -9
- data/lib/merge_hris_client/models/benefit_plan_type_enum.rb +48 -0
- data/lib/merge_hris_client/models/company.rb +10 -10
- data/lib/merge_hris_client/models/deduction.rb +10 -10
- data/lib/merge_hris_client/models/dependent.rb +470 -0
- data/lib/merge_hris_client/models/earning.rb +10 -10
- data/lib/merge_hris_client/models/employee.rb +10 -10
- data/lib/merge_hris_client/models/employee_payroll_run.rb +10 -10
- data/lib/merge_hris_client/models/employer_benefit.rb +363 -0
- data/lib/merge_hris_client/models/employment.rb +10 -10
- data/lib/merge_hris_client/models/end_user_details_request.rb +1 -1
- data/lib/merge_hris_client/models/group.rb +10 -10
- data/lib/merge_hris_client/models/location.rb +10 -10
- 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_group.rb +10 -10
- data/lib/merge_hris_client/models/payroll_run.rb +10 -10
- 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/sync_status_status_enum.rb +2 -1
- data/lib/merge_hris_client/models/tax.rb +10 -10
- data/lib/merge_hris_client/models/team.rb +10 -10
- data/lib/merge_hris_client/models/time_off.rb +10 -10
- data/lib/merge_hris_client/models/time_off_balance.rb +10 -10
- data/lib/merge_hris_client/version.rb +1 -1
- data/lib/merge_hris_client.rb +16 -2
- data/spec/api/async_passthrough_api_spec.rb +59 -0
- data/spec/api/bank_info_api_spec.rb +1 -1
- data/spec/api/delete_account_api_spec.rb +2 -2
- data/spec/api/dependents_api_spec.rb +70 -0
- data/spec/api/employer_benefits_api_spec.rb +68 -0
- data/spec/api/employments_api_spec.rb +1 -1
- data/spec/api/linked_accounts_api_spec.rb +1 -1
- data/spec/api/sync_status_api_spec.rb +1 -1
- data/spec/models/async_passthrough_reciept_spec.rb +34 -0
- data/spec/models/bank_info_spec.rb +2 -2
- data/spec/models/benefit_plan_type_enum_spec.rb +28 -0
- data/spec/models/benefit_spec.rb +19 -1
- data/spec/models/company_spec.rb +2 -2
- data/spec/models/deduction_spec.rb +2 -2
- data/spec/models/dependent_spec.rb +130 -0
- data/spec/models/earning_spec.rb +2 -2
- data/spec/models/employee_payroll_run_spec.rb +2 -2
- data/spec/models/employee_spec.rb +2 -2
- data/spec/models/employer_benefit_spec.rb +88 -0
- data/spec/models/employment_spec.rb +2 -2
- data/spec/models/group_spec.rb +2 -2
- data/spec/models/location_spec.rb +2 -2
- 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 +2 -2
- data/spec/models/payroll_run_spec.rb +2 -2
- data/spec/models/relationship_enum_spec.rb +28 -0
- data/spec/models/tax_spec.rb +2 -2
- data/spec/models/team_spec.rb +2 -2
- data/spec/models/time_off_balance_spec.rb +2 -2
- data/spec/models/time_off_spec.rb +2 -2
- metadata +161 -121
@@ -32,11 +32,11 @@ module MergeHRISClient
|
|
32
32
|
# Indicates whether or not this object has been deleted by third party webhooks.
|
33
33
|
attr_accessor :remote_was_deleted
|
34
34
|
|
35
|
-
attr_accessor :field_mappings
|
36
|
-
|
37
35
|
# This is the datetime that this object was last updated by Merge
|
38
36
|
attr_accessor :modified_at
|
39
37
|
|
38
|
+
attr_accessor :field_mappings
|
39
|
+
|
40
40
|
attr_accessor :remote_data
|
41
41
|
|
42
42
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -48,8 +48,8 @@ module MergeHRISClient
|
|
48
48
|
:'amount' => :'amount',
|
49
49
|
:'type' => :'type',
|
50
50
|
:'remote_was_deleted' => :'remote_was_deleted',
|
51
|
-
:'field_mappings' => :'field_mappings',
|
52
51
|
:'modified_at' => :'modified_at',
|
52
|
+
:'field_mappings' => :'field_mappings',
|
53
53
|
:'remote_data' => :'remote_data'
|
54
54
|
}
|
55
55
|
end
|
@@ -68,8 +68,8 @@ module MergeHRISClient
|
|
68
68
|
:'amount' => :'Float',
|
69
69
|
:'type' => :'EarningTypeEnum',
|
70
70
|
:'remote_was_deleted' => :'Boolean',
|
71
|
-
:'field_mappings' => :'Hash<String, Object>',
|
72
71
|
:'modified_at' => :'Time',
|
72
|
+
:'field_mappings' => :'Hash<String, Object>',
|
73
73
|
:'remote_data' => :'Array<RemoteData>'
|
74
74
|
}
|
75
75
|
end
|
@@ -125,16 +125,16 @@ module MergeHRISClient
|
|
125
125
|
self.remote_was_deleted = attributes[:'remote_was_deleted']
|
126
126
|
end
|
127
127
|
|
128
|
+
if attributes.key?(:'modified_at')
|
129
|
+
self.modified_at = attributes[:'modified_at']
|
130
|
+
end
|
131
|
+
|
128
132
|
if attributes.key?(:'field_mappings')
|
129
133
|
if (value = attributes[:'field_mappings']).is_a?(Hash)
|
130
134
|
self.field_mappings = value
|
131
135
|
end
|
132
136
|
end
|
133
137
|
|
134
|
-
if attributes.key?(:'modified_at')
|
135
|
-
self.modified_at = attributes[:'modified_at']
|
136
|
-
end
|
137
|
-
|
138
138
|
if attributes.key?(:'remote_data')
|
139
139
|
if (value = attributes[:'remote_data']).is_a?(Array)
|
140
140
|
self.remote_data = value
|
@@ -166,8 +166,8 @@ module MergeHRISClient
|
|
166
166
|
amount == o.amount &&
|
167
167
|
type == o.type &&
|
168
168
|
remote_was_deleted == o.remote_was_deleted &&
|
169
|
-
field_mappings == o.field_mappings &&
|
170
169
|
modified_at == o.modified_at &&
|
170
|
+
field_mappings == o.field_mappings &&
|
171
171
|
remote_data == o.remote_data
|
172
172
|
end
|
173
173
|
|
@@ -180,7 +180,7 @@ module MergeHRISClient
|
|
180
180
|
# Calculates hash code according to all attributes.
|
181
181
|
# @return [Integer] Hash code
|
182
182
|
def hash
|
183
|
-
[id, remote_id, employee_payroll_run, amount, type, remote_was_deleted,
|
183
|
+
[id, remote_id, employee_payroll_run, amount, type, remote_was_deleted, modified_at, field_mappings, remote_data].hash
|
184
184
|
end
|
185
185
|
|
186
186
|
# Builds the object from hash
|
@@ -106,11 +106,11 @@ module MergeHRISClient
|
|
106
106
|
|
107
107
|
attr_accessor :remote_was_deleted
|
108
108
|
|
109
|
-
attr_accessor :field_mappings
|
110
|
-
|
111
109
|
# This is the datetime that this object was last updated by Merge
|
112
110
|
attr_accessor :modified_at
|
113
111
|
|
112
|
+
attr_accessor :field_mappings
|
113
|
+
|
114
114
|
attr_accessor :remote_data
|
115
115
|
|
116
116
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -147,8 +147,8 @@ module MergeHRISClient
|
|
147
147
|
:'avatar' => :'avatar',
|
148
148
|
:'custom_fields' => :'custom_fields',
|
149
149
|
:'remote_was_deleted' => :'remote_was_deleted',
|
150
|
-
:'field_mappings' => :'field_mappings',
|
151
150
|
:'modified_at' => :'modified_at',
|
151
|
+
:'field_mappings' => :'field_mappings',
|
152
152
|
:'remote_data' => :'remote_data'
|
153
153
|
}
|
154
154
|
end
|
@@ -192,8 +192,8 @@ module MergeHRISClient
|
|
192
192
|
:'avatar' => :'String',
|
193
193
|
:'custom_fields' => :'Hash<String, Object>',
|
194
194
|
:'remote_was_deleted' => :'Boolean',
|
195
|
-
:'field_mappings' => :'Hash<String, Object>',
|
196
195
|
:'modified_at' => :'Time',
|
196
|
+
:'field_mappings' => :'Hash<String, Object>',
|
197
197
|
:'remote_data' => :'Array<RemoteData>'
|
198
198
|
}
|
199
199
|
end
|
@@ -378,16 +378,16 @@ module MergeHRISClient
|
|
378
378
|
self.remote_was_deleted = attributes[:'remote_was_deleted']
|
379
379
|
end
|
380
380
|
|
381
|
+
if attributes.key?(:'modified_at')
|
382
|
+
self.modified_at = attributes[:'modified_at']
|
383
|
+
end
|
384
|
+
|
381
385
|
if attributes.key?(:'field_mappings')
|
382
386
|
if (value = attributes[:'field_mappings']).is_a?(Hash)
|
383
387
|
self.field_mappings = value
|
384
388
|
end
|
385
389
|
end
|
386
390
|
|
387
|
-
if attributes.key?(:'modified_at')
|
388
|
-
self.modified_at = attributes[:'modified_at']
|
389
|
-
end
|
390
|
-
|
391
391
|
if attributes.key?(:'remote_data')
|
392
392
|
if (value = attributes[:'remote_data']).is_a?(Array)
|
393
393
|
self.remote_data = value
|
@@ -504,8 +504,8 @@ module MergeHRISClient
|
|
504
504
|
avatar == o.avatar &&
|
505
505
|
custom_fields == o.custom_fields &&
|
506
506
|
remote_was_deleted == o.remote_was_deleted &&
|
507
|
-
field_mappings == o.field_mappings &&
|
508
507
|
modified_at == o.modified_at &&
|
508
|
+
field_mappings == o.field_mappings &&
|
509
509
|
remote_data == o.remote_data
|
510
510
|
end
|
511
511
|
|
@@ -518,7 +518,7 @@ module MergeHRISClient
|
|
518
518
|
# Calculates hash code according to all attributes.
|
519
519
|
# @return [Integer] Hash code
|
520
520
|
def hash
|
521
|
-
[id, remote_id, employee_number, company, first_name, last_name, display_full_name, username, groups, work_email, personal_email, mobile_phone_number, employments, home_location, work_location, manager, team, pay_group, ssn, gender, ethnicity, marital_status, date_of_birth, hire_date, start_date, remote_created_at, employment_status, termination_date, avatar, custom_fields, remote_was_deleted,
|
521
|
+
[id, remote_id, employee_number, company, first_name, last_name, display_full_name, username, groups, work_email, personal_email, mobile_phone_number, employments, home_location, work_location, manager, team, pay_group, ssn, gender, ethnicity, marital_status, date_of_birth, hire_date, start_date, remote_created_at, employment_status, termination_date, avatar, custom_fields, remote_was_deleted, modified_at, field_mappings, remote_data].hash
|
522
522
|
end
|
523
523
|
|
524
524
|
# Builds the object from hash
|
@@ -51,11 +51,11 @@ module MergeHRISClient
|
|
51
51
|
# Indicates whether or not this object has been deleted by third party webhooks.
|
52
52
|
attr_accessor :remote_was_deleted
|
53
53
|
|
54
|
-
attr_accessor :field_mappings
|
55
|
-
|
56
54
|
# This is the datetime that this object was last updated by Merge
|
57
55
|
attr_accessor :modified_at
|
58
56
|
|
57
|
+
attr_accessor :field_mappings
|
58
|
+
|
59
59
|
attr_accessor :remote_data
|
60
60
|
|
61
61
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -74,8 +74,8 @@ module MergeHRISClient
|
|
74
74
|
:'deductions' => :'deductions',
|
75
75
|
:'taxes' => :'taxes',
|
76
76
|
:'remote_was_deleted' => :'remote_was_deleted',
|
77
|
-
:'field_mappings' => :'field_mappings',
|
78
77
|
:'modified_at' => :'modified_at',
|
78
|
+
:'field_mappings' => :'field_mappings',
|
79
79
|
:'remote_data' => :'remote_data'
|
80
80
|
}
|
81
81
|
end
|
@@ -101,8 +101,8 @@ module MergeHRISClient
|
|
101
101
|
:'deductions' => :'Array<Deduction>',
|
102
102
|
:'taxes' => :'Array<Tax>',
|
103
103
|
:'remote_was_deleted' => :'Boolean',
|
104
|
-
:'field_mappings' => :'Hash<String, Object>',
|
105
104
|
:'modified_at' => :'Time',
|
105
|
+
:'field_mappings' => :'Hash<String, Object>',
|
106
106
|
:'remote_data' => :'Array<RemoteData>'
|
107
107
|
}
|
108
108
|
end
|
@@ -196,16 +196,16 @@ module MergeHRISClient
|
|
196
196
|
self.remote_was_deleted = attributes[:'remote_was_deleted']
|
197
197
|
end
|
198
198
|
|
199
|
+
if attributes.key?(:'modified_at')
|
200
|
+
self.modified_at = attributes[:'modified_at']
|
201
|
+
end
|
202
|
+
|
199
203
|
if attributes.key?(:'field_mappings')
|
200
204
|
if (value = attributes[:'field_mappings']).is_a?(Hash)
|
201
205
|
self.field_mappings = value
|
202
206
|
end
|
203
207
|
end
|
204
208
|
|
205
|
-
if attributes.key?(:'modified_at')
|
206
|
-
self.modified_at = attributes[:'modified_at']
|
207
|
-
end
|
208
|
-
|
209
209
|
if attributes.key?(:'remote_data')
|
210
210
|
if (value = attributes[:'remote_data']).is_a?(Array)
|
211
211
|
self.remote_data = value
|
@@ -244,8 +244,8 @@ module MergeHRISClient
|
|
244
244
|
deductions == o.deductions &&
|
245
245
|
taxes == o.taxes &&
|
246
246
|
remote_was_deleted == o.remote_was_deleted &&
|
247
|
-
field_mappings == o.field_mappings &&
|
248
247
|
modified_at == o.modified_at &&
|
248
|
+
field_mappings == o.field_mappings &&
|
249
249
|
remote_data == o.remote_data
|
250
250
|
end
|
251
251
|
|
@@ -258,7 +258,7 @@ module MergeHRISClient
|
|
258
258
|
# Calculates hash code according to all attributes.
|
259
259
|
# @return [Integer] Hash code
|
260
260
|
def hash
|
261
|
-
[id, remote_id, employee, payroll_run, gross_pay, net_pay, start_date, end_date, check_date, earnings, deductions, taxes, remote_was_deleted,
|
261
|
+
[id, remote_id, employee, payroll_run, gross_pay, net_pay, start_date, end_date, check_date, earnings, deductions, taxes, remote_was_deleted, modified_at, field_mappings, remote_data].hash
|
262
262
|
end
|
263
263
|
|
264
264
|
# Builds the object from hash
|
@@ -0,0 +1,363 @@
|
|
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 EmployerBenefit Object ### Description The `Employer Benefit` object is used to represent a benefit plan offered by a company. ### Usage Example Fetch from the `LIST EmployerBenefits` endpoint and filter by `ID` to show all EmployerBenefits.
|
18
|
+
class EmployerBenefit
|
19
|
+
attr_accessor :id
|
20
|
+
|
21
|
+
# The third-party API ID of the matching object.
|
22
|
+
attr_accessor :remote_id
|
23
|
+
|
24
|
+
# The type of benefit plan. * `MEDICAL` - MEDICAL * `HEALTH_SAVINGS` - HEALTH_SAVINGS * `INSURANCE` - INSURANCE * `RETIREMENT` - RETIREMENT * `OTHER` - OTHER
|
25
|
+
attr_accessor :benefit_plan_type
|
26
|
+
|
27
|
+
# The employer benefit's name - typically the carrier or network name.
|
28
|
+
attr_accessor :name
|
29
|
+
|
30
|
+
# The employer benefit's description.
|
31
|
+
attr_accessor :description
|
32
|
+
|
33
|
+
# The employer benefit's deduction code.
|
34
|
+
attr_accessor :deduction_code
|
35
|
+
|
36
|
+
# Indicates whether or not this object has been deleted by third party webhooks.
|
37
|
+
attr_accessor :remote_was_deleted
|
38
|
+
|
39
|
+
# This is the datetime that this object was last updated by Merge
|
40
|
+
attr_accessor :modified_at
|
41
|
+
|
42
|
+
attr_accessor :field_mappings
|
43
|
+
|
44
|
+
attr_accessor :remote_data
|
45
|
+
|
46
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
47
|
+
def self.attribute_map
|
48
|
+
{
|
49
|
+
:'id' => :'id',
|
50
|
+
:'remote_id' => :'remote_id',
|
51
|
+
:'benefit_plan_type' => :'benefit_plan_type',
|
52
|
+
:'name' => :'name',
|
53
|
+
:'description' => :'description',
|
54
|
+
:'deduction_code' => :'deduction_code',
|
55
|
+
:'remote_was_deleted' => :'remote_was_deleted',
|
56
|
+
:'modified_at' => :'modified_at',
|
57
|
+
:'field_mappings' => :'field_mappings',
|
58
|
+
:'remote_data' => :'remote_data'
|
59
|
+
}
|
60
|
+
end
|
61
|
+
|
62
|
+
# Returns all the JSON keys this model knows about
|
63
|
+
def self.acceptable_attributes
|
64
|
+
attribute_map.values
|
65
|
+
end
|
66
|
+
|
67
|
+
# Attribute type mapping.
|
68
|
+
def self.openapi_types
|
69
|
+
{
|
70
|
+
:'id' => :'String',
|
71
|
+
:'remote_id' => :'String',
|
72
|
+
:'benefit_plan_type' => :'BenefitPlanTypeEnum',
|
73
|
+
:'name' => :'String',
|
74
|
+
:'description' => :'String',
|
75
|
+
:'deduction_code' => :'String',
|
76
|
+
:'remote_was_deleted' => :'Boolean',
|
77
|
+
:'modified_at' => :'Time',
|
78
|
+
:'field_mappings' => :'Hash<String, Object>',
|
79
|
+
:'remote_data' => :'Array<Hash<String, Object>>'
|
80
|
+
}
|
81
|
+
end
|
82
|
+
|
83
|
+
# List of attributes with nullable: true
|
84
|
+
def self.openapi_nullable
|
85
|
+
Set.new([
|
86
|
+
:'remote_id',
|
87
|
+
:'benefit_plan_type',
|
88
|
+
:'name',
|
89
|
+
:'description',
|
90
|
+
:'deduction_code',
|
91
|
+
:'field_mappings',
|
92
|
+
:'remote_data'
|
93
|
+
])
|
94
|
+
end
|
95
|
+
|
96
|
+
# Initializes the object
|
97
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
98
|
+
def initialize(attributes = {})
|
99
|
+
if (!attributes.is_a?(Hash))
|
100
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MergeHRISClient::EmployerBenefit` initialize method"
|
101
|
+
end
|
102
|
+
|
103
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
104
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
105
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
106
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MergeHRISClient::EmployerBenefit`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
107
|
+
end
|
108
|
+
h[k.to_sym] = v
|
109
|
+
}
|
110
|
+
|
111
|
+
if attributes.key?(:'id')
|
112
|
+
self.id = attributes[:'id']
|
113
|
+
end
|
114
|
+
|
115
|
+
if attributes.key?(:'remote_id')
|
116
|
+
self.remote_id = attributes[:'remote_id']
|
117
|
+
end
|
118
|
+
|
119
|
+
if attributes.key?(:'benefit_plan_type')
|
120
|
+
self.benefit_plan_type = attributes[:'benefit_plan_type']
|
121
|
+
end
|
122
|
+
|
123
|
+
if attributes.key?(:'name')
|
124
|
+
self.name = attributes[:'name']
|
125
|
+
end
|
126
|
+
|
127
|
+
if attributes.key?(:'description')
|
128
|
+
self.description = attributes[:'description']
|
129
|
+
end
|
130
|
+
|
131
|
+
if attributes.key?(:'deduction_code')
|
132
|
+
self.deduction_code = attributes[:'deduction_code']
|
133
|
+
end
|
134
|
+
|
135
|
+
if attributes.key?(:'remote_was_deleted')
|
136
|
+
self.remote_was_deleted = attributes[:'remote_was_deleted']
|
137
|
+
end
|
138
|
+
|
139
|
+
if attributes.key?(:'modified_at')
|
140
|
+
self.modified_at = attributes[:'modified_at']
|
141
|
+
end
|
142
|
+
|
143
|
+
if attributes.key?(:'field_mappings')
|
144
|
+
if (value = attributes[:'field_mappings']).is_a?(Hash)
|
145
|
+
self.field_mappings = value
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
if attributes.key?(:'remote_data')
|
150
|
+
if (value = attributes[:'remote_data']).is_a?(Array)
|
151
|
+
self.remote_data = value
|
152
|
+
end
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
156
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
157
|
+
# @return Array for valid properties with the reasons
|
158
|
+
def list_invalid_properties
|
159
|
+
invalid_properties = Array.new
|
160
|
+
if !@name.nil? && @name.to_s.length > 200
|
161
|
+
invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 200.')
|
162
|
+
end
|
163
|
+
|
164
|
+
if !@description.nil? && @description.to_s.length > 2000
|
165
|
+
invalid_properties.push('invalid value for "description", the character length must be smaller than or equal to 2000.')
|
166
|
+
end
|
167
|
+
|
168
|
+
if !@deduction_code.nil? && @deduction_code.to_s.length > 60
|
169
|
+
invalid_properties.push('invalid value for "deduction_code", the character length must be smaller than or equal to 60.')
|
170
|
+
end
|
171
|
+
|
172
|
+
invalid_properties
|
173
|
+
end
|
174
|
+
|
175
|
+
# Check to see if the all the properties in the model are valid
|
176
|
+
# @return true if the model is valid
|
177
|
+
def valid?
|
178
|
+
return false if !@name.nil? && @name.to_s.length > 200
|
179
|
+
return false if !@description.nil? && @description.to_s.length > 2000
|
180
|
+
return false if !@deduction_code.nil? && @deduction_code.to_s.length > 60
|
181
|
+
true
|
182
|
+
end
|
183
|
+
|
184
|
+
# Custom attribute writer method with validation
|
185
|
+
# @param [Object] name Value to be assigned
|
186
|
+
def name=(name)
|
187
|
+
if !name.nil? && name.to_s.length > 200
|
188
|
+
fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 200.'
|
189
|
+
end
|
190
|
+
|
191
|
+
@name = name
|
192
|
+
end
|
193
|
+
|
194
|
+
# Custom attribute writer method with validation
|
195
|
+
# @param [Object] description Value to be assigned
|
196
|
+
def description=(description)
|
197
|
+
if !description.nil? && description.to_s.length > 2000
|
198
|
+
fail ArgumentError, 'invalid value for "description", the character length must be smaller than or equal to 2000.'
|
199
|
+
end
|
200
|
+
|
201
|
+
@description = description
|
202
|
+
end
|
203
|
+
|
204
|
+
# Custom attribute writer method with validation
|
205
|
+
# @param [Object] deduction_code Value to be assigned
|
206
|
+
def deduction_code=(deduction_code)
|
207
|
+
if !deduction_code.nil? && deduction_code.to_s.length > 60
|
208
|
+
fail ArgumentError, 'invalid value for "deduction_code", the character length must be smaller than or equal to 60.'
|
209
|
+
end
|
210
|
+
|
211
|
+
@deduction_code = deduction_code
|
212
|
+
end
|
213
|
+
|
214
|
+
# Checks equality by comparing each attribute.
|
215
|
+
# @param [Object] Object to be compared
|
216
|
+
def ==(o)
|
217
|
+
return true if self.equal?(o)
|
218
|
+
self.class == o.class &&
|
219
|
+
id == o.id &&
|
220
|
+
remote_id == o.remote_id &&
|
221
|
+
benefit_plan_type == o.benefit_plan_type &&
|
222
|
+
name == o.name &&
|
223
|
+
description == o.description &&
|
224
|
+
deduction_code == o.deduction_code &&
|
225
|
+
remote_was_deleted == o.remote_was_deleted &&
|
226
|
+
modified_at == o.modified_at &&
|
227
|
+
field_mappings == o.field_mappings &&
|
228
|
+
remote_data == o.remote_data
|
229
|
+
end
|
230
|
+
|
231
|
+
# @see the `==` method
|
232
|
+
# @param [Object] Object to be compared
|
233
|
+
def eql?(o)
|
234
|
+
self == o
|
235
|
+
end
|
236
|
+
|
237
|
+
# Calculates hash code according to all attributes.
|
238
|
+
# @return [Integer] Hash code
|
239
|
+
def hash
|
240
|
+
[id, remote_id, benefit_plan_type, name, description, deduction_code, remote_was_deleted, modified_at, field_mappings, remote_data].hash
|
241
|
+
end
|
242
|
+
|
243
|
+
# Builds the object from hash
|
244
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
245
|
+
# @return [Object] Returns the model itself
|
246
|
+
def self.build_from_hash(attributes)
|
247
|
+
new.build_from_hash(attributes)
|
248
|
+
end
|
249
|
+
|
250
|
+
# Builds the object from hash
|
251
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
252
|
+
# @return [Object] Returns the model itself
|
253
|
+
def build_from_hash(attributes)
|
254
|
+
return nil unless attributes.is_a?(Hash)
|
255
|
+
self.class.openapi_types.each_pair do |key, type|
|
256
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
257
|
+
self.send("#{key}=", nil)
|
258
|
+
elsif type =~ /\AArray<(.*)>/i
|
259
|
+
# check to ensure the input is an array given that the attribute
|
260
|
+
# is documented as an array but the input is not
|
261
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
262
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
263
|
+
end
|
264
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
265
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
266
|
+
end
|
267
|
+
end
|
268
|
+
|
269
|
+
self
|
270
|
+
end
|
271
|
+
|
272
|
+
# Deserializes the data based on type
|
273
|
+
# @param string type Data type
|
274
|
+
# @param string value Value to be deserialized
|
275
|
+
# @return [Object] Deserialized data
|
276
|
+
def _deserialize(type, value)
|
277
|
+
case type.to_sym
|
278
|
+
when :Time
|
279
|
+
Time.parse(value)
|
280
|
+
when :Date
|
281
|
+
Date.parse(value)
|
282
|
+
when :String
|
283
|
+
value
|
284
|
+
when :Integer
|
285
|
+
value.to_i
|
286
|
+
when :Float
|
287
|
+
value.to_f
|
288
|
+
when :Boolean
|
289
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
290
|
+
true
|
291
|
+
else
|
292
|
+
false
|
293
|
+
end
|
294
|
+
when :Object
|
295
|
+
# generic object (usually a Hash), return directly
|
296
|
+
value
|
297
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
298
|
+
inner_type = Regexp.last_match[:inner_type]
|
299
|
+
value.map { |v| _deserialize(inner_type, v) }
|
300
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
301
|
+
k_type = Regexp.last_match[:k_type]
|
302
|
+
v_type = Regexp.last_match[:v_type]
|
303
|
+
{}.tap do |hash|
|
304
|
+
value.each do |k, v|
|
305
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
306
|
+
end
|
307
|
+
end
|
308
|
+
else # model
|
309
|
+
# models (e.g. Pet) or oneOf
|
310
|
+
klass = MergeHRISClient.const_get(type)
|
311
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
312
|
+
end
|
313
|
+
end
|
314
|
+
|
315
|
+
# Returns the string representation of the object
|
316
|
+
# @return [String] String presentation of the object
|
317
|
+
def to_s
|
318
|
+
to_hash.to_s
|
319
|
+
end
|
320
|
+
|
321
|
+
# to_body is an alias to to_hash (backward compatibility)
|
322
|
+
# @return [Hash] Returns the object in the form of hash
|
323
|
+
def to_body
|
324
|
+
to_hash
|
325
|
+
end
|
326
|
+
|
327
|
+
# Returns the object in the form of hash
|
328
|
+
# @return [Hash] Returns the object in the form of hash
|
329
|
+
def to_hash
|
330
|
+
hash = {}
|
331
|
+
self.class.attribute_map.each_pair do |attr, param|
|
332
|
+
value = self.send(attr)
|
333
|
+
if value.nil?
|
334
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
335
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
336
|
+
end
|
337
|
+
|
338
|
+
hash[param] = _to_hash(value)
|
339
|
+
end
|
340
|
+
hash
|
341
|
+
end
|
342
|
+
|
343
|
+
# Outputs non-array value in the form of hash
|
344
|
+
# For object, use to_hash. Otherwise, just return the value
|
345
|
+
# @param [Object] value Any valid value
|
346
|
+
# @return [Hash] Returns the value in the form of hash
|
347
|
+
def _to_hash(value)
|
348
|
+
if value.is_a?(Array)
|
349
|
+
value.compact.map { |v| _to_hash(v) }
|
350
|
+
elsif value.is_a?(Hash)
|
351
|
+
{}.tap do |hash|
|
352
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
353
|
+
end
|
354
|
+
elsif value.respond_to? :to_hash
|
355
|
+
value.to_hash
|
356
|
+
else
|
357
|
+
value
|
358
|
+
end
|
359
|
+
end
|
360
|
+
|
361
|
+
end
|
362
|
+
|
363
|
+
end
|
@@ -54,11 +54,11 @@ module MergeHRISClient
|
|
54
54
|
# Indicates whether or not this object has been deleted by third party webhooks.
|
55
55
|
attr_accessor :remote_was_deleted
|
56
56
|
|
57
|
-
attr_accessor :field_mappings
|
58
|
-
|
59
57
|
# This is the datetime that this object was last updated by Merge
|
60
58
|
attr_accessor :modified_at
|
61
59
|
|
60
|
+
attr_accessor :field_mappings
|
61
|
+
|
62
62
|
attr_accessor :remote_data
|
63
63
|
|
64
64
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -77,8 +77,8 @@ module MergeHRISClient
|
|
77
77
|
:'effective_date' => :'effective_date',
|
78
78
|
:'employment_type' => :'employment_type',
|
79
79
|
:'remote_was_deleted' => :'remote_was_deleted',
|
80
|
-
:'field_mappings' => :'field_mappings',
|
81
80
|
:'modified_at' => :'modified_at',
|
81
|
+
:'field_mappings' => :'field_mappings',
|
82
82
|
:'remote_data' => :'remote_data'
|
83
83
|
}
|
84
84
|
end
|
@@ -104,8 +104,8 @@ module MergeHRISClient
|
|
104
104
|
:'effective_date' => :'Time',
|
105
105
|
:'employment_type' => :'EmploymentTypeEnum',
|
106
106
|
:'remote_was_deleted' => :'Boolean',
|
107
|
-
:'field_mappings' => :'Hash<String, Object>',
|
108
107
|
:'modified_at' => :'Time',
|
108
|
+
:'field_mappings' => :'Hash<String, Object>',
|
109
109
|
:'remote_data' => :'Array<RemoteData>'
|
110
110
|
}
|
111
111
|
end
|
@@ -196,16 +196,16 @@ module MergeHRISClient
|
|
196
196
|
self.remote_was_deleted = attributes[:'remote_was_deleted']
|
197
197
|
end
|
198
198
|
|
199
|
+
if attributes.key?(:'modified_at')
|
200
|
+
self.modified_at = attributes[:'modified_at']
|
201
|
+
end
|
202
|
+
|
199
203
|
if attributes.key?(:'field_mappings')
|
200
204
|
if (value = attributes[:'field_mappings']).is_a?(Hash)
|
201
205
|
self.field_mappings = value
|
202
206
|
end
|
203
207
|
end
|
204
208
|
|
205
|
-
if attributes.key?(:'modified_at')
|
206
|
-
self.modified_at = attributes[:'modified_at']
|
207
|
-
end
|
208
|
-
|
209
209
|
if attributes.key?(:'remote_data')
|
210
210
|
if (value = attributes[:'remote_data']).is_a?(Array)
|
211
211
|
self.remote_data = value
|
@@ -244,8 +244,8 @@ module MergeHRISClient
|
|
244
244
|
effective_date == o.effective_date &&
|
245
245
|
employment_type == o.employment_type &&
|
246
246
|
remote_was_deleted == o.remote_was_deleted &&
|
247
|
-
field_mappings == o.field_mappings &&
|
248
247
|
modified_at == o.modified_at &&
|
248
|
+
field_mappings == o.field_mappings &&
|
249
249
|
remote_data == o.remote_data
|
250
250
|
end
|
251
251
|
|
@@ -258,7 +258,7 @@ module MergeHRISClient
|
|
258
258
|
# Calculates hash code according to all attributes.
|
259
259
|
# @return [Integer] Hash code
|
260
260
|
def hash
|
261
|
-
[id, remote_id, employee, job_title, pay_rate, pay_period, pay_frequency, pay_currency, pay_group, flsa_status, effective_date, employment_type, remote_was_deleted,
|
261
|
+
[id, remote_id, employee, job_title, pay_rate, pay_period, pay_frequency, pay_currency, pay_group, flsa_status, effective_date, employment_type, remote_was_deleted, modified_at, field_mappings, remote_data].hash
|
262
262
|
end
|
263
263
|
|
264
264
|
# Builds the object from hash
|
@@ -33,7 +33,7 @@ module MergeHRISClient
|
|
33
33
|
# An integer number of minutes between [30, 720 or 10080 if for a Magic Link URL] for how long this token is valid. Defaults to 30.
|
34
34
|
attr_accessor :link_expiry_mins
|
35
35
|
|
36
|
-
# Whether to generate a Magic Link URL. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/
|
36
|
+
# Whether to generate a Magic Link URL. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link.
|
37
37
|
attr_accessor :should_create_magic_link_url
|
38
38
|
|
39
39
|
# An array of objects to specify the models and fields that will be disabled for a given Linked Account. Each object uses model_id, enabled_actions, and disabled_fields to specify the model, method, and fields that are scoped for a given Linked Account.
|