Class: SmartRecruiters::OffersResource
- Inherits:
-
Resource
- Object
- Resource
- SmartRecruiters::OffersResource
show all
- Defined in:
- lib/smartrecruiters/resources/offers.rb
Instance Attribute Summary
Attributes inherited from Resource
#client
Instance Method Summary
collapse
Methods inherited from Resource
#initialize
Instance Method Details
#list(**params) ⇒ Object
5
6
7
8
|
# File 'lib/smartrecruiters/resources/offers.rb', line 5
def list(**params)
response = get_request('offers', params: params)
Collection.from_response(response, type: Offer)
end
|
#retrieve(offer_id:, candidate_id:, job_id:) ⇒ Object
15
16
17
|
# File 'lib/smartrecruiters/resources/offers.rb', line 15
def retrieve(offer_id:, candidate_id:, job_id:)
Offer.new get_request("candidates/#{candidate_id}/jobs/#{job_id}/offers/#{offer_id}").body
end
|
#retrieve_offers(candidate_id:, job_id:) ⇒ Object
10
11
12
13
|
# File 'lib/smartrecruiters/resources/offers.rb', line 10
def retrieve_offers(candidate_id:, job_id:)
response = get_request("candidates/#{candidate_id}/jobs/#{job_id}/offers")
Collection.from_response(response, type: Offer)
end
|