class TwilioTestToolkit2::CallInProgress
Models a call
Public Class Methods
new(initial_path, from_number, to_number, options = {})
click to toggle source
Initiate a call. Options:
-
:method - specify the http method of the initial api call
-
:call_sid - specify an optional fixed value to be passed as params
-
:is_machine - controls params
# File lib/twilio-test-toolkit2/call_in_progress.rb, line 10 def initialize(initial_path, from_number, to_number, options = {}) # Save our variables for later @initial_path = initial_path @from_number = from_number @to_number = to_number @is_machine = options[:is_machine] @method = options[:method] || :post # Generate an initial call SID if we don't have one if (options[:call_sid].nil?) @sid = UUIDTools::UUID.random_create.to_s else @sid = options[:call_sid] end # We are the root call self.root_call = self # Create the request request_for_twiml!(@initial_path, :method => @method, :is_machine => @is_machine) end
Public Instance Methods
from_number()
click to toggle source
# File lib/twilio-test-toolkit2/call_in_progress.rb, line 40 def from_number @from_number end
http_method()
click to toggle source
# File lib/twilio-test-toolkit2/call_in_progress.rb, line 52 def http_method @method end
initial_path()
click to toggle source
# File lib/twilio-test-toolkit2/call_in_progress.rb, line 36 def initial_path @initial_path end
is_machine()
click to toggle source
# File lib/twilio-test-toolkit2/call_in_progress.rb, line 48 def is_machine @is_machine end
sid()
click to toggle source
# File lib/twilio-test-toolkit2/call_in_progress.rb, line 32 def sid @sid end
to_number()
click to toggle source
# File lib/twilio-test-toolkit2/call_in_progress.rb, line 44 def to_number @to_number end