Class: Twilio::REST::Voice::V2
- Inherits:
-
Twilio::REST::Version
show all
- Defined in:
- lib/twilio-ruby/rest/voice/v2.rb,
lib/twilio-ruby/rest/voice/v2/type.rb,
lib/twilio-ruby/rest/voice/v2/recording.rb,
lib/twilio-ruby/rest/voice/v2/configuration.rb,
lib/twilio-ruby/rest/voice/v2/transcription.rb,
lib/twilio-ruby/rest/voice/v2/configuration/default.rb,
lib/twilio-ruby/rest/voice/v2/account_default_configuration.rb
Defined Under Namespace
Classes: AccountDefaultConfigurationContext, AccountDefaultConfigurationInstance, AccountDefaultConfigurationInstanceMetadata, AccountDefaultConfigurationList, AccountDefaultConfigurationListResponse, AccountDefaultConfigurationPage, AccountDefaultConfigurationPageMetadata, Configuration, ConfigurationContext, ConfigurationInstance, ConfigurationInstanceMetadata, ConfigurationList, ConfigurationListResponse, ConfigurationPage, ConfigurationPageMetadata, RecordingContext, RecordingInstance, RecordingInstanceMetadata, RecordingList, RecordingListResponse, RecordingPage, RecordingPageMetadata, TranscriptionContext, TranscriptionInstance, TranscriptionInstanceMetadata, TranscriptionList, TranscriptionListResponse, TranscriptionPage, TranscriptionPageMetadata, TypeContext, TypeInstance, TypeInstanceMetadata, TypeList, TypeListResponse, TypePage, TypePageMetadata
Instance Attribute Summary
#domain, #version
Instance Method Summary
collapse
#absolute_url, #create, #create_with_metadata, #delete, #delete_with_metadata, #exception, #fetch, #fetch_with_metadata, #page, #patch, #read_limits, #relative_uri, #request, #stream, #stream_with_metadata, #update, #update_with_metadata
Constructor Details
#initialize(domain) ⇒ V2
Initialize the V2 version of Voice
21
22
23
24
25
26
27
28
29
|
# File 'lib/twilio-ruby/rest/voice/v2.rb', line 21
def initialize(domain)
super
@version = 'v2'
@account_default_configuration = nil
@configurations = nil
@recording = nil
@transcription = nil
@type = nil
end
|
Instance Method Details
50
51
52
53
54
55
56
57
58
59
60
|
# File 'lib/twilio-ruby/rest/voice/v2.rb', line 50
def configurations(type=:unset)
if type.nil?
raise ArgumentError, 'type cannot be nil'
end
if type == :unset
@configurations ||= ConfigurationList.new self
else
ConfigurationContext.new(self, type)
end
end
|
65
66
67
68
69
70
71
72
73
74
75
|
# File 'lib/twilio-ruby/rest/voice/v2.rb', line 65
def recording(id_or_unique_name=:unset)
if id_or_unique_name.nil?
raise ArgumentError, 'id_or_unique_name cannot be nil'
end
if id_or_unique_name == :unset
@recording ||= RecordingList.new self
else
RecordingContext.new(self, id_or_unique_name)
end
end
|
#to_s ⇒ Object
Provide a user friendly representation
135
136
137
|
# File 'lib/twilio-ruby/rest/voice/v2.rb', line 135
def to_s
'<Twilio::REST::Voice::V2>';
end
|
80
81
82
83
84
85
86
87
88
89
90
|
# File 'lib/twilio-ruby/rest/voice/v2.rb', line 80
def transcription(id_or_unique_name=:unset)
if id_or_unique_name.nil?
raise ArgumentError, 'id_or_unique_name cannot be nil'
end
if id_or_unique_name == :unset
@transcription ||= TranscriptionList.new self
else
TranscriptionContext.new(self, id_or_unique_name)
end
end
|
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
# File 'lib/twilio-ruby/rest/voice/v2.rb', line 96
def type(type=:unset, id_or_unique_name=:unset)
if type.nil?
raise ArgumentError, 'type cannot be nil'
end
if id_or_unique_name.nil?
raise ArgumentError, 'id_or_unique_name cannot be nil'
end
if type == :unset && id_or_unique_name == :unset
@type ||= TypeList.new self
elsif type != :unset && id_or_unique_name == :unset
TypeList.new(self, type: type)
else
TypeContext.new(self, type, id_or_unique_name)
end
end
|