Class: Recruitee::API::InterviewEvents
Instance Attribute Summary
#client, #resource_klass
Instance Method Summary
collapse
#destroy, #find, #list, #resource_name, #update
Constructor Details
Returns a new instance of InterviewEvents.
6
7
8
|
# File 'lib/recruitee/api/interview_events.rb', line 6
def initialize(client)
super(client, InterviewEvent)
end
|
Instance Method Details
#create(candidate_id:, **interview_event) ⇒ Object
10
11
12
13
14
15
16
17
18
|
# File 'lib/recruitee/api/interview_events.rb', line 10
def create(candidate_id:, **interview_event)
payload = request(
:post,
"/interview/candidates/#{candidate_id}/events",
body: { interview_event: interview_event }
)
initialize_from(payload[resource_name])
end
|
#resource_url ⇒ Object
27
28
29
|
# File 'lib/recruitee/api/interview_events.rb', line 27
def resource_url
'/interview/events'
end
|
#schedule(id, data = {}) ⇒ Object
20
21
22
23
24
25
|
# File 'lib/recruitee/api/interview_events.rb', line 20
def schedule(id, data = {})
body = namespaced_body(data)
payload = request(:post, "#{resource_url}/#{id}/schedule", body: body)
initialize_from(payload[resource_name])
end
|