merge_hris_client 1.0.4 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (203) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +37 -12
  3. data/docs/AccountDetails.md +11 -7
  4. data/docs/AccountDetailsAndActions.md +2 -0
  5. data/docs/AccountDetailsApi.md +10 -7
  6. data/docs/AccountIntegration.md +4 -4
  7. data/docs/AccountTokenApi.md +2 -2
  8. data/docs/AvailableActionsApi.md +2 -2
  9. data/docs/BankInfo.md +1 -1
  10. data/docs/BankInfoApi.md +8 -12
  11. data/docs/Benefit.md +2 -2
  12. data/docs/BenefitsApi.md +4 -4
  13. data/docs/CompaniesApi.md +4 -4
  14. data/docs/Company.md +2 -2
  15. data/docs/DataPassthroughRequest.md +3 -1
  16. data/docs/DebugModeLog.md +22 -0
  17. data/docs/DebugModelLogSummary.md +22 -0
  18. data/docs/Deduction.md +2 -2
  19. data/docs/DeductionsApi.md +4 -4
  20. data/docs/DeleteAccountApi.md +3 -2
  21. data/docs/Earning.md +3 -3
  22. data/docs/EarningTypeEnum.md +15 -0
  23. data/docs/Employee.md +17 -15
  24. data/docs/EmployeeEndpointRequest.md +18 -0
  25. data/docs/EmployeePayrollRun.md +2 -2
  26. data/docs/EmployeePayrollRunsApi.md +4 -4
  27. data/docs/EmployeeRequest.md +70 -0
  28. data/docs/EmployeeResponse.md +24 -0
  29. data/docs/EmployeesApi.md +232 -4
  30. data/docs/Employment.md +6 -4
  31. data/docs/EmploymentsApi.md +5 -4
  32. data/docs/EncodingEnum.md +15 -0
  33. data/docs/EndUserDetailsRequest.md +5 -3
  34. data/docs/ForceResyncApi.md +2 -2
  35. data/docs/GenerateKeyApi.md +2 -2
  36. data/docs/Group.md +28 -0
  37. data/docs/GroupTypeEnum.md +15 -0
  38. data/docs/GroupsApi.md +177 -0
  39. data/docs/IgnoreCommonModel.md +20 -0
  40. data/docs/IssuesApi.md +13 -4
  41. data/docs/LinkTokenApi.md +3 -3
  42. data/docs/LinkedAccountStatus.md +20 -0
  43. data/docs/LinkedAccountsApi.md +2 -2
  44. data/docs/Location.md +3 -1
  45. data/docs/LocationsApi.md +4 -4
  46. data/docs/MetaResponse.md +24 -0
  47. data/docs/MultipartFormFieldRequest.md +26 -0
  48. data/docs/PaginatedGroupList.md +22 -0
  49. data/docs/PassthroughApi.md +2 -2
  50. data/docs/PayGroupsApi.md +4 -4
  51. data/docs/PayrollRunsApi.md +4 -4
  52. data/docs/RegenerateKeyApi.md +2 -2
  53. data/docs/SyncStatusApi.md +0 -1
  54. data/docs/Tax.md +2 -2
  55. data/docs/Team.md +1 -1
  56. data/docs/TeamsApi.md +5 -4
  57. data/docs/TimeOff.md +4 -4
  58. data/docs/TimeOffApi.md +80 -6
  59. data/docs/TimeOffBalance.md +2 -2
  60. data/docs/TimeOffRequest.md +4 -4
  61. data/docs/TimeOffResponse.md +3 -1
  62. data/docs/WebhookReceiver.md +22 -0
  63. data/docs/WebhookReceiverRequest.md +22 -0
  64. data/docs/WebhookReceiversApi.md +153 -0
  65. data/lib/merge_hris_client/api/account_details_api.rb +10 -3
  66. data/lib/merge_hris_client/api/bank_info_api.rb +4 -9
  67. data/lib/merge_hris_client/api/employees_api.rb +216 -2
  68. data/lib/merge_hris_client/api/employments_api.rb +2 -2
  69. data/lib/merge_hris_client/api/groups_api.rb +182 -0
  70. data/lib/merge_hris_client/api/issues_api.rb +12 -0
  71. data/lib/merge_hris_client/api/linked_accounts_api.rb +1 -1
  72. data/lib/merge_hris_client/api/sync_status_api.rb +0 -62
  73. data/lib/merge_hris_client/api/time_off_api.rb +65 -0
  74. data/lib/merge_hris_client/api/webhook_receivers_api.rb +154 -0
  75. data/lib/merge_hris_client/configuration.rb +6 -4
  76. data/lib/merge_hris_client/models/account_details.rb +23 -5
  77. data/lib/merge_hris_client/models/account_details_and_actions.rb +16 -2
  78. data/lib/merge_hris_client/models/account_details_and_actions_integration.rb +1 -1
  79. data/lib/merge_hris_client/models/account_details_and_actions_status_enum.rb +1 -0
  80. data/lib/merge_hris_client/models/account_integration.rb +5 -27
  81. data/lib/merge_hris_client/models/account_token.rb +1 -1
  82. data/lib/merge_hris_client/models/account_type_enum.rb +1 -0
  83. data/lib/merge_hris_client/models/available_actions.rb +1 -1
  84. data/lib/merge_hris_client/models/bank_info.rb +0 -1
  85. data/lib/merge_hris_client/models/benefit.rb +1 -2
  86. data/lib/merge_hris_client/models/categories_enum.rb +1 -0
  87. data/lib/merge_hris_client/models/category_enum.rb +1 -0
  88. data/lib/merge_hris_client/models/company.rb +1 -1
  89. data/lib/merge_hris_client/models/country_enum.rb +1 -0
  90. data/lib/merge_hris_client/models/data_passthrough_request.rb +17 -3
  91. data/lib/merge_hris_client/models/debug_mode_log.rb +251 -0
  92. data/lib/merge_hris_client/models/debug_model_log_summary.rb +251 -0
  93. data/lib/merge_hris_client/models/deduction.rb +0 -1
  94. data/lib/merge_hris_client/models/earning.rb +4 -7
  95. data/lib/merge_hris_client/models/earning_type_enum.rb +38 -0
  96. data/lib/merge_hris_client/models/employee.rb +14 -9
  97. data/lib/merge_hris_client/models/employee_endpoint_request.rb +223 -0
  98. data/lib/merge_hris_client/models/employee_payroll_run.rb +1 -3
  99. data/lib/merge_hris_client/models/employee_request.rb +564 -0
  100. data/lib/merge_hris_client/models/employee_response.rb +266 -0
  101. data/lib/merge_hris_client/models/employment.rb +12 -3
  102. data/lib/merge_hris_client/models/employment_status_enum.rb +1 -1
  103. data/lib/merge_hris_client/models/employment_type_enum.rb +1 -1
  104. data/lib/merge_hris_client/models/encoding_enum.rb +36 -0
  105. data/lib/merge_hris_client/models/end_user_details_request.rb +74 -27
  106. data/lib/merge_hris_client/models/error_validation_problem.rb +1 -1
  107. data/lib/merge_hris_client/models/ethnicity_enum.rb +1 -1
  108. data/lib/merge_hris_client/models/flsa_status_enum.rb +1 -1
  109. data/lib/merge_hris_client/models/gender_enum.rb +1 -1
  110. data/lib/merge_hris_client/models/generate_remote_key_request.rb +1 -1
  111. data/lib/merge_hris_client/models/group.rb +275 -0
  112. data/lib/merge_hris_client/models/group_type_enum.rb +38 -0
  113. data/lib/merge_hris_client/models/ignore_common_model.rb +247 -0
  114. data/lib/merge_hris_client/models/ignore_common_model_request.rb +256 -0
  115. data/lib/merge_hris_client/models/issue.rb +1 -1
  116. data/lib/merge_hris_client/models/issue_status_enum.rb +1 -1
  117. data/lib/merge_hris_client/models/link_token.rb +1 -1
  118. data/lib/merge_hris_client/models/linked_account_status.rb +237 -0
  119. data/lib/merge_hris_client/models/location.rb +13 -2
  120. data/lib/merge_hris_client/models/location_type_enum.rb +36 -0
  121. data/lib/merge_hris_client/models/marital_status_enum.rb +1 -1
  122. data/lib/merge_hris_client/models/meta_response.rb +262 -0
  123. data/lib/merge_hris_client/models/method_enum.rb +1 -1
  124. data/lib/merge_hris_client/models/model_operation.rb +1 -1
  125. data/lib/merge_hris_client/models/multipart_form_field_request.rb +341 -0
  126. data/lib/merge_hris_client/models/paginated_account_details_and_actions_list.rb +1 -1
  127. data/lib/merge_hris_client/models/paginated_bank_info_list.rb +1 -1
  128. data/lib/merge_hris_client/models/paginated_benefit_list.rb +1 -1
  129. data/lib/merge_hris_client/models/paginated_company_list.rb +1 -1
  130. data/lib/merge_hris_client/models/paginated_deduction_list.rb +1 -1
  131. data/lib/merge_hris_client/models/paginated_employee_list.rb +1 -1
  132. data/lib/merge_hris_client/models/paginated_employee_payroll_run_list.rb +1 -1
  133. data/lib/merge_hris_client/models/paginated_employment_list.rb +1 -1
  134. data/lib/merge_hris_client/models/paginated_group_list.rb +240 -0
  135. data/lib/merge_hris_client/models/paginated_issue_list.rb +1 -1
  136. data/lib/merge_hris_client/models/paginated_location_list.rb +1 -1
  137. data/lib/merge_hris_client/models/paginated_pay_group_list.rb +1 -1
  138. data/lib/merge_hris_client/models/paginated_payroll_run_list.rb +1 -1
  139. data/lib/merge_hris_client/models/paginated_sync_status_list.rb +1 -1
  140. data/lib/merge_hris_client/models/paginated_team_list.rb +1 -1
  141. data/lib/merge_hris_client/models/paginated_time_off_balance_list.rb +1 -1
  142. data/lib/merge_hris_client/models/paginated_time_off_list.rb +1 -1
  143. data/lib/merge_hris_client/models/pay_currency_enum.rb +1 -1
  144. data/lib/merge_hris_client/models/pay_frequency_enum.rb +1 -2
  145. data/lib/merge_hris_client/models/pay_period_enum.rb +1 -1
  146. data/lib/merge_hris_client/models/payroll_run.rb +1 -1
  147. data/lib/merge_hris_client/models/policy_type_enum.rb +1 -0
  148. data/lib/merge_hris_client/models/reason_enum.rb +37 -0
  149. data/lib/merge_hris_client/models/remote_data.rb +1 -1
  150. data/lib/merge_hris_client/models/remote_data_request.rb +1 -1
  151. data/lib/merge_hris_client/models/remote_key.rb +1 -1
  152. data/lib/merge_hris_client/models/remote_key_for_regeneration_request.rb +1 -1
  153. data/lib/merge_hris_client/models/remote_response.rb +1 -1
  154. data/lib/merge_hris_client/models/request_format_enum.rb +2 -0
  155. data/lib/merge_hris_client/models/request_type_enum.rb +1 -0
  156. data/lib/merge_hris_client/models/run_state_enum.rb +1 -1
  157. data/lib/merge_hris_client/models/run_type_enum.rb +1 -11
  158. data/lib/merge_hris_client/models/sync_status.rb +1 -1
  159. data/lib/merge_hris_client/models/sync_status_status_enum.rb +1 -2
  160. data/lib/merge_hris_client/models/tax.rb +3 -6
  161. data/lib/merge_hris_client/models/team.rb +0 -1
  162. data/lib/merge_hris_client/models/time_off.rb +0 -2
  163. data/lib/merge_hris_client/models/time_off_balance.rb +1 -2
  164. data/lib/merge_hris_client/models/time_off_endpoint_request.rb +1 -1
  165. data/lib/merge_hris_client/models/time_off_request.rb +1 -3
  166. data/lib/merge_hris_client/models/time_off_response.rb +16 -5
  167. data/lib/merge_hris_client/models/time_off_status_enum.rb +1 -1
  168. data/lib/merge_hris_client/models/units_enum.rb +1 -1
  169. data/lib/merge_hris_client/models/validation_problem_source.rb +1 -1
  170. data/lib/merge_hris_client/models/warning_validation_problem.rb +1 -1
  171. data/lib/merge_hris_client/models/webhook_receiver.rb +246 -0
  172. data/lib/merge_hris_client/models/webhook_receiver_request.rb +280 -0
  173. data/lib/merge_hris_client/version.rb +1 -1
  174. data/lib/merge_hris_client.rb +21 -2
  175. data/pull_request_template.md +3 -1
  176. data/spec/api/account_details_api_spec.rb +1 -0
  177. data/spec/api/bank_info_api_spec.rb +2 -4
  178. data/spec/api/employees_api_spec.rb +38 -0
  179. data/spec/api/groups_api_spec.rb +68 -0
  180. data/spec/api/issues_api_spec.rb +4 -0
  181. data/spec/api/time_off_api_spec.rb +12 -0
  182. data/spec/models/account_details_and_actions_spec.rb +6 -0
  183. data/spec/models/account_details_spec.rb +12 -0
  184. data/spec/models/data_passthrough_request_spec.rb +6 -0
  185. data/spec/models/debug_mode_log_spec.rb +46 -0
  186. data/spec/models/debug_model_log_summary_spec.rb +46 -0
  187. data/spec/models/earning_type_enum_spec.rb +28 -0
  188. data/spec/models/employee_endpoint_request_spec.rb +34 -0
  189. data/spec/models/employee_request_spec.rb +190 -0
  190. data/spec/models/employee_response_spec.rb +52 -0
  191. data/spec/models/employee_spec.rb +6 -0
  192. data/spec/models/employment_spec.rb +6 -0
  193. data/spec/models/encoding_enum_spec.rb +28 -0
  194. data/spec/models/end_user_details_request_spec.rb +6 -0
  195. data/spec/models/group_spec.rb +64 -0
  196. data/spec/models/group_type_enum_spec.rb +28 -0
  197. data/spec/models/ignore_common_model_spec.rb +40 -0
  198. data/spec/models/location_spec.rb +6 -0
  199. data/spec/models/multipart_form_field_request_spec.rb +58 -0
  200. data/spec/models/paginated_group_list_spec.rb +46 -0
  201. data/spec/models/time_off_response_spec.rb +6 -0
  202. metadata +153 -89
  203. data/test_ruby.rb +0 -30
@@ -0,0 +1,240 @@
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 PaginatedGroupList
18
+ attr_accessor :_next
19
+
20
+ attr_accessor :previous
21
+
22
+ attr_accessor :results
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'_next' => :'next',
28
+ :'previous' => :'previous',
29
+ :'results' => :'results'
30
+ }
31
+ end
32
+
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ attribute_map.values
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.openapi_types
40
+ {
41
+ :'_next' => :'String',
42
+ :'previous' => :'String',
43
+ :'results' => :'Array<Group>'
44
+ }
45
+ end
46
+
47
+ # List of attributes with nullable: true
48
+ def self.openapi_nullable
49
+ Set.new([
50
+ :'_next',
51
+ :'previous',
52
+ ])
53
+ end
54
+
55
+ # Initializes the object
56
+ # @param [Hash] attributes Model attributes in the form of hash
57
+ def initialize(attributes = {})
58
+ if (!attributes.is_a?(Hash))
59
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MergeHRISClient::PaginatedGroupList` initialize method"
60
+ end
61
+
62
+ # check to see if the attribute exists and convert string to symbol for hash key
63
+ attributes = attributes.each_with_object({}) { |(k, v), h|
64
+ if (!self.class.attribute_map.key?(k.to_sym))
65
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MergeHRISClient::PaginatedGroupList`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
66
+ end
67
+ h[k.to_sym] = v
68
+ }
69
+
70
+ if attributes.key?(:'_next')
71
+ self._next = attributes[:'_next']
72
+ end
73
+
74
+ if attributes.key?(:'previous')
75
+ self.previous = attributes[:'previous']
76
+ end
77
+
78
+ if attributes.key?(:'results')
79
+ if (value = attributes[:'results']).is_a?(Array)
80
+ self.results = value
81
+ end
82
+ end
83
+ end
84
+
85
+ # Show invalid properties with the reasons. Usually used together with valid?
86
+ # @return Array for valid properties with the reasons
87
+ def list_invalid_properties
88
+ invalid_properties = Array.new
89
+ invalid_properties
90
+ end
91
+
92
+ # Check to see if the all the properties in the model are valid
93
+ # @return true if the model is valid
94
+ def valid?
95
+ true
96
+ end
97
+
98
+ # Checks equality by comparing each attribute.
99
+ # @param [Object] Object to be compared
100
+ def ==(o)
101
+ return true if self.equal?(o)
102
+ self.class == o.class &&
103
+ _next == o._next &&
104
+ previous == o.previous &&
105
+ results == o.results
106
+ end
107
+
108
+ # @see the `==` method
109
+ # @param [Object] Object to be compared
110
+ def eql?(o)
111
+ self == o
112
+ end
113
+
114
+ # Calculates hash code according to all attributes.
115
+ # @return [Integer] Hash code
116
+ def hash
117
+ [_next, previous, results].hash
118
+ end
119
+
120
+ # Builds the object from hash
121
+ # @param [Hash] attributes Model attributes in the form of hash
122
+ # @return [Object] Returns the model itself
123
+ def self.build_from_hash(attributes)
124
+ new.build_from_hash(attributes)
125
+ end
126
+
127
+ # Builds the object from hash
128
+ # @param [Hash] attributes Model attributes in the form of hash
129
+ # @return [Object] Returns the model itself
130
+ def build_from_hash(attributes)
131
+ return nil unless attributes.is_a?(Hash)
132
+ self.class.openapi_types.each_pair do |key, type|
133
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
134
+ self.send("#{key}=", nil)
135
+ elsif type =~ /\AArray<(.*)>/i
136
+ # check to ensure the input is an array given that the attribute
137
+ # is documented as an array but the input is not
138
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
139
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
140
+ end
141
+ elsif !attributes[self.class.attribute_map[key]].nil?
142
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
143
+ end
144
+ end
145
+
146
+ self
147
+ end
148
+
149
+ # Deserializes the data based on type
150
+ # @param string type Data type
151
+ # @param string value Value to be deserialized
152
+ # @return [Object] Deserialized data
153
+ def _deserialize(type, value)
154
+ case type.to_sym
155
+ when :Time
156
+ Time.parse(value)
157
+ when :Date
158
+ Date.parse(value)
159
+ when :String
160
+ value
161
+ when :Integer
162
+ value.to_i
163
+ when :Float
164
+ value.to_f
165
+ when :Boolean
166
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
167
+ true
168
+ else
169
+ false
170
+ end
171
+ when :Object
172
+ # generic object (usually a Hash), return directly
173
+ value
174
+ when /\AArray<(?<inner_type>.+)>\z/
175
+ inner_type = Regexp.last_match[:inner_type]
176
+ value.map { |v| _deserialize(inner_type, v) }
177
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
178
+ k_type = Regexp.last_match[:k_type]
179
+ v_type = Regexp.last_match[:v_type]
180
+ {}.tap do |hash|
181
+ value.each do |k, v|
182
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
183
+ end
184
+ end
185
+ else # model
186
+ # models (e.g. Pet) or oneOf
187
+ klass = MergeHRISClient.const_get(type)
188
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
189
+ end
190
+ end
191
+
192
+ # Returns the string representation of the object
193
+ # @return [String] String presentation of the object
194
+ def to_s
195
+ to_hash.to_s
196
+ end
197
+
198
+ # to_body is an alias to to_hash (backward compatibility)
199
+ # @return [Hash] Returns the object in the form of hash
200
+ def to_body
201
+ to_hash
202
+ end
203
+
204
+ # Returns the object in the form of hash
205
+ # @return [Hash] Returns the object in the form of hash
206
+ def to_hash
207
+ hash = {}
208
+ self.class.attribute_map.each_pair do |attr, param|
209
+ value = self.send(attr)
210
+ if value.nil?
211
+ is_nullable = self.class.openapi_nullable.include?(attr)
212
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
213
+ end
214
+
215
+ hash[param] = _to_hash(value)
216
+ end
217
+ hash
218
+ end
219
+
220
+ # Outputs non-array value in the form of hash
221
+ # For object, use to_hash. Otherwise, just return the value
222
+ # @param [Object] value Any valid value
223
+ # @return [Hash] Returns the value in the form of hash
224
+ def _to_hash(value)
225
+ if value.is_a?(Array)
226
+ value.compact.map { |v| _to_hash(v) }
227
+ elsif value.is_a?(Hash)
228
+ {}.tap do |hash|
229
+ value.each { |k, v| hash[k] = _to_hash(v) }
230
+ end
231
+ elsif value.respond_to? :to_hash
232
+ value.to_hash
233
+ else
234
+ value
235
+ end
236
+ end
237
+
238
+ end
239
+
240
+ end
@@ -157,7 +157,7 @@ module MergeHRISClient
157
157
  when :Date
158
158
  Date.parse(value)
159
159
  when :String
160
- value.to_s
160
+ value
161
161
  when :Integer
162
162
  value.to_i
163
163
  when :Float
@@ -157,7 +157,7 @@ module MergeHRISClient
157
157
  when :Date
158
158
  Date.parse(value)
159
159
  when :String
160
- value.to_s
160
+ value
161
161
  when :Integer
162
162
  value.to_i
163
163
  when :Float
@@ -157,7 +157,7 @@ module MergeHRISClient
157
157
  when :Date
158
158
  Date.parse(value)
159
159
  when :String
160
- value.to_s
160
+ value
161
161
  when :Integer
162
162
  value.to_i
163
163
  when :Float
@@ -157,7 +157,7 @@ module MergeHRISClient
157
157
  when :Date
158
158
  Date.parse(value)
159
159
  when :String
160
- value.to_s
160
+ value
161
161
  when :Integer
162
162
  value.to_i
163
163
  when :Float
@@ -157,7 +157,7 @@ module MergeHRISClient
157
157
  when :Date
158
158
  Date.parse(value)
159
159
  when :String
160
- value.to_s
160
+ value
161
161
  when :Integer
162
162
  value.to_i
163
163
  when :Float
@@ -157,7 +157,7 @@ module MergeHRISClient
157
157
  when :Date
158
158
  Date.parse(value)
159
159
  when :String
160
- value.to_s
160
+ value
161
161
  when :Integer
162
162
  value.to_i
163
163
  when :Float
@@ -157,7 +157,7 @@ module MergeHRISClient
157
157
  when :Date
158
158
  Date.parse(value)
159
159
  when :String
160
- value.to_s
160
+ value
161
161
  when :Integer
162
162
  value.to_i
163
163
  when :Float
@@ -157,7 +157,7 @@ module MergeHRISClient
157
157
  when :Date
158
158
  Date.parse(value)
159
159
  when :String
160
- value.to_s
160
+ value
161
161
  when :Integer
162
162
  value.to_i
163
163
  when :Float
@@ -333,8 +333,8 @@ module MergeHRISClient
333
333
  # @param [String] The enum value in the form of the string
334
334
  # @return [String] The enum value
335
335
  def build_from_hash(value)
336
- constantValues = PayCurrencyEnum.constants.select { |c| PayCurrencyEnum::const_get(c) == value }
337
336
  value
338
337
  end
339
338
  end
339
+
340
340
  end
@@ -23,7 +23,6 @@ module MergeHRISClient
23
23
  ANNUALLY = "ANNUALLY".freeze
24
24
  THIRTEEN_MONTHLY = "THIRTEEN-MONTHLY".freeze
25
25
  PRO_RATA = "PRO_RATA".freeze
26
- NULL = "NULL".freeze
27
26
 
28
27
  # Builds the enum from string
29
28
  # @param [String] The enum value in the form of the string
@@ -36,8 +35,8 @@ module MergeHRISClient
36
35
  # @param [String] The enum value in the form of the string
37
36
  # @return [String] The enum value
38
37
  def build_from_hash(value)
39
- constantValues = PayFrequencyEnum.constants.select { |c| PayFrequencyEnum::const_get(c) == value }
40
38
  value
41
39
  end
42
40
  end
41
+
43
42
  end
@@ -35,8 +35,8 @@ module MergeHRISClient
35
35
  # @param [String] The enum value in the form of the string
36
36
  # @return [String] The enum value
37
37
  def build_from_hash(value)
38
- constantValues = PayPeriodEnum.constants.select { |c| PayPeriodEnum::const_get(c) == value }
39
38
  value
40
39
  end
41
40
  end
41
+
42
42
  end
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module MergeHRISClient
17
- # # The PayrollRun Object ### Description The `PayrollRun` object is used to represent a payroll run. ### Usage Example Fetch from the `LIST PayrollRuns` endpoint and filter by `ID` to show all payroll runs.
17
+ # # The PayrollRun Object ### Description The `PayrollRun` object is used to represent a payroll run. This payroll run is not specific to an employee. ### Usage Example Fetch from the `LIST PayrollRuns` endpoint and filter by `ID` to show all payroll runs.
18
18
  class PayrollRun
19
19
  attr_accessor :id
20
20
 
@@ -36,4 +36,5 @@ module MergeHRISClient
36
36
  value
37
37
  end
38
38
  end
39
+
39
40
  end
@@ -0,0 +1,37 @@
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 ReasonEnum
18
+ GENERAL_CUSTOMER_REQUEST = "GENERAL_CUSTOMER_REQUEST".freeze
19
+ GDPR = "GDPR".freeze
20
+ OTHER = "OTHER".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
+
37
+ end
@@ -151,7 +151,7 @@ module MergeHRISClient
151
151
  when :Date
152
152
  Date.parse(value)
153
153
  when :String
154
- value.to_s
154
+ value
155
155
  when :Integer
156
156
  value.to_i
157
157
  when :Float
@@ -170,7 +170,7 @@ module MergeHRISClient
170
170
  when :Date
171
171
  Date.parse(value)
172
172
  when :String
173
- value.to_s
173
+ value
174
174
  when :Integer
175
175
  value.to_i
176
176
  when :Float
@@ -155,7 +155,7 @@ module MergeHRISClient
155
155
  when :Date
156
156
  Date.parse(value)
157
157
  when :String
158
- value.to_s
158
+ value
159
159
  when :Integer
160
160
  value.to_i
161
161
  when :Float
@@ -160,7 +160,7 @@ module MergeHRISClient
160
160
  when :Date
161
161
  Date.parse(value)
162
162
  when :String
163
- value.to_s
163
+ value
164
164
  when :Integer
165
165
  value.to_i
166
166
  when :Float
@@ -196,7 +196,7 @@ module MergeHRISClient
196
196
  when :Date
197
197
  Date.parse(value)
198
198
  when :String
199
- value.to_s
199
+ value
200
200
  when :Integer
201
201
  value.to_i
202
202
  when :Float
@@ -17,6 +17,7 @@ module MergeHRISClient
17
17
  class RequestFormatEnum
18
18
  JSON = "JSON".freeze
19
19
  XML = "XML".freeze
20
+ MULTIPART = "MULTIPART".freeze
20
21
 
21
22
  # Builds the enum from string
22
23
  # @param [String] The enum value in the form of the string
@@ -32,4 +33,5 @@ module MergeHRISClient
32
33
  value
33
34
  end
34
35
  end
36
+
35
37
  end
@@ -36,4 +36,5 @@ module MergeHRISClient
36
36
  value
37
37
  end
38
38
  end
39
+
39
40
  end
@@ -32,8 +32,8 @@ module MergeHRISClient
32
32
  # @param [String] The enum value in the form of the string
33
33
  # @return [String] The enum value
34
34
  def build_from_hash(value)
35
- constantValues = RunStateEnum.constants.select { |c| RunStateEnum::const_get(c) == value }
36
35
  value
37
36
  end
38
37
  end
38
+
39
39
  end
@@ -15,21 +15,11 @@ require 'time'
15
15
 
16
16
  module MergeHRISClient
17
17
  class RunTypeEnum
18
- INIT = "INIT".freeze
19
18
  REGULAR = "REGULAR".freeze
20
19
  OFF_CYCLE = "OFF_CYCLE".freeze
21
20
  CORRECTION = "CORRECTION".freeze
22
21
  TERMINATION = "TERMINATION".freeze
23
- RECONCILIATION = "RECONCILIATION".freeze
24
- NEW_HIRE = "NEW_HIRE".freeze
25
- POP = "POP".freeze
26
- TRANSITION = "TRANSITION".freeze
27
- CORRECTION_DISPLAY = "CORRECTION_DISPLAY".freeze
28
- EXCESS_HOURS = "EXCESS_HOURS".freeze
29
22
  SIGN_ON_BONUS = "SIGN_ON_BONUS".freeze
30
- S_CORP = "S_CORP".freeze
31
- FRINGE_BENEFITS = "FRINGE_BENEFITS".freeze
32
- CONTRACTOR_LATE_PAYMENTS = "CONTRACTOR_LATE_PAYMENTS".freeze
33
23
 
34
24
  # Builds the enum from string
35
25
  # @param [String] The enum value in the form of the string
@@ -42,8 +32,8 @@ module MergeHRISClient
42
32
  # @param [String] The enum value in the form of the string
43
33
  # @return [String] The enum value
44
34
  def build_from_hash(value)
45
- constantValues = RunTypeEnum.constants.select { |c| RunTypeEnum::const_get(c) == value }
46
35
  value
47
36
  end
48
37
  end
38
+
49
39
  end
@@ -211,7 +211,7 @@ module MergeHRISClient
211
211
  when :Date
212
212
  Date.parse(value)
213
213
  when :String
214
- value.to_s
214
+ value
215
215
  when :Integer
216
216
  value.to_i
217
217
  when :Float
@@ -31,9 +31,8 @@ module MergeHRISClient
31
31
  # @param [String] The enum value in the form of the string
32
32
  # @return [String] The enum value
33
33
  def build_from_hash(value)
34
- constantValues = SyncStatusStatusEnum.constants.select { |c| SyncStatusStatusEnum::const_get(c) == value }
35
- raise "Invalid ENUM value #{value} for class #SyncStatusStatusEnum" if constantValues.empty?
36
34
  value
37
35
  end
38
36
  end
37
+
39
38
  end
@@ -18,7 +18,6 @@ module MergeHRISClient
18
18
  class Tax
19
19
  attr_accessor :id
20
20
 
21
- # The tax's employee payroll run.
22
21
  attr_accessor :employee_payroll_run
23
22
 
24
23
  # The tax's name.
@@ -57,7 +56,7 @@ module MergeHRISClient
57
56
  :'name' => :'String',
58
57
  :'amount' => :'Float',
59
58
  :'employer_tax' => :'Boolean',
60
- :'remote_data' => :'Array<RemoteData>'
59
+ :'remote_data' => :'String'
61
60
  }
62
61
  end
63
62
 
@@ -108,9 +107,7 @@ module MergeHRISClient
108
107
  end
109
108
 
110
109
  if attributes.key?(:'remote_data')
111
- if (value = attributes[:'remote_data']).is_a?(Array)
112
- self.remote_data = value
113
- end
110
+ self.remote_data = attributes[:'remote_data']
114
111
  end
115
112
  end
116
113
 
@@ -192,7 +189,7 @@ module MergeHRISClient
192
189
  when :Date
193
190
  Date.parse(value)
194
191
  when :String
195
- value.to_s
192
+ value
196
193
  when :Integer
197
194
  value.to_i
198
195
  when :Float
@@ -24,7 +24,6 @@ module MergeHRISClient
24
24
  # The team's name.
25
25
  attr_accessor :name
26
26
 
27
- # The team's parent team.
28
27
  attr_accessor :parent_team
29
28
 
30
29
  attr_accessor :remote_data
@@ -21,10 +21,8 @@ module MergeHRISClient
21
21
  # The third-party API ID of the matching object.
22
22
  attr_accessor :remote_id
23
23
 
24
- # The employee requesting time off.
25
24
  attr_accessor :employee
26
25
 
27
- # The employee approving the time off request.
28
26
  attr_accessor :approver
29
27
 
30
28
  # The status of this time off request.
@@ -21,10 +21,9 @@ module MergeHRISClient
21
21
  # The third-party API ID of the matching object.
22
22
  attr_accessor :remote_id
23
23
 
24
- # The employee the balance belongs to.
25
24
  attr_accessor :employee
26
25
 
27
- # The current PTO balance in terms of hours.
26
+ # The current remaining PTO balance in terms of hours. This does not represent the starting PTO balance. If the API provider only provides PTO balance in terms of days, we estimate 8 hours per day.
28
27
  attr_accessor :balance
29
28
 
30
29
  # The amount of PTO used in terms of hours.
@@ -140,7 +140,7 @@ module MergeHRISClient
140
140
  when :Date
141
141
  Date.parse(value)
142
142
  when :String
143
- value.to_s
143
+ value
144
144
  when :Integer
145
145
  value.to_i
146
146
  when :Float
@@ -19,10 +19,8 @@ module MergeHRISClient
19
19
  # The third-party API ID of the matching object.
20
20
  attr_accessor :remote_id
21
21
 
22
- # The employee requesting time off.
23
22
  attr_accessor :employee
24
23
 
25
- # The employee approving the time off request.
26
24
  attr_accessor :approver
27
25
 
28
26
  # The status of this time off request.
@@ -237,7 +235,7 @@ module MergeHRISClient
237
235
  when :Date
238
236
  Date.parse(value)
239
237
  when :String
240
- value.to_s
238
+ value
241
239
  when :Integer
242
240
  value.to_i
243
241
  when :Float