merge_hris_client 1.0.2 → 1.0.3
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/AccountDetails.md +30 -0
- data/docs/AccountDetailsAndActions.md +32 -0
- data/docs/AccountDetailsAndActionsIntegration.md +32 -0
- data/docs/AccountDetailsAndActionsStatusEnum.md +15 -0
- data/docs/AccountDetailsApi.md +76 -0
- data/docs/AccountTypeEnum.md +15 -0
- data/docs/BankInfo.md +34 -0
- data/docs/BankInfoApi.md +193 -0
- data/docs/BenefitsApi.md +2 -78
- data/docs/{StateEnum.md → CategoriesEnum.md} +2 -2
- data/docs/{NullEnum.md → CategoryEnum.md} +2 -2
- data/docs/CompaniesApi.md +3 -1
- data/docs/DataPassthroughRequest.md +5 -3
- data/docs/DeductionsApi.md +179 -0
- data/docs/Employee.md +12 -8
- data/docs/EmployeePayrollRun.md +3 -3
- data/docs/EmployeePayrollRunsApi.md +13 -3
- data/docs/EmployeesApi.md +12 -82
- data/docs/Employment.md +3 -1
- data/docs/EmploymentsApi.md +7 -78
- data/docs/EndUserDetailsRequest.md +1 -1
- data/docs/ErrorValidationProblem.md +24 -0
- data/docs/ForceResyncApi.md +79 -0
- data/docs/IssuesApi.md +11 -10
- data/docs/LinkedAccountsApi.md +103 -0
- data/docs/Location.md +2 -0
- data/docs/LocationsApi.md +2 -0
- data/docs/PaginatedAccountDetailsAndActionsList.md +22 -0
- data/docs/PaginatedBankInfoList.md +22 -0
- data/docs/PaginatedDeductionList.md +22 -0
- data/docs/PaginatedIssueList.md +2 -2
- data/docs/PaginatedPayGroupList.md +22 -0
- data/docs/PaginatedSyncStatusList.md +2 -2
- data/docs/PayGroup.md +24 -0
- data/docs/PayGroupsApi.md +177 -0
- data/docs/PayrollRun.md +3 -3
- data/docs/PayrollRunsApi.md +13 -1
- data/docs/PolicyTypeEnum.md +15 -0
- data/docs/RequestFormatEnum.md +15 -0
- data/docs/SyncStatusApi.md +3 -74
- data/docs/TeamsApi.md +7 -2
- data/docs/TimeOff.md +3 -3
- data/docs/TimeOffApi.md +88 -4
- data/docs/TimeOffBalance.md +4 -2
- data/docs/{TimeOffBalanceApi.md → TimeOffBalancesApi.md} +26 -22
- data/docs/TimeOffEndpointRequest.md +18 -0
- data/docs/TimeOffRequest.md +36 -0
- data/docs/TimeOffResponse.md +22 -0
- data/docs/ValidationProblemSource.md +18 -0
- data/docs/WarningValidationProblem.md +24 -0
- data/lib/merge_hris_client/api/account_details_api.rb +77 -0
- data/lib/merge_hris_client/api/bank_info_api.rb +222 -0
- data/lib/merge_hris_client/api/benefits_api.rb +3 -69
- data/lib/merge_hris_client/api/companies_api.rb +3 -0
- data/lib/merge_hris_client/api/deductions_api.rb +185 -0
- data/lib/merge_hris_client/api/employee_payroll_runs_api.rb +17 -2
- data/lib/merge_hris_client/api/employees_api.rb +18 -75
- data/lib/merge_hris_client/api/employments_api.rb +24 -69
- data/lib/merge_hris_client/api/force_resync_api.rb +84 -0
- data/lib/merge_hris_client/api/issues_api.rb +10 -10
- data/lib/merge_hris_client/api/linked_accounts_api.rb +117 -0
- data/lib/merge_hris_client/api/locations_api.rb +3 -0
- data/lib/merge_hris_client/api/pay_groups_api.rb +182 -0
- data/lib/merge_hris_client/api/payroll_runs_api.rb +22 -0
- data/lib/merge_hris_client/api/sync_status_api.rb +4 -4
- data/lib/merge_hris_client/api/teams_api.rb +17 -0
- data/lib/merge_hris_client/api/time_off_api.rb +92 -2
- data/lib/merge_hris_client/api/time_off_balances_api.rb +206 -0
- data/lib/merge_hris_client/models/account_details.rb +273 -0
- data/lib/merge_hris_client/models/account_details_and_actions.rb +302 -0
- data/lib/merge_hris_client/models/account_details_and_actions_integration.rb +310 -0
- data/lib/merge_hris_client/models/account_details_and_actions_status_enum.rb +36 -0
- data/lib/merge_hris_client/models/account_integration.rb +1 -1
- data/lib/merge_hris_client/models/account_type_enum.rb +35 -0
- data/lib/merge_hris_client/models/bank_info.rb +323 -0
- data/lib/merge_hris_client/models/categories_enum.rb +36 -0
- data/lib/merge_hris_client/models/category_enum.rb +36 -0
- data/lib/merge_hris_client/models/data_passthrough_request.rb +66 -9
- data/lib/merge_hris_client/models/employee.rb +32 -8
- data/lib/merge_hris_client/models/employment.rb +12 -1
- data/lib/merge_hris_client/models/end_user_details_request.rb +73 -1
- data/lib/merge_hris_client/models/error_validation_problem.rb +260 -0
- data/lib/merge_hris_client/models/generate_remote_key_request.rb +19 -0
- data/lib/merge_hris_client/models/location.rb +12 -1
- data/lib/merge_hris_client/models/marital_status_enum.rb +1 -1
- data/lib/merge_hris_client/models/paginated_account_details_and_actions_list.rb +240 -0
- data/lib/merge_hris_client/models/paginated_bank_info_list.rb +240 -0
- data/lib/merge_hris_client/models/paginated_deduction_list.rb +240 -0
- data/lib/merge_hris_client/models/paginated_pay_group_list.rb +240 -0
- data/lib/merge_hris_client/models/{benefit_request.rb → pay_group.rb} +31 -54
- data/lib/merge_hris_client/models/policy_type_enum.rb +39 -0
- data/lib/merge_hris_client/models/remote_data_request.rb +19 -0
- data/lib/merge_hris_client/models/remote_key_for_regeneration_request.rb +19 -0
- data/lib/merge_hris_client/models/request_format_enum.rb +35 -0
- data/lib/merge_hris_client/models/request_type_enum.rb +2 -1
- data/lib/merge_hris_client/models/sync_status_status_enum.rb +2 -0
- data/lib/merge_hris_client/models/time_off_balance.rb +14 -3
- data/lib/merge_hris_client/models/time_off_endpoint_request.rb +223 -0
- data/lib/merge_hris_client/models/{employment_request.rb → time_off_request.rb} +80 -69
- data/lib/merge_hris_client/models/time_off_response.rb +255 -0
- data/lib/merge_hris_client/models/validation_problem_source.rb +223 -0
- data/lib/merge_hris_client/models/warning_validation_problem.rb +260 -0
- data/lib/merge_hris_client/version.rb +1 -1
- data/lib/merge_hris_client.rb +28 -4
- data/spec/api/account_details_api_spec.rb +45 -0
- data/spec/api/account_token_api_spec.rb +1 -1
- data/spec/api/available_actions_api_spec.rb +1 -1
- data/spec/api/bank_info_api_spec.rb +76 -0
- data/spec/api/benefits_api_spec.rb +4 -1
- data/spec/api/companies_api_spec.rb +4 -1
- data/spec/api/deductions_api_spec.rb +69 -0
- data/spec/api/employee_payroll_runs_api_spec.rb +9 -2
- data/spec/api/employees_api_spec.rb +9 -1
- data/spec/api/employments_api_spec.rb +7 -1
- data/spec/api/force_resync_api_spec.rb +46 -0
- data/spec/api/issues_api_spec.rb +5 -5
- data/spec/api/link_token_api_spec.rb +2 -2
- data/spec/api/linked_accounts_api_spec.rb +57 -0
- data/spec/api/locations_api_spec.rb +4 -1
- data/spec/api/passthrough_api_spec.rb +2 -3
- data/spec/api/pay_groups_api_spec.rb +68 -0
- data/spec/api/payroll_runs_api_spec.rb +9 -1
- data/spec/api/regenerate_key_api_spec.rb +2 -2
- data/spec/api/sync_status_api_spec.rb +2 -13
- data/spec/api/teams_api_spec.rb +7 -1
- data/spec/api/time_off_api_spec.rb +20 -2
- data/spec/api/{time_off_balance_api_spec.rb → time_off_balances_api_spec.rb} +13 -11
- data/spec/models/account_details_and_actions_integration_spec.rb +76 -0
- data/spec/models/account_details_and_actions_spec.rb +76 -0
- data/spec/models/account_details_and_actions_status_enum_spec.rb +28 -0
- data/spec/models/{benefit_request_spec.rb → account_details_spec.rb} +18 -12
- data/spec/models/account_integration_spec.rb +7 -1
- data/spec/models/account_token_spec.rb +7 -1
- data/spec/models/account_type_enum_spec.rb +28 -0
- data/spec/models/available_actions_spec.rb +13 -1
- data/spec/models/{employment_request_spec.rb → bank_info_spec.rb} +15 -15
- data/spec/models/benefit_plan_type_enum_spec.rb +1 -1
- data/spec/models/benefit_spec.rb +7 -1
- data/spec/models/categories_enum_spec.rb +28 -0
- data/spec/models/{state_enum_spec.rb → category_enum_spec.rb} +7 -7
- data/spec/models/company_spec.rb +7 -1
- data/spec/models/country_enum_spec.rb +1 -1
- data/spec/models/data_passthrough_request_spec.rb +7 -1
- data/spec/models/deduction_spec.rb +7 -1
- data/spec/models/earning_spec.rb +7 -1
- data/spec/models/employee_payroll_run_spec.rb +7 -1
- data/spec/models/employee_spec.rb +31 -1
- data/spec/models/employment_spec.rb +13 -1
- data/spec/models/employment_status_enum_spec.rb +1 -1
- data/spec/models/employment_type_enum_spec.rb +1 -1
- data/spec/models/end_user_details_request_spec.rb +7 -5
- data/spec/models/{end_user_details_spec.rb → error_validation_problem_spec.rb} +11 -15
- data/spec/models/ethnicity_enum_spec.rb +1 -1
- data/spec/models/flsa_status_enum_spec.rb +1 -1
- data/spec/models/gender_enum_spec.rb +1 -1
- data/spec/models/link_token_spec.rb +1 -1
- data/spec/models/location_spec.rb +13 -1
- data/spec/models/marital_status_enum_spec.rb +1 -1
- data/spec/models/method_enum_spec.rb +1 -1
- data/spec/models/model_operation_spec.rb +13 -1
- data/spec/models/paginated_account_details_and_actions_list_spec.rb +46 -0
- data/spec/models/paginated_bank_info_list_spec.rb +46 -0
- data/spec/models/paginated_benefit_list_spec.rb +1 -1
- data/spec/models/paginated_company_list_spec.rb +1 -1
- data/spec/models/paginated_deduction_list_spec.rb +46 -0
- data/spec/models/paginated_employee_list_spec.rb +1 -1
- data/spec/models/paginated_employee_payroll_run_list_spec.rb +1 -1
- data/spec/models/paginated_employment_list_spec.rb +1 -1
- data/spec/models/paginated_location_list_spec.rb +1 -1
- data/spec/models/paginated_pay_group_list_spec.rb +46 -0
- data/spec/models/paginated_payroll_run_list_spec.rb +1 -1
- data/spec/models/paginated_team_list_spec.rb +1 -1
- data/spec/models/paginated_time_off_list_spec.rb +1 -1
- data/spec/models/pay_currency_enum_spec.rb +1 -1
- data/spec/models/pay_frequency_enum_spec.rb +1 -1
- data/spec/models/{data_passthrough_spec.rb → pay_group_spec.rb} +11 -11
- data/spec/models/pay_period_enum_spec.rb +1 -1
- data/spec/models/payroll_run_spec.rb +7 -1
- data/spec/models/policy_type_enum_spec.rb +28 -0
- data/spec/models/remote_data_spec.rb +1 -1
- data/spec/models/remote_key_for_regeneration_request_spec.rb +1 -1
- data/spec/models/remote_key_spec.rb +1 -1
- data/spec/models/remote_response_spec.rb +1 -1
- data/spec/models/request_format_enum_spec.rb +28 -0
- data/spec/models/request_type_enum_spec.rb +1 -1
- data/spec/models/run_state_enum_spec.rb +1 -1
- data/spec/models/run_type_enum_spec.rb +1 -1
- data/spec/models/tax_spec.rb +7 -1
- data/spec/models/team_spec.rb +13 -1
- data/spec/models/time_off_balance_spec.rb +6 -0
- data/spec/models/{remote_key_for_regeneration_spec.rb → time_off_endpoint_request_spec.rb} +8 -8
- data/spec/models/time_off_request_spec.rb +88 -0
- data/spec/models/time_off_response_spec.rb +46 -0
- data/spec/models/time_off_spec.rb +19 -1
- data/spec/models/time_off_status_enum_spec.rb +1 -1
- data/spec/models/type_enum_spec.rb +1 -1
- data/spec/models/units_enum_spec.rb +1 -1
- data/spec/models/validation_problem_source_spec.rb +34 -0
- data/spec/models/warning_validation_problem_spec.rb +52 -0
- data/test_ruby.rb +11 -14
- metadata +115 -33
- data/docs/BenefitRequest.md +0 -28
- data/docs/DataPassthrough.md +0 -24
- data/docs/EmployeeRequest.md +0 -62
- data/docs/EmploymentRequest.md +0 -34
- data/docs/EndUserDetails.md +0 -24
- data/docs/RemoteKeyForRegeneration.md +0 -18
- data/lib/merge_hris_client/models/employee_request.rb +0 -523
- data/merge_hris_client-1.0.0.gem +0 -0
- data/merge_hris_client-1.0.1.gem +0 -0
- data/spec/models/employee_request_spec.rb +0 -160
@@ -0,0 +1,323 @@
|
|
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 BankInfo Object ### Description The `BankInfo` object is used to represent the Bank Account information for an Employee. This is often referenced with an Employee object. ### Usage Example Fetch from the `LIST BankInfo` endpoint and filter by `ID` to show all bank information.
|
18
|
+
class BankInfo
|
19
|
+
attr_accessor :id
|
20
|
+
|
21
|
+
# The third-party API ID of the matching object.
|
22
|
+
attr_accessor :remote_id
|
23
|
+
|
24
|
+
# The employee with this bank account.
|
25
|
+
attr_accessor :employee
|
26
|
+
|
27
|
+
# The account number.
|
28
|
+
attr_accessor :account_number
|
29
|
+
|
30
|
+
# The routing number.
|
31
|
+
attr_accessor :routing_number
|
32
|
+
|
33
|
+
# The bank name.
|
34
|
+
attr_accessor :bank_name
|
35
|
+
|
36
|
+
# The bank account type
|
37
|
+
attr_accessor :account_type
|
38
|
+
|
39
|
+
# When the matching bank object was created in the third party system.
|
40
|
+
attr_accessor :remote_created_at
|
41
|
+
|
42
|
+
attr_accessor :remote_data
|
43
|
+
|
44
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
45
|
+
def self.attribute_map
|
46
|
+
{
|
47
|
+
:'id' => :'id',
|
48
|
+
:'remote_id' => :'remote_id',
|
49
|
+
:'employee' => :'employee',
|
50
|
+
:'account_number' => :'account_number',
|
51
|
+
:'routing_number' => :'routing_number',
|
52
|
+
:'bank_name' => :'bank_name',
|
53
|
+
:'account_type' => :'account_type',
|
54
|
+
:'remote_created_at' => :'remote_created_at',
|
55
|
+
:'remote_data' => :'remote_data'
|
56
|
+
}
|
57
|
+
end
|
58
|
+
|
59
|
+
# Returns all the JSON keys this model knows about
|
60
|
+
def self.acceptable_attributes
|
61
|
+
attribute_map.values
|
62
|
+
end
|
63
|
+
|
64
|
+
# Attribute type mapping.
|
65
|
+
def self.openapi_types
|
66
|
+
{
|
67
|
+
:'id' => :'String',
|
68
|
+
:'remote_id' => :'String',
|
69
|
+
:'employee' => :'String',
|
70
|
+
:'account_number' => :'String',
|
71
|
+
:'routing_number' => :'String',
|
72
|
+
:'bank_name' => :'String',
|
73
|
+
:'account_type' => :'AccountTypeEnum',
|
74
|
+
:'remote_created_at' => :'Time',
|
75
|
+
:'remote_data' => :'Array<RemoteData>'
|
76
|
+
}
|
77
|
+
end
|
78
|
+
|
79
|
+
# List of attributes with nullable: true
|
80
|
+
def self.openapi_nullable
|
81
|
+
Set.new([
|
82
|
+
:'remote_id',
|
83
|
+
:'employee',
|
84
|
+
:'account_number',
|
85
|
+
:'routing_number',
|
86
|
+
:'bank_name',
|
87
|
+
:'account_type',
|
88
|
+
:'remote_created_at',
|
89
|
+
:'remote_data'
|
90
|
+
])
|
91
|
+
end
|
92
|
+
|
93
|
+
# Initializes the object
|
94
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
95
|
+
def initialize(attributes = {})
|
96
|
+
if (!attributes.is_a?(Hash))
|
97
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MergeHRISClient::BankInfo` initialize method"
|
98
|
+
end
|
99
|
+
|
100
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
101
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
102
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
103
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MergeHRISClient::BankInfo`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
104
|
+
end
|
105
|
+
h[k.to_sym] = v
|
106
|
+
}
|
107
|
+
|
108
|
+
if attributes.key?(:'id')
|
109
|
+
self.id = attributes[:'id']
|
110
|
+
end
|
111
|
+
|
112
|
+
if attributes.key?(:'remote_id')
|
113
|
+
self.remote_id = attributes[:'remote_id']
|
114
|
+
end
|
115
|
+
|
116
|
+
if attributes.key?(:'employee')
|
117
|
+
self.employee = attributes[:'employee']
|
118
|
+
end
|
119
|
+
|
120
|
+
if attributes.key?(:'account_number')
|
121
|
+
self.account_number = attributes[:'account_number']
|
122
|
+
end
|
123
|
+
|
124
|
+
if attributes.key?(:'routing_number')
|
125
|
+
self.routing_number = attributes[:'routing_number']
|
126
|
+
end
|
127
|
+
|
128
|
+
if attributes.key?(:'bank_name')
|
129
|
+
self.bank_name = attributes[:'bank_name']
|
130
|
+
end
|
131
|
+
|
132
|
+
if attributes.key?(:'account_type')
|
133
|
+
self.account_type = attributes[:'account_type']
|
134
|
+
end
|
135
|
+
|
136
|
+
if attributes.key?(:'remote_created_at')
|
137
|
+
self.remote_created_at = attributes[:'remote_created_at']
|
138
|
+
end
|
139
|
+
|
140
|
+
if attributes.key?(:'remote_data')
|
141
|
+
if (value = attributes[:'remote_data']).is_a?(Array)
|
142
|
+
self.remote_data = value
|
143
|
+
end
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
147
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
148
|
+
# @return Array for valid properties with the reasons
|
149
|
+
def list_invalid_properties
|
150
|
+
invalid_properties = Array.new
|
151
|
+
if !@account_number.nil? && @account_number.to_s.length > 100
|
152
|
+
invalid_properties.push('invalid value for "account_number", the character length must be smaller than or equal to 100.')
|
153
|
+
end
|
154
|
+
|
155
|
+
invalid_properties
|
156
|
+
end
|
157
|
+
|
158
|
+
# Check to see if the all the properties in the model are valid
|
159
|
+
# @return true if the model is valid
|
160
|
+
def valid?
|
161
|
+
return false if !@account_number.nil? && @account_number.to_s.length > 100
|
162
|
+
true
|
163
|
+
end
|
164
|
+
|
165
|
+
# Custom attribute writer method with validation
|
166
|
+
# @param [Object] account_number Value to be assigned
|
167
|
+
def account_number=(account_number)
|
168
|
+
if !account_number.nil? && account_number.to_s.length > 100
|
169
|
+
fail ArgumentError, 'invalid value for "account_number", the character length must be smaller than or equal to 100.'
|
170
|
+
end
|
171
|
+
|
172
|
+
@account_number = account_number
|
173
|
+
end
|
174
|
+
|
175
|
+
# Checks equality by comparing each attribute.
|
176
|
+
# @param [Object] Object to be compared
|
177
|
+
def ==(o)
|
178
|
+
return true if self.equal?(o)
|
179
|
+
self.class == o.class &&
|
180
|
+
id == o.id &&
|
181
|
+
remote_id == o.remote_id &&
|
182
|
+
employee == o.employee &&
|
183
|
+
account_number == o.account_number &&
|
184
|
+
routing_number == o.routing_number &&
|
185
|
+
bank_name == o.bank_name &&
|
186
|
+
account_type == o.account_type &&
|
187
|
+
remote_created_at == o.remote_created_at &&
|
188
|
+
remote_data == o.remote_data
|
189
|
+
end
|
190
|
+
|
191
|
+
# @see the `==` method
|
192
|
+
# @param [Object] Object to be compared
|
193
|
+
def eql?(o)
|
194
|
+
self == o
|
195
|
+
end
|
196
|
+
|
197
|
+
# Calculates hash code according to all attributes.
|
198
|
+
# @return [Integer] Hash code
|
199
|
+
def hash
|
200
|
+
[id, remote_id, employee, account_number, routing_number, bank_name, account_type, remote_created_at, remote_data].hash
|
201
|
+
end
|
202
|
+
|
203
|
+
# Builds the object from hash
|
204
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
205
|
+
# @return [Object] Returns the model itself
|
206
|
+
def self.build_from_hash(attributes)
|
207
|
+
new.build_from_hash(attributes)
|
208
|
+
end
|
209
|
+
|
210
|
+
# Builds the object from hash
|
211
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
212
|
+
# @return [Object] Returns the model itself
|
213
|
+
def build_from_hash(attributes)
|
214
|
+
return nil unless attributes.is_a?(Hash)
|
215
|
+
self.class.openapi_types.each_pair do |key, type|
|
216
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
217
|
+
self.send("#{key}=", nil)
|
218
|
+
elsif type =~ /\AArray<(.*)>/i
|
219
|
+
# check to ensure the input is an array given that the attribute
|
220
|
+
# is documented as an array but the input is not
|
221
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
222
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
223
|
+
end
|
224
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
225
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
226
|
+
end
|
227
|
+
end
|
228
|
+
|
229
|
+
self
|
230
|
+
end
|
231
|
+
|
232
|
+
# Deserializes the data based on type
|
233
|
+
# @param string type Data type
|
234
|
+
# @param string value Value to be deserialized
|
235
|
+
# @return [Object] Deserialized data
|
236
|
+
def _deserialize(type, value)
|
237
|
+
case type.to_sym
|
238
|
+
when :Time
|
239
|
+
Time.parse(value)
|
240
|
+
when :Date
|
241
|
+
Date.parse(value)
|
242
|
+
when :String
|
243
|
+
value.to_s
|
244
|
+
when :Integer
|
245
|
+
value.to_i
|
246
|
+
when :Float
|
247
|
+
value.to_f
|
248
|
+
when :Boolean
|
249
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
250
|
+
true
|
251
|
+
else
|
252
|
+
false
|
253
|
+
end
|
254
|
+
when :Object
|
255
|
+
# generic object (usually a Hash), return directly
|
256
|
+
value
|
257
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
258
|
+
inner_type = Regexp.last_match[:inner_type]
|
259
|
+
value.map { |v| _deserialize(inner_type, v) }
|
260
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
261
|
+
k_type = Regexp.last_match[:k_type]
|
262
|
+
v_type = Regexp.last_match[:v_type]
|
263
|
+
{}.tap do |hash|
|
264
|
+
value.each do |k, v|
|
265
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
266
|
+
end
|
267
|
+
end
|
268
|
+
else # model
|
269
|
+
# models (e.g. Pet) or oneOf
|
270
|
+
klass = MergeHRISClient.const_get(type)
|
271
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
272
|
+
end
|
273
|
+
end
|
274
|
+
|
275
|
+
# Returns the string representation of the object
|
276
|
+
# @return [String] String presentation of the object
|
277
|
+
def to_s
|
278
|
+
to_hash.to_s
|
279
|
+
end
|
280
|
+
|
281
|
+
# to_body is an alias to to_hash (backward compatibility)
|
282
|
+
# @return [Hash] Returns the object in the form of hash
|
283
|
+
def to_body
|
284
|
+
to_hash
|
285
|
+
end
|
286
|
+
|
287
|
+
# Returns the object in the form of hash
|
288
|
+
# @return [Hash] Returns the object in the form of hash
|
289
|
+
def to_hash
|
290
|
+
hash = {}
|
291
|
+
self.class.attribute_map.each_pair do |attr, param|
|
292
|
+
value = self.send(attr)
|
293
|
+
if value.nil?
|
294
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
295
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
296
|
+
end
|
297
|
+
|
298
|
+
hash[param] = _to_hash(value)
|
299
|
+
end
|
300
|
+
hash
|
301
|
+
end
|
302
|
+
|
303
|
+
# Outputs non-array value in the form of hash
|
304
|
+
# For object, use to_hash. Otherwise, just return the value
|
305
|
+
# @param [Object] value Any valid value
|
306
|
+
# @return [Hash] Returns the value in the form of hash
|
307
|
+
def _to_hash(value)
|
308
|
+
if value.is_a?(Array)
|
309
|
+
value.compact.map { |v| _to_hash(v) }
|
310
|
+
elsif value.is_a?(Hash)
|
311
|
+
{}.tap do |hash|
|
312
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
313
|
+
end
|
314
|
+
elsif value.respond_to? :to_hash
|
315
|
+
value.to_hash
|
316
|
+
else
|
317
|
+
value
|
318
|
+
end
|
319
|
+
end
|
320
|
+
|
321
|
+
end
|
322
|
+
|
323
|
+
end
|
@@ -0,0 +1,36 @@
|
|
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
|
+
class CategoriesEnum
|
18
|
+
HRIS = "hris".freeze
|
19
|
+
ATS = "ats".freeze
|
20
|
+
ACCOUNTING = "accounting".freeze
|
21
|
+
|
22
|
+
# Builds the enum from string
|
23
|
+
# @param [String] The enum value in the form of the string
|
24
|
+
# @return [String] The enum value
|
25
|
+
def self.build_from_hash(value)
|
26
|
+
new.build_from_hash(value)
|
27
|
+
end
|
28
|
+
|
29
|
+
# Builds the enum from string
|
30
|
+
# @param [String] The enum value in the form of the string
|
31
|
+
# @return [String] The enum value
|
32
|
+
def build_from_hash(value)
|
33
|
+
value
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,36 @@
|
|
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
|
+
class CategoryEnum
|
18
|
+
HRIS = "hris".freeze
|
19
|
+
ATS = "ats".freeze
|
20
|
+
ACCOUNTING = "accounting".freeze
|
21
|
+
|
22
|
+
# Builds the enum from string
|
23
|
+
# @param [String] The enum value in the form of the string
|
24
|
+
# @return [String] The enum value
|
25
|
+
def self.build_from_hash(value)
|
26
|
+
new.build_from_hash(value)
|
27
|
+
end
|
28
|
+
|
29
|
+
# Builds the enum from string
|
30
|
+
# @param [String] The enum value in the form of the string
|
31
|
+
# @return [String] The enum value
|
32
|
+
def build_from_hash(value)
|
33
|
+
value
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -26,6 +26,8 @@ module MergeHRISClient
|
|
26
26
|
|
27
27
|
attr_accessor :headers
|
28
28
|
|
29
|
+
attr_accessor :request_format
|
30
|
+
|
29
31
|
# Attribute mapping from ruby-style variable name to JSON key.
|
30
32
|
def self.attribute_map
|
31
33
|
{
|
@@ -33,7 +35,8 @@ module MergeHRISClient
|
|
33
35
|
:'path' => :'path',
|
34
36
|
:'base_url_override' => :'base_url_override',
|
35
37
|
:'data' => :'data',
|
36
|
-
:'headers' => :'headers'
|
38
|
+
:'headers' => :'headers',
|
39
|
+
:'request_format' => :'request_format'
|
37
40
|
}
|
38
41
|
end
|
39
42
|
|
@@ -48,8 +51,9 @@ module MergeHRISClient
|
|
48
51
|
:'method' => :'MethodEnum',
|
49
52
|
:'path' => :'String',
|
50
53
|
:'base_url_override' => :'String',
|
51
|
-
:'data' => :'
|
52
|
-
:'headers' => :'Hash<String, Object>'
|
54
|
+
:'data' => :'String',
|
55
|
+
:'headers' => :'Hash<String, Object>',
|
56
|
+
:'request_format' => :'RequestFormatEnum'
|
53
57
|
}
|
54
58
|
end
|
55
59
|
|
@@ -58,7 +62,8 @@ module MergeHRISClient
|
|
58
62
|
Set.new([
|
59
63
|
:'base_url_override',
|
60
64
|
:'data',
|
61
|
-
:'headers'
|
65
|
+
:'headers',
|
66
|
+
:'request_format'
|
62
67
|
])
|
63
68
|
end
|
64
69
|
|
@@ -90,9 +95,7 @@ module MergeHRISClient
|
|
90
95
|
end
|
91
96
|
|
92
97
|
if attributes.key?(:'data')
|
93
|
-
|
94
|
-
self.data = value
|
95
|
-
end
|
98
|
+
self.data = attributes[:'data']
|
96
99
|
end
|
97
100
|
|
98
101
|
if attributes.key?(:'headers')
|
@@ -100,6 +103,10 @@ module MergeHRISClient
|
|
100
103
|
self.headers = value
|
101
104
|
end
|
102
105
|
end
|
106
|
+
|
107
|
+
if attributes.key?(:'request_format')
|
108
|
+
self.request_format = attributes[:'request_format']
|
109
|
+
end
|
103
110
|
end
|
104
111
|
|
105
112
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -114,6 +121,18 @@ module MergeHRISClient
|
|
114
121
|
invalid_properties.push('invalid value for "path", path cannot be nil.')
|
115
122
|
end
|
116
123
|
|
124
|
+
if @path.to_s.length < 1
|
125
|
+
invalid_properties.push('invalid value for "path", the character length must be great than or equal to 1.')
|
126
|
+
end
|
127
|
+
|
128
|
+
if !@base_url_override.nil? && @base_url_override.to_s.length < 1
|
129
|
+
invalid_properties.push('invalid value for "base_url_override", the character length must be great than or equal to 1.')
|
130
|
+
end
|
131
|
+
|
132
|
+
if !@data.nil? && @data.to_s.length < 1
|
133
|
+
invalid_properties.push('invalid value for "data", the character length must be great than or equal to 1.')
|
134
|
+
end
|
135
|
+
|
117
136
|
invalid_properties
|
118
137
|
end
|
119
138
|
|
@@ -122,9 +141,46 @@ module MergeHRISClient
|
|
122
141
|
def valid?
|
123
142
|
return false if @method.nil?
|
124
143
|
return false if @path.nil?
|
144
|
+
return false if @path.to_s.length < 1
|
145
|
+
return false if !@base_url_override.nil? && @base_url_override.to_s.length < 1
|
146
|
+
return false if !@data.nil? && @data.to_s.length < 1
|
125
147
|
true
|
126
148
|
end
|
127
149
|
|
150
|
+
# Custom attribute writer method with validation
|
151
|
+
# @param [Object] path Value to be assigned
|
152
|
+
def path=(path)
|
153
|
+
if path.nil?
|
154
|
+
fail ArgumentError, 'path cannot be nil'
|
155
|
+
end
|
156
|
+
|
157
|
+
if path.to_s.length < 1
|
158
|
+
fail ArgumentError, 'invalid value for "path", the character length must be great than or equal to 1.'
|
159
|
+
end
|
160
|
+
|
161
|
+
@path = path
|
162
|
+
end
|
163
|
+
|
164
|
+
# Custom attribute writer method with validation
|
165
|
+
# @param [Object] base_url_override Value to be assigned
|
166
|
+
def base_url_override=(base_url_override)
|
167
|
+
if !base_url_override.nil? && base_url_override.to_s.length < 1
|
168
|
+
fail ArgumentError, 'invalid value for "base_url_override", the character length must be great than or equal to 1.'
|
169
|
+
end
|
170
|
+
|
171
|
+
@base_url_override = base_url_override
|
172
|
+
end
|
173
|
+
|
174
|
+
# Custom attribute writer method with validation
|
175
|
+
# @param [Object] data Value to be assigned
|
176
|
+
def data=(data)
|
177
|
+
if !data.nil? && data.to_s.length < 1
|
178
|
+
fail ArgumentError, 'invalid value for "data", the character length must be great than or equal to 1.'
|
179
|
+
end
|
180
|
+
|
181
|
+
@data = data
|
182
|
+
end
|
183
|
+
|
128
184
|
# Checks equality by comparing each attribute.
|
129
185
|
# @param [Object] Object to be compared
|
130
186
|
def ==(o)
|
@@ -134,7 +190,8 @@ module MergeHRISClient
|
|
134
190
|
path == o.path &&
|
135
191
|
base_url_override == o.base_url_override &&
|
136
192
|
data == o.data &&
|
137
|
-
headers == o.headers
|
193
|
+
headers == o.headers &&
|
194
|
+
request_format == o.request_format
|
138
195
|
end
|
139
196
|
|
140
197
|
# @see the `==` method
|
@@ -146,7 +203,7 @@ module MergeHRISClient
|
|
146
203
|
# Calculates hash code according to all attributes.
|
147
204
|
# @return [Integer] Hash code
|
148
205
|
def hash
|
149
|
-
[method, path, base_url_override, data, headers].hash
|
206
|
+
[method, path, base_url_override, data, headers, request_format].hash
|
150
207
|
end
|
151
208
|
|
152
209
|
# Builds the object from hash
|
@@ -33,7 +33,7 @@ module MergeHRISClient
|
|
33
33
|
# The employee's last name.
|
34
34
|
attr_accessor :last_name
|
35
35
|
|
36
|
-
# The employee's full name, to use for display purposes.
|
36
|
+
# The employee's full name, to use for display purposes. If a preferred first name is available, the full name will include the preferred first name.
|
37
37
|
attr_accessor :display_full_name
|
38
38
|
|
39
39
|
# The employee's work email.
|
@@ -60,6 +60,9 @@ module MergeHRISClient
|
|
60
60
|
# The employee's team.
|
61
61
|
attr_accessor :team
|
62
62
|
|
63
|
+
# The employee's pay group
|
64
|
+
attr_accessor :pay_group
|
65
|
+
|
63
66
|
# The employee's social security number.
|
64
67
|
attr_accessor :ssn
|
65
68
|
|
@@ -75,10 +78,10 @@ module MergeHRISClient
|
|
75
78
|
# The employee's date of birth.
|
76
79
|
attr_accessor :date_of_birth
|
77
80
|
|
78
|
-
# The employee
|
81
|
+
# 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.
|
79
82
|
attr_accessor :hire_date
|
80
83
|
|
81
|
-
# The employee
|
84
|
+
# The date that the employee started working. If an employee has multiple start dates from previous employments, this represents the most recent start date.
|
82
85
|
attr_accessor :start_date
|
83
86
|
|
84
87
|
# The employment status of the employee.
|
@@ -92,6 +95,9 @@ module MergeHRISClient
|
|
92
95
|
|
93
96
|
attr_accessor :remote_data
|
94
97
|
|
98
|
+
# Custom fields configured for a given model.
|
99
|
+
attr_accessor :custom_fields
|
100
|
+
|
95
101
|
# Attribute mapping from ruby-style variable name to JSON key.
|
96
102
|
def self.attribute_map
|
97
103
|
{
|
@@ -110,6 +116,7 @@ module MergeHRISClient
|
|
110
116
|
:'work_location' => :'work_location',
|
111
117
|
:'manager' => :'manager',
|
112
118
|
:'team' => :'team',
|
119
|
+
:'pay_group' => :'pay_group',
|
113
120
|
:'ssn' => :'ssn',
|
114
121
|
:'gender' => :'gender',
|
115
122
|
:'ethnicity' => :'ethnicity',
|
@@ -120,7 +127,8 @@ module MergeHRISClient
|
|
120
127
|
:'employment_status' => :'employment_status',
|
121
128
|
:'termination_date' => :'termination_date',
|
122
129
|
:'avatar' => :'avatar',
|
123
|
-
:'remote_data' => :'remote_data'
|
130
|
+
:'remote_data' => :'remote_data',
|
131
|
+
:'custom_fields' => :'custom_fields'
|
124
132
|
}
|
125
133
|
end
|
126
134
|
|
@@ -147,6 +155,7 @@ module MergeHRISClient
|
|
147
155
|
:'work_location' => :'String',
|
148
156
|
:'manager' => :'String',
|
149
157
|
:'team' => :'String',
|
158
|
+
:'pay_group' => :'String',
|
150
159
|
:'ssn' => :'String',
|
151
160
|
:'gender' => :'GenderEnum',
|
152
161
|
:'ethnicity' => :'EthnicityEnum',
|
@@ -157,7 +166,8 @@ module MergeHRISClient
|
|
157
166
|
:'employment_status' => :'EmploymentStatusEnum',
|
158
167
|
:'termination_date' => :'Time',
|
159
168
|
:'avatar' => :'String',
|
160
|
-
:'remote_data' => :'Array<RemoteData>'
|
169
|
+
:'remote_data' => :'Array<RemoteData>',
|
170
|
+
:'custom_fields' => :'Hash<String, Object>'
|
161
171
|
}
|
162
172
|
end
|
163
173
|
|
@@ -177,6 +187,7 @@ module MergeHRISClient
|
|
177
187
|
:'work_location',
|
178
188
|
:'manager',
|
179
189
|
:'team',
|
190
|
+
:'pay_group',
|
180
191
|
:'ssn',
|
181
192
|
:'gender',
|
182
193
|
:'ethnicity',
|
@@ -187,7 +198,8 @@ module MergeHRISClient
|
|
187
198
|
:'employment_status',
|
188
199
|
:'termination_date',
|
189
200
|
:'avatar',
|
190
|
-
:'remote_data'
|
201
|
+
:'remote_data',
|
202
|
+
:'custom_fields'
|
191
203
|
])
|
192
204
|
end
|
193
205
|
|
@@ -268,6 +280,10 @@ module MergeHRISClient
|
|
268
280
|
self.team = attributes[:'team']
|
269
281
|
end
|
270
282
|
|
283
|
+
if attributes.key?(:'pay_group')
|
284
|
+
self.pay_group = attributes[:'pay_group']
|
285
|
+
end
|
286
|
+
|
271
287
|
if attributes.key?(:'ssn')
|
272
288
|
self.ssn = attributes[:'ssn']
|
273
289
|
end
|
@@ -313,6 +329,12 @@ module MergeHRISClient
|
|
313
329
|
self.remote_data = value
|
314
330
|
end
|
315
331
|
end
|
332
|
+
|
333
|
+
if attributes.key?(:'custom_fields')
|
334
|
+
if (value = attributes[:'custom_fields']).is_a?(Hash)
|
335
|
+
self.custom_fields = value
|
336
|
+
end
|
337
|
+
end
|
316
338
|
end
|
317
339
|
|
318
340
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -408,6 +430,7 @@ module MergeHRISClient
|
|
408
430
|
work_location == o.work_location &&
|
409
431
|
manager == o.manager &&
|
410
432
|
team == o.team &&
|
433
|
+
pay_group == o.pay_group &&
|
411
434
|
ssn == o.ssn &&
|
412
435
|
gender == o.gender &&
|
413
436
|
ethnicity == o.ethnicity &&
|
@@ -418,7 +441,8 @@ module MergeHRISClient
|
|
418
441
|
employment_status == o.employment_status &&
|
419
442
|
termination_date == o.termination_date &&
|
420
443
|
avatar == o.avatar &&
|
421
|
-
remote_data == o.remote_data
|
444
|
+
remote_data == o.remote_data &&
|
445
|
+
custom_fields == o.custom_fields
|
422
446
|
end
|
423
447
|
|
424
448
|
# @see the `==` method
|
@@ -430,7 +454,7 @@ module MergeHRISClient
|
|
430
454
|
# Calculates hash code according to all attributes.
|
431
455
|
# @return [Integer] Hash code
|
432
456
|
def hash
|
433
|
-
[id, remote_id, employee_number, company, first_name, last_name, display_full_name, work_email, personal_email, mobile_phone_number, employments, home_location, work_location, manager, team, ssn, gender, ethnicity, marital_status, date_of_birth, hire_date, start_date, employment_status, termination_date, avatar, remote_data].hash
|
457
|
+
[id, remote_id, employee_number, company, first_name, last_name, display_full_name, work_email, personal_email, mobile_phone_number, employments, home_location, work_location, manager, team, pay_group, ssn, gender, ethnicity, marital_status, date_of_birth, hire_date, start_date, employment_status, termination_date, avatar, remote_data, custom_fields].hash
|
434
458
|
end
|
435
459
|
|
436
460
|
# Builds the object from hash
|