Class: Twilio::REST::Feedback

Inherits:
ListResource show all
Defined in:
lib/twilio-ruby/rest/call_feedback.rb

Instance Method Summary collapse

Methods inherited from ListResource

#initialize, #inspect, #list

Methods included from Utils

#detwilify, #twilify

Constructor Details

This class inherits a constructor from Twilio::REST::ListResource

Instance Method Details

#create(params = {}) ⇒ Object

Creates a new Feedback object.



19
20
21
22
23
# File 'lib/twilio-ruby/rest/call_feedback.rb', line 19

def create(params={})
  raise "Can't create feedback without a REST Client" unless @client
  response = @client.post @path, params
  @instance_class.new @path, @client, response
end

#get(params = {}, full_path = false) ⇒ Object

Get this feedback object.

Overridden because GETS to /Feedback returns an instance, not a list.



10
11
12
13
14
15
# File 'lib/twilio-ruby/rest/call_feedback.rb', line 10

def get(params={}, full_path=false)
  raise "Can't fetch feedback without a REST Client" unless @client
  response = @client.get @path, params, full_path
  path = full_path ? @path.split('.')[0] : @path
  @instance_class.new path, @client, response
end