merge_hris_client 1.0.4 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (179) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +28 -12
  3. data/docs/AccountDetails.md +7 -7
  4. data/docs/AccountDetailsApi.md +2 -2
  5. data/docs/AccountIntegration.md +4 -4
  6. data/docs/AccountTokenApi.md +2 -2
  7. data/docs/AvailableActionsApi.md +2 -2
  8. data/docs/BankInfo.md +1 -1
  9. data/docs/BankInfoApi.md +8 -12
  10. data/docs/Benefit.md +2 -2
  11. data/docs/BenefitsApi.md +4 -4
  12. data/docs/CompaniesApi.md +4 -4
  13. data/docs/DataPassthroughRequest.md +2 -0
  14. data/docs/DebugModeLog.md +22 -0
  15. data/docs/DebugModelLogSummary.md +22 -0
  16. data/docs/Deduction.md +2 -2
  17. data/docs/DeductionsApi.md +4 -4
  18. data/docs/DeleteAccountApi.md +3 -2
  19. data/docs/Earning.md +3 -3
  20. data/docs/EarningTypeEnum.md +15 -0
  21. data/docs/Employee.md +9 -7
  22. data/docs/EmployeeEndpointRequest.md +18 -0
  23. data/docs/EmployeePayrollRun.md +2 -2
  24. data/docs/EmployeePayrollRunsApi.md +4 -4
  25. data/docs/EmployeeRequest.md +70 -0
  26. data/docs/EmployeeResponse.md +24 -0
  27. data/docs/EmployeesApi.md +158 -4
  28. data/docs/Employment.md +1 -1
  29. data/docs/EmploymentsApi.md +5 -4
  30. data/docs/EncodingEnum.md +15 -0
  31. data/docs/EndUserDetailsRequest.md +3 -1
  32. data/docs/ForceResyncApi.md +2 -2
  33. data/docs/GenerateKeyApi.md +2 -2
  34. data/docs/Group.md +28 -0
  35. data/docs/GroupTypeEnum.md +15 -0
  36. data/docs/GroupsApi.md +177 -0
  37. data/docs/IgnoreCommonModel.md +20 -0
  38. data/docs/IssuesApi.md +5 -4
  39. data/docs/LinkTokenApi.md +3 -3
  40. data/docs/LinkedAccountsApi.md +2 -2
  41. data/docs/Location.md +2 -0
  42. data/docs/LocationsApi.md +4 -4
  43. data/docs/MultipartFormFieldRequest.md +26 -0
  44. data/docs/PaginatedGroupList.md +22 -0
  45. data/docs/PassthroughApi.md +2 -2
  46. data/docs/PayGroupsApi.md +4 -4
  47. data/docs/PayrollRunsApi.md +4 -4
  48. data/docs/RegenerateKeyApi.md +2 -2
  49. data/docs/SyncStatusApi.md +0 -1
  50. data/docs/Tax.md +2 -2
  51. data/docs/Team.md +1 -1
  52. data/docs/TeamsApi.md +5 -4
  53. data/docs/TimeOff.md +2 -2
  54. data/docs/TimeOffApi.md +8 -6
  55. data/docs/TimeOffBalance.md +1 -1
  56. data/docs/TimeOffRequest.md +2 -2
  57. data/docs/TimeOffResponse.md +3 -1
  58. data/lib/merge_hris_client/api/bank_info_api.rb +4 -9
  59. data/lib/merge_hris_client/api/employees_api.rb +147 -2
  60. data/lib/merge_hris_client/api/groups_api.rb +182 -0
  61. data/lib/merge_hris_client/api/sync_status_api.rb +0 -62
  62. data/lib/merge_hris_client/api/time_off_api.rb +3 -0
  63. data/lib/merge_hris_client/configuration.rb +6 -4
  64. data/lib/merge_hris_client/models/account_details.rb +1 -1
  65. data/lib/merge_hris_client/models/account_details_and_actions.rb +1 -1
  66. data/lib/merge_hris_client/models/account_details_and_actions_integration.rb +1 -1
  67. data/lib/merge_hris_client/models/account_details_and_actions_status_enum.rb +1 -0
  68. data/lib/merge_hris_client/models/account_integration.rb +5 -27
  69. data/lib/merge_hris_client/models/account_token.rb +1 -1
  70. data/lib/merge_hris_client/models/account_type_enum.rb +1 -0
  71. data/lib/merge_hris_client/models/available_actions.rb +1 -1
  72. data/lib/merge_hris_client/models/bank_info.rb +0 -1
  73. data/lib/merge_hris_client/models/benefit.rb +1 -2
  74. data/lib/merge_hris_client/models/categories_enum.rb +1 -0
  75. data/lib/merge_hris_client/models/category_enum.rb +1 -0
  76. data/lib/merge_hris_client/models/country_enum.rb +1 -0
  77. data/lib/merge_hris_client/models/data_passthrough_request.rb +16 -3
  78. data/lib/merge_hris_client/models/debug_mode_log.rb +251 -0
  79. data/lib/merge_hris_client/models/debug_model_log_summary.rb +251 -0
  80. data/lib/merge_hris_client/models/deduction.rb +0 -1
  81. data/lib/merge_hris_client/models/earning.rb +4 -8
  82. data/lib/merge_hris_client/models/earning_type_enum.rb +38 -0
  83. data/lib/merge_hris_client/models/employee.rb +13 -8
  84. data/lib/merge_hris_client/models/employee_endpoint_request.rb +223 -0
  85. data/lib/merge_hris_client/models/employee_payroll_run.rb +1 -3
  86. data/lib/merge_hris_client/models/employee_request.rb +564 -0
  87. data/lib/merge_hris_client/models/employee_response.rb +266 -0
  88. data/lib/merge_hris_client/models/employment.rb +0 -1
  89. data/lib/merge_hris_client/models/employment_status_enum.rb +1 -1
  90. data/lib/merge_hris_client/models/employment_type_enum.rb +1 -1
  91. data/lib/merge_hris_client/models/encoding_enum.rb +36 -0
  92. data/lib/merge_hris_client/models/end_user_details_request.rb +40 -27
  93. data/lib/merge_hris_client/models/error_validation_problem.rb +1 -1
  94. data/lib/merge_hris_client/models/ethnicity_enum.rb +1 -1
  95. data/lib/merge_hris_client/models/flsa_status_enum.rb +1 -1
  96. data/lib/merge_hris_client/models/gender_enum.rb +1 -1
  97. data/lib/merge_hris_client/models/generate_remote_key_request.rb +1 -1
  98. data/lib/merge_hris_client/models/group.rb +275 -0
  99. data/lib/merge_hris_client/models/group_type_enum.rb +38 -0
  100. data/lib/merge_hris_client/models/ignore_common_model.rb +247 -0
  101. data/lib/merge_hris_client/models/ignore_common_model_request.rb +256 -0
  102. data/lib/merge_hris_client/models/issue.rb +1 -1
  103. data/lib/merge_hris_client/models/issue_status_enum.rb +1 -1
  104. data/lib/merge_hris_client/models/link_token.rb +1 -1
  105. data/lib/merge_hris_client/models/location.rb +12 -1
  106. data/lib/merge_hris_client/models/location_type_enum.rb +36 -0
  107. data/lib/merge_hris_client/models/marital_status_enum.rb +1 -1
  108. data/lib/merge_hris_client/models/method_enum.rb +1 -1
  109. data/lib/merge_hris_client/models/model_operation.rb +1 -1
  110. data/lib/merge_hris_client/models/multipart_form_field_request.rb +341 -0
  111. data/lib/merge_hris_client/models/paginated_account_details_and_actions_list.rb +1 -1
  112. data/lib/merge_hris_client/models/paginated_bank_info_list.rb +1 -1
  113. data/lib/merge_hris_client/models/paginated_benefit_list.rb +1 -1
  114. data/lib/merge_hris_client/models/paginated_company_list.rb +1 -1
  115. data/lib/merge_hris_client/models/paginated_deduction_list.rb +1 -1
  116. data/lib/merge_hris_client/models/paginated_employee_list.rb +1 -1
  117. data/lib/merge_hris_client/models/paginated_employee_payroll_run_list.rb +1 -1
  118. data/lib/merge_hris_client/models/paginated_employment_list.rb +1 -1
  119. data/lib/merge_hris_client/models/paginated_group_list.rb +240 -0
  120. data/lib/merge_hris_client/models/paginated_issue_list.rb +1 -1
  121. data/lib/merge_hris_client/models/paginated_location_list.rb +1 -1
  122. data/lib/merge_hris_client/models/paginated_pay_group_list.rb +1 -1
  123. data/lib/merge_hris_client/models/paginated_payroll_run_list.rb +1 -1
  124. data/lib/merge_hris_client/models/paginated_sync_status_list.rb +1 -1
  125. data/lib/merge_hris_client/models/paginated_team_list.rb +1 -1
  126. data/lib/merge_hris_client/models/paginated_time_off_balance_list.rb +1 -1
  127. data/lib/merge_hris_client/models/paginated_time_off_list.rb +1 -1
  128. data/lib/merge_hris_client/models/pay_currency_enum.rb +1 -1
  129. data/lib/merge_hris_client/models/pay_frequency_enum.rb +1 -2
  130. data/lib/merge_hris_client/models/pay_period_enum.rb +1 -1
  131. data/lib/merge_hris_client/models/policy_type_enum.rb +1 -0
  132. data/lib/merge_hris_client/models/reason_enum.rb +37 -0
  133. data/lib/merge_hris_client/models/remote_data.rb +1 -1
  134. data/lib/merge_hris_client/models/remote_data_request.rb +1 -1
  135. data/lib/merge_hris_client/models/remote_key.rb +1 -1
  136. data/lib/merge_hris_client/models/remote_key_for_regeneration_request.rb +1 -1
  137. data/lib/merge_hris_client/models/remote_response.rb +1 -1
  138. data/lib/merge_hris_client/models/request_format_enum.rb +2 -0
  139. data/lib/merge_hris_client/models/request_type_enum.rb +1 -0
  140. data/lib/merge_hris_client/models/run_state_enum.rb +1 -1
  141. data/lib/merge_hris_client/models/run_type_enum.rb +1 -11
  142. data/lib/merge_hris_client/models/sync_status.rb +1 -1
  143. data/lib/merge_hris_client/models/sync_status_status_enum.rb +1 -2
  144. data/lib/merge_hris_client/models/tax.rb +3 -7
  145. data/lib/merge_hris_client/models/team.rb +0 -1
  146. data/lib/merge_hris_client/models/time_off.rb +0 -2
  147. data/lib/merge_hris_client/models/time_off_balance.rb +0 -1
  148. data/lib/merge_hris_client/models/time_off_endpoint_request.rb +1 -1
  149. data/lib/merge_hris_client/models/time_off_request.rb +1 -3
  150. data/lib/merge_hris_client/models/time_off_response.rb +16 -5
  151. data/lib/merge_hris_client/models/time_off_status_enum.rb +1 -1
  152. data/lib/merge_hris_client/models/units_enum.rb +1 -1
  153. data/lib/merge_hris_client/models/validation_problem_source.rb +1 -1
  154. data/lib/merge_hris_client/models/warning_validation_problem.rb +1 -1
  155. data/lib/merge_hris_client/version.rb +1 -1
  156. data/lib/merge_hris_client.rb +16 -2
  157. data/pull_request_template.md +3 -1
  158. data/spec/api/bank_info_api_spec.rb +2 -4
  159. data/spec/api/employees_api_spec.rb +26 -0
  160. data/spec/api/groups_api_spec.rb +68 -0
  161. data/spec/api/time_off_api_spec.rb +1 -0
  162. data/spec/models/data_passthrough_request_spec.rb +6 -0
  163. data/spec/models/debug_mode_log_spec.rb +46 -0
  164. data/spec/models/debug_model_log_summary_spec.rb +46 -0
  165. data/spec/models/earning_type_enum_spec.rb +28 -0
  166. data/spec/models/employee_endpoint_request_spec.rb +34 -0
  167. data/spec/models/employee_request_spec.rb +190 -0
  168. data/spec/models/employee_response_spec.rb +52 -0
  169. data/spec/models/employee_spec.rb +6 -0
  170. data/spec/models/encoding_enum_spec.rb +28 -0
  171. data/spec/models/end_user_details_request_spec.rb +6 -0
  172. data/spec/models/group_spec.rb +64 -0
  173. data/spec/models/group_type_enum_spec.rb +28 -0
  174. data/spec/models/ignore_common_model_spec.rb +40 -0
  175. data/spec/models/location_spec.rb +6 -0
  176. data/spec/models/multipart_form_field_request_spec.rb +58 -0
  177. data/spec/models/paginated_group_list_spec.rb +46 -0
  178. data/spec/models/time_off_response_spec.rb +6 -0
  179. metadata +57 -2
@@ -154,7 +154,7 @@ module MergeHRISClient
154
154
  when :Date
155
155
  Date.parse(value)
156
156
  when :String
157
- value.to_s
157
+ value
158
158
  when :Integer
159
159
  value.to_i
160
160
  when :Float
@@ -32,4 +32,5 @@ module MergeHRISClient
32
32
  value
33
33
  end
34
34
  end
35
+
35
36
  end
@@ -166,7 +166,7 @@ module MergeHRISClient
166
166
  when :Date
167
167
  Date.parse(value)
168
168
  when :String
169
- value.to_s
169
+ value
170
170
  when :Integer
171
171
  value.to_i
172
172
  when :Float
@@ -21,7 +21,6 @@ module MergeHRISClient
21
21
  # The third-party API ID of the matching object.
22
22
  attr_accessor :remote_id
23
23
 
24
- # The employee with this bank account.
25
24
  attr_accessor :employee
26
25
 
27
26
  # The account number.
@@ -21,7 +21,6 @@ module MergeHRISClient
21
21
  # The third-party API ID of the matching object.
22
22
  attr_accessor :remote_id
23
23
 
24
- # The employee on the plan.
25
24
  attr_accessor :employee
26
25
 
27
26
  # The name of the benefit provider.
@@ -64,7 +63,7 @@ module MergeHRISClient
64
63
  :'remote_id' => :'String',
65
64
  :'employee' => :'String',
66
65
  :'provider_name' => :'String',
67
- :'benefit_plan_type' => :'BenefitPlanTypeEnum',
66
+ :'benefit_plan_type' => :'String',
68
67
  :'employee_contribution' => :'Float',
69
68
  :'company_contribution' => :'Float',
70
69
  :'remote_data' => :'Array<RemoteData>'
@@ -33,4 +33,5 @@ module MergeHRISClient
33
33
  value
34
34
  end
35
35
  end
36
+
36
37
  end
@@ -33,4 +33,5 @@ module MergeHRISClient
33
33
  value
34
34
  end
35
35
  end
36
+
36
37
  end
@@ -279,4 +279,5 @@ module MergeHRISClient
279
279
  value
280
280
  end
281
281
  end
282
+
282
283
  end
@@ -24,6 +24,9 @@ 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
+
27
30
  attr_accessor :headers
28
31
 
29
32
  attr_accessor :request_format
@@ -35,6 +38,7 @@ module MergeHRISClient
35
38
  :'path' => :'path',
36
39
  :'base_url_override' => :'base_url_override',
37
40
  :'data' => :'data',
41
+ :'multipart_form_data' => :'multipart_form_data',
38
42
  :'headers' => :'headers',
39
43
  :'request_format' => :'request_format'
40
44
  }
@@ -52,7 +56,8 @@ module MergeHRISClient
52
56
  :'path' => :'String',
53
57
  :'base_url_override' => :'String',
54
58
  :'data' => :'String',
55
- :'headers' => :'Hash<String, Object>',
59
+ :'multipart_form_data' => :'Array<MultipartFormFieldRequest>',
60
+ :'headers' => :'Hash<String, AnyType>',
56
61
  :'request_format' => :'RequestFormatEnum'
57
62
  }
58
63
  end
@@ -62,6 +67,7 @@ module MergeHRISClient
62
67
  Set.new([
63
68
  :'base_url_override',
64
69
  :'data',
70
+ :'multipart_form_data',
65
71
  :'headers',
66
72
  :'request_format'
67
73
  ])
@@ -98,6 +104,12 @@ module MergeHRISClient
98
104
  self.data = attributes[:'data']
99
105
  end
100
106
 
107
+ if attributes.key?(:'multipart_form_data')
108
+ if (value = attributes[:'multipart_form_data']).is_a?(Array)
109
+ self.multipart_form_data = value
110
+ end
111
+ end
112
+
101
113
  if attributes.key?(:'headers')
102
114
  if (value = attributes[:'headers']).is_a?(Hash)
103
115
  self.headers = value
@@ -190,6 +202,7 @@ module MergeHRISClient
190
202
  path == o.path &&
191
203
  base_url_override == o.base_url_override &&
192
204
  data == o.data &&
205
+ multipart_form_data == o.multipart_form_data &&
193
206
  headers == o.headers &&
194
207
  request_format == o.request_format
195
208
  end
@@ -203,7 +216,7 @@ module MergeHRISClient
203
216
  # Calculates hash code according to all attributes.
204
217
  # @return [Integer] Hash code
205
218
  def hash
206
- [method, path, base_url_override, data, headers, request_format].hash
219
+ [method, path, base_url_override, data, multipart_form_data, headers, request_format].hash
207
220
  end
208
221
 
209
222
  # Builds the object from hash
@@ -246,7 +259,7 @@ module MergeHRISClient
246
259
  when :Date
247
260
  Date.parse(value)
248
261
  when :String
249
- value.to_s
262
+ value
250
263
  when :Integer
251
264
  value.to_i
252
265
  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
 
@@ -62,7 +61,6 @@ module MergeHRISClient
62
61
  :'employee_payroll_run',
63
62
  :'amount',
64
63
  :'type',
65
- :'remote_data'
66
64
  ])
67
65
  end
68
66
 
@@ -98,9 +96,7 @@ module MergeHRISClient
98
96
  end
99
97
 
100
98
  if attributes.key?(:'remote_data')
101
- if (value = attributes[:'remote_data']).is_a?(Array)
102
- self.remote_data = value
103
- end
99
+ self.remote_data = attributes[:'remote_data']
104
100
  end
105
101
  end
106
102
 
@@ -181,7 +177,7 @@ module MergeHRISClient
181
177
  when :Date
182
178
  Date.parse(value)
183
179
  when :String
184
- value.to_s
180
+ value
185
181
  when :Integer
186
182
  value.to_i
187
183
  when :Float