merge_hris_client 2.0.5 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (217) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +27 -8
  3. data/docs/AccountIntegration.md +6 -2
  4. data/docs/BankInfo.md +9 -5
  5. data/docs/BankInfoApi.md +15 -11
  6. data/docs/Benefit.md +8 -4
  7. data/docs/BenefitsApi.md +6 -6
  8. data/docs/CommonModelScopeData.md +20 -0
  9. data/docs/CommonModelScopes.md +20 -0
  10. data/docs/CommonModelScopesApi.md +157 -0
  11. data/docs/CommonModelScopesBodyRequest.md +22 -0
  12. data/docs/CommonModelScopesDisabledModels.md +26 -0
  13. data/docs/CommonModelScopesDisabledModelsEnabledActionsEnum.md +15 -0
  14. data/docs/CommonModelScopesPostInnerDeserializerRequest.md +22 -0
  15. data/docs/CommonModelScopesUpdateSerializer.md +18 -0
  16. data/docs/CompaniesApi.md +4 -4
  17. data/docs/Company.md +7 -3
  18. data/docs/ConditionSchema.md +30 -0
  19. data/docs/ConditionTypeEnum.md +15 -0
  20. data/docs/DataPassthroughRequest.md +1 -1
  21. data/docs/Deduction.md +11 -5
  22. data/docs/Earning.md +10 -2
  23. data/docs/Employee.md +19 -15
  24. data/docs/EmployeePayrollRun.md +11 -7
  25. data/docs/EmployeePayrollRunsApi.md +4 -4
  26. data/docs/EmployeeRequest.md +16 -18
  27. data/docs/EmployeesApi.md +31 -18
  28. data/docs/Employment.md +14 -10
  29. data/docs/EmploymentsApi.md +13 -9
  30. data/docs/EnabledActionsEnum.md +15 -0
  31. data/docs/EndUserDetailsRequest.md +5 -3
  32. data/docs/ForceResyncApi.md +1 -1
  33. data/docs/Group.md +8 -4
  34. data/docs/GroupsApi.md +15 -9
  35. data/docs/Issue.md +10 -8
  36. data/docs/IssuesApi.md +6 -6
  37. data/docs/LinkToken.md +1 -1
  38. data/docs/LinkedAccountCondition.md +28 -0
  39. data/docs/LinkedAccountConditionRequest.md +22 -0
  40. data/docs/LinkedAccountSelectiveSyncConfiguration.md +18 -0
  41. data/docs/LinkedAccountSelectiveSyncConfigurationListRequest.md +18 -0
  42. data/docs/LinkedAccountSelectiveSyncConfigurationRequest.md +18 -0
  43. data/docs/LinkedAccountsApi.md +2 -2
  44. data/docs/Location.md +9 -5
  45. data/docs/LocationsApi.md +13 -9
  46. data/docs/MetaResponse.md +2 -0
  47. data/docs/MultipartFormFieldRequest.md +1 -1
  48. data/docs/OperatorSchema.md +20 -0
  49. data/docs/PaginatedConditionSchemaList.md +22 -0
  50. data/docs/PayGroup.md +7 -3
  51. data/docs/PayGroupsApi.md +4 -4
  52. data/docs/PayrollRun.md +9 -5
  53. data/docs/PayrollRunsApi.md +14 -10
  54. data/docs/SelectiveSyncApi.md +233 -0
  55. data/docs/SelectiveSyncConfigurationsUsageEnum.md +15 -0
  56. data/docs/SyncStatus.md +5 -3
  57. data/docs/Tax.md +9 -1
  58. data/docs/Team.md +8 -4
  59. data/docs/TeamsApi.md +4 -4
  60. data/docs/TimeOff.md +13 -9
  61. data/docs/TimeOffApi.md +16 -12
  62. data/docs/TimeOffBalance.md +10 -6
  63. data/docs/TimeOffBalancesApi.md +15 -11
  64. data/docs/TimeOffRequest.md +11 -9
  65. data/lib/merge_hris_client/api/bank_info_api.rb +24 -10
  66. data/lib/merge_hris_client/api/benefits_api.rb +6 -6
  67. data/lib/merge_hris_client/api/common_model_scopes_api.rb +146 -0
  68. data/lib/merge_hris_client/api/companies_api.rb +4 -4
  69. data/lib/merge_hris_client/api/employee_payroll_runs_api.rb +4 -4
  70. data/lib/merge_hris_client/api/employees_api.rb +44 -17
  71. data/lib/merge_hris_client/api/employments_api.rb +22 -8
  72. data/lib/merge_hris_client/api/force_resync_api.rb +2 -2
  73. data/lib/merge_hris_client/api/groups_api.rb +25 -8
  74. data/lib/merge_hris_client/api/issues_api.rb +6 -6
  75. data/lib/merge_hris_client/api/linked_accounts_api.rb +3 -3
  76. data/lib/merge_hris_client/api/locations_api.rb +22 -8
  77. data/lib/merge_hris_client/api/pay_groups_api.rb +4 -4
  78. data/lib/merge_hris_client/api/payroll_runs_api.rb +24 -10
  79. data/lib/merge_hris_client/api/selective_sync_api.rb +225 -0
  80. data/lib/merge_hris_client/api/teams_api.rb +4 -4
  81. data/lib/merge_hris_client/api/time_off_api.rb +26 -12
  82. data/lib/merge_hris_client/api/time_off_balances_api.rb +24 -10
  83. data/lib/merge_hris_client/models/account_details_and_actions_status_enum.rb +1 -1
  84. data/lib/merge_hris_client/models/account_integration.rb +30 -8
  85. data/lib/merge_hris_client/models/account_type_enum.rb +1 -1
  86. data/lib/merge_hris_client/models/bank_info.rb +39 -16
  87. data/lib/merge_hris_client/models/benefit.rb +38 -15
  88. data/lib/merge_hris_client/models/categories_enum.rb +4 -2
  89. data/lib/merge_hris_client/models/category_enum.rb +4 -2
  90. data/lib/merge_hris_client/models/common_model_scope_data.rb +234 -0
  91. data/lib/merge_hris_client/models/common_model_scopes.rb +234 -0
  92. data/lib/merge_hris_client/models/common_model_scopes_body_request.rb +274 -0
  93. data/lib/merge_hris_client/models/common_model_scopes_disabled_models.rb +283 -0
  94. data/lib/merge_hris_client/models/common_model_scopes_disabled_models_enabled_actions_enum.rb +45 -0
  95. data/lib/merge_hris_client/models/common_model_scopes_post_inner_deserializer_request.rb +274 -0
  96. data/lib/merge_hris_client/models/common_model_scopes_update_serializer.rb +226 -0
  97. data/lib/merge_hris_client/models/company.rb +37 -15
  98. data/lib/merge_hris_client/models/condition_schema.rb +298 -0
  99. data/lib/merge_hris_client/models/condition_type_enum.rb +50 -0
  100. data/lib/merge_hris_client/models/country_enum.rb +1 -1
  101. data/lib/merge_hris_client/models/data_passthrough_request.rb +1 -0
  102. data/lib/merge_hris_client/models/deduction.rb +50 -17
  103. data/lib/merge_hris_client/models/earning.rb +51 -6
  104. data/lib/merge_hris_client/models/earning_type_enum.rb +1 -1
  105. data/lib/merge_hris_client/models/employee.rb +51 -23
  106. data/lib/merge_hris_client/models/employee_payroll_run.rb +41 -17
  107. data/lib/merge_hris_client/models/employee_request.rb +34 -39
  108. data/lib/merge_hris_client/models/employment.rb +44 -20
  109. data/lib/merge_hris_client/models/employment_status_enum.rb +1 -1
  110. data/lib/merge_hris_client/models/employment_type_enum.rb +1 -1
  111. data/lib/merge_hris_client/models/enabled_actions_enum.rb +45 -0
  112. data/lib/merge_hris_client/models/encoding_enum.rb +1 -1
  113. data/lib/merge_hris_client/models/end_user_details_request.rb +20 -7
  114. data/lib/merge_hris_client/models/ethnicity_enum.rb +1 -1
  115. data/lib/merge_hris_client/models/flsa_status_enum.rb +1 -1
  116. data/lib/merge_hris_client/models/gender_enum.rb +1 -1
  117. data/lib/merge_hris_client/models/group.rb +38 -16
  118. data/lib/merge_hris_client/models/group_type_enum.rb +3 -2
  119. data/lib/merge_hris_client/models/issue.rb +16 -4
  120. data/lib/merge_hris_client/models/link_token.rb +0 -5
  121. data/lib/merge_hris_client/models/linked_account_condition.rb +282 -0
  122. data/lib/merge_hris_client/models/linked_account_condition_request.rb +269 -0
  123. data/lib/merge_hris_client/models/linked_account_selective_sync_configuration.rb +221 -0
  124. data/lib/merge_hris_client/models/linked_account_selective_sync_configuration_list_request.rb +226 -0
  125. data/lib/merge_hris_client/models/linked_account_selective_sync_configuration_request.rb +226 -0
  126. data/lib/merge_hris_client/models/location.rb +39 -17
  127. data/lib/merge_hris_client/models/location_type_enum.rb +1 -1
  128. data/lib/merge_hris_client/models/marital_status_enum.rb +1 -1
  129. data/lib/merge_hris_client/models/meta_response.rb +12 -1
  130. data/lib/merge_hris_client/models/method_enum.rb +1 -1
  131. data/lib/merge_hris_client/models/multipart_form_field_request.rb +1 -1
  132. data/lib/merge_hris_client/models/operator_schema.rb +229 -0
  133. data/lib/merge_hris_client/models/paginated_condition_schema_list.rb +240 -0
  134. data/lib/merge_hris_client/models/pay_currency_enum.rb +1 -1
  135. data/lib/merge_hris_client/models/pay_frequency_enum.rb +3 -2
  136. data/lib/merge_hris_client/models/pay_group.rb +37 -15
  137. data/lib/merge_hris_client/models/pay_period_enum.rb +3 -2
  138. data/lib/merge_hris_client/models/payroll_run.rb +39 -17
  139. data/lib/merge_hris_client/models/policy_type_enum.rb +1 -1
  140. data/lib/merge_hris_client/models/reason_enum.rb +1 -1
  141. data/lib/merge_hris_client/models/request_format_enum.rb +1 -1
  142. data/lib/merge_hris_client/models/request_type_enum.rb +1 -1
  143. data/lib/merge_hris_client/models/response_type_enum.rb +1 -1
  144. data/lib/merge_hris_client/models/run_state_enum.rb +1 -1
  145. data/lib/merge_hris_client/models/run_type_enum.rb +1 -1
  146. data/lib/merge_hris_client/models/selective_sync_configurations_usage_enum.rb +45 -0
  147. data/lib/merge_hris_client/models/sync_status.rb +13 -4
  148. data/lib/merge_hris_client/models/sync_status_status_enum.rb +1 -1
  149. data/lib/merge_hris_client/models/tax.rb +50 -5
  150. data/lib/merge_hris_client/models/team.rb +38 -15
  151. data/lib/merge_hris_client/models/time_off.rb +43 -19
  152. data/lib/merge_hris_client/models/time_off_balance.rb +40 -17
  153. data/lib/merge_hris_client/models/time_off_request.rb +36 -21
  154. data/lib/merge_hris_client/models/time_off_status_enum.rb +1 -1
  155. data/lib/merge_hris_client/models/units_enum.rb +1 -1
  156. data/lib/merge_hris_client/version.rb +1 -1
  157. data/lib/merge_hris_client.rb +20 -3
  158. data/spec/api/bank_info_api_spec.rb +7 -5
  159. data/spec/api/benefits_api_spec.rb +3 -3
  160. data/spec/api/common_model_scopes_api_spec.rb +58 -0
  161. data/spec/api/companies_api_spec.rb +2 -2
  162. data/spec/api/employee_payroll_runs_api_spec.rb +2 -2
  163. data/spec/api/employees_api_spec.rb +13 -6
  164. data/spec/api/employments_api_spec.rb +6 -4
  165. data/spec/api/force_resync_api_spec.rb +1 -1
  166. data/spec/api/groups_api_spec.rb +7 -4
  167. data/spec/api/issues_api_spec.rb +3 -3
  168. data/spec/api/linked_accounts_api_spec.rb +1 -1
  169. data/spec/api/locations_api_spec.rb +6 -4
  170. data/spec/api/pay_groups_api_spec.rb +2 -2
  171. data/spec/api/payroll_runs_api_spec.rb +7 -5
  172. data/spec/api/selective_sync_api_spec.rb +72 -0
  173. data/spec/api/teams_api_spec.rb +2 -2
  174. data/spec/api/time_off_api_spec.rb +8 -6
  175. data/spec/api/time_off_balances_api_spec.rb +7 -5
  176. data/spec/models/account_integration_spec.rb +12 -0
  177. data/spec/models/bank_info_spec.rb +14 -2
  178. data/spec/models/benefit_spec.rb +14 -2
  179. data/spec/models/common_model_scope_data_spec.rb +40 -0
  180. data/spec/models/common_model_scopes_body_request_spec.rb +46 -0
  181. data/spec/models/common_model_scopes_disabled_models_enabled_actions_enum_spec.rb +28 -0
  182. data/spec/models/common_model_scopes_disabled_models_spec.rb +58 -0
  183. data/spec/models/common_model_scopes_post_inner_deserializer_request_spec.rb +46 -0
  184. data/spec/models/common_model_scopes_spec.rb +40 -0
  185. data/spec/models/common_model_scopes_update_serializer_spec.rb +34 -0
  186. data/spec/models/company_spec.rb +14 -2
  187. data/spec/models/condition_schema_spec.rb +70 -0
  188. data/spec/models/condition_type_enum_spec.rb +28 -0
  189. data/spec/models/deduction_spec.rb +20 -2
  190. data/spec/models/earning_spec.rb +24 -0
  191. data/spec/models/employee_payroll_run_spec.rb +14 -2
  192. data/spec/models/employee_request_spec.rb +5 -11
  193. data/spec/models/employee_spec.rb +15 -3
  194. data/spec/models/employment_spec.rb +14 -2
  195. data/spec/models/enabled_actions_enum_spec.rb +28 -0
  196. data/spec/models/end_user_details_request_spec.rb +6 -0
  197. data/spec/models/group_spec.rb +14 -2
  198. data/spec/models/issue_spec.rb +6 -0
  199. data/spec/models/linked_account_condition_request_spec.rb +46 -0
  200. data/spec/models/linked_account_condition_spec.rb +64 -0
  201. data/spec/models/linked_account_selective_sync_configuration_list_request_spec.rb +34 -0
  202. data/spec/models/linked_account_selective_sync_configuration_request_spec.rb +34 -0
  203. data/spec/models/linked_account_selective_sync_configuration_spec.rb +34 -0
  204. data/spec/models/location_spec.rb +14 -2
  205. data/spec/models/meta_response_spec.rb +6 -0
  206. data/spec/models/operator_schema_spec.rb +40 -0
  207. data/spec/models/paginated_condition_schema_list_spec.rb +46 -0
  208. data/spec/models/pay_group_spec.rb +14 -2
  209. data/spec/models/payroll_run_spec.rb +14 -2
  210. data/spec/models/selective_sync_configurations_usage_enum_spec.rb +28 -0
  211. data/spec/models/sync_status_spec.rb +6 -0
  212. data/spec/models/tax_spec.rb +24 -0
  213. data/spec/models/team_spec.rb +14 -2
  214. data/spec/models/time_off_balance_spec.rb +14 -2
  215. data/spec/models/time_off_request_spec.rb +12 -6
  216. data/spec/models/time_off_spec.rb +14 -2
  217. metadata +183 -103
@@ -0,0 +1,226 @@
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 CommonModelScopesUpdateSerializer
18
+ # The common model scopes to update.
19
+ attr_accessor :common_models
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'common_models' => :'common_models'
25
+ }
26
+ end
27
+
28
+ # Returns all the JSON keys this model knows about
29
+ def self.acceptable_attributes
30
+ attribute_map.values
31
+ end
32
+
33
+ # Attribute type mapping.
34
+ def self.openapi_types
35
+ {
36
+ :'common_models' => :'Array<CommonModelScopesPostInnerDeserializerRequest>'
37
+ }
38
+ end
39
+
40
+ # List of attributes with nullable: true
41
+ def self.openapi_nullable
42
+ Set.new([
43
+ ])
44
+ end
45
+
46
+ # Initializes the object
47
+ # @param [Hash] attributes Model attributes in the form of hash
48
+ def initialize(attributes = {})
49
+ if (!attributes.is_a?(Hash))
50
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MergeHRISClient::CommonModelScopesUpdateSerializer` initialize method"
51
+ end
52
+
53
+ # check to see if the attribute exists and convert string to symbol for hash key
54
+ attributes = attributes.each_with_object({}) { |(k, v), h|
55
+ if (!self.class.attribute_map.key?(k.to_sym))
56
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MergeHRISClient::CommonModelScopesUpdateSerializer`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
57
+ end
58
+ h[k.to_sym] = v
59
+ }
60
+
61
+ if attributes.key?(:'common_models')
62
+ if (value = attributes[:'common_models']).is_a?(Array)
63
+ self.common_models = value
64
+ end
65
+ end
66
+ end
67
+
68
+ # Show invalid properties with the reasons. Usually used together with valid?
69
+ # @return Array for valid properties with the reasons
70
+ def list_invalid_properties
71
+ invalid_properties = Array.new
72
+ if @common_models.nil?
73
+ invalid_properties.push('invalid value for "common_models", common_models cannot be nil.')
74
+ end
75
+
76
+ invalid_properties
77
+ end
78
+
79
+ # Check to see if the all the properties in the model are valid
80
+ # @return true if the model is valid
81
+ def valid?
82
+ return false if @common_models.nil?
83
+ true
84
+ end
85
+
86
+ # Checks equality by comparing each attribute.
87
+ # @param [Object] Object to be compared
88
+ def ==(o)
89
+ return true if self.equal?(o)
90
+ self.class == o.class &&
91
+ common_models == o.common_models
92
+ end
93
+
94
+ # @see the `==` method
95
+ # @param [Object] Object to be compared
96
+ def eql?(o)
97
+ self == o
98
+ end
99
+
100
+ # Calculates hash code according to all attributes.
101
+ # @return [Integer] Hash code
102
+ def hash
103
+ [common_models].hash
104
+ end
105
+
106
+ # Builds the object from hash
107
+ # @param [Hash] attributes Model attributes in the form of hash
108
+ # @return [Object] Returns the model itself
109
+ def self.build_from_hash(attributes)
110
+ new.build_from_hash(attributes)
111
+ end
112
+
113
+ # Builds the object from hash
114
+ # @param [Hash] attributes Model attributes in the form of hash
115
+ # @return [Object] Returns the model itself
116
+ def build_from_hash(attributes)
117
+ return nil unless attributes.is_a?(Hash)
118
+ self.class.openapi_types.each_pair do |key, type|
119
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
120
+ self.send("#{key}=", nil)
121
+ elsif type =~ /\AArray<(.*)>/i
122
+ # check to ensure the input is an array given that the attribute
123
+ # is documented as an array but the input is not
124
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
125
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
126
+ end
127
+ elsif !attributes[self.class.attribute_map[key]].nil?
128
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
129
+ end
130
+ end
131
+
132
+ self
133
+ end
134
+
135
+ # Deserializes the data based on type
136
+ # @param string type Data type
137
+ # @param string value Value to be deserialized
138
+ # @return [Object] Deserialized data
139
+ def _deserialize(type, value)
140
+ case type.to_sym
141
+ when :Time
142
+ Time.parse(value)
143
+ when :Date
144
+ Date.parse(value)
145
+ when :String
146
+ value
147
+ when :Integer
148
+ value.to_i
149
+ when :Float
150
+ value.to_f
151
+ when :Boolean
152
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
153
+ true
154
+ else
155
+ false
156
+ end
157
+ when :Object
158
+ # generic object (usually a Hash), return directly
159
+ value
160
+ when /\AArray<(?<inner_type>.+)>\z/
161
+ inner_type = Regexp.last_match[:inner_type]
162
+ value.map { |v| _deserialize(inner_type, v) }
163
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
164
+ k_type = Regexp.last_match[:k_type]
165
+ v_type = Regexp.last_match[:v_type]
166
+ {}.tap do |hash|
167
+ value.each do |k, v|
168
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
169
+ end
170
+ end
171
+ else # model
172
+ # models (e.g. Pet) or oneOf
173
+ klass = MergeHRISClient.const_get(type)
174
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
175
+ end
176
+ end
177
+
178
+ # Returns the string representation of the object
179
+ # @return [String] String presentation of the object
180
+ def to_s
181
+ to_hash.to_s
182
+ end
183
+
184
+ # to_body is an alias to to_hash (backward compatibility)
185
+ # @return [Hash] Returns the object in the form of hash
186
+ def to_body
187
+ to_hash
188
+ end
189
+
190
+ # Returns the object in the form of hash
191
+ # @return [Hash] Returns the object in the form of hash
192
+ def to_hash
193
+ hash = {}
194
+ self.class.attribute_map.each_pair do |attr, param|
195
+ value = self.send(attr)
196
+ if value.nil?
197
+ is_nullable = self.class.openapi_nullable.include?(attr)
198
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
199
+ end
200
+
201
+ hash[param] = _to_hash(value)
202
+ end
203
+ hash
204
+ end
205
+
206
+ # Outputs non-array value in the form of hash
207
+ # For object, use to_hash. Otherwise, just return the value
208
+ # @param [Object] value Any valid value
209
+ # @return [Hash] Returns the value in the form of hash
210
+ def _to_hash(value)
211
+ if value.is_a?(Array)
212
+ value.compact.map { |v| _to_hash(v) }
213
+ elsif value.is_a?(Hash)
214
+ {}.tap do |hash|
215
+ value.each { |k, v| hash[k] = _to_hash(v) }
216
+ end
217
+ elsif value.respond_to? :to_hash
218
+ value.to_hash
219
+ else
220
+ value
221
+ end
222
+ end
223
+
224
+ end
225
+
226
+ end
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module MergeHRISClient
17
- # # The Company Object ### Description The `Company` object is used to represent a Company within the HRIS / Payroll system. ### Usage Example Fetch from the `LIST Companies` endpoint and filter by `ID` to show all companies.
17
+ # # The Company Object ### Description The `Company` object is used to represent a company within the HRIS / Payroll system. ### Usage Example Fetch from the `LIST Companies` endpoint and filter by `ID` to show all companies.
18
18
  class Company
19
19
  attr_accessor :id
20
20
 
@@ -30,11 +30,16 @@ module MergeHRISClient
30
30
  # The company's Employer Identification Numbers.
31
31
  attr_accessor :eins
32
32
 
33
- attr_accessor :remote_data
34
-
35
33
  # Indicates whether or not this object has been deleted by third party webhooks.
36
34
  attr_accessor :remote_was_deleted
37
35
 
36
+ attr_accessor :field_mappings
37
+
38
+ # This is the datetime that this object was last updated by Merge
39
+ attr_accessor :modified_at
40
+
41
+ attr_accessor :remote_data
42
+
38
43
  # Attribute mapping from ruby-style variable name to JSON key.
39
44
  def self.attribute_map
40
45
  {
@@ -43,8 +48,10 @@ module MergeHRISClient
43
48
  :'legal_name' => :'legal_name',
44
49
  :'display_name' => :'display_name',
45
50
  :'eins' => :'eins',
46
- :'remote_data' => :'remote_data',
47
- :'remote_was_deleted' => :'remote_was_deleted'
51
+ :'remote_was_deleted' => :'remote_was_deleted',
52
+ :'field_mappings' => :'field_mappings',
53
+ :'modified_at' => :'modified_at',
54
+ :'remote_data' => :'remote_data'
48
55
  }
49
56
  end
50
57
 
@@ -61,8 +68,10 @@ module MergeHRISClient
61
68
  :'legal_name' => :'String',
62
69
  :'display_name' => :'String',
63
70
  :'eins' => :'Array<String>',
64
- :'remote_data' => :'Array<RemoteData>',
65
- :'remote_was_deleted' => :'Boolean'
71
+ :'remote_was_deleted' => :'Boolean',
72
+ :'field_mappings' => :'Hash<String, Object>',
73
+ :'modified_at' => :'Time',
74
+ :'remote_data' => :'Array<RemoteData>'
66
75
  }
67
76
  end
68
77
 
@@ -73,7 +82,8 @@ module MergeHRISClient
73
82
  :'legal_name',
74
83
  :'display_name',
75
84
  :'eins',
76
- :'remote_data',
85
+ :'field_mappings',
86
+ :'remote_data'
77
87
  ])
78
88
  end
79
89
 
@@ -114,15 +124,25 @@ module MergeHRISClient
114
124
  end
115
125
  end
116
126
 
127
+ if attributes.key?(:'remote_was_deleted')
128
+ self.remote_was_deleted = attributes[:'remote_was_deleted']
129
+ end
130
+
131
+ if attributes.key?(:'field_mappings')
132
+ if (value = attributes[:'field_mappings']).is_a?(Hash)
133
+ self.field_mappings = value
134
+ end
135
+ end
136
+
137
+ if attributes.key?(:'modified_at')
138
+ self.modified_at = attributes[:'modified_at']
139
+ end
140
+
117
141
  if attributes.key?(:'remote_data')
118
142
  if (value = attributes[:'remote_data']).is_a?(Array)
119
143
  self.remote_data = value
120
144
  end
121
145
  end
122
-
123
- if attributes.key?(:'remote_was_deleted')
124
- self.remote_was_deleted = attributes[:'remote_was_deleted']
125
- end
126
146
  end
127
147
 
128
148
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -148,8 +168,10 @@ module MergeHRISClient
148
168
  legal_name == o.legal_name &&
149
169
  display_name == o.display_name &&
150
170
  eins == o.eins &&
151
- remote_data == o.remote_data &&
152
- remote_was_deleted == o.remote_was_deleted
171
+ remote_was_deleted == o.remote_was_deleted &&
172
+ field_mappings == o.field_mappings &&
173
+ modified_at == o.modified_at &&
174
+ remote_data == o.remote_data
153
175
  end
154
176
 
155
177
  # @see the `==` method
@@ -161,7 +183,7 @@ module MergeHRISClient
161
183
  # Calculates hash code according to all attributes.
162
184
  # @return [Integer] Hash code
163
185
  def hash
164
- [id, remote_id, legal_name, display_name, eins, remote_data, remote_was_deleted].hash
186
+ [id, remote_id, legal_name, display_name, eins, remote_was_deleted, field_mappings, modified_at, remote_data].hash
165
187
  end
166
188
 
167
189
  # Builds the object from hash
@@ -0,0 +1,298 @@
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 ConditionSchema
18
+ # The ID of the condition schema. This ID is used when updating selective syncs for a linked account.
19
+ attr_accessor :id
20
+
21
+ # The common model for which a condition schema is defined.
22
+ attr_accessor :common_model
23
+
24
+ # User-facing *native condition* name. e.g. \"Skip Manager\".
25
+ attr_accessor :native_name
26
+
27
+ # The name of the field on the common model that this condition corresponds to, if they conceptually match. e.g. \"location_type\".
28
+ attr_accessor :field_name
29
+
30
+ # Whether this condition can only be applied once. If false, the condition can be AND'd together multiple times.
31
+ attr_accessor :is_unique
32
+
33
+ # The type of value(s) that can be set for this condition. * `BOOLEAN` - BOOLEAN * `DATE` - DATE * `DATE_TIME` - DATE_TIME * `INTEGER` - INTEGER * `FLOAT` - FLOAT * `STRING` - STRING * `LIST_OF_STRINGS` - LIST_OF_STRINGS
34
+ attr_accessor :condition_type
35
+
36
+ # The schemas for the operators that can be used on a condition.
37
+ attr_accessor :operators
38
+
39
+ # Attribute mapping from ruby-style variable name to JSON key.
40
+ def self.attribute_map
41
+ {
42
+ :'id' => :'id',
43
+ :'common_model' => :'common_model',
44
+ :'native_name' => :'native_name',
45
+ :'field_name' => :'field_name',
46
+ :'is_unique' => :'is_unique',
47
+ :'condition_type' => :'condition_type',
48
+ :'operators' => :'operators'
49
+ }
50
+ end
51
+
52
+ # Returns all the JSON keys this model knows about
53
+ def self.acceptable_attributes
54
+ attribute_map.values
55
+ end
56
+
57
+ # Attribute type mapping.
58
+ def self.openapi_types
59
+ {
60
+ :'id' => :'String',
61
+ :'common_model' => :'String',
62
+ :'native_name' => :'String',
63
+ :'field_name' => :'String',
64
+ :'is_unique' => :'Boolean',
65
+ :'condition_type' => :'ConditionTypeEnum',
66
+ :'operators' => :'Array<OperatorSchema>'
67
+ }
68
+ end
69
+
70
+ # List of attributes with nullable: true
71
+ def self.openapi_nullable
72
+ Set.new([
73
+ :'native_name',
74
+ :'field_name',
75
+ ])
76
+ end
77
+
78
+ # Initializes the object
79
+ # @param [Hash] attributes Model attributes in the form of hash
80
+ def initialize(attributes = {})
81
+ if (!attributes.is_a?(Hash))
82
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MergeHRISClient::ConditionSchema` initialize method"
83
+ end
84
+
85
+ # check to see if the attribute exists and convert string to symbol for hash key
86
+ attributes = attributes.each_with_object({}) { |(k, v), h|
87
+ if (!self.class.attribute_map.key?(k.to_sym))
88
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MergeHRISClient::ConditionSchema`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
89
+ end
90
+ h[k.to_sym] = v
91
+ }
92
+
93
+ if attributes.key?(:'id')
94
+ self.id = attributes[:'id']
95
+ end
96
+
97
+ if attributes.key?(:'common_model')
98
+ self.common_model = attributes[:'common_model']
99
+ end
100
+
101
+ if attributes.key?(:'native_name')
102
+ self.native_name = attributes[:'native_name']
103
+ end
104
+
105
+ if attributes.key?(:'field_name')
106
+ self.field_name = attributes[:'field_name']
107
+ end
108
+
109
+ if attributes.key?(:'is_unique')
110
+ self.is_unique = attributes[:'is_unique']
111
+ end
112
+
113
+ if attributes.key?(:'condition_type')
114
+ self.condition_type = attributes[:'condition_type']
115
+ end
116
+
117
+ if attributes.key?(:'operators')
118
+ if (value = attributes[:'operators']).is_a?(Array)
119
+ self.operators = value
120
+ end
121
+ end
122
+ end
123
+
124
+ # Show invalid properties with the reasons. Usually used together with valid?
125
+ # @return Array for valid properties with the reasons
126
+ def list_invalid_properties
127
+ invalid_properties = Array.new
128
+ if @id.nil?
129
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
130
+ end
131
+
132
+ if @condition_type.nil?
133
+ invalid_properties.push('invalid value for "condition_type", condition_type cannot be nil.')
134
+ end
135
+
136
+ if @operators.nil?
137
+ invalid_properties.push('invalid value for "operators", operators cannot be nil.')
138
+ end
139
+
140
+ invalid_properties
141
+ end
142
+
143
+ # Check to see if the all the properties in the model are valid
144
+ # @return true if the model is valid
145
+ def valid?
146
+ return false if @id.nil?
147
+ return false if @condition_type.nil?
148
+ return false if @operators.nil?
149
+ true
150
+ end
151
+
152
+ # Checks equality by comparing each attribute.
153
+ # @param [Object] Object to be compared
154
+ def ==(o)
155
+ return true if self.equal?(o)
156
+ self.class == o.class &&
157
+ id == o.id &&
158
+ common_model == o.common_model &&
159
+ native_name == o.native_name &&
160
+ field_name == o.field_name &&
161
+ is_unique == o.is_unique &&
162
+ condition_type == o.condition_type &&
163
+ operators == o.operators
164
+ end
165
+
166
+ # @see the `==` method
167
+ # @param [Object] Object to be compared
168
+ def eql?(o)
169
+ self == o
170
+ end
171
+
172
+ # Calculates hash code according to all attributes.
173
+ # @return [Integer] Hash code
174
+ def hash
175
+ [id, common_model, native_name, field_name, is_unique, condition_type, operators].hash
176
+ end
177
+
178
+ # Builds the object from hash
179
+ # @param [Hash] attributes Model attributes in the form of hash
180
+ # @return [Object] Returns the model itself
181
+ def self.build_from_hash(attributes)
182
+ new.build_from_hash(attributes)
183
+ end
184
+
185
+ # Builds the object from hash
186
+ # @param [Hash] attributes Model attributes in the form of hash
187
+ # @return [Object] Returns the model itself
188
+ def build_from_hash(attributes)
189
+ return nil unless attributes.is_a?(Hash)
190
+ self.class.openapi_types.each_pair do |key, type|
191
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
192
+ self.send("#{key}=", nil)
193
+ elsif type =~ /\AArray<(.*)>/i
194
+ # check to ensure the input is an array given that the attribute
195
+ # is documented as an array but the input is not
196
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
197
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
198
+ end
199
+ elsif !attributes[self.class.attribute_map[key]].nil?
200
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
201
+ end
202
+ end
203
+
204
+ self
205
+ end
206
+
207
+ # Deserializes the data based on type
208
+ # @param string type Data type
209
+ # @param string value Value to be deserialized
210
+ # @return [Object] Deserialized data
211
+ def _deserialize(type, value)
212
+ case type.to_sym
213
+ when :Time
214
+ Time.parse(value)
215
+ when :Date
216
+ Date.parse(value)
217
+ when :String
218
+ value
219
+ when :Integer
220
+ value.to_i
221
+ when :Float
222
+ value.to_f
223
+ when :Boolean
224
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
225
+ true
226
+ else
227
+ false
228
+ end
229
+ when :Object
230
+ # generic object (usually a Hash), return directly
231
+ value
232
+ when /\AArray<(?<inner_type>.+)>\z/
233
+ inner_type = Regexp.last_match[:inner_type]
234
+ value.map { |v| _deserialize(inner_type, v) }
235
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
236
+ k_type = Regexp.last_match[:k_type]
237
+ v_type = Regexp.last_match[:v_type]
238
+ {}.tap do |hash|
239
+ value.each do |k, v|
240
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
241
+ end
242
+ end
243
+ else # model
244
+ # models (e.g. Pet) or oneOf
245
+ klass = MergeHRISClient.const_get(type)
246
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
247
+ end
248
+ end
249
+
250
+ # Returns the string representation of the object
251
+ # @return [String] String presentation of the object
252
+ def to_s
253
+ to_hash.to_s
254
+ end
255
+
256
+ # to_body is an alias to to_hash (backward compatibility)
257
+ # @return [Hash] Returns the object in the form of hash
258
+ def to_body
259
+ to_hash
260
+ end
261
+
262
+ # Returns the object in the form of hash
263
+ # @return [Hash] Returns the object in the form of hash
264
+ def to_hash
265
+ hash = {}
266
+ self.class.attribute_map.each_pair do |attr, param|
267
+ value = self.send(attr)
268
+ if value.nil?
269
+ is_nullable = self.class.openapi_nullable.include?(attr)
270
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
271
+ end
272
+
273
+ hash[param] = _to_hash(value)
274
+ end
275
+ hash
276
+ end
277
+
278
+ # Outputs non-array value in the form of hash
279
+ # For object, use to_hash. Otherwise, just return the value
280
+ # @param [Object] value Any valid value
281
+ # @return [Hash] Returns the value in the form of hash
282
+ def _to_hash(value)
283
+ if value.is_a?(Array)
284
+ value.compact.map { |v| _to_hash(v) }
285
+ elsif value.is_a?(Hash)
286
+ {}.tap do |hash|
287
+ value.each { |k, v| hash[k] = _to_hash(v) }
288
+ end
289
+ elsif value.respond_to? :to_hash
290
+ value.to_hash
291
+ else
292
+ value
293
+ end
294
+ end
295
+
296
+ end
297
+
298
+ end
@@ -0,0 +1,50 @@
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 ConditionTypeEnum
18
+ BOOLEAN = "BOOLEAN".freeze
19
+ DATE = "DATE".freeze
20
+ DATE_TIME = "DATE_TIME".freeze
21
+ INTEGER = "INTEGER".freeze
22
+ FLOAT = "FLOAT".freeze
23
+ STRING = "STRING".freeze
24
+ LIST_OF_STRINGS = "LIST_OF_STRINGS".freeze
25
+
26
+ MERGE_NONSTANDARD_VALUE = "MERGE_NONSTANDARD_VALUE".freeze
27
+
28
+ attr_accessor :value
29
+ attr_accessor :raw_value
30
+
31
+ # Builds the enum from string
32
+ # @param [String] The enum value in the form of the string
33
+ # @return [String] The enum value
34
+ def build_from_hash(value)
35
+ @raw_value = value
36
+ if ["BOOLEAN", "DATE", "DATE_TIME", "INTEGER", "FLOAT", "STRING", "LIST_OF_STRINGS", ].include? value
37
+ @value = value
38
+ else
39
+ @value = MERGE_NONSTANDARD_VALUE
40
+ end
41
+
42
+ self
43
+ end
44
+
45
+ def self.build_from_hash(value)
46
+ ConditionTypeEnum.new.build_from_hash(value)
47
+ end
48
+ end
49
+
50
+ end
@@ -285,7 +285,7 @@ module MergeHRISClient
285
285
  end
286
286
 
287
287
  def self.build_from_hash(value)
288
- IssueStatusEnum.new.build_from_hash(value)
288
+ CountryEnum.new.build_from_hash(value)
289
289
  end
290
290
  end
291
291
 
@@ -32,6 +32,7 @@ module MergeHRISClient
32
32
 
33
33
  attr_accessor :request_format
34
34
 
35
+ # Optional. If true, the response will always be an object of the form `{\"type\": T, \"value\": ...}` where `T` will be one of `string, boolean, number, null, array, object`.
35
36
  attr_accessor :normalize_response
36
37
 
37
38
  # Attribute mapping from ruby-style variable name to JSON key.