merge_ats_client 1.0.4 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +37 -17
- data/docs/AccountDetails.md +11 -7
- data/docs/AccountDetailsAndActions.md +4 -0
- data/docs/AccountDetailsAndActionsIntegration.md +1 -1
- data/docs/AccountDetailsApi.md +10 -7
- data/docs/AccountIntegration.md +4 -4
- data/docs/AccountTokenApi.md +2 -2
- data/docs/ActivitiesApi.md +6 -4
- data/docs/Activity.md +4 -2
- data/docs/Application.md +8 -6
- data/docs/ApplicationEndpointRequest.md +20 -0
- data/docs/ApplicationRequest.md +12 -6
- data/docs/ApplicationResponse.md +24 -0
- data/docs/ApplicationsApi.md +98 -18
- data/docs/Attachment.md +3 -1
- data/docs/AttachmentEndpointRequest.md +20 -0
- data/docs/AttachmentRequest.md +5 -1
- data/docs/AttachmentResponse.md +24 -0
- data/docs/AttachmentsApi.md +93 -15
- data/docs/AvailableActionsApi.md +2 -2
- data/docs/Candidate.md +3 -1
- data/docs/CandidateEndpointRequest.md +20 -0
- data/docs/CandidateRequest.md +7 -1
- data/docs/CandidateResponse.md +24 -0
- data/docs/CandidatesApi.md +168 -22
- data/docs/DataPassthroughRequest.md +3 -1
- data/docs/DebugModeLog.md +22 -0
- data/docs/DebugModelLogSummary.md +22 -0
- data/docs/Department.md +3 -1
- data/docs/DepartmentsApi.md +6 -4
- data/docs/EEOC.md +4 -2
- data/docs/EeocsApi.md +6 -4
- data/docs/EncodingEnum.md +15 -0
- data/docs/EndUserDetailsRequest.md +5 -3
- data/docs/ErrorValidationProblem.md +24 -0
- data/docs/ForceResyncApi.md +79 -0
- data/docs/GenerateKeyApi.md +2 -2
- data/docs/IgnoreCommonModel.md +20 -0
- data/docs/IgnoreCommonModelRequest.md +20 -0
- data/docs/InterviewsApi.md +6 -84
- data/docs/IssuesApi.md +18 -10
- data/docs/Job.md +5 -1
- data/docs/JobInterviewStage.md +4 -2
- data/docs/JobInterviewStagesApi.md +8 -6
- data/docs/JobsApi.md +8 -5
- data/docs/LinkTokenApi.md +3 -3
- data/docs/LinkedAccountStatus.md +20 -0
- data/docs/LinkedAccountsApi.md +22 -22
- data/docs/MetaResponse.md +24 -0
- data/docs/MultipartFormFieldRequest.md +26 -0
- data/docs/Offer.md +5 -3
- data/docs/OffersApi.md +6 -4
- data/docs/Office.md +3 -1
- data/docs/OfficesApi.md +6 -4
- data/docs/PassthroughApi.md +2 -2
- data/docs/ReasonEnum.md +15 -0
- data/docs/RegenerateKeyApi.md +2 -2
- data/docs/RejectReason.md +3 -1
- data/docs/RejectReasonsApi.md +6 -4
- data/docs/RemoteUser.md +3 -1
- data/docs/ScheduledInterview.md +6 -4
- data/docs/Scorecard.md +6 -4
- data/docs/ScorecardsApi.md +6 -84
- data/docs/SyncStatusApi.md +3 -75
- data/docs/Tag.md +3 -1
- data/docs/TagsApi.md +4 -2
- data/docs/UsersApi.md +6 -84
- data/docs/ValidationProblemSource.md +18 -0
- data/docs/WarningValidationProblem.md +24 -0
- data/docs/WebhookReceiver.md +22 -0
- data/docs/WebhookReceiverRequest.md +22 -0
- data/docs/WebhookReceiversApi.md +153 -0
- data/lib/merge_ats_client/api/account_details_api.rb +10 -3
- data/lib/merge_ats_client/api/activities_api.rb +3 -0
- data/lib/merge_ats_client/api/applications_api.rb +86 -15
- data/lib/merge_ats_client/api/attachments_api.rb +94 -15
- data/lib/merge_ats_client/api/candidates_api.rb +156 -21
- data/lib/merge_ats_client/api/departments_api.rb +3 -0
- data/lib/merge_ats_client/api/eeocs_api.rb +3 -0
- data/lib/merge_ats_client/api/force_resync_api.rb +84 -0
- data/lib/merge_ats_client/api/interviews_api.rb +3 -76
- data/lib/merge_ats_client/api/issues_api.rb +22 -10
- data/lib/merge_ats_client/api/job_interview_stages_api.rb +5 -2
- data/lib/merge_ats_client/api/jobs_api.rb +6 -3
- data/lib/merge_ats_client/api/linked_accounts_api.rb +21 -21
- data/lib/merge_ats_client/api/offers_api.rb +3 -0
- data/lib/merge_ats_client/api/offices_api.rb +3 -0
- data/lib/merge_ats_client/api/reject_reasons_api.rb +3 -0
- data/lib/merge_ats_client/api/scorecards_api.rb +3 -76
- data/lib/merge_ats_client/api/sync_status_api.rb +4 -66
- data/lib/merge_ats_client/api/tags_api.rb +3 -0
- data/lib/merge_ats_client/api/users_api.rb +3 -76
- data/lib/merge_ats_client/api/webhook_receivers_api.rb +154 -0
- data/lib/merge_ats_client/configuration.rb +6 -4
- data/lib/merge_ats_client/models/account_details.rb +22 -4
- data/lib/merge_ats_client/models/account_details_and_actions.rb +24 -1
- data/lib/merge_ats_client/models/account_details_and_actions_integration.rb +4 -2
- data/lib/merge_ats_client/models/account_integration.rb +2 -24
- data/lib/merge_ats_client/models/account_token.rb +1 -1
- data/lib/merge_ats_client/models/activity.rb +16 -7
- data/lib/merge_ats_client/models/application.rb +15 -11
- data/lib/merge_ats_client/models/application_endpoint_request.rb +237 -0
- data/lib/merge_ats_client/models/application_request.rb +56 -12
- data/lib/merge_ats_client/models/application_response.rb +266 -0
- data/lib/merge_ats_client/models/attachment.rb +15 -6
- data/lib/merge_ats_client/models/attachment_endpoint_request.rb +237 -0
- data/lib/merge_ats_client/models/attachment_request.rb +31 -7
- data/lib/merge_ats_client/models/attachment_response.rb +266 -0
- data/lib/merge_ats_client/models/attachment_type_enum.rb +0 -2
- data/lib/merge_ats_client/models/available_actions.rb +1 -1
- data/lib/merge_ats_client/models/candidate.rb +15 -6
- data/lib/merge_ats_client/models/candidate_endpoint_request.rb +237 -0
- data/lib/merge_ats_client/models/candidate_request.rb +56 -7
- data/lib/merge_ats_client/models/candidate_response.rb +266 -0
- data/lib/merge_ats_client/models/categories_enum.rb +2 -0
- data/lib/merge_ats_client/models/category_enum.rb +2 -0
- data/lib/merge_ats_client/models/data_passthrough_request.rb +67 -4
- data/lib/merge_ats_client/models/debug_mode_log.rb +251 -0
- data/lib/merge_ats_client/models/{data_passthrough.rb → debug_model_log_summary.rb} +30 -41
- data/lib/merge_ats_client/models/department.rb +17 -7
- data/lib/merge_ats_client/models/eeoc.rb +16 -7
- data/lib/merge_ats_client/models/email_address.rb +2 -2
- data/lib/merge_ats_client/models/email_address_request.rb +2 -2
- data/lib/merge_ats_client/models/encoding_enum.rb +35 -0
- data/lib/merge_ats_client/models/end_user_details_request.rb +147 -28
- data/lib/merge_ats_client/models/error_validation_problem.rb +260 -0
- data/lib/merge_ats_client/models/generate_remote_key_request.rb +20 -1
- data/lib/merge_ats_client/models/{remote_user_request.rb → ignore_common_model.rb} +30 -85
- data/lib/merge_ats_client/models/ignore_common_model_request.rb +256 -0
- data/lib/merge_ats_client/models/issue.rb +1 -1
- data/lib/merge_ats_client/models/job.rb +28 -6
- data/lib/merge_ats_client/models/job_interview_stage.rb +16 -7
- data/lib/merge_ats_client/models/link_token.rb +1 -1
- data/lib/merge_ats_client/models/linked_account_status.rb +237 -0
- data/lib/merge_ats_client/models/{scorecard_request.rb → meta_response.rb} +45 -70
- data/lib/merge_ats_client/models/model_operation.rb +1 -1
- data/lib/merge_ats_client/models/{scheduled_interview_request.rb → multipart_form_field_request.rb} +115 -106
- data/lib/merge_ats_client/models/offer.rb +16 -8
- data/lib/merge_ats_client/models/office.rb +17 -7
- data/lib/merge_ats_client/models/paginated_activity_list.rb +1 -1
- data/lib/merge_ats_client/models/paginated_application_list.rb +1 -1
- data/lib/merge_ats_client/models/paginated_attachment_list.rb +1 -1
- data/lib/merge_ats_client/models/paginated_candidate_list.rb +1 -1
- data/lib/merge_ats_client/models/paginated_department_list.rb +1 -1
- data/lib/merge_ats_client/models/paginated_eeoc_list.rb +1 -1
- data/lib/merge_ats_client/models/paginated_issue_list.rb +1 -1
- data/lib/merge_ats_client/models/paginated_job_interview_stage_list.rb +1 -1
- data/lib/merge_ats_client/models/paginated_job_list.rb +1 -1
- data/lib/merge_ats_client/models/paginated_offer_list.rb +1 -1
- data/lib/merge_ats_client/models/paginated_office_list.rb +1 -1
- data/lib/merge_ats_client/models/paginated_reject_reason_list.rb +1 -1
- data/lib/merge_ats_client/models/paginated_remote_user_list.rb +1 -1
- data/lib/merge_ats_client/models/paginated_scheduled_interview_list.rb +1 -1
- data/lib/merge_ats_client/models/paginated_scorecard_list.rb +1 -1
- data/lib/merge_ats_client/models/paginated_sync_status_list.rb +1 -1
- data/lib/merge_ats_client/models/paginated_tag_list.rb +1 -1
- data/lib/merge_ats_client/models/phone_number.rb +2 -2
- data/lib/merge_ats_client/models/phone_number_request.rb +2 -2
- data/lib/merge_ats_client/models/reason_enum.rb +36 -0
- data/lib/merge_ats_client/models/reject_reason.rb +17 -7
- data/lib/merge_ats_client/models/remote_data.rb +1 -1
- data/lib/merge_ats_client/models/remote_data_request.rb +20 -1
- data/lib/merge_ats_client/models/remote_key.rb +1 -1
- data/lib/merge_ats_client/models/remote_key_for_regeneration_request.rb +20 -1
- data/lib/merge_ats_client/models/remote_response.rb +1 -1
- data/lib/merge_ats_client/models/remote_user.rb +17 -7
- data/lib/merge_ats_client/models/request_format_enum.rb +1 -0
- data/lib/merge_ats_client/models/scheduled_interview.rb +16 -9
- data/lib/merge_ats_client/models/scorecard.rb +16 -9
- data/lib/merge_ats_client/models/sync_status.rb +1 -1
- data/lib/merge_ats_client/models/sync_status_status_enum.rb +1 -2
- data/lib/merge_ats_client/models/tag.rb +17 -7
- data/lib/merge_ats_client/models/url.rb +2 -2
- data/lib/merge_ats_client/models/url_request.rb +2 -2
- data/lib/merge_ats_client/models/{remote_key_for_regeneration.rb → validation_problem_source.rb} +15 -16
- data/lib/merge_ats_client/models/warning_validation_problem.rb +260 -0
- data/lib/merge_ats_client/models/webhook_receiver.rb +246 -0
- data/lib/merge_ats_client/models/{end_user_details.rb → webhook_receiver_request.rb} +60 -69
- data/lib/merge_ats_client/version.rb +1 -1
- data/lib/merge_ats_client.rb +22 -3
- data/spec/api/account_details_api_spec.rb +1 -0
- data/spec/api/account_token_api_spec.rb +1 -1
- data/spec/api/activities_api_spec.rb +4 -1
- data/spec/api/applications_api_spec.rb +31 -1
- data/spec/api/attachments_api_spec.rb +31 -1
- data/spec/api/available_actions_api_spec.rb +1 -1
- data/spec/api/candidates_api_spec.rb +44 -1
- data/spec/api/departments_api_spec.rb +4 -1
- data/spec/api/eeocs_api_spec.rb +4 -1
- data/spec/api/force_resync_api_spec.rb +46 -0
- data/spec/api/interviews_api_spec.rb +4 -1
- data/spec/api/issues_api_spec.rb +9 -5
- data/spec/api/job_interview_stages_api_spec.rb +4 -1
- data/spec/api/jobs_api_spec.rb +6 -1
- data/spec/api/link_token_api_spec.rb +2 -2
- data/spec/api/linked_accounts_api_spec.rb +10 -10
- data/spec/api/offers_api_spec.rb +4 -1
- data/spec/api/offices_api_spec.rb +4 -1
- data/spec/api/passthrough_api_spec.rb +2 -2
- data/spec/api/regenerate_key_api_spec.rb +3 -5
- data/spec/api/reject_reasons_api_spec.rb +4 -1
- data/spec/api/scorecards_api_spec.rb +4 -1
- data/spec/api/sync_status_api_spec.rb +8 -5
- data/spec/api/tags_api_spec.rb +3 -1
- data/spec/api/users_api_spec.rb +5 -1
- data/spec/api/webhook_receivers_api_spec.rb +58 -0
- data/spec/models/access_role_enum_spec.rb +1 -1
- data/spec/models/account_details_and_actions_spec.rb +12 -0
- data/spec/models/account_details_spec.rb +12 -0
- data/spec/models/account_integration_spec.rb +7 -1
- data/spec/models/account_token_spec.rb +7 -1
- data/spec/models/activity_spec.rb +13 -1
- data/spec/models/activity_type_enum_spec.rb +1 -1
- data/spec/models/application_endpoint_request_spec.rb +40 -0
- data/spec/models/application_request_spec.rb +25 -1
- data/spec/models/{end_user_details_spec.rb → application_response_spec.rb} +11 -15
- data/spec/models/application_spec.rb +19 -7
- data/spec/models/attachment_endpoint_request_spec.rb +40 -0
- data/spec/models/attachment_request_spec.rb +12 -0
- data/spec/models/attachment_response_spec.rb +52 -0
- data/spec/models/attachment_spec.rb +25 -1
- data/spec/models/available_actions_spec.rb +1 -1
- data/spec/models/candidate_endpoint_request_spec.rb +40 -0
- data/spec/models/candidate_request_spec.rb +37 -1
- data/spec/models/{data_passthrough_spec.rb → candidate_response_spec.rb} +11 -11
- data/spec/models/candidate_spec.rb +19 -1
- data/spec/models/data_passthrough_request_spec.rb +13 -1
- data/spec/models/debug_mode_log_spec.rb +46 -0
- data/spec/models/debug_model_log_summary_spec.rb +46 -0
- data/spec/models/department_spec.rb +13 -1
- data/spec/models/disability_status_enum_spec.rb +1 -1
- data/spec/models/eeoc_spec.rb +13 -1
- data/spec/models/email_address_request_spec.rb +1 -1
- data/spec/models/email_address_spec.rb +1 -1
- data/spec/models/email_address_type_enum_spec.rb +1 -1
- data/spec/models/encoding_enum_spec.rb +28 -0
- data/spec/models/end_user_details_request_spec.rb +13 -5
- data/spec/models/error_validation_problem_spec.rb +52 -0
- data/spec/models/gender_enum_spec.rb +1 -1
- data/spec/models/ignore_common_model_request_spec.rb +40 -0
- data/spec/models/ignore_common_model_spec.rb +40 -0
- data/spec/models/job_interview_stage_spec.rb +13 -1
- data/spec/models/job_spec.rb +31 -1
- data/spec/models/job_status_enum_spec.rb +1 -1
- data/spec/models/link_token_spec.rb +1 -1
- data/spec/models/linked_account_status_spec.rb +40 -0
- data/spec/models/meta_response_spec.rb +52 -0
- data/spec/models/method_enum_spec.rb +1 -1
- data/spec/models/model_operation_spec.rb +13 -1
- data/spec/models/{remote_user_request_spec.rb → multipart_form_field_request_spec.rb} +11 -23
- data/spec/models/offer_spec.rb +13 -1
- data/spec/models/offer_status_enum_spec.rb +1 -1
- data/spec/models/office_spec.rb +13 -1
- data/spec/models/overall_recommendation_enum_spec.rb +1 -1
- data/spec/models/paginated_activity_list_spec.rb +1 -1
- data/spec/models/paginated_application_list_spec.rb +1 -1
- data/spec/models/paginated_attachment_list_spec.rb +1 -1
- data/spec/models/paginated_candidate_list_spec.rb +1 -1
- data/spec/models/paginated_department_list_spec.rb +1 -1
- data/spec/models/paginated_eeoc_list_spec.rb +1 -1
- data/spec/models/paginated_job_interview_stage_list_spec.rb +1 -1
- data/spec/models/paginated_job_list_spec.rb +1 -1
- data/spec/models/paginated_offer_list_spec.rb +1 -1
- data/spec/models/paginated_office_list_spec.rb +1 -1
- data/spec/models/paginated_reject_reason_list_spec.rb +1 -1
- data/spec/models/paginated_remote_user_list_spec.rb +1 -1
- data/spec/models/paginated_scheduled_interview_list_spec.rb +1 -1
- data/spec/models/paginated_scorecard_list_spec.rb +1 -1
- data/spec/models/paginated_tag_list_spec.rb +1 -1
- data/spec/models/phone_number_request_spec.rb +1 -1
- data/spec/models/phone_number_spec.rb +1 -1
- data/spec/models/phone_number_type_enum_spec.rb +1 -1
- data/spec/models/race_enum_spec.rb +1 -1
- data/spec/models/reason_enum_spec.rb +28 -0
- data/spec/models/reject_reason_spec.rb +13 -1
- data/spec/models/remote_data_spec.rb +1 -1
- data/spec/models/remote_key_for_regeneration_request_spec.rb +1 -1
- data/spec/models/remote_key_spec.rb +1 -1
- data/spec/models/remote_response_spec.rb +1 -1
- data/spec/models/remote_user_spec.rb +13 -1
- data/spec/models/scheduled_interview_spec.rb +13 -1
- data/spec/models/scheduled_interview_status_enum_spec.rb +1 -1
- data/spec/models/scorecard_spec.rb +13 -1
- data/spec/models/sync_status_spec.rb +1 -1
- data/spec/models/tag_spec.rb +13 -1
- data/spec/models/url_request_spec.rb +1 -1
- data/spec/models/url_spec.rb +1 -1
- data/spec/models/url_type_enum_spec.rb +1 -1
- data/spec/models/{remote_key_for_regeneration_spec.rb → validation_problem_source_spec.rb} +8 -8
- data/spec/models/veteran_status_enum_spec.rb +1 -1
- data/spec/models/visibility_enum_spec.rb +1 -1
- data/spec/models/warning_validation_problem_spec.rb +52 -0
- data/spec/models/webhook_receiver_request_spec.rb +46 -0
- data/spec/models/webhook_receiver_spec.rb +46 -0
- metadata +179 -123
- data/config.json +0 -2
- data/docs/DataPassthrough.md +0 -24
- data/docs/EndUserDetails.md +0 -24
- data/docs/PatchedApplicationRequest.md +0 -34
- data/docs/RemoteKeyForRegeneration.md +0 -18
- data/docs/RemoteUserRequest.md +0 -30
- data/docs/ScheduledInterviewRequest.md +0 -38
- data/docs/ScorecardRequest.md +0 -30
- data/lib/merge_ats_client/models/patched_application_request.rb +0 -309
- data/merge_ats_client-1.0.3.gem +0 -0
- data/spec/models/patched_application_request_spec.rb +0 -82
- data/spec/models/scheduled_interview_request_spec.rb +0 -94
- data/spec/models/scorecard_request_spec.rb +0 -70
- data/test_ats.rb +0 -22
- data/test_signature.rb +0 -32
@@ -14,20 +14,17 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module MergeATSClient
|
17
|
-
# # The ScheduledInterview Object ### Description The `ScheduledInterview` object is used to represent an interview
|
17
|
+
# # The ScheduledInterview Object ### Description The `ScheduledInterview` object is used to represent an interview ### Usage Example Fetch from the `LIST ScheduledInterviews` endpoint and filter by `interviewers` to show all office locations.
|
18
18
|
class ScheduledInterview
|
19
19
|
attr_accessor :id
|
20
20
|
|
21
21
|
# The third-party API ID of the matching object.
|
22
22
|
attr_accessor :remote_id
|
23
23
|
|
24
|
-
# The application being interviewed.
|
25
24
|
attr_accessor :application
|
26
25
|
|
27
|
-
# The stage of the interview.
|
28
26
|
attr_accessor :job_interview_stage
|
29
27
|
|
30
|
-
# The user organizing the interview.
|
31
28
|
attr_accessor :organizer
|
32
29
|
|
33
30
|
# Array of `RemoteUser` IDs.
|
@@ -53,6 +50,9 @@ module MergeATSClient
|
|
53
50
|
|
54
51
|
attr_accessor :remote_data
|
55
52
|
|
53
|
+
# Indicates whether or not this object has been deleted on the third-party.
|
54
|
+
attr_accessor :remote_was_deleted
|
55
|
+
|
56
56
|
# Attribute mapping from ruby-style variable name to JSON key.
|
57
57
|
def self.attribute_map
|
58
58
|
{
|
@@ -68,7 +68,8 @@ module MergeATSClient
|
|
68
68
|
:'remote_created_at' => :'remote_created_at',
|
69
69
|
:'remote_updated_at' => :'remote_updated_at',
|
70
70
|
:'status' => :'status',
|
71
|
-
:'remote_data' => :'remote_data'
|
71
|
+
:'remote_data' => :'remote_data',
|
72
|
+
:'remote_was_deleted' => :'remote_was_deleted'
|
72
73
|
}
|
73
74
|
end
|
74
75
|
|
@@ -92,7 +93,8 @@ module MergeATSClient
|
|
92
93
|
:'remote_created_at' => :'Time',
|
93
94
|
:'remote_updated_at' => :'Time',
|
94
95
|
:'status' => :'ScheduledInterviewStatusEnum',
|
95
|
-
:'remote_data' => :'Array<RemoteData>'
|
96
|
+
:'remote_data' => :'Array<RemoteData>',
|
97
|
+
:'remote_was_deleted' => :'Boolean'
|
96
98
|
}
|
97
99
|
end
|
98
100
|
|
@@ -109,7 +111,7 @@ module MergeATSClient
|
|
109
111
|
:'remote_created_at',
|
110
112
|
:'remote_updated_at',
|
111
113
|
:'status',
|
112
|
-
:'remote_data'
|
114
|
+
:'remote_data',
|
113
115
|
])
|
114
116
|
end
|
115
117
|
|
@@ -183,6 +185,10 @@ module MergeATSClient
|
|
183
185
|
self.remote_data = value
|
184
186
|
end
|
185
187
|
end
|
188
|
+
|
189
|
+
if attributes.key?(:'remote_was_deleted')
|
190
|
+
self.remote_was_deleted = attributes[:'remote_was_deleted']
|
191
|
+
end
|
186
192
|
end
|
187
193
|
|
188
194
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -215,7 +221,8 @@ module MergeATSClient
|
|
215
221
|
remote_created_at == o.remote_created_at &&
|
216
222
|
remote_updated_at == o.remote_updated_at &&
|
217
223
|
status == o.status &&
|
218
|
-
remote_data == o.remote_data
|
224
|
+
remote_data == o.remote_data &&
|
225
|
+
remote_was_deleted == o.remote_was_deleted
|
219
226
|
end
|
220
227
|
|
221
228
|
# @see the `==` method
|
@@ -227,7 +234,7 @@ module MergeATSClient
|
|
227
234
|
# Calculates hash code according to all attributes.
|
228
235
|
# @return [Integer] Hash code
|
229
236
|
def hash
|
230
|
-
[id, remote_id, application, job_interview_stage, organizer, interviewers, location, start_at, end_at, remote_created_at, remote_updated_at, status, remote_data].hash
|
237
|
+
[id, remote_id, application, job_interview_stage, organizer, interviewers, location, start_at, end_at, remote_created_at, remote_updated_at, status, remote_data, remote_was_deleted].hash
|
231
238
|
end
|
232
239
|
|
233
240
|
# Builds the object from hash
|
@@ -14,20 +14,17 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module MergeATSClient
|
17
|
-
# # The Scorecard Object ### Description The `Scorecard` object is used to represent a Scorecard for an interview
|
17
|
+
# # The Scorecard Object ### Description The `Scorecard` object is used to represent a Scorecard for an interview ### Usage Example Fetch from the `LIST Scorecards` endpoint and filter by `application` to show all scorecard for an applicant.
|
18
18
|
class Scorecard
|
19
19
|
attr_accessor :id
|
20
20
|
|
21
21
|
# The third-party API ID of the matching object.
|
22
22
|
attr_accessor :remote_id
|
23
23
|
|
24
|
-
# The application being scored.
|
25
24
|
attr_accessor :application
|
26
25
|
|
27
|
-
# The interview being scored.
|
28
26
|
attr_accessor :interview
|
29
27
|
|
30
|
-
# The interviewer doing the scoring.
|
31
28
|
attr_accessor :interviewer
|
32
29
|
|
33
30
|
# When the third party's scorecard was created.
|
@@ -41,6 +38,9 @@ module MergeATSClient
|
|
41
38
|
|
42
39
|
attr_accessor :remote_data
|
43
40
|
|
41
|
+
# Indicates whether or not this object has been deleted on the third-party.
|
42
|
+
attr_accessor :remote_was_deleted
|
43
|
+
|
44
44
|
# Attribute mapping from ruby-style variable name to JSON key.
|
45
45
|
def self.attribute_map
|
46
46
|
{
|
@@ -52,7 +52,8 @@ module MergeATSClient
|
|
52
52
|
:'remote_created_at' => :'remote_created_at',
|
53
53
|
:'submitted_at' => :'submitted_at',
|
54
54
|
:'overall_recommendation' => :'overall_recommendation',
|
55
|
-
:'remote_data' => :'remote_data'
|
55
|
+
:'remote_data' => :'remote_data',
|
56
|
+
:'remote_was_deleted' => :'remote_was_deleted'
|
56
57
|
}
|
57
58
|
end
|
58
59
|
|
@@ -72,7 +73,8 @@ module MergeATSClient
|
|
72
73
|
:'remote_created_at' => :'Time',
|
73
74
|
:'submitted_at' => :'Time',
|
74
75
|
:'overall_recommendation' => :'OverallRecommendationEnum',
|
75
|
-
:'remote_data' => :'Array<RemoteData>'
|
76
|
+
:'remote_data' => :'Array<RemoteData>',
|
77
|
+
:'remote_was_deleted' => :'Boolean'
|
76
78
|
}
|
77
79
|
end
|
78
80
|
|
@@ -86,7 +88,7 @@ module MergeATSClient
|
|
86
88
|
:'remote_created_at',
|
87
89
|
:'submitted_at',
|
88
90
|
:'overall_recommendation',
|
89
|
-
:'remote_data'
|
91
|
+
:'remote_data',
|
90
92
|
])
|
91
93
|
end
|
92
94
|
|
@@ -142,6 +144,10 @@ module MergeATSClient
|
|
142
144
|
self.remote_data = value
|
143
145
|
end
|
144
146
|
end
|
147
|
+
|
148
|
+
if attributes.key?(:'remote_was_deleted')
|
149
|
+
self.remote_was_deleted = attributes[:'remote_was_deleted']
|
150
|
+
end
|
145
151
|
end
|
146
152
|
|
147
153
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -170,7 +176,8 @@ module MergeATSClient
|
|
170
176
|
remote_created_at == o.remote_created_at &&
|
171
177
|
submitted_at == o.submitted_at &&
|
172
178
|
overall_recommendation == o.overall_recommendation &&
|
173
|
-
remote_data == o.remote_data
|
179
|
+
remote_data == o.remote_data &&
|
180
|
+
remote_was_deleted == o.remote_was_deleted
|
174
181
|
end
|
175
182
|
|
176
183
|
# @see the `==` method
|
@@ -182,7 +189,7 @@ module MergeATSClient
|
|
182
189
|
# Calculates hash code according to all attributes.
|
183
190
|
# @return [Integer] Hash code
|
184
191
|
def hash
|
185
|
-
[id, remote_id, application, interview, interviewer, remote_created_at, submitted_at, overall_recommendation, remote_data].hash
|
192
|
+
[id, remote_id, application, interview, interviewer, remote_created_at, submitted_at, overall_recommendation, remote_data, remote_was_deleted].hash
|
186
193
|
end
|
187
194
|
|
188
195
|
# Builds the object from hash
|
@@ -18,6 +18,7 @@ module MergeATSClient
|
|
18
18
|
SYNCING = "SYNCING".freeze
|
19
19
|
DONE = "DONE".freeze
|
20
20
|
FAILED = "FAILED".freeze
|
21
|
+
DISABLED = "DISABLED".freeze
|
21
22
|
|
22
23
|
# Builds the enum from string
|
23
24
|
# @param [String] The enum value in the form of the string
|
@@ -30,8 +31,6 @@ module MergeATSClient
|
|
30
31
|
# @param [String] The enum value in the form of the string
|
31
32
|
# @return [String] The enum value
|
32
33
|
def build_from_hash(value)
|
33
|
-
constantValues = SyncStatusStatusEnum.constants.select { |c| SyncStatusStatusEnum::const_get(c) == value }
|
34
|
-
raise "Invalid ENUM value #{value} for class #SyncStatusStatusEnum" if constantValues.empty?
|
35
34
|
value
|
36
35
|
end
|
37
36
|
end
|
@@ -14,7 +14,7 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module MergeATSClient
|
17
|
-
# # The Tag Object ### Description The `Tag` object is used to represent a tag for a candidate.
|
17
|
+
# # The Tag Object ### Description The `Tag` object is used to represent a tag for a candidate. ### Usage Example Fetch from the `LIST Tags` endpoint and view the tags used within a company.
|
18
18
|
class Tag
|
19
19
|
# The third-party API ID of the matching object.
|
20
20
|
attr_accessor :remote_id
|
@@ -24,12 +24,16 @@ module MergeATSClient
|
|
24
24
|
|
25
25
|
attr_accessor :remote_data
|
26
26
|
|
27
|
+
# Indicates whether or not this object has been deleted on the third-party.
|
28
|
+
attr_accessor :remote_was_deleted
|
29
|
+
|
27
30
|
# Attribute mapping from ruby-style variable name to JSON key.
|
28
31
|
def self.attribute_map
|
29
32
|
{
|
30
33
|
:'remote_id' => :'remote_id',
|
31
34
|
:'name' => :'name',
|
32
|
-
:'remote_data' => :'remote_data'
|
35
|
+
:'remote_data' => :'remote_data',
|
36
|
+
:'remote_was_deleted' => :'remote_was_deleted'
|
33
37
|
}
|
34
38
|
end
|
35
39
|
|
@@ -43,7 +47,8 @@ module MergeATSClient
|
|
43
47
|
{
|
44
48
|
:'remote_id' => :'String',
|
45
49
|
:'name' => :'String',
|
46
|
-
:'remote_data' => :'Array<
|
50
|
+
:'remote_data' => :'Array<Hash<String, AnyType>>',
|
51
|
+
:'remote_was_deleted' => :'Boolean'
|
47
52
|
}
|
48
53
|
end
|
49
54
|
|
@@ -52,7 +57,7 @@ module MergeATSClient
|
|
52
57
|
Set.new([
|
53
58
|
:'remote_id',
|
54
59
|
:'name',
|
55
|
-
:'remote_data'
|
60
|
+
:'remote_data',
|
56
61
|
])
|
57
62
|
end
|
58
63
|
|
@@ -84,6 +89,10 @@ module MergeATSClient
|
|
84
89
|
self.remote_data = value
|
85
90
|
end
|
86
91
|
end
|
92
|
+
|
93
|
+
if attributes.key?(:'remote_was_deleted')
|
94
|
+
self.remote_was_deleted = attributes[:'remote_was_deleted']
|
95
|
+
end
|
87
96
|
end
|
88
97
|
|
89
98
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -106,7 +115,8 @@ module MergeATSClient
|
|
106
115
|
self.class == o.class &&
|
107
116
|
remote_id == o.remote_id &&
|
108
117
|
name == o.name &&
|
109
|
-
remote_data == o.remote_data
|
118
|
+
remote_data == o.remote_data &&
|
119
|
+
remote_was_deleted == o.remote_was_deleted
|
110
120
|
end
|
111
121
|
|
112
122
|
# @see the `==` method
|
@@ -118,7 +128,7 @@ module MergeATSClient
|
|
118
128
|
# Calculates hash code according to all attributes.
|
119
129
|
# @return [Integer] Hash code
|
120
130
|
def hash
|
121
|
-
[remote_id, name, remote_data].hash
|
131
|
+
[remote_id, name, remote_data, remote_was_deleted].hash
|
122
132
|
end
|
123
133
|
|
124
134
|
# Builds the object from hash
|
@@ -161,7 +171,7 @@ module MergeATSClient
|
|
161
171
|
when :Date
|
162
172
|
Date.parse(value)
|
163
173
|
when :String
|
164
|
-
value
|
174
|
+
value
|
165
175
|
when :Integer
|
166
176
|
value.to_i
|
167
177
|
when :Float
|
@@ -14,7 +14,7 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module MergeATSClient
|
17
|
-
# # The Url Object ### Description The `Url` object is used to represent a candidate's website.
|
17
|
+
# # The Url Object ### Description The `Url` object is used to represent a candidate's website. ### Usage Example Fetch from the `GET Candidate` endpoint and view their website urls.
|
18
18
|
class Url
|
19
19
|
# The site's url.
|
20
20
|
attr_accessor :value
|
@@ -164,7 +164,7 @@ module MergeATSClient
|
|
164
164
|
when :Date
|
165
165
|
Date.parse(value)
|
166
166
|
when :String
|
167
|
-
value
|
167
|
+
value
|
168
168
|
when :Integer
|
169
169
|
value.to_i
|
170
170
|
when :Float
|
@@ -14,7 +14,7 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module MergeATSClient
|
17
|
-
# # The Url Object ### Description The `Url` object is used to represent a candidate's website.
|
17
|
+
# # The Url Object ### Description The `Url` object is used to represent a candidate's website. ### Usage Example Fetch from the `GET Candidate` endpoint and view their website urls.
|
18
18
|
class UrlRequest
|
19
19
|
# The site's url.
|
20
20
|
attr_accessor :value
|
@@ -164,7 +164,7 @@ module MergeATSClient
|
|
164
164
|
when :Date
|
165
165
|
Date.parse(value)
|
166
166
|
when :String
|
167
|
-
value
|
167
|
+
value
|
168
168
|
when :Integer
|
169
169
|
value.to_i
|
170
170
|
when :Float
|
data/lib/merge_ats_client/models/{remote_key_for_regeneration.rb → validation_problem_source.rb}
RENAMED
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 1.0
|
7
7
|
Contact: hello@merge.dev
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.
|
9
|
+
OpenAPI Generator version: 5.1.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -14,14 +14,13 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module MergeATSClient
|
17
|
-
|
18
|
-
|
19
|
-
attr_accessor :name
|
17
|
+
class ValidationProblemSource
|
18
|
+
attr_accessor :pointer
|
20
19
|
|
21
20
|
# Attribute mapping from ruby-style variable name to JSON key.
|
22
21
|
def self.attribute_map
|
23
22
|
{
|
24
|
-
:'
|
23
|
+
:'pointer' => :'pointer'
|
25
24
|
}
|
26
25
|
end
|
27
26
|
|
@@ -33,7 +32,7 @@ module MergeATSClient
|
|
33
32
|
# Attribute type mapping.
|
34
33
|
def self.openapi_types
|
35
34
|
{
|
36
|
-
:'
|
35
|
+
:'pointer' => :'String'
|
37
36
|
}
|
38
37
|
end
|
39
38
|
|
@@ -47,19 +46,19 @@ module MergeATSClient
|
|
47
46
|
# @param [Hash] attributes Model attributes in the form of hash
|
48
47
|
def initialize(attributes = {})
|
49
48
|
if (!attributes.is_a?(Hash))
|
50
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `MergeATSClient::
|
49
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MergeATSClient::ValidationProblemSource` initialize method"
|
51
50
|
end
|
52
51
|
|
53
52
|
# check to see if the attribute exists and convert string to symbol for hash key
|
54
53
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
55
54
|
if (!self.class.attribute_map.key?(k.to_sym))
|
56
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `MergeATSClient::
|
55
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MergeATSClient::ValidationProblemSource`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
57
56
|
end
|
58
57
|
h[k.to_sym] = v
|
59
58
|
}
|
60
59
|
|
61
|
-
if attributes.key?(:'
|
62
|
-
self.
|
60
|
+
if attributes.key?(:'pointer')
|
61
|
+
self.pointer = attributes[:'pointer']
|
63
62
|
end
|
64
63
|
end
|
65
64
|
|
@@ -67,8 +66,8 @@ module MergeATSClient
|
|
67
66
|
# @return Array for valid properties with the reasons
|
68
67
|
def list_invalid_properties
|
69
68
|
invalid_properties = Array.new
|
70
|
-
if @
|
71
|
-
invalid_properties.push('invalid value for "
|
69
|
+
if @pointer.nil?
|
70
|
+
invalid_properties.push('invalid value for "pointer", pointer cannot be nil.')
|
72
71
|
end
|
73
72
|
|
74
73
|
invalid_properties
|
@@ -77,7 +76,7 @@ module MergeATSClient
|
|
77
76
|
# Check to see if the all the properties in the model are valid
|
78
77
|
# @return true if the model is valid
|
79
78
|
def valid?
|
80
|
-
return false if @
|
79
|
+
return false if @pointer.nil?
|
81
80
|
true
|
82
81
|
end
|
83
82
|
|
@@ -86,7 +85,7 @@ module MergeATSClient
|
|
86
85
|
def ==(o)
|
87
86
|
return true if self.equal?(o)
|
88
87
|
self.class == o.class &&
|
89
|
-
|
88
|
+
pointer == o.pointer
|
90
89
|
end
|
91
90
|
|
92
91
|
# @see the `==` method
|
@@ -98,7 +97,7 @@ module MergeATSClient
|
|
98
97
|
# Calculates hash code according to all attributes.
|
99
98
|
# @return [Integer] Hash code
|
100
99
|
def hash
|
101
|
-
[
|
100
|
+
[pointer].hash
|
102
101
|
end
|
103
102
|
|
104
103
|
# Builds the object from hash
|
@@ -141,7 +140,7 @@ module MergeATSClient
|
|
141
140
|
when :Date
|
142
141
|
Date.parse(value)
|
143
142
|
when :String
|
144
|
-
value
|
143
|
+
value
|
145
144
|
when :Integer
|
146
145
|
value.to_i
|
147
146
|
when :Float
|
@@ -0,0 +1,260 @@
|
|
1
|
+
=begin
|
2
|
+
#Merge ATS API
|
3
|
+
|
4
|
+
#The unified API for building rich integrations with multiple Applicant Tracking 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 MergeATSClient
|
17
|
+
class WarningValidationProblem
|
18
|
+
attr_accessor :source
|
19
|
+
|
20
|
+
attr_accessor :title
|
21
|
+
|
22
|
+
attr_accessor :detail
|
23
|
+
|
24
|
+
attr_accessor :problem_type
|
25
|
+
|
26
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
27
|
+
def self.attribute_map
|
28
|
+
{
|
29
|
+
:'source' => :'source',
|
30
|
+
:'title' => :'title',
|
31
|
+
:'detail' => :'detail',
|
32
|
+
:'problem_type' => :'problem_type'
|
33
|
+
}
|
34
|
+
end
|
35
|
+
|
36
|
+
# Returns all the JSON keys this model knows about
|
37
|
+
def self.acceptable_attributes
|
38
|
+
attribute_map.values
|
39
|
+
end
|
40
|
+
|
41
|
+
# Attribute type mapping.
|
42
|
+
def self.openapi_types
|
43
|
+
{
|
44
|
+
:'source' => :'ValidationProblemSource',
|
45
|
+
:'title' => :'String',
|
46
|
+
:'detail' => :'String',
|
47
|
+
:'problem_type' => :'String'
|
48
|
+
}
|
49
|
+
end
|
50
|
+
|
51
|
+
# List of attributes with nullable: true
|
52
|
+
def self.openapi_nullable
|
53
|
+
Set.new([
|
54
|
+
])
|
55
|
+
end
|
56
|
+
|
57
|
+
# Initializes the object
|
58
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
59
|
+
def initialize(attributes = {})
|
60
|
+
if (!attributes.is_a?(Hash))
|
61
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MergeATSClient::WarningValidationProblem` initialize method"
|
62
|
+
end
|
63
|
+
|
64
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
65
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
66
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
67
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MergeATSClient::WarningValidationProblem`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
68
|
+
end
|
69
|
+
h[k.to_sym] = v
|
70
|
+
}
|
71
|
+
|
72
|
+
if attributes.key?(:'source')
|
73
|
+
self.source = attributes[:'source']
|
74
|
+
end
|
75
|
+
|
76
|
+
if attributes.key?(:'title')
|
77
|
+
self.title = attributes[:'title']
|
78
|
+
end
|
79
|
+
|
80
|
+
if attributes.key?(:'detail')
|
81
|
+
self.detail = attributes[:'detail']
|
82
|
+
end
|
83
|
+
|
84
|
+
if attributes.key?(:'problem_type')
|
85
|
+
self.problem_type = attributes[:'problem_type']
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
90
|
+
# @return Array for valid properties with the reasons
|
91
|
+
def list_invalid_properties
|
92
|
+
invalid_properties = Array.new
|
93
|
+
if @title.nil?
|
94
|
+
invalid_properties.push('invalid value for "title", title cannot be nil.')
|
95
|
+
end
|
96
|
+
|
97
|
+
if @detail.nil?
|
98
|
+
invalid_properties.push('invalid value for "detail", detail cannot be nil.')
|
99
|
+
end
|
100
|
+
|
101
|
+
if @problem_type.nil?
|
102
|
+
invalid_properties.push('invalid value for "problem_type", problem_type cannot be nil.')
|
103
|
+
end
|
104
|
+
|
105
|
+
invalid_properties
|
106
|
+
end
|
107
|
+
|
108
|
+
# Check to see if the all the properties in the model are valid
|
109
|
+
# @return true if the model is valid
|
110
|
+
def valid?
|
111
|
+
return false if @title.nil?
|
112
|
+
return false if @detail.nil?
|
113
|
+
return false if @problem_type.nil?
|
114
|
+
true
|
115
|
+
end
|
116
|
+
|
117
|
+
# Checks equality by comparing each attribute.
|
118
|
+
# @param [Object] Object to be compared
|
119
|
+
def ==(o)
|
120
|
+
return true if self.equal?(o)
|
121
|
+
self.class == o.class &&
|
122
|
+
source == o.source &&
|
123
|
+
title == o.title &&
|
124
|
+
detail == o.detail &&
|
125
|
+
problem_type == o.problem_type
|
126
|
+
end
|
127
|
+
|
128
|
+
# @see the `==` method
|
129
|
+
# @param [Object] Object to be compared
|
130
|
+
def eql?(o)
|
131
|
+
self == o
|
132
|
+
end
|
133
|
+
|
134
|
+
# Calculates hash code according to all attributes.
|
135
|
+
# @return [Integer] Hash code
|
136
|
+
def hash
|
137
|
+
[source, title, detail, problem_type].hash
|
138
|
+
end
|
139
|
+
|
140
|
+
# Builds the object from hash
|
141
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
142
|
+
# @return [Object] Returns the model itself
|
143
|
+
def self.build_from_hash(attributes)
|
144
|
+
new.build_from_hash(attributes)
|
145
|
+
end
|
146
|
+
|
147
|
+
# Builds the object from hash
|
148
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
149
|
+
# @return [Object] Returns the model itself
|
150
|
+
def build_from_hash(attributes)
|
151
|
+
return nil unless attributes.is_a?(Hash)
|
152
|
+
self.class.openapi_types.each_pair do |key, type|
|
153
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
154
|
+
self.send("#{key}=", nil)
|
155
|
+
elsif type =~ /\AArray<(.*)>/i
|
156
|
+
# check to ensure the input is an array given that the attribute
|
157
|
+
# is documented as an array but the input is not
|
158
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
159
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
160
|
+
end
|
161
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
162
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
163
|
+
end
|
164
|
+
end
|
165
|
+
|
166
|
+
self
|
167
|
+
end
|
168
|
+
|
169
|
+
# Deserializes the data based on type
|
170
|
+
# @param string type Data type
|
171
|
+
# @param string value Value to be deserialized
|
172
|
+
# @return [Object] Deserialized data
|
173
|
+
def _deserialize(type, value)
|
174
|
+
case type.to_sym
|
175
|
+
when :Time
|
176
|
+
Time.parse(value)
|
177
|
+
when :Date
|
178
|
+
Date.parse(value)
|
179
|
+
when :String
|
180
|
+
value
|
181
|
+
when :Integer
|
182
|
+
value.to_i
|
183
|
+
when :Float
|
184
|
+
value.to_f
|
185
|
+
when :Boolean
|
186
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
187
|
+
true
|
188
|
+
else
|
189
|
+
false
|
190
|
+
end
|
191
|
+
when :Object
|
192
|
+
# generic object (usually a Hash), return directly
|
193
|
+
value
|
194
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
195
|
+
inner_type = Regexp.last_match[:inner_type]
|
196
|
+
value.map { |v| _deserialize(inner_type, v) }
|
197
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
198
|
+
k_type = Regexp.last_match[:k_type]
|
199
|
+
v_type = Regexp.last_match[:v_type]
|
200
|
+
{}.tap do |hash|
|
201
|
+
value.each do |k, v|
|
202
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
203
|
+
end
|
204
|
+
end
|
205
|
+
else # model
|
206
|
+
# models (e.g. Pet) or oneOf
|
207
|
+
klass = MergeATSClient.const_get(type)
|
208
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
209
|
+
end
|
210
|
+
end
|
211
|
+
|
212
|
+
# Returns the string representation of the object
|
213
|
+
# @return [String] String presentation of the object
|
214
|
+
def to_s
|
215
|
+
to_hash.to_s
|
216
|
+
end
|
217
|
+
|
218
|
+
# to_body is an alias to to_hash (backward compatibility)
|
219
|
+
# @return [Hash] Returns the object in the form of hash
|
220
|
+
def to_body
|
221
|
+
to_hash
|
222
|
+
end
|
223
|
+
|
224
|
+
# Returns the object in the form of hash
|
225
|
+
# @return [Hash] Returns the object in the form of hash
|
226
|
+
def to_hash
|
227
|
+
hash = {}
|
228
|
+
self.class.attribute_map.each_pair do |attr, param|
|
229
|
+
value = self.send(attr)
|
230
|
+
if value.nil?
|
231
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
232
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
233
|
+
end
|
234
|
+
|
235
|
+
hash[param] = _to_hash(value)
|
236
|
+
end
|
237
|
+
hash
|
238
|
+
end
|
239
|
+
|
240
|
+
# Outputs non-array value in the form of hash
|
241
|
+
# For object, use to_hash. Otherwise, just return the value
|
242
|
+
# @param [Object] value Any valid value
|
243
|
+
# @return [Hash] Returns the value in the form of hash
|
244
|
+
def _to_hash(value)
|
245
|
+
if value.is_a?(Array)
|
246
|
+
value.compact.map { |v| _to_hash(v) }
|
247
|
+
elsif value.is_a?(Hash)
|
248
|
+
{}.tap do |hash|
|
249
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
250
|
+
end
|
251
|
+
elsif value.respond_to? :to_hash
|
252
|
+
value.to_hash
|
253
|
+
else
|
254
|
+
value
|
255
|
+
end
|
256
|
+
end
|
257
|
+
|
258
|
+
end
|
259
|
+
|
260
|
+
end
|