merge_ats_client 1.0.4 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +40 -18
- data/docs/AccountDetails.md +13 -7
- data/docs/AccountDetailsAndActions.md +6 -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 +11 -5
- 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 +180 -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 +98 -16
- 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 +6 -2
- 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 +11 -5
- data/docs/EncodingEnum.md +15 -0
- data/docs/EndUserDetailsRequest.md +10 -6
- 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 +11 -85
- data/docs/IssuesApi.md +18 -10
- data/docs/Job.md +7 -1
- data/docs/JobInterviewStage.md +4 -2
- data/docs/JobInterviewStagesApi.md +8 -6
- data/docs/JobsApi.md +13 -6
- data/docs/LinkToken.md +3 -1
- data/docs/LinkTokenApi.md +3 -3
- data/docs/LinkedAccountStatus.md +20 -0
- data/docs/LinkedAccountsApi.md +24 -22
- data/docs/MetaResponse.md +24 -0
- data/docs/MultipartFormFieldRequest.md +26 -0
- data/docs/Offer.md +5 -3
- data/docs/OffersApi.md +11 -5
- 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/RemoteResponse.md +5 -1
- data/docs/RemoteUser.md +3 -1
- data/docs/ResponseTypeEnum.md +15 -0
- data/docs/ScheduledInterview.md +6 -4
- data/docs/Scorecard.md +6 -4
- data/docs/ScorecardsApi.md +11 -85
- data/docs/SyncStatus.md +2 -2
- data/docs/SyncStatusApi.md +3 -75
- data/docs/Tag.md +3 -1
- data/docs/TagsApi.md +4 -2
- data/docs/UpdateApplicationStageRequest.md +20 -0
- data/docs/UsersApi.md +11 -85
- 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 +17 -0
- data/lib/merge_ats_client/api/applications_api.rb +164 -15
- data/lib/merge_ats_client/api/attachments_api.rb +108 -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 +17 -0
- data/lib/merge_ats_client/api/force_resync_api.rb +84 -0
- data/lib/merge_ats_client/api/interviews_api.rb +17 -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 +20 -3
- data/lib/merge_ats_client/api/linked_accounts_api.rb +24 -21
- data/lib/merge_ats_client/api/offers_api.rb +17 -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 +17 -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 +17 -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/access_role_enum.rb +17 -7
- data/lib/merge_ats_client/models/account_details.rb +33 -4
- data/lib/merge_ats_client/models/account_details_and_actions.rb +35 -1
- data/lib/merge_ats_client/models/account_details_and_actions_integration.rb +4 -2
- data/lib/merge_ats_client/models/account_details_and_actions_status_enum.rb +17 -7
- 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/activity_type_enum.rb +17 -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 +17 -9
- 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/{remote_key_for_regeneration.rb → candidate_endpoint_request.rb} +29 -16
- 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 +19 -7
- data/lib/merge_ats_client/models/category_enum.rb +19 -7
- data/lib/merge_ats_client/models/data_passthrough_request.rb +79 -7
- 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/disability_status_enum.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/email_address_type_enum.rb +17 -7
- data/lib/merge_ats_client/models/encoding_enum.rb +46 -0
- data/lib/merge_ats_client/models/end_user_details_request.rb +163 -27
- data/lib/merge_ats_client/models/error_validation_problem.rb +260 -0
- data/lib/merge_ats_client/models/gender_enum.rb +17 -7
- data/lib/merge_ats_client/models/generate_remote_key_request.rb +20 -1
- data/lib/merge_ats_client/models/ignore_common_model.rb +247 -0
- data/lib/merge_ats_client/models/ignore_common_model_request.rb +256 -0
- data/lib/merge_ats_client/models/issue.rb +2 -2
- data/lib/merge_ats_client/models/issue_status_enum.rb +17 -7
- data/lib/merge_ats_client/models/job.rb +39 -6
- data/lib/merge_ats_client/models/job_interview_stage.rb +17 -7
- data/lib/merge_ats_client/models/job_status_enum.rb +17 -7
- data/lib/merge_ats_client/models/link_token.rb +14 -5
- 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/method_enum.rb +17 -7
- 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/offer_status_enum.rb +17 -7
- data/lib/merge_ats_client/models/office.rb +17 -7
- data/lib/merge_ats_client/models/overall_recommendation_enum.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/phone_number_type_enum.rb +17 -7
- data/lib/merge_ats_client/models/race_enum.rb +17 -7
- data/lib/merge_ats_client/models/reason_enum.rb +46 -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_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 +24 -10
- data/lib/merge_ats_client/models/remote_user.rb +17 -7
- data/lib/merge_ats_client/models/request_format_enum.rb +18 -7
- data/lib/merge_ats_client/models/response_type_enum.rb +45 -0
- data/lib/merge_ats_client/models/scheduled_interview.rb +16 -9
- data/lib/merge_ats_client/models/scheduled_interview_status_enum.rb +17 -7
- data/lib/merge_ats_client/models/scorecard.rb +16 -9
- data/lib/merge_ats_client/models/sync_status.rb +1 -11
- data/lib/merge_ats_client/models/sync_status_status_enum.rb +19 -9
- data/lib/merge_ats_client/models/tag.rb +17 -7
- data/lib/merge_ats_client/models/update_application_stage_request.rb +244 -0
- 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/url_type_enum.rb +18 -7
- data/lib/merge_ats_client/models/{remote_data_request.rb → validation_problem_source.rb} +14 -25
- data/lib/merge_ats_client/models/veteran_status_enum.rb +17 -7
- data/lib/merge_ats_client/models/visibility_enum.rb +17 -7
- 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 +24 -4
- 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 +6 -1
- data/spec/api/applications_api_spec.rb +46 -1
- data/spec/api/attachments_api_spec.rb +33 -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 +6 -1
- data/spec/api/force_resync_api_spec.rb +46 -0
- data/spec/api/interviews_api_spec.rb +6 -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 +8 -1
- data/spec/api/link_token_api_spec.rb +2 -2
- data/spec/api/linked_accounts_api_spec.rb +11 -10
- data/spec/api/offers_api_spec.rb +6 -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 +6 -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 +7 -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 +18 -0
- data/spec/models/account_details_spec.rb +18 -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 +19 -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 +19 -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 +37 -1
- data/spec/models/job_status_enum_spec.rb +1 -1
- data/spec/models/link_token_spec.rb +7 -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 +13 -1
- data/spec/models/remote_user_spec.rb +13 -1
- data/spec/models/response_type_enum_spec.rb +28 -0
- 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/update_application_stage_request_spec.rb +40 -0
- 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 +186 -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/lib/merge_ats_client/models/remote_user_request.rb +0 -302
- 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
@@ -1,302 +0,0 @@
|
|
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
|
-
# # The RemoteUser Object ### Description The `RemoteUser` object is used to represent a third party user. ### Usage Example Fetch from the `LIST RemoteUsers` endpoint to show all users for a third party.
|
18
|
-
class RemoteUserRequest
|
19
|
-
# The third-party API ID of the matching object.
|
20
|
-
attr_accessor :remote_id
|
21
|
-
|
22
|
-
# The user's first name.
|
23
|
-
attr_accessor :first_name
|
24
|
-
|
25
|
-
# The user's last name.
|
26
|
-
attr_accessor :last_name
|
27
|
-
|
28
|
-
# The user's email.
|
29
|
-
attr_accessor :email
|
30
|
-
|
31
|
-
# Whether the user's account had been disabled.
|
32
|
-
attr_accessor :disabled
|
33
|
-
|
34
|
-
# When the third party's user was created.
|
35
|
-
attr_accessor :remote_created_at
|
36
|
-
|
37
|
-
# The user's role.
|
38
|
-
attr_accessor :access_role
|
39
|
-
|
40
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
41
|
-
def self.attribute_map
|
42
|
-
{
|
43
|
-
:'remote_id' => :'remote_id',
|
44
|
-
:'first_name' => :'first_name',
|
45
|
-
:'last_name' => :'last_name',
|
46
|
-
:'email' => :'email',
|
47
|
-
:'disabled' => :'disabled',
|
48
|
-
:'remote_created_at' => :'remote_created_at',
|
49
|
-
:'access_role' => :'access_role'
|
50
|
-
}
|
51
|
-
end
|
52
|
-
|
53
|
-
# Returns all the JSON keys this model knows about
|
54
|
-
def self.acceptable_attributes
|
55
|
-
attribute_map.values
|
56
|
-
end
|
57
|
-
|
58
|
-
# Attribute type mapping.
|
59
|
-
def self.openapi_types
|
60
|
-
{
|
61
|
-
:'remote_id' => :'String',
|
62
|
-
:'first_name' => :'String',
|
63
|
-
:'last_name' => :'String',
|
64
|
-
:'email' => :'String',
|
65
|
-
:'disabled' => :'Boolean',
|
66
|
-
:'remote_created_at' => :'Time',
|
67
|
-
:'access_role' => :'AccessRoleEnum'
|
68
|
-
}
|
69
|
-
end
|
70
|
-
|
71
|
-
# List of attributes with nullable: true
|
72
|
-
def self.openapi_nullable
|
73
|
-
Set.new([
|
74
|
-
:'remote_id',
|
75
|
-
:'first_name',
|
76
|
-
:'last_name',
|
77
|
-
:'email',
|
78
|
-
:'disabled',
|
79
|
-
:'remote_created_at',
|
80
|
-
:'access_role'
|
81
|
-
])
|
82
|
-
end
|
83
|
-
|
84
|
-
# Initializes the object
|
85
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
86
|
-
def initialize(attributes = {})
|
87
|
-
if (!attributes.is_a?(Hash))
|
88
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `MergeATSClient::RemoteUserRequest` initialize method"
|
89
|
-
end
|
90
|
-
|
91
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
92
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
93
|
-
if (!self.class.attribute_map.key?(k.to_sym))
|
94
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `MergeATSClient::RemoteUserRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
95
|
-
end
|
96
|
-
h[k.to_sym] = v
|
97
|
-
}
|
98
|
-
|
99
|
-
if attributes.key?(:'remote_id')
|
100
|
-
self.remote_id = attributes[:'remote_id']
|
101
|
-
end
|
102
|
-
|
103
|
-
if attributes.key?(:'first_name')
|
104
|
-
self.first_name = attributes[:'first_name']
|
105
|
-
end
|
106
|
-
|
107
|
-
if attributes.key?(:'last_name')
|
108
|
-
self.last_name = attributes[:'last_name']
|
109
|
-
end
|
110
|
-
|
111
|
-
if attributes.key?(:'email')
|
112
|
-
self.email = attributes[:'email']
|
113
|
-
end
|
114
|
-
|
115
|
-
if attributes.key?(:'disabled')
|
116
|
-
self.disabled = attributes[:'disabled']
|
117
|
-
end
|
118
|
-
|
119
|
-
if attributes.key?(:'remote_created_at')
|
120
|
-
self.remote_created_at = attributes[:'remote_created_at']
|
121
|
-
end
|
122
|
-
|
123
|
-
if attributes.key?(:'access_role')
|
124
|
-
self.access_role = attributes[:'access_role']
|
125
|
-
end
|
126
|
-
end
|
127
|
-
|
128
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
129
|
-
# @return Array for valid properties with the reasons
|
130
|
-
def list_invalid_properties
|
131
|
-
invalid_properties = Array.new
|
132
|
-
if !@email.nil? && @email.to_s.length > 254
|
133
|
-
invalid_properties.push('invalid value for "email", the character length must be smaller than or equal to 254.')
|
134
|
-
end
|
135
|
-
|
136
|
-
invalid_properties
|
137
|
-
end
|
138
|
-
|
139
|
-
# Check to see if the all the properties in the model are valid
|
140
|
-
# @return true if the model is valid
|
141
|
-
def valid?
|
142
|
-
return false if !@email.nil? && @email.to_s.length > 254
|
143
|
-
true
|
144
|
-
end
|
145
|
-
|
146
|
-
# Custom attribute writer method with validation
|
147
|
-
# @param [Object] email Value to be assigned
|
148
|
-
def email=(email)
|
149
|
-
if !email.nil? && email.to_s.length > 254
|
150
|
-
fail ArgumentError, 'invalid value for "email", the character length must be smaller than or equal to 254.'
|
151
|
-
end
|
152
|
-
|
153
|
-
@email = email
|
154
|
-
end
|
155
|
-
|
156
|
-
# Checks equality by comparing each attribute.
|
157
|
-
# @param [Object] Object to be compared
|
158
|
-
def ==(o)
|
159
|
-
return true if self.equal?(o)
|
160
|
-
self.class == o.class &&
|
161
|
-
remote_id == o.remote_id &&
|
162
|
-
first_name == o.first_name &&
|
163
|
-
last_name == o.last_name &&
|
164
|
-
email == o.email &&
|
165
|
-
disabled == o.disabled &&
|
166
|
-
remote_created_at == o.remote_created_at &&
|
167
|
-
access_role == o.access_role
|
168
|
-
end
|
169
|
-
|
170
|
-
# @see the `==` method
|
171
|
-
# @param [Object] Object to be compared
|
172
|
-
def eql?(o)
|
173
|
-
self == o
|
174
|
-
end
|
175
|
-
|
176
|
-
# Calculates hash code according to all attributes.
|
177
|
-
# @return [Integer] Hash code
|
178
|
-
def hash
|
179
|
-
[remote_id, first_name, last_name, email, disabled, remote_created_at, access_role].hash
|
180
|
-
end
|
181
|
-
|
182
|
-
# Builds the object from hash
|
183
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
184
|
-
# @return [Object] Returns the model itself
|
185
|
-
def self.build_from_hash(attributes)
|
186
|
-
new.build_from_hash(attributes)
|
187
|
-
end
|
188
|
-
|
189
|
-
# Builds the object from hash
|
190
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
191
|
-
# @return [Object] Returns the model itself
|
192
|
-
def build_from_hash(attributes)
|
193
|
-
return nil unless attributes.is_a?(Hash)
|
194
|
-
self.class.openapi_types.each_pair do |key, type|
|
195
|
-
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
196
|
-
self.send("#{key}=", nil)
|
197
|
-
elsif type =~ /\AArray<(.*)>/i
|
198
|
-
# check to ensure the input is an array given that the attribute
|
199
|
-
# is documented as an array but the input is not
|
200
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
201
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
202
|
-
end
|
203
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
204
|
-
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
205
|
-
end
|
206
|
-
end
|
207
|
-
|
208
|
-
self
|
209
|
-
end
|
210
|
-
|
211
|
-
# Deserializes the data based on type
|
212
|
-
# @param string type Data type
|
213
|
-
# @param string value Value to be deserialized
|
214
|
-
# @return [Object] Deserialized data
|
215
|
-
def _deserialize(type, value)
|
216
|
-
case type.to_sym
|
217
|
-
when :Time
|
218
|
-
Time.parse(value)
|
219
|
-
when :Date
|
220
|
-
Date.parse(value)
|
221
|
-
when :String
|
222
|
-
value.to_s
|
223
|
-
when :Integer
|
224
|
-
value.to_i
|
225
|
-
when :Float
|
226
|
-
value.to_f
|
227
|
-
when :Boolean
|
228
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
229
|
-
true
|
230
|
-
else
|
231
|
-
false
|
232
|
-
end
|
233
|
-
when :Object
|
234
|
-
# generic object (usually a Hash), return directly
|
235
|
-
value
|
236
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
237
|
-
inner_type = Regexp.last_match[:inner_type]
|
238
|
-
value.map { |v| _deserialize(inner_type, v) }
|
239
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
240
|
-
k_type = Regexp.last_match[:k_type]
|
241
|
-
v_type = Regexp.last_match[:v_type]
|
242
|
-
{}.tap do |hash|
|
243
|
-
value.each do |k, v|
|
244
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
245
|
-
end
|
246
|
-
end
|
247
|
-
else # model
|
248
|
-
# models (e.g. Pet) or oneOf
|
249
|
-
klass = MergeATSClient.const_get(type)
|
250
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
251
|
-
end
|
252
|
-
end
|
253
|
-
|
254
|
-
# Returns the string representation of the object
|
255
|
-
# @return [String] String presentation of the object
|
256
|
-
def to_s
|
257
|
-
to_hash.to_s
|
258
|
-
end
|
259
|
-
|
260
|
-
# to_body is an alias to to_hash (backward compatibility)
|
261
|
-
# @return [Hash] Returns the object in the form of hash
|
262
|
-
def to_body
|
263
|
-
to_hash
|
264
|
-
end
|
265
|
-
|
266
|
-
# Returns the object in the form of hash
|
267
|
-
# @return [Hash] Returns the object in the form of hash
|
268
|
-
def to_hash
|
269
|
-
hash = {}
|
270
|
-
self.class.attribute_map.each_pair do |attr, param|
|
271
|
-
value = self.send(attr)
|
272
|
-
if value.nil?
|
273
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
274
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
275
|
-
end
|
276
|
-
|
277
|
-
hash[param] = _to_hash(value)
|
278
|
-
end
|
279
|
-
hash
|
280
|
-
end
|
281
|
-
|
282
|
-
# Outputs non-array value in the form of hash
|
283
|
-
# For object, use to_hash. Otherwise, just return the value
|
284
|
-
# @param [Object] value Any valid value
|
285
|
-
# @return [Hash] Returns the value in the form of hash
|
286
|
-
def _to_hash(value)
|
287
|
-
if value.is_a?(Array)
|
288
|
-
value.compact.map { |v| _to_hash(v) }
|
289
|
-
elsif value.is_a?(Hash)
|
290
|
-
{}.tap do |hash|
|
291
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
292
|
-
end
|
293
|
-
elsif value.respond_to? :to_hash
|
294
|
-
value.to_hash
|
295
|
-
else
|
296
|
-
value
|
297
|
-
end
|
298
|
-
end
|
299
|
-
|
300
|
-
end
|
301
|
-
|
302
|
-
end
|
data/merge_ats_client-1.0.3.gem
DELETED
Binary file
|
@@ -1,82 +0,0 @@
|
|
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.0.0
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'spec_helper'
|
14
|
-
require 'json'
|
15
|
-
require 'date'
|
16
|
-
|
17
|
-
# Unit tests for MergeATSClient::PatchedApplicationRequest
|
18
|
-
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
-
# Please update as you see appropriate
|
20
|
-
describe MergeATSClient::PatchedApplicationRequest do
|
21
|
-
let(:instance) { MergeATSClient::PatchedApplicationRequest.new }
|
22
|
-
|
23
|
-
describe 'test an instance of PatchedApplicationRequest' do
|
24
|
-
it 'should create an instance of PatchedApplicationRequest' do
|
25
|
-
expect(instance).to be_instance_of(MergeATSClient::PatchedApplicationRequest)
|
26
|
-
end
|
27
|
-
end
|
28
|
-
describe 'test attribute "remote_id"' do
|
29
|
-
it 'should work' do
|
30
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
describe 'test attribute "candidate"' do
|
35
|
-
it 'should work' do
|
36
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
describe 'test attribute "job"' do
|
41
|
-
it 'should work' do
|
42
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
describe 'test attribute "applied_at"' do
|
47
|
-
it 'should work' do
|
48
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
49
|
-
end
|
50
|
-
end
|
51
|
-
|
52
|
-
describe 'test attribute "rejected_at"' do
|
53
|
-
it 'should work' do
|
54
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
55
|
-
end
|
56
|
-
end
|
57
|
-
|
58
|
-
describe 'test attribute "source"' do
|
59
|
-
it 'should work' do
|
60
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
61
|
-
end
|
62
|
-
end
|
63
|
-
|
64
|
-
describe 'test attribute "credited_to"' do
|
65
|
-
it 'should work' do
|
66
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
67
|
-
end
|
68
|
-
end
|
69
|
-
|
70
|
-
describe 'test attribute "current_stage"' do
|
71
|
-
it 'should work' do
|
72
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
73
|
-
end
|
74
|
-
end
|
75
|
-
|
76
|
-
describe 'test attribute "reject_reason"' do
|
77
|
-
it 'should work' do
|
78
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
79
|
-
end
|
80
|
-
end
|
81
|
-
|
82
|
-
end
|
@@ -1,94 +0,0 @@
|
|
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 'spec_helper'
|
14
|
-
require 'json'
|
15
|
-
require 'date'
|
16
|
-
|
17
|
-
# Unit tests for MergeATSClient::ScheduledInterviewRequest
|
18
|
-
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
-
# Please update as you see appropriate
|
20
|
-
describe MergeATSClient::ScheduledInterviewRequest do
|
21
|
-
let(:instance) { MergeATSClient::ScheduledInterviewRequest.new }
|
22
|
-
|
23
|
-
describe 'test an instance of ScheduledInterviewRequest' do
|
24
|
-
it 'should create an instance of ScheduledInterviewRequest' do
|
25
|
-
expect(instance).to be_instance_of(MergeATSClient::ScheduledInterviewRequest)
|
26
|
-
end
|
27
|
-
end
|
28
|
-
describe 'test attribute "remote_id"' do
|
29
|
-
it 'should work' do
|
30
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
describe 'test attribute "application"' do
|
35
|
-
it 'should work' do
|
36
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
describe 'test attribute "job_interview_stage"' do
|
41
|
-
it 'should work' do
|
42
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
describe 'test attribute "organizer"' do
|
47
|
-
it 'should work' do
|
48
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
49
|
-
end
|
50
|
-
end
|
51
|
-
|
52
|
-
describe 'test attribute "interviewers"' do
|
53
|
-
it 'should work' do
|
54
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
55
|
-
end
|
56
|
-
end
|
57
|
-
|
58
|
-
describe 'test attribute "location"' do
|
59
|
-
it 'should work' do
|
60
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
61
|
-
end
|
62
|
-
end
|
63
|
-
|
64
|
-
describe 'test attribute "start_at"' do
|
65
|
-
it 'should work' do
|
66
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
67
|
-
end
|
68
|
-
end
|
69
|
-
|
70
|
-
describe 'test attribute "end_at"' do
|
71
|
-
it 'should work' do
|
72
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
73
|
-
end
|
74
|
-
end
|
75
|
-
|
76
|
-
describe 'test attribute "remote_created_at"' do
|
77
|
-
it 'should work' do
|
78
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
79
|
-
end
|
80
|
-
end
|
81
|
-
|
82
|
-
describe 'test attribute "remote_updated_at"' do
|
83
|
-
it 'should work' do
|
84
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
85
|
-
end
|
86
|
-
end
|
87
|
-
|
88
|
-
describe 'test attribute "status"' do
|
89
|
-
it 'should work' do
|
90
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
91
|
-
end
|
92
|
-
end
|
93
|
-
|
94
|
-
end
|
@@ -1,70 +0,0 @@
|
|
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 'spec_helper'
|
14
|
-
require 'json'
|
15
|
-
require 'date'
|
16
|
-
|
17
|
-
# Unit tests for MergeATSClient::ScorecardRequest
|
18
|
-
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
-
# Please update as you see appropriate
|
20
|
-
describe MergeATSClient::ScorecardRequest do
|
21
|
-
let(:instance) { MergeATSClient::ScorecardRequest.new }
|
22
|
-
|
23
|
-
describe 'test an instance of ScorecardRequest' do
|
24
|
-
it 'should create an instance of ScorecardRequest' do
|
25
|
-
expect(instance).to be_instance_of(MergeATSClient::ScorecardRequest)
|
26
|
-
end
|
27
|
-
end
|
28
|
-
describe 'test attribute "remote_id"' do
|
29
|
-
it 'should work' do
|
30
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
describe 'test attribute "application"' do
|
35
|
-
it 'should work' do
|
36
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
describe 'test attribute "interview"' do
|
41
|
-
it 'should work' do
|
42
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
describe 'test attribute "interviewer"' do
|
47
|
-
it 'should work' do
|
48
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
49
|
-
end
|
50
|
-
end
|
51
|
-
|
52
|
-
describe 'test attribute "remote_created_at"' do
|
53
|
-
it 'should work' do
|
54
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
55
|
-
end
|
56
|
-
end
|
57
|
-
|
58
|
-
describe 'test attribute "submitted_at"' do
|
59
|
-
it 'should work' do
|
60
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
61
|
-
end
|
62
|
-
end
|
63
|
-
|
64
|
-
describe 'test attribute "overall_recommendation"' do
|
65
|
-
it 'should work' do
|
66
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
67
|
-
end
|
68
|
-
end
|
69
|
-
|
70
|
-
end
|
data/test_ats.rb
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
require 'merge_ats_client'
|
2
|
-
|
3
|
-
MergeATSClient.configure do |config|
|
4
|
-
config.api_key["Authorization"] = "gCTNlqHbmF3z2mGRh92StFH2mtOwF50mtvvs4aX-0ntwI_AbGtrB1g"
|
5
|
-
config.api_key_prefix['Authorization'] = 'Bearer'
|
6
|
-
end
|
7
|
-
x_account_token = "NBfCj-FLWuB7gkD9-lhmsuK7Et2bc04dnYMyAtVY0nX8PVCchrcjvg"
|
8
|
-
expand = "applications,attachments"
|
9
|
-
opts = {expand: expand}
|
10
|
-
api_instance = MergeATSClient::CandidatesApi.new
|
11
|
-
p = MergeATSClient::DataPassthroughRequest.new
|
12
|
-
p.method = "GET"
|
13
|
-
p.path = "/test"
|
14
|
-
p.headers = {"a": "b"}
|
15
|
-
begin
|
16
|
-
result = p.candidates_list(x_account_token, opts)
|
17
|
-
puts result.class
|
18
|
-
puts result.results.first()
|
19
|
-
puts result.results.first().attachments.first().class
|
20
|
-
rescue MergeATSClient::ApiError => e
|
21
|
-
puts "Exception when calling CandidatesApi->candidates_retrieve: #{e}"
|
22
|
-
end
|
data/test_signature.rb
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
|
2
|
-
require "base64"
|
3
|
-
require 'openssl'
|
4
|
-
require 'json'
|
5
|
-
|
6
|
-
'''signature = "EXAMPLE_SIGNATURE"
|
7
|
-
payload = {model: "a", pk: "b", fields: "c"}
|
8
|
-
json_payload = payload.to_json
|
9
|
-
puts json_payload
|
10
|
-
hmax_2 = OpenSSL::HMAC.digest(OpenSSL::Digest.new('sha256'), signature, json_payload)
|
11
|
-
puts "from SO: "
|
12
|
-
puts hmax_2
|
13
|
-
|
14
|
-
b64_encoded2 = Base64.encode64(hmax_2).strip!
|
15
|
-
puts "decoded 2: "
|
16
|
-
puts hmax_2'''
|
17
|
-
# b64_encoded == request.env["X-Merge-Webhook-Signature"]
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
'''
|
22
|
-
require "base64"
|
23
|
-
require "openssl"
|
24
|
-
require "json"
|
25
|
-
|
26
|
-
signature = "EXAMPLE_SIGNATURE"
|
27
|
-
payload = request.raw_post
|
28
|
-
hmac = OpenSSL::HMAC::hexdigest("sha256", signature, payload)
|
29
|
-
b64_encoded = Base64.encode64(hmac)
|
30
|
-
|
31
|
-
b64_encoded == request.env["X-Merge-Webhook-Signature"]
|
32
|
-
'''
|