Class: Twilio::REST::Call
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Call
- Defined in:
- lib/twilio-ruby/rest/calls.rb
Instance Method Summary collapse
- #cancel ⇒ Object
- #hangup ⇒ Object
-
#initialize(path, client, params = {}) ⇒ Call
constructor
A new instance of Call.
- #redirect_to(url) ⇒ Object
Methods inherited from InstanceResource
#delete, #inspect, #method_missing, #refresh, #update
Methods included from Utils
Constructor Details
#initialize(path, client, params = {}) ⇒ Call
Returns a new instance of Call.
10 11 12 13 |
# File 'lib/twilio-ruby/rest/calls.rb', line 10 def initialize(path, client, params={}) super path, client, params resource :recordings, :notifications end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Twilio::REST::InstanceResource
Instance Method Details
#cancel ⇒ Object
19 20 21 |
# File 'lib/twilio-ruby/rest/calls.rb', line 19 def cancel update :status => 'canceled' end |
#hangup ⇒ Object
23 24 25 |
# File 'lib/twilio-ruby/rest/calls.rb', line 23 def hangup update :status => 'completed' end |
#redirect_to(url) ⇒ Object
15 16 17 |
# File 'lib/twilio-ruby/rest/calls.rb', line 15 def redirect_to(url) update :url => url end |