Class: SmartRecruiters::PostingsResource
- Inherits:
-
Resource
- Object
- Resource
- SmartRecruiters::PostingsResource
show all
- Defined in:
- lib/smartrecruiters/resources/postings.rb
Constant Summary
collapse
- COMPANY_API =
'v1/companies'
Instance Attribute Summary
Attributes inherited from Resource
#client
Instance Method Summary
collapse
Methods inherited from Resource
#initialize
Instance Method Details
#create_candidate(posting_id:, **attributes) ⇒ Object
21
22
23
|
# File 'lib/smartrecruiters/resources/postings.rb', line 21
def create_candidate(posting_id:, **attributes)
Object.new post_request("postings/#{posting_id}/candidates", body: attributes).body
end
|
#list(company_id:, **params) ⇒ Object
7
8
9
10
|
# File 'lib/smartrecruiters/resources/postings.rb', line 7
def list(company_id:, **params)
response = get_request("#{COMPANY_API}/#{company_id}/postings", params: params)
Collection.from_response(response, type: Posting)
end
|
#list_departments(company_id:, **params) ⇒ Object
12
13
14
15
|
# File 'lib/smartrecruiters/resources/postings.rb', line 12
def list_departments(company_id:, **params)
response = get_request("#{COMPANY_API}/#{company_id}/departments", params: params)
Collection.from_response(response, type: Department)
end
|
#retrieve_candidate_status(posting_id:, candidate_id:) ⇒ Object
25
26
27
|
# File 'lib/smartrecruiters/resources/postings.rb', line 25
def retrieve_candidate_status(posting_id:, candidate_id:)
Object.new get_request("postings/#{posting_id}/candidates/#{candidate_id}/status").body
end
|
#retrieve_configuration(posting_id:) ⇒ Object
29
30
31
|
# File 'lib/smartrecruiters/resources/postings.rb', line 29
def retrieve_configuration(posting_id:)
Object.new get_request("postings/#{posting_id}/configuration").body
end
|
#retrieve_posting(company_id:, posting_id:, **params) ⇒ Object
17
18
19
|
# File 'lib/smartrecruiters/resources/postings.rb', line 17
def retrieve_posting(company_id:, posting_id:, **params)
Posting.new get_request("#{COMPANY_API}/#{company_id}/postings/#{posting_id}", params: params).body
end
|