class SmartRecruiters::CandidatesResource
Public Instance Methods
create(**attributes)
click to toggle source
# File lib/smartrecruiters/resources/candidates.rb, line 14 def create(**attributes) Candidate.new post_request('candidates', body: attributes).body end
delete(candidate_id:)
click to toggle source
# File lib/smartrecruiters/resources/candidates.rb, line 22 def delete(candidate_id:) delete_request("candidates/#{candidate_id}") end
list(**params)
click to toggle source
# File lib/smartrecruiters/resources/candidates.rb, line 5 def list(**params) response = get_request('candidates', params: params) Collection.from_response(response, type: Candidate) end
retrieve(candidate_id:)
click to toggle source
# File lib/smartrecruiters/resources/candidates.rb, line 10 def retrieve(candidate_id:) Candidate.new get_request("candidates/#{candidate_id}").body end
retrieve_application(candidate_id:, job_id:)
click to toggle source
# File lib/smartrecruiters/resources/candidates.rb, line 34 def retrieve_application(candidate_id:, job_id:) Object.new get_request("candidates/#{candidate_id}/jobs/#{job_id}").body end
retrieve_application_attachments(candidate_id:, job_id:)
click to toggle source
# File lib/smartrecruiters/resources/candidates.rb, line 38 def retrieve_application_attachments(candidate_id:, job_id:) response = get_request("candidates/#{candidate_id}/jobs/#{job_id}/attachments") Collection.from_response(response, type: Attachment) end
retrieve_consent(candidate_id:)
click to toggle source
# File lib/smartrecruiters/resources/candidates.rb, line 26 def retrieve_consent(candidate_id:) Object.new get_request("candidates/#{candidate_id}/consent").body end
retrieve_consents(candidate_id:)
click to toggle source
# File lib/smartrecruiters/resources/candidates.rb, line 30 def retrieve_consents(candidate_id:) Object.new get_request("candidates/#{candidate_id}/consents").body end
retrieve_status_history(candidate_id:, job_id:)
click to toggle source
# File lib/smartrecruiters/resources/candidates.rb, line 43 def retrieve_status_history(candidate_id:, job_id:) response = get_request("candidates/#{candidate_id}/jobs/#{job_id}/status/history") Collection.from_response(response, type: Object) end
update(candidate_id:, **attributes)
click to toggle source
# File lib/smartrecruiters/resources/candidates.rb, line 18 def update(candidate_id:, **attributes) Candidate.new patch_request("candidates/#{candidate_id}", body: attributes).body end