Class: Restcomm::REST::Call
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Restcomm::REST::Call
- Defined in:
- lib/restcomm-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.
15 16 17 18 19 |
# File 'lib/restcomm-ruby/rest/calls.rb', line 15 def initialize(path, client, params={}) super path, client, params resource :recordings, :notifications, :feedback end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Restcomm::REST::InstanceResource
Instance Method Details
#cancel ⇒ Object
25 26 27 28 29 30 |
# File 'lib/restcomm-ruby/rest/calls.rb', line 25 def cancel raise "*********#{params}" update status: 'canceled' end |
#hangup ⇒ Object
32 33 34 |
# File 'lib/restcomm-ruby/rest/calls.rb', line 32 def hangup update status: 'completed' end |
#redirect_to(url) ⇒ Object
21 22 23 |
# File 'lib/restcomm-ruby/rest/calls.rb', line 21 def redirect_to(url) update url: url end |