Class: TwilioTestToolkit::CallInProgress
- Inherits:
-
CallScope
- Object
- CallScope
- TwilioTestToolkit::CallInProgress
show all
- Defined in:
- lib/twilio-test-toolkit/call_in_progress.rb
Overview
Instance Method Summary
collapse
Methods inherited from CallScope
#current_path, #follow_redirect, #follow_redirect!, #gather?, #gather_action, #gather_finish_on_key, #gather_method, has_element, #has_redirect_to?, #method_missing, #press, #respond_to_missing?, #response_xml, #root_call
Constructor Details
#initialize(initial_path, from_number, to_number, options = {}) ⇒ CallInProgress
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
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# File 'lib/twilio-test-toolkit/call_in_progress.rb', line 10
def initialize(initial_path, from_number, to_number, options = {})
@initial_path = initial_path
@from_number = from_number
@to_number = to_number
@is_machine = options[:is_machine]
@method = options[:method] || :post
if (options[:call_sid].nil?)
@sid = UUIDTools::UUID.random_create.to_s
else
@sid = options[:call_sid]
end
self.root_call = self
request_for_twiml!(@initial_path, :method => @method, :is_machine => @is_machine)
end
|
Instance Method Details
#from_number ⇒ Object
40
41
42
|
# File 'lib/twilio-test-toolkit/call_in_progress.rb', line 40
def from_number
@from_number
end
|
#http_method ⇒ Object
52
53
54
|
# File 'lib/twilio-test-toolkit/call_in_progress.rb', line 52
def http_method
@method
end
|
#initial_path ⇒ Object
36
37
38
|
# File 'lib/twilio-test-toolkit/call_in_progress.rb', line 36
def initial_path
@initial_path
end
|
#is_machine ⇒ Object
48
49
50
|
# File 'lib/twilio-test-toolkit/call_in_progress.rb', line 48
def is_machine
@is_machine
end
|
#sid ⇒ Object
32
33
34
|
# File 'lib/twilio-test-toolkit/call_in_progress.rb', line 32
def sid
@sid
end
|
#to_number ⇒ Object
44
45
46
|
# File 'lib/twilio-test-toolkit/call_in_progress.rb', line 44
def to_number
@to_number
end
|