merge_hris_client 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/README.md +179 -0
- data/Rakefile +10 -0
- data/config.json +1 -0
- data/docs/AccountIntegration.md +28 -0
- data/docs/AccountToken.md +18 -0
- data/docs/AccountTokenApi.md +79 -0
- data/docs/AvailableActions.md +22 -0
- data/docs/AvailableActionsApi.md +79 -0
- data/docs/Benefit.md +32 -0
- data/docs/BenefitPlanTypeEnum.md +15 -0
- data/docs/BenefitsApi.md +181 -0
- data/docs/CompaniesApi.md +175 -0
- data/docs/Company.md +28 -0
- data/docs/CountryEnum.md +15 -0
- data/docs/DataPassthrough.md +24 -0
- data/docs/DataPassthroughRequest.md +26 -0
- data/docs/Deduction.md +28 -0
- data/docs/Earning.md +26 -0
- data/docs/Employee.md +66 -0
- data/docs/EmployeePayrollRun.md +42 -0
- data/docs/EmployeePayrollRunsApi.md +183 -0
- data/docs/EmployeesApi.md +187 -0
- data/docs/Employment.md +38 -0
- data/docs/EmploymentStatusEnum.md +15 -0
- data/docs/EmploymentTypeEnum.md +15 -0
- data/docs/EmploymentsApi.md +177 -0
- data/docs/EndUserDetails.md +24 -0
- data/docs/EndUserDetailsRequest.md +26 -0
- data/docs/EthnicityEnum.md +15 -0
- data/docs/FlsaStatusEnum.md +15 -0
- data/docs/GenderEnum.md +15 -0
- data/docs/GenerateKeyApi.md +79 -0
- data/docs/GenerateRemoteKeyRequest.md +18 -0
- data/docs/LinkToken.md +20 -0
- data/docs/LinkTokenApi.md +79 -0
- data/docs/Location.md +36 -0
- data/docs/LocationsApi.md +175 -0
- data/docs/MaritalStatusEnum.md +15 -0
- data/docs/MethodEnum.md +15 -0
- data/docs/ModelOperation.md +22 -0
- data/docs/NullEnum.md +15 -0
- data/docs/PaginatedBenefitList.md +22 -0
- data/docs/PaginatedCompanyList.md +22 -0
- data/docs/PaginatedEmployeeList.md +22 -0
- data/docs/PaginatedEmployeePayrollRunList.md +22 -0
- data/docs/PaginatedEmploymentList.md +22 -0
- data/docs/PaginatedLocationList.md +22 -0
- data/docs/PaginatedPayrollRunList.md +22 -0
- data/docs/PaginatedTeamList.md +22 -0
- data/docs/PaginatedTimeOffList.md +22 -0
- data/docs/PassthroughApi.md +81 -0
- data/docs/PayCurrencyEnum.md +15 -0
- data/docs/PayFrequencyEnum.md +15 -0
- data/docs/PayPeriodEnum.md +15 -0
- data/docs/PayrollRun.md +32 -0
- data/docs/PayrollRunsApi.md +175 -0
- data/docs/RegenerateKeyApi.md +79 -0
- data/docs/RemoteData.md +20 -0
- data/docs/RemoteKey.md +20 -0
- data/docs/RemoteKeyForRegeneration.md +18 -0
- data/docs/RemoteKeyForRegenerationRequest.md +18 -0
- data/docs/RemoteResponse.md +26 -0
- data/docs/RequestTypeEnum.md +15 -0
- data/docs/RunStateEnum.md +15 -0
- data/docs/RunTypeEnum.md +15 -0
- data/docs/StateEnum.md +15 -0
- data/docs/SyncStatus.md +28 -0
- data/docs/SyncStatusApi.md +79 -0
- data/docs/Tax.md +28 -0
- data/docs/Team.md +24 -0
- data/docs/TeamsApi.md +175 -0
- data/docs/TimeOff.md +36 -0
- data/docs/TimeOffApi.md +183 -0
- data/docs/TimeOffStatusEnum.md +15 -0
- data/docs/TypeEnum.md +15 -0
- data/docs/UnitsEnum.md +15 -0
- data/git_push.sh +58 -0
- data/lib/merge_hris_client.rb +110 -0
- data/lib/merge_hris_client/api/account_token_api.rb +83 -0
- data/lib/merge_hris_client/api/available_actions_api.rb +84 -0
- data/lib/merge_hris_client/api/benefits_api.rb +196 -0
- data/lib/merge_hris_client/api/companies_api.rb +179 -0
- data/lib/merge_hris_client/api/employee_payroll_runs_api.rb +199 -0
- data/lib/merge_hris_client/api/employees_api.rb +205 -0
- data/lib/merge_hris_client/api/employments_api.rb +182 -0
- data/lib/merge_hris_client/api/generate_key_api.rb +85 -0
- data/lib/merge_hris_client/api/link_token_api.rb +85 -0
- data/lib/merge_hris_client/api/locations_api.rb +179 -0
- data/lib/merge_hris_client/api/passthrough_api.rb +92 -0
- data/lib/merge_hris_client/api/payroll_runs_api.rb +179 -0
- data/lib/merge_hris_client/api/regenerate_key_api.rb +85 -0
- data/lib/merge_hris_client/api/sync_status_api.rb +84 -0
- data/lib/merge_hris_client/api/teams_api.rb +179 -0
- data/lib/merge_hris_client/api/time_off_api.rb +199 -0
- data/lib/merge_hris_client/api_client.rb +390 -0
- data/lib/merge_hris_client/api_error.rb +57 -0
- data/lib/merge_hris_client/configuration.rb +279 -0
- data/lib/merge_hris_client/models/account_integration.rb +325 -0
- data/lib/merge_hris_client/models/account_token.rb +223 -0
- data/lib/merge_hris_client/models/available_actions.rb +249 -0
- data/lib/merge_hris_client/models/benefit.rb +297 -0
- data/lib/merge_hris_client/models/benefit_plan_type_enum.rb +56 -0
- data/lib/merge_hris_client/models/company.rb +277 -0
- data/lib/merge_hris_client/models/country_enum.rb +282 -0
- data/lib/merge_hris_client/models/data_passthrough.rb +262 -0
- data/lib/merge_hris_client/models/data_passthrough_request.rb +271 -0
- data/lib/merge_hris_client/models/deduction.rb +275 -0
- data/lib/merge_hris_client/models/earning.rb +264 -0
- data/lib/merge_hris_client/models/employee.rb +544 -0
- data/lib/merge_hris_client/models/employee_payroll_run.rb +352 -0
- data/lib/merge_hris_client/models/employment.rb +330 -0
- data/lib/merge_hris_client/models/employment_status_enum.rb +37 -0
- data/lib/merge_hris_client/models/employment_type_enum.rb +39 -0
- data/lib/merge_hris_client/models/end_user_details.rb +289 -0
- data/lib/merge_hris_client/models/end_user_details_request.rb +298 -0
- data/lib/merge_hris_client/models/ethnicity_enum.rb +42 -0
- data/lib/merge_hris_client/models/flsa_status_enum.rb +38 -0
- data/lib/merge_hris_client/models/gender_enum.rb +39 -0
- data/lib/merge_hris_client/models/generate_remote_key_request.rb +224 -0
- data/lib/merge_hris_client/models/link_token.rb +237 -0
- data/lib/merge_hris_client/models/location.rb +319 -0
- data/lib/merge_hris_client/models/marital_status_enum.rb +39 -0
- data/lib/merge_hris_client/models/method_enum.rb +41 -0
- data/lib/merge_hris_client/models/model_operation.rb +256 -0
- data/lib/merge_hris_client/models/paginated_benefit_list.rb +240 -0
- data/lib/merge_hris_client/models/paginated_company_list.rb +240 -0
- data/lib/merge_hris_client/models/paginated_employee_list.rb +240 -0
- data/lib/merge_hris_client/models/paginated_employee_payroll_run_list.rb +240 -0
- data/lib/merge_hris_client/models/paginated_employment_list.rb +240 -0
- data/lib/merge_hris_client/models/paginated_location_list.rb +240 -0
- data/lib/merge_hris_client/models/paginated_payroll_run_list.rb +240 -0
- data/lib/merge_hris_client/models/paginated_team_list.rb +240 -0
- data/lib/merge_hris_client/models/paginated_time_off_list.rb +240 -0
- data/lib/merge_hris_client/models/pay_currency_enum.rb +340 -0
- data/lib/merge_hris_client/models/pay_frequency_enum.rb +43 -0
- data/lib/merge_hris_client/models/pay_period_enum.rb +42 -0
- data/lib/merge_hris_client/models/payroll_run.rb +297 -0
- data/lib/merge_hris_client/models/remote_data.rb +234 -0
- data/lib/merge_hris_client/models/remote_key.rb +238 -0
- data/lib/merge_hris_client/models/remote_key_for_regeneration.rb +224 -0
- data/lib/merge_hris_client/models/remote_key_for_regeneration_request.rb +224 -0
- data/lib/merge_hris_client/models/remote_response.rb +279 -0
- data/lib/merge_hris_client/models/request_type_enum.rb +38 -0
- data/lib/merge_hris_client/models/run_state_enum.rb +39 -0
- data/lib/merge_hris_client/models/run_type_enum.rb +49 -0
- data/lib/merge_hris_client/models/state_enum.rb +93 -0
- data/lib/merge_hris_client/models/sync_status.rb +294 -0
- data/lib/merge_hris_client/models/tax.rb +275 -0
- data/lib/merge_hris_client/models/team.rb +253 -0
- data/lib/merge_hris_client/models/time_off.rb +319 -0
- data/lib/merge_hris_client/models/time_off_status_enum.rb +39 -0
- data/lib/merge_hris_client/models/type_enum.rb +38 -0
- data/lib/merge_hris_client/models/units_enum.rb +36 -0
- data/lib/merge_hris_client/version.rb +15 -0
- data/merge_hris_client-1.0.0.gem +0 -0
- data/merge_hris_client.gemspec +38 -0
- data/pull_request_template.md +20 -0
- data/spec/api/account_token_api_spec.rb +46 -0
- data/spec/api/available_actions_api_spec.rb +46 -0
- data/spec/api/benefits_api_spec.rb +68 -0
- data/spec/api/companies_api_spec.rb +65 -0
- data/spec/api/employee_payroll_runs_api_spec.rb +69 -0
- data/spec/api/employees_api_spec.rb +71 -0
- data/spec/api/employments_api_spec.rb +66 -0
- data/spec/api/link_token_api_spec.rb +46 -0
- data/spec/api/locations_api_spec.rb +65 -0
- data/spec/api/passthrough_api_spec.rb +48 -0
- data/spec/api/payroll_runs_api_spec.rb +65 -0
- data/spec/api/regenerate_key_api_spec.rb +46 -0
- data/spec/api/teams_api_spec.rb +65 -0
- data/spec/api/time_off_api_spec.rb +69 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/account_integration_spec.rb +58 -0
- data/spec/models/account_token_spec.rb +34 -0
- data/spec/models/available_actions_spec.rb +34 -0
- data/spec/models/benefit_plan_type_enum_spec.rb +28 -0
- data/spec/models/benefit_spec.rb +70 -0
- data/spec/models/company_spec.rb +58 -0
- data/spec/models/country_enum_spec.rb +28 -0
- data/spec/models/data_passthrough_request_spec.rb +58 -0
- data/spec/models/data_passthrough_spec.rb +52 -0
- data/spec/models/deduction_spec.rb +58 -0
- data/spec/models/earning_spec.rb +52 -0
- data/spec/models/employee_payroll_run_spec.rb +100 -0
- data/spec/models/employee_spec.rb +166 -0
- data/spec/models/employment_spec.rb +88 -0
- data/spec/models/employment_status_enum_spec.rb +28 -0
- data/spec/models/employment_type_enum_spec.rb +28 -0
- data/spec/models/end_user_details_request_spec.rb +56 -0
- data/spec/models/end_user_details_spec.rb +56 -0
- data/spec/models/ethnicity_enum_spec.rb +28 -0
- data/spec/models/flsa_status_enum_spec.rb +28 -0
- data/spec/models/gender_enum_spec.rb +28 -0
- data/spec/models/link_token_spec.rb +40 -0
- data/spec/models/location_spec.rb +82 -0
- data/spec/models/marital_status_enum_spec.rb +28 -0
- data/spec/models/method_enum_spec.rb +28 -0
- data/spec/models/model_operation_spec.rb +40 -0
- data/spec/models/paginated_benefit_list_spec.rb +46 -0
- data/spec/models/paginated_company_list_spec.rb +46 -0
- data/spec/models/paginated_employee_list_spec.rb +46 -0
- data/spec/models/paginated_employee_payroll_run_list_spec.rb +46 -0
- data/spec/models/paginated_employment_list_spec.rb +46 -0
- data/spec/models/paginated_location_list_spec.rb +46 -0
- data/spec/models/paginated_payroll_run_list_spec.rb +46 -0
- data/spec/models/paginated_team_list_spec.rb +46 -0
- data/spec/models/paginated_time_off_list_spec.rb +46 -0
- data/spec/models/pay_currency_enum_spec.rb +28 -0
- data/spec/models/pay_frequency_enum_spec.rb +28 -0
- data/spec/models/pay_period_enum_spec.rb +28 -0
- data/spec/models/payroll_run_spec.rb +70 -0
- data/spec/models/remote_data_spec.rb +40 -0
- data/spec/models/remote_key_for_regeneration_request_spec.rb +34 -0
- data/spec/models/remote_key_for_regeneration_spec.rb +34 -0
- data/spec/models/remote_key_spec.rb +40 -0
- data/spec/models/remote_response_spec.rb +58 -0
- data/spec/models/request_type_enum_spec.rb +28 -0
- data/spec/models/run_state_enum_spec.rb +28 -0
- data/spec/models/run_type_enum_spec.rb +28 -0
- data/spec/models/state_enum_spec.rb +28 -0
- data/spec/models/tax_spec.rb +58 -0
- data/spec/models/team_spec.rb +46 -0
- data/spec/models/time_off_spec.rb +82 -0
- data/spec/models/time_off_status_enum_spec.rb +28 -0
- data/spec/models/type_enum_spec.rb +28 -0
- data/spec/models/units_enum_spec.rb +28 -0
- data/spec/spec_helper.rb +111 -0
- data/test_ruby.rb +30 -0
- metadata +385 -0
@@ -0,0 +1,56 @@
|
|
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.0.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module MergeHRISClient
|
17
|
+
class BenefitPlanTypeEnum
|
18
|
+
MEDICAL = "MEDICAL".freeze
|
19
|
+
DENTAL = "DENTAL".freeze
|
20
|
+
VISION = "VISION".freeze
|
21
|
+
HSA = "HSA".freeze
|
22
|
+
FSA_MEDICAL = "FSA_MEDICAL".freeze
|
23
|
+
FSA_DEPENDENT_CARE = "FSA_DEPENDENT_CARE".freeze
|
24
|
+
SIMPLE_IRA = "SIMPLE_IRA".freeze
|
25
|
+
N401_K = "_401K".freeze
|
26
|
+
ROTH_401_K = "ROTH_401K".freeze
|
27
|
+
OTHER_NON_TAXABLE = "OTHER_NON_TAXABLE".freeze
|
28
|
+
COMMUTER_TRANSIT = "COMMUTER_TRANSIT".freeze
|
29
|
+
COMMUTER_PARKING = "COMMUTER_PARKING".freeze
|
30
|
+
N401_K_LOAN_PAYMENT = "_401K_LOAN_PAYMENT".freeze
|
31
|
+
SHORT_DISABILITY = "SHORT_DISABILITY".freeze
|
32
|
+
LONG_DISABILITY = "LONG_DISABILITY".freeze
|
33
|
+
LIFE = "LIFE".freeze
|
34
|
+
SEP_IRA = "SEP_IRA".freeze
|
35
|
+
SARSEP = "SARSEP".freeze
|
36
|
+
CUSTOM_TAXABLE = "CUSTOM_TAXABLE".freeze
|
37
|
+
N403_B = "_403B".freeze
|
38
|
+
ROTH_403_B = "ROTH_403B".freeze
|
39
|
+
STUDENT_LOAN = "STUDENT_LOAN".freeze
|
40
|
+
|
41
|
+
# Builds the enum from string
|
42
|
+
# @param [String] The enum value in the form of the string
|
43
|
+
# @return [String] The enum value
|
44
|
+
def self.build_from_hash(value)
|
45
|
+
new.build_from_hash(value)
|
46
|
+
end
|
47
|
+
|
48
|
+
# Builds the enum from string
|
49
|
+
# @param [String] The enum value in the form of the string
|
50
|
+
# @return [String] The enum value
|
51
|
+
def build_from_hash(value)
|
52
|
+
constantValues = BenefitPlanTypeEnum.constants.select { |c| BenefitPlanTypeEnum::const_get(c) == value }
|
53
|
+
value
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,277 @@
|
|
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.0.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module MergeHRISClient
|
17
|
+
# # The Company Object ### Description The `Company` object is used to represent a Company. ### Usage Example Fetch from the `LIST Companies` endpoint and filter by `ID` to show all companies.
|
18
|
+
class Company
|
19
|
+
attr_accessor :id
|
20
|
+
|
21
|
+
# The third-party API ID of the matching object.
|
22
|
+
attr_accessor :remote_id
|
23
|
+
|
24
|
+
# The company's legal name.
|
25
|
+
attr_accessor :legal_name
|
26
|
+
|
27
|
+
# The company's display name.
|
28
|
+
attr_accessor :display_name
|
29
|
+
|
30
|
+
# The company's Employer Identification Numbers.
|
31
|
+
attr_accessor :eins
|
32
|
+
|
33
|
+
attr_accessor :remote_data
|
34
|
+
|
35
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
36
|
+
def self.attribute_map
|
37
|
+
{
|
38
|
+
:'id' => :'id',
|
39
|
+
:'remote_id' => :'remote_id',
|
40
|
+
:'legal_name' => :'legal_name',
|
41
|
+
:'display_name' => :'display_name',
|
42
|
+
:'eins' => :'eins',
|
43
|
+
:'remote_data' => :'remote_data'
|
44
|
+
}
|
45
|
+
end
|
46
|
+
|
47
|
+
# Returns all the JSON keys this model knows about
|
48
|
+
def self.acceptable_attributes
|
49
|
+
attribute_map.values
|
50
|
+
end
|
51
|
+
|
52
|
+
# Attribute type mapping.
|
53
|
+
def self.openapi_types
|
54
|
+
{
|
55
|
+
:'id' => :'String',
|
56
|
+
:'remote_id' => :'String',
|
57
|
+
:'legal_name' => :'String',
|
58
|
+
:'display_name' => :'String',
|
59
|
+
:'eins' => :'Array<String>',
|
60
|
+
:'remote_data' => :'Array<RemoteData>'
|
61
|
+
}
|
62
|
+
end
|
63
|
+
|
64
|
+
# List of attributes with nullable: true
|
65
|
+
def self.openapi_nullable
|
66
|
+
Set.new([
|
67
|
+
:'remote_id',
|
68
|
+
:'legal_name',
|
69
|
+
:'display_name',
|
70
|
+
:'eins',
|
71
|
+
:'remote_data'
|
72
|
+
])
|
73
|
+
end
|
74
|
+
|
75
|
+
# Initializes the object
|
76
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
77
|
+
def initialize(attributes = {})
|
78
|
+
if (!attributes.is_a?(Hash))
|
79
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MergeHRISClient::Company` initialize method"
|
80
|
+
end
|
81
|
+
|
82
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
83
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
84
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
85
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MergeHRISClient::Company`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
86
|
+
end
|
87
|
+
h[k.to_sym] = v
|
88
|
+
}
|
89
|
+
|
90
|
+
if attributes.key?(:'id')
|
91
|
+
self.id = attributes[:'id']
|
92
|
+
end
|
93
|
+
|
94
|
+
if attributes.key?(:'remote_id')
|
95
|
+
self.remote_id = attributes[:'remote_id']
|
96
|
+
end
|
97
|
+
|
98
|
+
if attributes.key?(:'legal_name')
|
99
|
+
self.legal_name = attributes[:'legal_name']
|
100
|
+
end
|
101
|
+
|
102
|
+
if attributes.key?(:'display_name')
|
103
|
+
self.display_name = attributes[:'display_name']
|
104
|
+
end
|
105
|
+
|
106
|
+
if attributes.key?(:'eins')
|
107
|
+
if (value = attributes[:'eins']).is_a?(Array)
|
108
|
+
self.eins = value
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
if attributes.key?(:'remote_data')
|
113
|
+
if (value = attributes[:'remote_data']).is_a?(Array)
|
114
|
+
self.remote_data = value
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
120
|
+
# @return Array for valid properties with the reasons
|
121
|
+
def list_invalid_properties
|
122
|
+
invalid_properties = Array.new
|
123
|
+
invalid_properties
|
124
|
+
end
|
125
|
+
|
126
|
+
# Check to see if the all the properties in the model are valid
|
127
|
+
# @return true if the model is valid
|
128
|
+
def valid?
|
129
|
+
true
|
130
|
+
end
|
131
|
+
|
132
|
+
# Checks equality by comparing each attribute.
|
133
|
+
# @param [Object] Object to be compared
|
134
|
+
def ==(o)
|
135
|
+
return true if self.equal?(o)
|
136
|
+
self.class == o.class &&
|
137
|
+
id == o.id &&
|
138
|
+
remote_id == o.remote_id &&
|
139
|
+
legal_name == o.legal_name &&
|
140
|
+
display_name == o.display_name &&
|
141
|
+
eins == o.eins &&
|
142
|
+
remote_data == o.remote_data
|
143
|
+
end
|
144
|
+
|
145
|
+
# @see the `==` method
|
146
|
+
# @param [Object] Object to be compared
|
147
|
+
def eql?(o)
|
148
|
+
self == o
|
149
|
+
end
|
150
|
+
|
151
|
+
# Calculates hash code according to all attributes.
|
152
|
+
# @return [Integer] Hash code
|
153
|
+
def hash
|
154
|
+
[id, remote_id, legal_name, display_name, eins, remote_data].hash
|
155
|
+
end
|
156
|
+
|
157
|
+
# Builds the object from hash
|
158
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
159
|
+
# @return [Object] Returns the model itself
|
160
|
+
def self.build_from_hash(attributes)
|
161
|
+
new.build_from_hash(attributes)
|
162
|
+
end
|
163
|
+
|
164
|
+
# Builds the object from hash
|
165
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
166
|
+
# @return [Object] Returns the model itself
|
167
|
+
def build_from_hash(attributes)
|
168
|
+
return nil unless attributes.is_a?(Hash)
|
169
|
+
self.class.openapi_types.each_pair do |key, type|
|
170
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
171
|
+
self.send("#{key}=", nil)
|
172
|
+
elsif type =~ /\AArray<(.*)>/i
|
173
|
+
# check to ensure the input is an array given that the attribute
|
174
|
+
# is documented as an array but the input is not
|
175
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
176
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
177
|
+
end
|
178
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
179
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
180
|
+
end
|
181
|
+
end
|
182
|
+
|
183
|
+
self
|
184
|
+
end
|
185
|
+
|
186
|
+
# Deserializes the data based on type
|
187
|
+
# @param string type Data type
|
188
|
+
# @param string value Value to be deserialized
|
189
|
+
# @return [Object] Deserialized data
|
190
|
+
def _deserialize(type, value)
|
191
|
+
case type.to_sym
|
192
|
+
when :Time
|
193
|
+
Time.parse(value)
|
194
|
+
when :Date
|
195
|
+
Date.parse(value)
|
196
|
+
when :String
|
197
|
+
value.to_s
|
198
|
+
when :Integer
|
199
|
+
value.to_i
|
200
|
+
when :Float
|
201
|
+
value.to_f
|
202
|
+
when :Boolean
|
203
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
204
|
+
true
|
205
|
+
else
|
206
|
+
false
|
207
|
+
end
|
208
|
+
when :Object
|
209
|
+
# generic object (usually a Hash), return directly
|
210
|
+
value
|
211
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
212
|
+
inner_type = Regexp.last_match[:inner_type]
|
213
|
+
value.map { |v| _deserialize(inner_type, v) }
|
214
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
215
|
+
k_type = Regexp.last_match[:k_type]
|
216
|
+
v_type = Regexp.last_match[:v_type]
|
217
|
+
{}.tap do |hash|
|
218
|
+
value.each do |k, v|
|
219
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
220
|
+
end
|
221
|
+
end
|
222
|
+
else # model
|
223
|
+
# models (e.g. Pet) or oneOf
|
224
|
+
klass = MergeHRISClient.const_get(type)
|
225
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
226
|
+
end
|
227
|
+
end
|
228
|
+
|
229
|
+
# Returns the string representation of the object
|
230
|
+
# @return [String] String presentation of the object
|
231
|
+
def to_s
|
232
|
+
to_hash.to_s
|
233
|
+
end
|
234
|
+
|
235
|
+
# to_body is an alias to to_hash (backward compatibility)
|
236
|
+
# @return [Hash] Returns the object in the form of hash
|
237
|
+
def to_body
|
238
|
+
to_hash
|
239
|
+
end
|
240
|
+
|
241
|
+
# Returns the object in the form of hash
|
242
|
+
# @return [Hash] Returns the object in the form of hash
|
243
|
+
def to_hash
|
244
|
+
hash = {}
|
245
|
+
self.class.attribute_map.each_pair do |attr, param|
|
246
|
+
value = self.send(attr)
|
247
|
+
if value.nil?
|
248
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
249
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
250
|
+
end
|
251
|
+
|
252
|
+
hash[param] = _to_hash(value)
|
253
|
+
end
|
254
|
+
hash
|
255
|
+
end
|
256
|
+
|
257
|
+
# Outputs non-array value in the form of hash
|
258
|
+
# For object, use to_hash. Otherwise, just return the value
|
259
|
+
# @param [Object] value Any valid value
|
260
|
+
# @return [Hash] Returns the value in the form of hash
|
261
|
+
def _to_hash(value)
|
262
|
+
if value.is_a?(Array)
|
263
|
+
value.compact.map { |v| _to_hash(v) }
|
264
|
+
elsif value.is_a?(Hash)
|
265
|
+
{}.tap do |hash|
|
266
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
267
|
+
end
|
268
|
+
elsif value.respond_to? :to_hash
|
269
|
+
value.to_hash
|
270
|
+
else
|
271
|
+
value
|
272
|
+
end
|
273
|
+
end
|
274
|
+
|
275
|
+
end
|
276
|
+
|
277
|
+
end
|
@@ -0,0 +1,282 @@
|
|
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.0.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module MergeHRISClient
|
17
|
+
class CountryEnum
|
18
|
+
AF = "AF".freeze
|
19
|
+
AX = "AX".freeze
|
20
|
+
AL = "AL".freeze
|
21
|
+
DZ = "DZ".freeze
|
22
|
+
AS = "AS".freeze
|
23
|
+
AD = "AD".freeze
|
24
|
+
AO = "AO".freeze
|
25
|
+
AI = "AI".freeze
|
26
|
+
AQ = "AQ".freeze
|
27
|
+
AG = "AG".freeze
|
28
|
+
AR = "AR".freeze
|
29
|
+
AM = "AM".freeze
|
30
|
+
AW = "AW".freeze
|
31
|
+
AU = "AU".freeze
|
32
|
+
AT = "AT".freeze
|
33
|
+
AZ = "AZ".freeze
|
34
|
+
BS = "BS".freeze
|
35
|
+
BH = "BH".freeze
|
36
|
+
BD = "BD".freeze
|
37
|
+
BB = "BB".freeze
|
38
|
+
BY = "BY".freeze
|
39
|
+
BE = "BE".freeze
|
40
|
+
BZ = "BZ".freeze
|
41
|
+
BJ = "BJ".freeze
|
42
|
+
BM = "BM".freeze
|
43
|
+
BT = "BT".freeze
|
44
|
+
BO = "BO".freeze
|
45
|
+
BQ = "BQ".freeze
|
46
|
+
BA = "BA".freeze
|
47
|
+
BW = "BW".freeze
|
48
|
+
BV = "BV".freeze
|
49
|
+
BR = "BR".freeze
|
50
|
+
IO = "IO".freeze
|
51
|
+
BN = "BN".freeze
|
52
|
+
BG = "BG".freeze
|
53
|
+
BF = "BF".freeze
|
54
|
+
BI = "BI".freeze
|
55
|
+
CV = "CV".freeze
|
56
|
+
KH = "KH".freeze
|
57
|
+
CM = "CM".freeze
|
58
|
+
CA = "CA".freeze
|
59
|
+
KY = "KY".freeze
|
60
|
+
CF = "CF".freeze
|
61
|
+
TD = "TD".freeze
|
62
|
+
CL = "CL".freeze
|
63
|
+
CN = "CN".freeze
|
64
|
+
CX = "CX".freeze
|
65
|
+
CC = "CC".freeze
|
66
|
+
CO = "CO".freeze
|
67
|
+
KM = "KM".freeze
|
68
|
+
CG = "CG".freeze
|
69
|
+
CD = "CD".freeze
|
70
|
+
CK = "CK".freeze
|
71
|
+
CR = "CR".freeze
|
72
|
+
CI = "CI".freeze
|
73
|
+
HR = "HR".freeze
|
74
|
+
CU = "CU".freeze
|
75
|
+
CW = "CW".freeze
|
76
|
+
CY = "CY".freeze
|
77
|
+
CZ = "CZ".freeze
|
78
|
+
DK = "DK".freeze
|
79
|
+
DJ = "DJ".freeze
|
80
|
+
DM = "DM".freeze
|
81
|
+
DO = "DO".freeze
|
82
|
+
EC = "EC".freeze
|
83
|
+
EG = "EG".freeze
|
84
|
+
SV = "SV".freeze
|
85
|
+
GQ = "GQ".freeze
|
86
|
+
ER = "ER".freeze
|
87
|
+
EE = "EE".freeze
|
88
|
+
SZ = "SZ".freeze
|
89
|
+
ET = "ET".freeze
|
90
|
+
FK = "FK".freeze
|
91
|
+
FO = "FO".freeze
|
92
|
+
FJ = "FJ".freeze
|
93
|
+
FI = "FI".freeze
|
94
|
+
FR = "FR".freeze
|
95
|
+
GF = "GF".freeze
|
96
|
+
PF = "PF".freeze
|
97
|
+
TF = "TF".freeze
|
98
|
+
GA = "GA".freeze
|
99
|
+
GM = "GM".freeze
|
100
|
+
GE = "GE".freeze
|
101
|
+
DE = "DE".freeze
|
102
|
+
GH = "GH".freeze
|
103
|
+
GI = "GI".freeze
|
104
|
+
GR = "GR".freeze
|
105
|
+
GL = "GL".freeze
|
106
|
+
GD = "GD".freeze
|
107
|
+
GP = "GP".freeze
|
108
|
+
GU = "GU".freeze
|
109
|
+
GT = "GT".freeze
|
110
|
+
GG = "GG".freeze
|
111
|
+
GN = "GN".freeze
|
112
|
+
GW = "GW".freeze
|
113
|
+
GY = "GY".freeze
|
114
|
+
HT = "HT".freeze
|
115
|
+
HM = "HM".freeze
|
116
|
+
VA = "VA".freeze
|
117
|
+
HN = "HN".freeze
|
118
|
+
HK = "HK".freeze
|
119
|
+
HU = "HU".freeze
|
120
|
+
IS = "IS".freeze
|
121
|
+
IN = "IN".freeze
|
122
|
+
ID = "ID".freeze
|
123
|
+
IR = "IR".freeze
|
124
|
+
IQ = "IQ".freeze
|
125
|
+
IE = "IE".freeze
|
126
|
+
IM = "IM".freeze
|
127
|
+
IL = "IL".freeze
|
128
|
+
IT = "IT".freeze
|
129
|
+
JM = "JM".freeze
|
130
|
+
JP = "JP".freeze
|
131
|
+
JE = "JE".freeze
|
132
|
+
JO = "JO".freeze
|
133
|
+
KZ = "KZ".freeze
|
134
|
+
KE = "KE".freeze
|
135
|
+
KI = "KI".freeze
|
136
|
+
KW = "KW".freeze
|
137
|
+
KG = "KG".freeze
|
138
|
+
LA = "LA".freeze
|
139
|
+
LV = "LV".freeze
|
140
|
+
LB = "LB".freeze
|
141
|
+
LS = "LS".freeze
|
142
|
+
LR = "LR".freeze
|
143
|
+
LY = "LY".freeze
|
144
|
+
LI = "LI".freeze
|
145
|
+
LT = "LT".freeze
|
146
|
+
LU = "LU".freeze
|
147
|
+
MO = "MO".freeze
|
148
|
+
MG = "MG".freeze
|
149
|
+
MW = "MW".freeze
|
150
|
+
MY = "MY".freeze
|
151
|
+
MV = "MV".freeze
|
152
|
+
ML = "ML".freeze
|
153
|
+
MT = "MT".freeze
|
154
|
+
MH = "MH".freeze
|
155
|
+
MQ = "MQ".freeze
|
156
|
+
MR = "MR".freeze
|
157
|
+
MU = "MU".freeze
|
158
|
+
YT = "YT".freeze
|
159
|
+
MX = "MX".freeze
|
160
|
+
FM = "FM".freeze
|
161
|
+
MD = "MD".freeze
|
162
|
+
MC = "MC".freeze
|
163
|
+
MN = "MN".freeze
|
164
|
+
ME = "ME".freeze
|
165
|
+
MS = "MS".freeze
|
166
|
+
MA = "MA".freeze
|
167
|
+
MZ = "MZ".freeze
|
168
|
+
MM = "MM".freeze
|
169
|
+
NA = "NA".freeze
|
170
|
+
NR = "NR".freeze
|
171
|
+
NP = "NP".freeze
|
172
|
+
NL = "NL".freeze
|
173
|
+
NC = "NC".freeze
|
174
|
+
NZ = "NZ".freeze
|
175
|
+
NI = "NI".freeze
|
176
|
+
NE = "NE".freeze
|
177
|
+
NG = "NG".freeze
|
178
|
+
NU = "NU".freeze
|
179
|
+
NF = "NF".freeze
|
180
|
+
KP = "KP".freeze
|
181
|
+
MK = "MK".freeze
|
182
|
+
MP = "MP".freeze
|
183
|
+
NO = "NO".freeze
|
184
|
+
OM = "OM".freeze
|
185
|
+
PK = "PK".freeze
|
186
|
+
PW = "PW".freeze
|
187
|
+
PS = "PS".freeze
|
188
|
+
PA = "PA".freeze
|
189
|
+
PG = "PG".freeze
|
190
|
+
PY = "PY".freeze
|
191
|
+
PE = "PE".freeze
|
192
|
+
PH = "PH".freeze
|
193
|
+
PN = "PN".freeze
|
194
|
+
PL = "PL".freeze
|
195
|
+
PT = "PT".freeze
|
196
|
+
PR = "PR".freeze
|
197
|
+
QA = "QA".freeze
|
198
|
+
RE = "RE".freeze
|
199
|
+
RO = "RO".freeze
|
200
|
+
RU = "RU".freeze
|
201
|
+
RW = "RW".freeze
|
202
|
+
BL = "BL".freeze
|
203
|
+
SH = "SH".freeze
|
204
|
+
KN = "KN".freeze
|
205
|
+
LC = "LC".freeze
|
206
|
+
MF = "MF".freeze
|
207
|
+
PM = "PM".freeze
|
208
|
+
VC = "VC".freeze
|
209
|
+
WS = "WS".freeze
|
210
|
+
SM = "SM".freeze
|
211
|
+
ST = "ST".freeze
|
212
|
+
SA = "SA".freeze
|
213
|
+
SN = "SN".freeze
|
214
|
+
RS = "RS".freeze
|
215
|
+
SC = "SC".freeze
|
216
|
+
SL = "SL".freeze
|
217
|
+
SG = "SG".freeze
|
218
|
+
SX = "SX".freeze
|
219
|
+
SK = "SK".freeze
|
220
|
+
SI = "SI".freeze
|
221
|
+
SB = "SB".freeze
|
222
|
+
SO = "SO".freeze
|
223
|
+
ZA = "ZA".freeze
|
224
|
+
GS = "GS".freeze
|
225
|
+
KR = "KR".freeze
|
226
|
+
SS = "SS".freeze
|
227
|
+
ES = "ES".freeze
|
228
|
+
LK = "LK".freeze
|
229
|
+
SD = "SD".freeze
|
230
|
+
SR = "SR".freeze
|
231
|
+
SJ = "SJ".freeze
|
232
|
+
SE = "SE".freeze
|
233
|
+
CH = "CH".freeze
|
234
|
+
SY = "SY".freeze
|
235
|
+
TW = "TW".freeze
|
236
|
+
TJ = "TJ".freeze
|
237
|
+
TZ = "TZ".freeze
|
238
|
+
TH = "TH".freeze
|
239
|
+
TL = "TL".freeze
|
240
|
+
TG = "TG".freeze
|
241
|
+
TK = "TK".freeze
|
242
|
+
TO = "TO".freeze
|
243
|
+
TT = "TT".freeze
|
244
|
+
TN = "TN".freeze
|
245
|
+
TR = "TR".freeze
|
246
|
+
TM = "TM".freeze
|
247
|
+
TC = "TC".freeze
|
248
|
+
TV = "TV".freeze
|
249
|
+
UG = "UG".freeze
|
250
|
+
UA = "UA".freeze
|
251
|
+
AE = "AE".freeze
|
252
|
+
GB = "GB".freeze
|
253
|
+
UM = "UM".freeze
|
254
|
+
US = "US".freeze
|
255
|
+
UY = "UY".freeze
|
256
|
+
UZ = "UZ".freeze
|
257
|
+
VU = "VU".freeze
|
258
|
+
VE = "VE".freeze
|
259
|
+
VN = "VN".freeze
|
260
|
+
VG = "VG".freeze
|
261
|
+
VI = "VI".freeze
|
262
|
+
WF = "WF".freeze
|
263
|
+
EH = "EH".freeze
|
264
|
+
YE = "YE".freeze
|
265
|
+
ZM = "ZM".freeze
|
266
|
+
ZW = "ZW".freeze
|
267
|
+
|
268
|
+
# Builds the enum from string
|
269
|
+
# @param [String] The enum value in the form of the string
|
270
|
+
# @return [String] The enum value
|
271
|
+
def self.build_from_hash(value)
|
272
|
+
new.build_from_hash(value)
|
273
|
+
end
|
274
|
+
|
275
|
+
# Builds the enum from string
|
276
|
+
# @param [String] The enum value in the form of the string
|
277
|
+
# @return [String] The enum value
|
278
|
+
def build_from_hash(value)
|
279
|
+
value
|
280
|
+
end
|
281
|
+
end
|
282
|
+
end
|