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
@@ -24,6 +24,10 @@ module MergeHRISClient
24
24
 
25
25
  attr_accessor :data
26
26
 
27
+ # Pass an array of `MultipartFormField` objects in here instead of using the `data` param if `request_format` is set to `MULTIPART`.
28
+ attr_accessor :multipart_form_data
29
+
30
+ # The headers to use for the request (Merge will handle the account's authorization headers). `Content-Type` header is required for passthrough. Choose content type corresponding to expected format of receiving server.
27
31
  attr_accessor :headers
28
32
 
29
33
  attr_accessor :request_format
@@ -35,6 +39,7 @@ module MergeHRISClient
35
39
  :'path' => :'path',
36
40
  :'base_url_override' => :'base_url_override',
37
41
  :'data' => :'data',
42
+ :'multipart_form_data' => :'multipart_form_data',
38
43
  :'headers' => :'headers',
39
44
  :'request_format' => :'request_format'
40
45
  }
@@ -52,7 +57,8 @@ module MergeHRISClient
52
57
  :'path' => :'String',
53
58
  :'base_url_override' => :'String',
54
59
  :'data' => :'String',
55
- :'headers' => :'Hash<String, Object>',
60
+ :'multipart_form_data' => :'Array<MultipartFormFieldRequest>',
61
+ :'headers' => :'Hash<String, AnyType>',
56
62
  :'request_format' => :'RequestFormatEnum'
57
63
  }
58
64
  end
@@ -62,6 +68,7 @@ module MergeHRISClient
62
68
  Set.new([
63
69
  :'base_url_override',
64
70
  :'data',
71
+ :'multipart_form_data',
65
72
  :'headers',
66
73
  :'request_format'
67
74
  ])
@@ -98,6 +105,12 @@ module MergeHRISClient
98
105
  self.data = attributes[:'data']
99
106
  end
100
107
 
108
+ if attributes.key?(:'multipart_form_data')
109
+ if (value = attributes[:'multipart_form_data']).is_a?(Array)
110
+ self.multipart_form_data = value
111
+ end
112
+ end
113
+
101
114
  if attributes.key?(:'headers')
102
115
  if (value = attributes[:'headers']).is_a?(Hash)
103
116
  self.headers = value
@@ -190,6 +203,7 @@ module MergeHRISClient
190
203
  path == o.path &&
191
204
  base_url_override == o.base_url_override &&
192
205
  data == o.data &&
206
+ multipart_form_data == o.multipart_form_data &&
193
207
  headers == o.headers &&
194
208
  request_format == o.request_format
195
209
  end
@@ -203,7 +217,7 @@ module MergeHRISClient
203
217
  # Calculates hash code according to all attributes.
204
218
  # @return [Integer] Hash code
205
219
  def hash
206
- [method, path, base_url_override, data, headers, request_format].hash
220
+ [method, path, base_url_override, data, multipart_form_data, headers, request_format].hash
207
221
  end
208
222
 
209
223
  # Builds the object from hash
@@ -246,7 +260,7 @@ module MergeHRISClient
246
260
  when :Date
247
261
  Date.parse(value)
248
262
  when :String
249
- value.to_s
263
+ value
250
264
  when :Integer
251
265
  value.to_i
252
266
  when :Float
@@ -0,0 +1,251 @@
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 DebugModeLog
18
+ attr_accessor :log_id
19
+
20
+ attr_accessor :dashboard_view
21
+
22
+ attr_accessor :log_summary
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'log_id' => :'log_id',
28
+ :'dashboard_view' => :'dashboard_view',
29
+ :'log_summary' => :'log_summary'
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
+ :'log_id' => :'String',
42
+ :'dashboard_view' => :'String',
43
+ :'log_summary' => :'DebugModelLogSummary'
44
+ }
45
+ end
46
+
47
+ # List of attributes with nullable: true
48
+ def self.openapi_nullable
49
+ Set.new([
50
+ ])
51
+ end
52
+
53
+ # Initializes the object
54
+ # @param [Hash] attributes Model attributes in the form of hash
55
+ def initialize(attributes = {})
56
+ if (!attributes.is_a?(Hash))
57
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MergeHRISClient::DebugModeLog` initialize method"
58
+ end
59
+
60
+ # check to see if the attribute exists and convert string to symbol for hash key
61
+ attributes = attributes.each_with_object({}) { |(k, v), h|
62
+ if (!self.class.attribute_map.key?(k.to_sym))
63
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MergeHRISClient::DebugModeLog`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
64
+ end
65
+ h[k.to_sym] = v
66
+ }
67
+
68
+ if attributes.key?(:'log_id')
69
+ self.log_id = attributes[:'log_id']
70
+ end
71
+
72
+ if attributes.key?(:'dashboard_view')
73
+ self.dashboard_view = attributes[:'dashboard_view']
74
+ end
75
+
76
+ if attributes.key?(:'log_summary')
77
+ self.log_summary = attributes[:'log_summary']
78
+ end
79
+ end
80
+
81
+ # Show invalid properties with the reasons. Usually used together with valid?
82
+ # @return Array for valid properties with the reasons
83
+ def list_invalid_properties
84
+ invalid_properties = Array.new
85
+ if @log_id.nil?
86
+ invalid_properties.push('invalid value for "log_id", log_id cannot be nil.')
87
+ end
88
+
89
+ if @dashboard_view.nil?
90
+ invalid_properties.push('invalid value for "dashboard_view", dashboard_view cannot be nil.')
91
+ end
92
+
93
+ if @log_summary.nil?
94
+ invalid_properties.push('invalid value for "log_summary", log_summary cannot be nil.')
95
+ end
96
+
97
+ invalid_properties
98
+ end
99
+
100
+ # Check to see if the all the properties in the model are valid
101
+ # @return true if the model is valid
102
+ def valid?
103
+ return false if @log_id.nil?
104
+ return false if @dashboard_view.nil?
105
+ return false if @log_summary.nil?
106
+ true
107
+ end
108
+
109
+ # Checks equality by comparing each attribute.
110
+ # @param [Object] Object to be compared
111
+ def ==(o)
112
+ return true if self.equal?(o)
113
+ self.class == o.class &&
114
+ log_id == o.log_id &&
115
+ dashboard_view == o.dashboard_view &&
116
+ log_summary == o.log_summary
117
+ end
118
+
119
+ # @see the `==` method
120
+ # @param [Object] Object to be compared
121
+ def eql?(o)
122
+ self == o
123
+ end
124
+
125
+ # Calculates hash code according to all attributes.
126
+ # @return [Integer] Hash code
127
+ def hash
128
+ [log_id, dashboard_view, log_summary].hash
129
+ end
130
+
131
+ # Builds the object from hash
132
+ # @param [Hash] attributes Model attributes in the form of hash
133
+ # @return [Object] Returns the model itself
134
+ def self.build_from_hash(attributes)
135
+ new.build_from_hash(attributes)
136
+ end
137
+
138
+ # Builds the object from hash
139
+ # @param [Hash] attributes Model attributes in the form of hash
140
+ # @return [Object] Returns the model itself
141
+ def build_from_hash(attributes)
142
+ return nil unless attributes.is_a?(Hash)
143
+ self.class.openapi_types.each_pair do |key, type|
144
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
145
+ self.send("#{key}=", nil)
146
+ elsif type =~ /\AArray<(.*)>/i
147
+ # check to ensure the input is an array given that the attribute
148
+ # is documented as an array but the input is not
149
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
150
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
151
+ end
152
+ elsif !attributes[self.class.attribute_map[key]].nil?
153
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
154
+ end
155
+ end
156
+
157
+ self
158
+ end
159
+
160
+ # Deserializes the data based on type
161
+ # @param string type Data type
162
+ # @param string value Value to be deserialized
163
+ # @return [Object] Deserialized data
164
+ def _deserialize(type, value)
165
+ case type.to_sym
166
+ when :Time
167
+ Time.parse(value)
168
+ when :Date
169
+ Date.parse(value)
170
+ when :String
171
+ value
172
+ when :Integer
173
+ value.to_i
174
+ when :Float
175
+ value.to_f
176
+ when :Boolean
177
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
178
+ true
179
+ else
180
+ false
181
+ end
182
+ when :Object
183
+ # generic object (usually a Hash), return directly
184
+ value
185
+ when /\AArray<(?<inner_type>.+)>\z/
186
+ inner_type = Regexp.last_match[:inner_type]
187
+ value.map { |v| _deserialize(inner_type, v) }
188
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
189
+ k_type = Regexp.last_match[:k_type]
190
+ v_type = Regexp.last_match[:v_type]
191
+ {}.tap do |hash|
192
+ value.each do |k, v|
193
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
194
+ end
195
+ end
196
+ else # model
197
+ # models (e.g. Pet) or oneOf
198
+ klass = MergeHRISClient.const_get(type)
199
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
200
+ end
201
+ end
202
+
203
+ # Returns the string representation of the object
204
+ # @return [String] String presentation of the object
205
+ def to_s
206
+ to_hash.to_s
207
+ end
208
+
209
+ # to_body is an alias to to_hash (backward compatibility)
210
+ # @return [Hash] Returns the object in the form of hash
211
+ def to_body
212
+ to_hash
213
+ end
214
+
215
+ # Returns the object in the form of hash
216
+ # @return [Hash] Returns the object in the form of hash
217
+ def to_hash
218
+ hash = {}
219
+ self.class.attribute_map.each_pair do |attr, param|
220
+ value = self.send(attr)
221
+ if value.nil?
222
+ is_nullable = self.class.openapi_nullable.include?(attr)
223
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
224
+ end
225
+
226
+ hash[param] = _to_hash(value)
227
+ end
228
+ hash
229
+ end
230
+
231
+ # Outputs non-array value in the form of hash
232
+ # For object, use to_hash. Otherwise, just return the value
233
+ # @param [Object] value Any valid value
234
+ # @return [Hash] Returns the value in the form of hash
235
+ def _to_hash(value)
236
+ if value.is_a?(Array)
237
+ value.compact.map { |v| _to_hash(v) }
238
+ elsif value.is_a?(Hash)
239
+ {}.tap do |hash|
240
+ value.each { |k, v| hash[k] = _to_hash(v) }
241
+ end
242
+ elsif value.respond_to? :to_hash
243
+ value.to_hash
244
+ else
245
+ value
246
+ end
247
+ end
248
+
249
+ end
250
+
251
+ end
@@ -0,0 +1,251 @@
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 DebugModelLogSummary
18
+ attr_accessor :url
19
+
20
+ attr_accessor :method
21
+
22
+ attr_accessor :status_code
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'url' => :'url',
28
+ :'method' => :'method',
29
+ :'status_code' => :'status_code'
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
+ :'url' => :'String',
42
+ :'method' => :'String',
43
+ :'status_code' => :'Integer'
44
+ }
45
+ end
46
+
47
+ # List of attributes with nullable: true
48
+ def self.openapi_nullable
49
+ Set.new([
50
+ ])
51
+ end
52
+
53
+ # Initializes the object
54
+ # @param [Hash] attributes Model attributes in the form of hash
55
+ def initialize(attributes = {})
56
+ if (!attributes.is_a?(Hash))
57
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MergeHRISClient::DebugModelLogSummary` initialize method"
58
+ end
59
+
60
+ # check to see if the attribute exists and convert string to symbol for hash key
61
+ attributes = attributes.each_with_object({}) { |(k, v), h|
62
+ if (!self.class.attribute_map.key?(k.to_sym))
63
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MergeHRISClient::DebugModelLogSummary`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
64
+ end
65
+ h[k.to_sym] = v
66
+ }
67
+
68
+ if attributes.key?(:'url')
69
+ self.url = attributes[:'url']
70
+ end
71
+
72
+ if attributes.key?(:'method')
73
+ self.method = attributes[:'method']
74
+ end
75
+
76
+ if attributes.key?(:'status_code')
77
+ self.status_code = attributes[:'status_code']
78
+ end
79
+ end
80
+
81
+ # Show invalid properties with the reasons. Usually used together with valid?
82
+ # @return Array for valid properties with the reasons
83
+ def list_invalid_properties
84
+ invalid_properties = Array.new
85
+ if @url.nil?
86
+ invalid_properties.push('invalid value for "url", url cannot be nil.')
87
+ end
88
+
89
+ if @method.nil?
90
+ invalid_properties.push('invalid value for "method", method cannot be nil.')
91
+ end
92
+
93
+ if @status_code.nil?
94
+ invalid_properties.push('invalid value for "status_code", status_code cannot be nil.')
95
+ end
96
+
97
+ invalid_properties
98
+ end
99
+
100
+ # Check to see if the all the properties in the model are valid
101
+ # @return true if the model is valid
102
+ def valid?
103
+ return false if @url.nil?
104
+ return false if @method.nil?
105
+ return false if @status_code.nil?
106
+ true
107
+ end
108
+
109
+ # Checks equality by comparing each attribute.
110
+ # @param [Object] Object to be compared
111
+ def ==(o)
112
+ return true if self.equal?(o)
113
+ self.class == o.class &&
114
+ url == o.url &&
115
+ method == o.method &&
116
+ status_code == o.status_code
117
+ end
118
+
119
+ # @see the `==` method
120
+ # @param [Object] Object to be compared
121
+ def eql?(o)
122
+ self == o
123
+ end
124
+
125
+ # Calculates hash code according to all attributes.
126
+ # @return [Integer] Hash code
127
+ def hash
128
+ [url, method, status_code].hash
129
+ end
130
+
131
+ # Builds the object from hash
132
+ # @param [Hash] attributes Model attributes in the form of hash
133
+ # @return [Object] Returns the model itself
134
+ def self.build_from_hash(attributes)
135
+ new.build_from_hash(attributes)
136
+ end
137
+
138
+ # Builds the object from hash
139
+ # @param [Hash] attributes Model attributes in the form of hash
140
+ # @return [Object] Returns the model itself
141
+ def build_from_hash(attributes)
142
+ return nil unless attributes.is_a?(Hash)
143
+ self.class.openapi_types.each_pair do |key, type|
144
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
145
+ self.send("#{key}=", nil)
146
+ elsif type =~ /\AArray<(.*)>/i
147
+ # check to ensure the input is an array given that the attribute
148
+ # is documented as an array but the input is not
149
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
150
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
151
+ end
152
+ elsif !attributes[self.class.attribute_map[key]].nil?
153
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
154
+ end
155
+ end
156
+
157
+ self
158
+ end
159
+
160
+ # Deserializes the data based on type
161
+ # @param string type Data type
162
+ # @param string value Value to be deserialized
163
+ # @return [Object] Deserialized data
164
+ def _deserialize(type, value)
165
+ case type.to_sym
166
+ when :Time
167
+ Time.parse(value)
168
+ when :Date
169
+ Date.parse(value)
170
+ when :String
171
+ value
172
+ when :Integer
173
+ value.to_i
174
+ when :Float
175
+ value.to_f
176
+ when :Boolean
177
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
178
+ true
179
+ else
180
+ false
181
+ end
182
+ when :Object
183
+ # generic object (usually a Hash), return directly
184
+ value
185
+ when /\AArray<(?<inner_type>.+)>\z/
186
+ inner_type = Regexp.last_match[:inner_type]
187
+ value.map { |v| _deserialize(inner_type, v) }
188
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
189
+ k_type = Regexp.last_match[:k_type]
190
+ v_type = Regexp.last_match[:v_type]
191
+ {}.tap do |hash|
192
+ value.each do |k, v|
193
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
194
+ end
195
+ end
196
+ else # model
197
+ # models (e.g. Pet) or oneOf
198
+ klass = MergeHRISClient.const_get(type)
199
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
200
+ end
201
+ end
202
+
203
+ # Returns the string representation of the object
204
+ # @return [String] String presentation of the object
205
+ def to_s
206
+ to_hash.to_s
207
+ end
208
+
209
+ # to_body is an alias to to_hash (backward compatibility)
210
+ # @return [Hash] Returns the object in the form of hash
211
+ def to_body
212
+ to_hash
213
+ end
214
+
215
+ # Returns the object in the form of hash
216
+ # @return [Hash] Returns the object in the form of hash
217
+ def to_hash
218
+ hash = {}
219
+ self.class.attribute_map.each_pair do |attr, param|
220
+ value = self.send(attr)
221
+ if value.nil?
222
+ is_nullable = self.class.openapi_nullable.include?(attr)
223
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
224
+ end
225
+
226
+ hash[param] = _to_hash(value)
227
+ end
228
+ hash
229
+ end
230
+
231
+ # Outputs non-array value in the form of hash
232
+ # For object, use to_hash. Otherwise, just return the value
233
+ # @param [Object] value Any valid value
234
+ # @return [Hash] Returns the value in the form of hash
235
+ def _to_hash(value)
236
+ if value.is_a?(Array)
237
+ value.compact.map { |v| _to_hash(v) }
238
+ elsif value.is_a?(Hash)
239
+ {}.tap do |hash|
240
+ value.each { |k, v| hash[k] = _to_hash(v) }
241
+ end
242
+ elsif value.respond_to? :to_hash
243
+ value.to_hash
244
+ else
245
+ value
246
+ end
247
+ end
248
+
249
+ end
250
+
251
+ end
@@ -18,7 +18,6 @@ module MergeHRISClient
18
18
  class Deduction
19
19
  attr_accessor :id
20
20
 
21
- # The deduction's employee payroll run.
22
21
  attr_accessor :employee_payroll_run
23
22
 
24
23
  # The deduction's name.
@@ -18,7 +18,6 @@ module MergeHRISClient
18
18
  class Earning
19
19
  attr_accessor :id
20
20
 
21
- # The earning's employee payroll run.
22
21
  attr_accessor :employee_payroll_run
23
22
 
24
23
  # The amount earned.
@@ -51,8 +50,8 @@ module MergeHRISClient
51
50
  :'id' => :'String',
52
51
  :'employee_payroll_run' => :'String',
53
52
  :'amount' => :'Float',
54
- :'type' => :'TypeEnum',
55
- :'remote_data' => :'Array<Hash<RemoteData>>'
53
+ :'type' => :'EarningTypeEnum',
54
+ :'remote_data' => :'String'
56
55
  }
57
56
  end
58
57
 
@@ -98,9 +97,7 @@ module MergeHRISClient
98
97
  end
99
98
 
100
99
  if attributes.key?(:'remote_data')
101
- if (value = attributes[:'remote_data']).is_a?(Array)
102
- self.remote_data = value
103
- end
100
+ self.remote_data = attributes[:'remote_data']
104
101
  end
105
102
  end
106
103
 
@@ -181,7 +178,7 @@ module MergeHRISClient
181
178
  when :Date
182
179
  Date.parse(value)
183
180
  when :String
184
- value.to_s
181
+ value
185
182
  when :Integer
186
183
  value.to_i
187
184
  when :Float
@@ -0,0 +1,38 @@
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 EarningTypeEnum
18
+ SALARY = "SALARY".freeze
19
+ REIMBURSEMENT = "REIMBURSEMENT".freeze
20
+ OVERTIME = "OVERTIME".freeze
21
+ BONUS = "BONUS".freeze
22
+
23
+ # Builds the enum from string
24
+ # @param [String] The enum value in the form of the string
25
+ # @return [String] The enum value
26
+ def self.build_from_hash(value)
27
+ new.build_from_hash(value)
28
+ end
29
+
30
+ # Builds the enum from string
31
+ # @param [String] The enum value in the form of the string
32
+ # @return [String] The enum value
33
+ def build_from_hash(value)
34
+ value
35
+ end
36
+ end
37
+
38
+ end