merge_hris_client 3.2.1 → 3.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +49 -16
- data/docs/AccountDetails.md +3 -1
- data/docs/AccountDetailsAndActions.md +7 -3
- data/docs/AccountIntegration.md +8 -4
- data/docs/AdvancedMetadata.md +28 -0
- data/docs/AuditLogEvent.md +32 -0
- data/docs/AuditTrailApi.md +91 -0
- data/docs/BankInfo.md +6 -4
- data/docs/BankInfoApi.md +4 -4
- data/docs/Benefit.md +6 -4
- data/docs/CommonModelScopeAPI.md +18 -0
- data/docs/Company.md +6 -4
- data/docs/CreateFieldMappingRequest.md +28 -0
- data/docs/DataPassthroughRequest.md +4 -4
- data/docs/DebugModelLogSummary.md +1 -1
- data/docs/Deduction.md +6 -4
- data/docs/Dependent.md +6 -4
- data/docs/Earning.md +6 -4
- data/docs/Employee.md +7 -3
- data/docs/EmployeePayrollRun.md +6 -4
- data/docs/EmployeeRequest.md +2 -0
- data/docs/EmployeesApi.md +10 -4
- data/docs/EmployerBenefit.md +6 -4
- data/docs/Employment.md +6 -4
- data/docs/EmploymentsApi.md +4 -4
- data/docs/EndUserDetailsRequest.md +13 -7
- data/docs/EventTypeEnum.md +15 -0
- data/docs/ExternalTargetFieldAPI.md +22 -0
- data/docs/ExternalTargetFieldAPIResponse.md +48 -0
- data/docs/FieldMappingApi.md +455 -0
- data/docs/FieldMappingApiInstance.md +24 -0
- data/docs/FieldMappingApiInstanceRemoteField.md +22 -0
- data/docs/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.md +22 -0
- data/docs/FieldMappingApiInstanceResponse.md +48 -0
- data/docs/FieldMappingApiInstanceTargetField.md +22 -0
- data/docs/FieldMappingInstanceResponse.md +24 -0
- data/docs/FieldPermissionDeserializer.md +20 -0
- data/docs/FieldPermissionDeserializerRequest.md +20 -0
- data/docs/ForceResyncApi.md +1 -1
- data/docs/GenerateRemoteKeyRequest.md +1 -1
- data/docs/Group.md +9 -5
- data/docs/GroupsApi.md +8 -4
- data/docs/IndividualCommonModelScopeDeserializer.md +22 -0
- data/docs/IndividualCommonModelScopeDeserializerRequest.md +22 -0
- data/docs/Issue.md +1 -1
- data/docs/IssuesApi.md +5 -3
- data/docs/LinkTokenApi.md +1 -1
- data/docs/LinkedAccountCommonModelScopeDeserializerRequest.md +18 -0
- data/docs/LinkedAccountsApi.md +2 -2
- data/docs/Location.md +6 -4
- data/docs/LocationsApi.md +6 -4
- data/docs/MetaResponse.md +1 -1
- data/docs/ModelPermissionDeserializer.md +18 -0
- data/docs/ModelPermissionDeserializerRequest.md +18 -0
- data/docs/PaginatedAuditLogEventList.md +22 -0
- data/docs/PaginatedTimesheetEntryList.md +22 -0
- data/docs/PatchedEditFieldMappingRequest.md +22 -0
- data/docs/PayGroup.md +6 -4
- data/docs/PayrollRun.md +6 -4
- data/docs/PayrollRunsApi.md +4 -4
- data/docs/RemoteEndpointInfo.md +22 -0
- data/docs/RemoteFieldAPI.md +28 -0
- data/docs/RemoteFieldAPIResponse.md +48 -0
- data/docs/RemoteKeyForRegenerationRequest.md +1 -1
- data/docs/RoleEnum.md +15 -0
- data/docs/ScopesApi.md +222 -0
- data/docs/SyncStatusApi.md +1 -1
- data/docs/Tax.md +6 -4
- data/docs/Team.md +6 -4
- data/docs/TimeOff.md +5 -3
- data/docs/TimeOffApi.md +12 -4
- data/docs/TimeOffBalance.md +6 -4
- data/docs/TimeOffBalancesApi.md +4 -4
- data/docs/TimesheetEntriesApi.md +341 -0
- data/docs/TimesheetEntry.md +38 -0
- data/docs/TimesheetEntryEndpointRequest.md +18 -0
- data/docs/TimesheetEntryRequest.md +28 -0
- data/docs/TimesheetEntryResponse.md +24 -0
- data/lib/merge_hris_client/api/audit_trail_api.rb +95 -0
- data/lib/merge_hris_client/api/bank_info_api.rb +4 -4
- data/lib/merge_hris_client/api/employees_api.rb +13 -4
- data/lib/merge_hris_client/api/employments_api.rb +4 -4
- data/lib/merge_hris_client/api/field_mapping_api.rb +424 -0
- data/lib/merge_hris_client/api/force_resync_api.rb +2 -2
- data/lib/merge_hris_client/api/groups_api.rb +10 -4
- data/lib/merge_hris_client/api/issues_api.rb +7 -4
- data/lib/merge_hris_client/api/linked_accounts_api.rb +3 -3
- data/lib/merge_hris_client/api/locations_api.rb +11 -4
- data/lib/merge_hris_client/api/payroll_runs_api.rb +4 -4
- data/lib/merge_hris_client/api/scopes_api.rb +209 -0
- data/lib/merge_hris_client/api/sync_status_api.rb +2 -2
- data/lib/merge_hris_client/api/time_off_api.rb +16 -4
- data/lib/merge_hris_client/api/time_off_balances_api.rb +4 -4
- data/lib/merge_hris_client/api/timesheet_entries_api.rb +342 -0
- data/lib/merge_hris_client/configuration.rb +4 -0
- data/lib/merge_hris_client/models/account_details.rb +14 -5
- data/lib/merge_hris_client/models/account_details_and_actions.rb +28 -4
- data/lib/merge_hris_client/models/account_integration.rb +36 -14
- data/lib/merge_hris_client/models/advanced_metadata.rb +270 -0
- data/lib/merge_hris_client/models/audit_log_event.rb +356 -0
- data/lib/merge_hris_client/models/bank_info.rb +24 -16
- data/lib/merge_hris_client/models/benefit.rb +24 -16
- data/lib/merge_hris_client/models/common_model_scope_api.rb +226 -0
- data/lib/merge_hris_client/models/company.rb +24 -16
- data/lib/merge_hris_client/models/create_field_mapping_request.rb +396 -0
- data/lib/merge_hris_client/models/data_passthrough_request.rb +3 -0
- data/lib/merge_hris_client/models/deduction.rb +24 -16
- data/lib/merge_hris_client/models/dependent.rb +24 -16
- data/lib/merge_hris_client/models/earning.rb +24 -16
- data/lib/merge_hris_client/models/employee.rb +34 -15
- data/lib/merge_hris_client/models/employee_payroll_run.rb +24 -16
- data/lib/merge_hris_client/models/employee_request.rb +12 -1
- data/lib/merge_hris_client/models/employer_benefit.rb +24 -16
- data/lib/merge_hris_client/models/employment.rb +24 -16
- data/lib/merge_hris_client/models/end_user_details_request.rb +67 -6
- data/lib/merge_hris_client/models/event_type_enum.rb +81 -0
- data/lib/merge_hris_client/models/external_target_field_api.rb +239 -0
- data/lib/merge_hris_client/models/external_target_field_api_response.rb +385 -0
- data/lib/merge_hris_client/models/field_mapping_api_instance.rb +247 -0
- data/lib/merge_hris_client/models/field_mapping_api_instance_remote_field.rb +253 -0
- data/lib/merge_hris_client/models/field_mapping_api_instance_remote_field_remote_endpoint_info.rb +241 -0
- data/lib/merge_hris_client/models/field_mapping_api_instance_response.rb +385 -0
- data/lib/merge_hris_client/models/field_mapping_api_instance_target_field.rb +251 -0
- data/lib/merge_hris_client/models/field_mapping_instance_response.rb +266 -0
- data/lib/merge_hris_client/models/field_permission_deserializer.rb +231 -0
- data/lib/merge_hris_client/models/field_permission_deserializer_request.rb +231 -0
- data/lib/merge_hris_client/models/generate_remote_key_request.rb +1 -0
- data/lib/merge_hris_client/models/group.rb +34 -15
- data/lib/merge_hris_client/models/individual_common_model_scope_deserializer.rb +243 -0
- data/lib/merge_hris_client/models/individual_common_model_scope_deserializer_request.rb +262 -0
- data/lib/merge_hris_client/models/linked_account_common_model_scope_deserializer_request.rb +226 -0
- data/lib/merge_hris_client/models/location.rb +24 -16
- data/lib/merge_hris_client/models/model_permission_deserializer.rb +218 -0
- data/lib/merge_hris_client/models/model_permission_deserializer_request.rb +218 -0
- data/lib/merge_hris_client/models/paginated_audit_log_event_list.rb +240 -0
- data/lib/merge_hris_client/models/paginated_timesheet_entry_list.rb +240 -0
- data/lib/merge_hris_client/models/patched_edit_field_mapping_request.rb +271 -0
- data/lib/merge_hris_client/models/pay_group.rb +24 -16
- data/lib/merge_hris_client/models/payroll_run.rb +24 -16
- data/lib/merge_hris_client/models/remote_endpoint_info.rb +253 -0
- data/lib/merge_hris_client/models/remote_field_api.rb +285 -0
- data/lib/merge_hris_client/models/remote_field_api_response.rb +385 -0
- data/lib/merge_hris_client/models/remote_key_for_regeneration_request.rb +1 -0
- data/lib/merge_hris_client/models/role_enum.rb +49 -0
- data/lib/merge_hris_client/models/tax.rb +24 -16
- data/lib/merge_hris_client/models/team.rb +24 -16
- data/lib/merge_hris_client/models/time_off.rb +23 -15
- data/lib/merge_hris_client/models/time_off_balance.rb +24 -16
- data/lib/merge_hris_client/models/timesheet_entry.rb +326 -0
- data/lib/merge_hris_client/models/timesheet_entry_endpoint_request.rb +223 -0
- data/lib/merge_hris_client/models/timesheet_entry_request.rb +278 -0
- data/lib/merge_hris_client/models/timesheet_entry_response.rb +266 -0
- data/lib/merge_hris_client/version.rb +1 -1
- data/lib/merge_hris_client.rb +35 -21
- data/spec/api/audit_trail_api_spec.rb +51 -0
- data/spec/api/bank_info_api_spec.rb +2 -2
- data/spec/api/employees_api_spec.rb +5 -2
- data/spec/api/employments_api_spec.rb +2 -2
- data/spec/api/field_mapping_api_spec.rb +107 -0
- data/spec/api/force_resync_api_spec.rb +1 -1
- data/spec/api/groups_api_spec.rb +4 -2
- data/spec/api/issues_api_spec.rb +3 -2
- data/spec/api/linked_accounts_api_spec.rb +1 -1
- data/spec/api/locations_api_spec.rb +3 -2
- data/spec/api/payroll_runs_api_spec.rb +2 -2
- data/spec/api/scopes_api_spec.rb +68 -0
- data/spec/api/sync_status_api_spec.rb +1 -1
- data/spec/api/time_off_api_spec.rb +6 -2
- data/spec/api/time_off_balances_api_spec.rb +2 -2
- data/spec/api/timesheet_entries_api_spec.rb +99 -0
- data/spec/models/account_details_and_actions_spec.rb +12 -0
- data/spec/models/account_details_spec.rb +6 -0
- data/spec/models/account_integration_spec.rb +14 -2
- data/spec/models/advanced_metadata_spec.rb +64 -0
- data/spec/models/audit_log_event_spec.rb +76 -0
- data/spec/models/bank_info_spec.rb +12 -6
- data/spec/models/benefit_spec.rb +12 -6
- data/spec/models/common_model_scope_api_spec.rb +34 -0
- data/spec/models/company_spec.rb +11 -5
- data/spec/models/create_field_mapping_request_spec.rb +64 -0
- data/spec/models/deduction_spec.rb +12 -6
- data/spec/models/dependent_spec.rb +12 -6
- data/spec/models/earning_spec.rb +11 -5
- data/spec/models/employee_payroll_run_spec.rb +12 -6
- data/spec/models/employee_request_spec.rb +6 -0
- data/spec/models/employee_spec.rb +18 -6
- data/spec/models/employer_benefit_spec.rb +12 -6
- data/spec/models/employment_spec.rb +12 -6
- data/spec/models/end_user_details_request_spec.rb +18 -0
- data/spec/models/event_type_enum_spec.rb +28 -0
- data/spec/models/external_target_field_api_response_spec.rb +124 -0
- data/spec/models/external_target_field_api_spec.rb +46 -0
- data/spec/models/field_mapping_api_instance_remote_field_remote_endpoint_info_spec.rb +46 -0
- data/spec/models/field_mapping_api_instance_remote_field_spec.rb +46 -0
- data/spec/models/field_mapping_api_instance_response_spec.rb +124 -0
- data/spec/models/field_mapping_api_instance_spec.rb +52 -0
- data/spec/models/field_mapping_api_instance_target_field_spec.rb +46 -0
- data/spec/models/field_mapping_instance_response_spec.rb +52 -0
- data/spec/models/field_permission_deserializer_request_spec.rb +40 -0
- data/spec/models/field_permission_deserializer_spec.rb +40 -0
- data/spec/models/group_spec.rb +13 -1
- data/spec/models/individual_common_model_scope_deserializer_request_spec.rb +46 -0
- data/spec/models/individual_common_model_scope_deserializer_spec.rb +46 -0
- data/spec/models/linked_account_common_model_scope_deserializer_request_spec.rb +34 -0
- data/spec/models/location_spec.rb +12 -6
- data/spec/models/model_permission_deserializer_request_spec.rb +34 -0
- data/spec/models/model_permission_deserializer_spec.rb +34 -0
- data/spec/models/paginated_audit_log_event_list_spec.rb +46 -0
- data/spec/models/paginated_timesheet_entry_list_spec.rb +46 -0
- data/spec/models/patched_edit_field_mapping_request_spec.rb +46 -0
- data/spec/models/pay_group_spec.rb +9 -3
- data/spec/models/payroll_run_spec.rb +12 -6
- data/spec/models/remote_endpoint_info_spec.rb +46 -0
- data/spec/models/remote_field_api_response_spec.rb +124 -0
- data/spec/models/remote_field_api_spec.rb +64 -0
- data/spec/models/role_enum_spec.rb +28 -0
- data/spec/models/tax_spec.rb +12 -6
- data/spec/models/team_spec.rb +10 -4
- data/spec/models/time_off_balance_spec.rb +12 -6
- data/spec/models/time_off_spec.rb +12 -6
- data/spec/models/timesheet_entry_endpoint_request_spec.rb +34 -0
- data/spec/models/timesheet_entry_request_spec.rb +64 -0
- data/spec/models/timesheet_entry_response_spec.rb +52 -0
- data/spec/models/timesheet_entry_spec.rb +94 -0
- metadata +266 -126
@@ -27,7 +27,7 @@ module MergeHRISClient
|
|
27
27
|
# The integration categories to show in Merge Link.
|
28
28
|
attr_accessor :categories
|
29
29
|
|
30
|
-
# The slug of a specific pre-selected integration for this linking flow token. For examples of slugs, see https://
|
30
|
+
# The slug of a specific pre-selected integration for this linking flow token. For examples of slugs, see https://docs.merge.dev/guides/merge-link/single-integration/.
|
31
31
|
attr_accessor :integration
|
32
32
|
|
33
33
|
# An integer number of minutes between [30, 720 or 10080 if for a Magic Link URL] for how long this token is valid. Defaults to 30.
|
@@ -39,6 +39,15 @@ module MergeHRISClient
|
|
39
39
|
# An array of objects to specify the models and fields that will be disabled for a given Linked Account. Each object uses model_id, enabled_actions, and disabled_fields to specify the model, method, and fields that are scoped for a given Linked Account.
|
40
40
|
attr_accessor :common_models
|
41
41
|
|
42
|
+
# When creating a Link Token, you can set permissions for Common Models that will apply to the account that is going to be linked. Any model or field not specified in link token payload will default to existing settings.
|
43
|
+
attr_accessor :category_common_model_scopes
|
44
|
+
|
45
|
+
# The language code for the language to localize Merge Link to.
|
46
|
+
attr_accessor :language
|
47
|
+
|
48
|
+
# A JSON object containing integration-specific configuration options.
|
49
|
+
attr_accessor :integration_specific_config
|
50
|
+
|
42
51
|
# Attribute mapping from ruby-style variable name to JSON key.
|
43
52
|
def self.attribute_map
|
44
53
|
{
|
@@ -49,7 +58,10 @@ module MergeHRISClient
|
|
49
58
|
:'integration' => :'integration',
|
50
59
|
:'link_expiry_mins' => :'link_expiry_mins',
|
51
60
|
:'should_create_magic_link_url' => :'should_create_magic_link_url',
|
52
|
-
:'common_models' => :'common_models'
|
61
|
+
:'common_models' => :'common_models',
|
62
|
+
:'category_common_model_scopes' => :'category_common_model_scopes',
|
63
|
+
:'language' => :'language',
|
64
|
+
:'integration_specific_config' => :'integration_specific_config'
|
53
65
|
}
|
54
66
|
end
|
55
67
|
|
@@ -68,7 +80,10 @@ module MergeHRISClient
|
|
68
80
|
:'integration' => :'String',
|
69
81
|
:'link_expiry_mins' => :'Integer',
|
70
82
|
:'should_create_magic_link_url' => :'Boolean',
|
71
|
-
:'common_models' => :'Array<CommonModelScopesBodyRequest>'
|
83
|
+
:'common_models' => :'Array<CommonModelScopesBodyRequest>',
|
84
|
+
:'category_common_model_scopes' => :'Hash<String, Array<IndividualCommonModelScopeDeserializerRequest>>',
|
85
|
+
:'language' => :'String',
|
86
|
+
:'integration_specific_config' => :'Hash<String, Object>'
|
72
87
|
}
|
73
88
|
end
|
74
89
|
|
@@ -77,7 +92,10 @@ module MergeHRISClient
|
|
77
92
|
Set.new([
|
78
93
|
:'integration',
|
79
94
|
:'should_create_magic_link_url',
|
80
|
-
:'common_models'
|
95
|
+
:'common_models',
|
96
|
+
:'category_common_model_scopes',
|
97
|
+
:'language',
|
98
|
+
:'integration_specific_config'
|
81
99
|
])
|
82
100
|
end
|
83
101
|
|
@@ -135,6 +153,22 @@ module MergeHRISClient
|
|
135
153
|
self.common_models = value
|
136
154
|
end
|
137
155
|
end
|
156
|
+
|
157
|
+
if attributes.key?(:'category_common_model_scopes')
|
158
|
+
if (value = attributes[:'category_common_model_scopes']).is_a?(Hash)
|
159
|
+
self.category_common_model_scopes = value
|
160
|
+
end
|
161
|
+
end
|
162
|
+
|
163
|
+
if attributes.key?(:'language')
|
164
|
+
self.language = attributes[:'language']
|
165
|
+
end
|
166
|
+
|
167
|
+
if attributes.key?(:'integration_specific_config')
|
168
|
+
if (value = attributes[:'integration_specific_config']).is_a?(Hash)
|
169
|
+
self.integration_specific_config = value
|
170
|
+
end
|
171
|
+
end
|
138
172
|
end
|
139
173
|
|
140
174
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -193,6 +227,14 @@ module MergeHRISClient
|
|
193
227
|
invalid_properties.push('invalid value for "link_expiry_mins", must be greater than or equal to 30.')
|
194
228
|
end
|
195
229
|
|
230
|
+
if !@language.nil? && @language.to_s.length > 2
|
231
|
+
invalid_properties.push('invalid value for "language", the character length must be smaller than or equal to 2.')
|
232
|
+
end
|
233
|
+
|
234
|
+
if !@language.nil? && @language.to_s.length < 1
|
235
|
+
invalid_properties.push('invalid value for "language", the character length must be great than or equal to 1.')
|
236
|
+
end
|
237
|
+
|
196
238
|
invalid_properties
|
197
239
|
end
|
198
240
|
|
@@ -212,6 +254,8 @@ module MergeHRISClient
|
|
212
254
|
return false if !@integration.nil? && @integration.to_s.length < 1
|
213
255
|
return false if !@link_expiry_mins.nil? && @link_expiry_mins > 10080
|
214
256
|
return false if !@link_expiry_mins.nil? && @link_expiry_mins < 30
|
257
|
+
return false if !@language.nil? && @language.to_s.length > 2
|
258
|
+
return false if !@language.nil? && @language.to_s.length < 1
|
215
259
|
true
|
216
260
|
end
|
217
261
|
|
@@ -293,6 +337,20 @@ module MergeHRISClient
|
|
293
337
|
@link_expiry_mins = link_expiry_mins
|
294
338
|
end
|
295
339
|
|
340
|
+
# Custom attribute writer method with validation
|
341
|
+
# @param [Object] language Value to be assigned
|
342
|
+
def language=(language)
|
343
|
+
if !language.nil? && language.to_s.length > 2
|
344
|
+
fail ArgumentError, 'invalid value for "language", the character length must be smaller than or equal to 2.'
|
345
|
+
end
|
346
|
+
|
347
|
+
if !language.nil? && language.to_s.length < 1
|
348
|
+
fail ArgumentError, 'invalid value for "language", the character length must be great than or equal to 1.'
|
349
|
+
end
|
350
|
+
|
351
|
+
@language = language
|
352
|
+
end
|
353
|
+
|
296
354
|
# Checks equality by comparing each attribute.
|
297
355
|
# @param [Object] Object to be compared
|
298
356
|
def ==(o)
|
@@ -305,7 +363,10 @@ module MergeHRISClient
|
|
305
363
|
integration == o.integration &&
|
306
364
|
link_expiry_mins == o.link_expiry_mins &&
|
307
365
|
should_create_magic_link_url == o.should_create_magic_link_url &&
|
308
|
-
common_models == o.common_models
|
366
|
+
common_models == o.common_models &&
|
367
|
+
category_common_model_scopes == o.category_common_model_scopes &&
|
368
|
+
language == o.language &&
|
369
|
+
integration_specific_config == o.integration_specific_config
|
309
370
|
end
|
310
371
|
|
311
372
|
# @see the `==` method
|
@@ -317,7 +378,7 @@ module MergeHRISClient
|
|
317
378
|
# Calculates hash code according to all attributes.
|
318
379
|
# @return [Integer] Hash code
|
319
380
|
def hash
|
320
|
-
[end_user_email_address, end_user_organization_name, end_user_origin_id, categories, integration, link_expiry_mins, should_create_magic_link_url, common_models].hash
|
381
|
+
[end_user_email_address, end_user_organization_name, end_user_origin_id, categories, integration, link_expiry_mins, should_create_magic_link_url, common_models, category_common_model_scopes, language, integration_specific_config].hash
|
321
382
|
end
|
322
383
|
|
323
384
|
# Builds the object from hash
|
@@ -0,0 +1,81 @@
|
|
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 EventTypeEnum
|
18
|
+
CREATED_REMOTE_PRODUCTION_API_KEY = "CREATED_REMOTE_PRODUCTION_API_KEY".freeze
|
19
|
+
DELETED_REMOTE_PRODUCTION_API_KEY = "DELETED_REMOTE_PRODUCTION_API_KEY".freeze
|
20
|
+
CREATED_TEST_API_KEY = "CREATED_TEST_API_KEY".freeze
|
21
|
+
DELETED_TEST_API_KEY = "DELETED_TEST_API_KEY".freeze
|
22
|
+
REGENERATED_PRODUCTION_API_KEY = "REGENERATED_PRODUCTION_API_KEY".freeze
|
23
|
+
INVITED_USER = "INVITED_USER".freeze
|
24
|
+
TWO_FACTOR_AUTH_ENABLED = "TWO_FACTOR_AUTH_ENABLED".freeze
|
25
|
+
TWO_FACTOR_AUTH_DISABLED = "TWO_FACTOR_AUTH_DISABLED".freeze
|
26
|
+
DELETED_LINKED_ACCOUNT = "DELETED_LINKED_ACCOUNT".freeze
|
27
|
+
CREATED_DESTINATION = "CREATED_DESTINATION".freeze
|
28
|
+
DELETED_DESTINATION = "DELETED_DESTINATION".freeze
|
29
|
+
CHANGED_DESTINATION = "CHANGED_DESTINATION".freeze
|
30
|
+
CHANGED_SCOPES = "CHANGED_SCOPES".freeze
|
31
|
+
CHANGED_PERSONAL_INFORMATION = "CHANGED_PERSONAL_INFORMATION".freeze
|
32
|
+
CHANGED_ORGANIZATION_SETTINGS = "CHANGED_ORGANIZATION_SETTINGS".freeze
|
33
|
+
ENABLED_INTEGRATION = "ENABLED_INTEGRATION".freeze
|
34
|
+
DISABLED_INTEGRATION = "DISABLED_INTEGRATION".freeze
|
35
|
+
ENABLED_CATEGORY = "ENABLED_CATEGORY".freeze
|
36
|
+
DISABLED_CATEGORY = "DISABLED_CATEGORY".freeze
|
37
|
+
CHANGED_PASSWORD = "CHANGED_PASSWORD".freeze
|
38
|
+
RESET_PASSWORD = "RESET_PASSWORD".freeze
|
39
|
+
ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION = "ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION".freeze
|
40
|
+
ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT = "ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT".freeze
|
41
|
+
DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION = "DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION".freeze
|
42
|
+
DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT = "DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT".freeze
|
43
|
+
CREATED_INTEGRATION_WIDE_FIELD_MAPPING = "CREATED_INTEGRATION_WIDE_FIELD_MAPPING".freeze
|
44
|
+
CREATED_LINKED_ACCOUNT_FIELD_MAPPING = "CREATED_LINKED_ACCOUNT_FIELD_MAPPING".freeze
|
45
|
+
CHANGED_INTEGRATION_WIDE_FIELD_MAPPING = "CHANGED_INTEGRATION_WIDE_FIELD_MAPPING".freeze
|
46
|
+
CHANGED_LINKED_ACCOUNT_FIELD_MAPPING = "CHANGED_LINKED_ACCOUNT_FIELD_MAPPING".freeze
|
47
|
+
DELETED_INTEGRATION_WIDE_FIELD_MAPPING = "DELETED_INTEGRATION_WIDE_FIELD_MAPPING".freeze
|
48
|
+
DELETED_LINKED_ACCOUNT_FIELD_MAPPING = "DELETED_LINKED_ACCOUNT_FIELD_MAPPING".freeze
|
49
|
+
FORCED_LINKED_ACCOUNT_RESYNC = "FORCED_LINKED_ACCOUNT_RESYNC".freeze
|
50
|
+
MUTED_ISSUE = "MUTED_ISSUE".freeze
|
51
|
+
GENERATED_MAGIC_LINK = "GENERATED_MAGIC_LINK".freeze
|
52
|
+
ENABLED_MERGE_WEBHOOK = "ENABLED_MERGE_WEBHOOK".freeze
|
53
|
+
DISABLED_MERGE_WEBHOOK = "DISABLED_MERGE_WEBHOOK".freeze
|
54
|
+
MERGE_WEBHOOK_TARGET_CHANGED = "MERGE_WEBHOOK_TARGET_CHANGED".freeze
|
55
|
+
END_USER_CREDENTIALS_ACCESSED = "END_USER_CREDENTIALS_ACCESSED".freeze
|
56
|
+
|
57
|
+
MERGE_NONSTANDARD_VALUE = "MERGE_NONSTANDARD_VALUE".freeze
|
58
|
+
|
59
|
+
attr_accessor :value
|
60
|
+
attr_accessor :raw_value
|
61
|
+
|
62
|
+
# Builds the enum from string
|
63
|
+
# @param [String] The enum value in the form of the string
|
64
|
+
# @return [String] The enum value
|
65
|
+
def build_from_hash(value)
|
66
|
+
@raw_value = value
|
67
|
+
if ["CREATED_REMOTE_PRODUCTION_API_KEY", "DELETED_REMOTE_PRODUCTION_API_KEY", "CREATED_TEST_API_KEY", "DELETED_TEST_API_KEY", "REGENERATED_PRODUCTION_API_KEY", "INVITED_USER", "TWO_FACTOR_AUTH_ENABLED", "TWO_FACTOR_AUTH_DISABLED", "DELETED_LINKED_ACCOUNT", "CREATED_DESTINATION", "DELETED_DESTINATION", "CHANGED_DESTINATION", "CHANGED_SCOPES", "CHANGED_PERSONAL_INFORMATION", "CHANGED_ORGANIZATION_SETTINGS", "ENABLED_INTEGRATION", "DISABLED_INTEGRATION", "ENABLED_CATEGORY", "DISABLED_CATEGORY", "CHANGED_PASSWORD", "RESET_PASSWORD", "ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION", "ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT", "DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION", "DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT", "CREATED_INTEGRATION_WIDE_FIELD_MAPPING", "CREATED_LINKED_ACCOUNT_FIELD_MAPPING", "CHANGED_INTEGRATION_WIDE_FIELD_MAPPING", "CHANGED_LINKED_ACCOUNT_FIELD_MAPPING", "DELETED_INTEGRATION_WIDE_FIELD_MAPPING", "DELETED_LINKED_ACCOUNT_FIELD_MAPPING", "FORCED_LINKED_ACCOUNT_RESYNC", "MUTED_ISSUE", "GENERATED_MAGIC_LINK", "ENABLED_MERGE_WEBHOOK", "DISABLED_MERGE_WEBHOOK", "MERGE_WEBHOOK_TARGET_CHANGED", "END_USER_CREDENTIALS_ACCESSED", ].include? value
|
68
|
+
@value = value
|
69
|
+
else
|
70
|
+
@value = MERGE_NONSTANDARD_VALUE
|
71
|
+
end
|
72
|
+
|
73
|
+
self
|
74
|
+
end
|
75
|
+
|
76
|
+
def self.build_from_hash(value)
|
77
|
+
EventTypeEnum.new.build_from_hash(value)
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
end
|
@@ -0,0 +1,239 @@
|
|
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 ExternalTargetFieldAPI
|
18
|
+
attr_accessor :name
|
19
|
+
|
20
|
+
attr_accessor :description
|
21
|
+
|
22
|
+
attr_accessor :is_mapped
|
23
|
+
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
25
|
+
def self.attribute_map
|
26
|
+
{
|
27
|
+
:'name' => :'name',
|
28
|
+
:'description' => :'description',
|
29
|
+
:'is_mapped' => :'is_mapped'
|
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
|
+
:'name' => :'String',
|
42
|
+
:'description' => :'String',
|
43
|
+
:'is_mapped' => :'String'
|
44
|
+
}
|
45
|
+
end
|
46
|
+
|
47
|
+
# List of attributes with nullable: true
|
48
|
+
def self.openapi_nullable
|
49
|
+
Set.new([
|
50
|
+
:'name',
|
51
|
+
:'description',
|
52
|
+
:'is_mapped'
|
53
|
+
])
|
54
|
+
end
|
55
|
+
|
56
|
+
# Initializes the object
|
57
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
58
|
+
def initialize(attributes = {})
|
59
|
+
if (!attributes.is_a?(Hash))
|
60
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MergeHRISClient::ExternalTargetFieldAPI` initialize method"
|
61
|
+
end
|
62
|
+
|
63
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
64
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
65
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
66
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MergeHRISClient::ExternalTargetFieldAPI`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
67
|
+
end
|
68
|
+
h[k.to_sym] = v
|
69
|
+
}
|
70
|
+
|
71
|
+
if attributes.key?(:'name')
|
72
|
+
self.name = attributes[:'name']
|
73
|
+
end
|
74
|
+
|
75
|
+
if attributes.key?(:'description')
|
76
|
+
self.description = attributes[:'description']
|
77
|
+
end
|
78
|
+
|
79
|
+
if attributes.key?(:'is_mapped')
|
80
|
+
self.is_mapped = attributes[:'is_mapped']
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
85
|
+
# @return Array for valid properties with the reasons
|
86
|
+
def list_invalid_properties
|
87
|
+
invalid_properties = Array.new
|
88
|
+
invalid_properties
|
89
|
+
end
|
90
|
+
|
91
|
+
# Check to see if the all the properties in the model are valid
|
92
|
+
# @return true if the model is valid
|
93
|
+
def valid?
|
94
|
+
true
|
95
|
+
end
|
96
|
+
|
97
|
+
# Checks equality by comparing each attribute.
|
98
|
+
# @param [Object] Object to be compared
|
99
|
+
def ==(o)
|
100
|
+
return true if self.equal?(o)
|
101
|
+
self.class == o.class &&
|
102
|
+
name == o.name &&
|
103
|
+
description == o.description &&
|
104
|
+
is_mapped == o.is_mapped
|
105
|
+
end
|
106
|
+
|
107
|
+
# @see the `==` method
|
108
|
+
# @param [Object] Object to be compared
|
109
|
+
def eql?(o)
|
110
|
+
self == o
|
111
|
+
end
|
112
|
+
|
113
|
+
# Calculates hash code according to all attributes.
|
114
|
+
# @return [Integer] Hash code
|
115
|
+
def hash
|
116
|
+
[name, description, is_mapped].hash
|
117
|
+
end
|
118
|
+
|
119
|
+
# Builds the object from hash
|
120
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
121
|
+
# @return [Object] Returns the model itself
|
122
|
+
def self.build_from_hash(attributes)
|
123
|
+
new.build_from_hash(attributes)
|
124
|
+
end
|
125
|
+
|
126
|
+
# Builds the object from hash
|
127
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
128
|
+
# @return [Object] Returns the model itself
|
129
|
+
def build_from_hash(attributes)
|
130
|
+
return nil unless attributes.is_a?(Hash)
|
131
|
+
self.class.openapi_types.each_pair do |key, type|
|
132
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
133
|
+
self.send("#{key}=", nil)
|
134
|
+
elsif type =~ /\AArray<(.*)>/i
|
135
|
+
# check to ensure the input is an array given that the attribute
|
136
|
+
# is documented as an array but the input is not
|
137
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
138
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
139
|
+
end
|
140
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
141
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
142
|
+
end
|
143
|
+
end
|
144
|
+
|
145
|
+
self
|
146
|
+
end
|
147
|
+
|
148
|
+
# Deserializes the data based on type
|
149
|
+
# @param string type Data type
|
150
|
+
# @param string value Value to be deserialized
|
151
|
+
# @return [Object] Deserialized data
|
152
|
+
def _deserialize(type, value)
|
153
|
+
case type.to_sym
|
154
|
+
when :Time
|
155
|
+
Time.parse(value)
|
156
|
+
when :Date
|
157
|
+
Date.parse(value)
|
158
|
+
when :String
|
159
|
+
value
|
160
|
+
when :Integer
|
161
|
+
value.to_i
|
162
|
+
when :Float
|
163
|
+
value.to_f
|
164
|
+
when :Boolean
|
165
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
166
|
+
true
|
167
|
+
else
|
168
|
+
false
|
169
|
+
end
|
170
|
+
when :Object
|
171
|
+
# generic object (usually a Hash), return directly
|
172
|
+
value
|
173
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
174
|
+
inner_type = Regexp.last_match[:inner_type]
|
175
|
+
value.map { |v| _deserialize(inner_type, v) }
|
176
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
177
|
+
k_type = Regexp.last_match[:k_type]
|
178
|
+
v_type = Regexp.last_match[:v_type]
|
179
|
+
{}.tap do |hash|
|
180
|
+
value.each do |k, v|
|
181
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
182
|
+
end
|
183
|
+
end
|
184
|
+
else # model
|
185
|
+
# models (e.g. Pet) or oneOf
|
186
|
+
klass = MergeHRISClient.const_get(type)
|
187
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
188
|
+
end
|
189
|
+
end
|
190
|
+
|
191
|
+
# Returns the string representation of the object
|
192
|
+
# @return [String] String presentation of the object
|
193
|
+
def to_s
|
194
|
+
to_hash.to_s
|
195
|
+
end
|
196
|
+
|
197
|
+
# to_body is an alias to to_hash (backward compatibility)
|
198
|
+
# @return [Hash] Returns the object in the form of hash
|
199
|
+
def to_body
|
200
|
+
to_hash
|
201
|
+
end
|
202
|
+
|
203
|
+
# Returns the object in the form of hash
|
204
|
+
# @return [Hash] Returns the object in the form of hash
|
205
|
+
def to_hash
|
206
|
+
hash = {}
|
207
|
+
self.class.attribute_map.each_pair do |attr, param|
|
208
|
+
value = self.send(attr)
|
209
|
+
if value.nil?
|
210
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
211
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
212
|
+
end
|
213
|
+
|
214
|
+
hash[param] = _to_hash(value)
|
215
|
+
end
|
216
|
+
hash
|
217
|
+
end
|
218
|
+
|
219
|
+
# Outputs non-array value in the form of hash
|
220
|
+
# For object, use to_hash. Otherwise, just return the value
|
221
|
+
# @param [Object] value Any valid value
|
222
|
+
# @return [Hash] Returns the value in the form of hash
|
223
|
+
def _to_hash(value)
|
224
|
+
if value.is_a?(Array)
|
225
|
+
value.compact.map { |v| _to_hash(v) }
|
226
|
+
elsif value.is_a?(Hash)
|
227
|
+
{}.tap do |hash|
|
228
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
229
|
+
end
|
230
|
+
elsif value.respond_to? :to_hash
|
231
|
+
value.to_hash
|
232
|
+
else
|
233
|
+
value
|
234
|
+
end
|
235
|
+
end
|
236
|
+
|
237
|
+
end
|
238
|
+
|
239
|
+
end
|