Class: Recruitee::API::InterviewResults

Inherits:
Recruitee::APIResource show all
Defined in:
lib/recruitee/api/interview_results.rb

Instance Attribute Summary

Attributes inherited from Recruitee::APIResource

#client, #resource_klass

Instance Method Summary collapse

Methods inherited from Recruitee::APIResource

#destroy, #find, #list, #resource_name, #update

Constructor Details

#initialize(client) ⇒ InterviewResults

Returns a new instance of InterviewResults.



6
7
8
# File 'lib/recruitee/api/interview_results.rb', line 6

def initialize(client)
  super(client, InterviewResult)
end

Instance Method Details

#create(candidate_id:, **interview_result) ⇒ Object



10
11
12
13
14
15
16
17
18
# File 'lib/recruitee/api/interview_results.rb', line 10

def create(candidate_id:, **interview_result)
  payload = request(
    :post,
    "/interview/candidates/#{candidate_id}/results",
    body: { interview_result: interview_result }
  )

  initialize_from(payload[resource_name])
end

#resource_urlObject



20
21
22
# File 'lib/recruitee/api/interview_results.rb', line 20

def resource_url
  '/interview/results'
end