Module: Truework::APIOperations::Retrieve
Instance Method Summary
collapse
#delete, #get, #post, #put, #request
Instance Method Details
#instance_url(id) ⇒ Object
11
12
13
|
# File 'lib/truework/api_operations/retrieve.rb', line 11
def instance_url(id)
"#{resource_path}#{id}/"
end
|
#retrieve(id) ⇒ Object
15
16
17
18
19
|
# File 'lib/truework/api_operations/retrieve.rb', line 15
def retrieve(id)
response = request(:get, instance_url(id))
api_response = Truework::APIResponse.from_response(response)
new(**api_response.json)
end
|