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,
lib/twilio-ruby/rest/voice/v2/recording_account_default_configuration.rb
Defined Under Namespace
Classes: AccountDefaultConfigurationContext, AccountDefaultConfigurationInstance, AccountDefaultConfigurationInstanceMetadata, AccountDefaultConfigurationList, AccountDefaultConfigurationListResponse, AccountDefaultConfigurationPage, Configuration, ConfigurationContext, ConfigurationInstance, ConfigurationInstanceMetadata, ConfigurationList, ConfigurationListResponse, ConfigurationPage, RecordingAccountDefaultConfigurationContext, RecordingAccountDefaultConfigurationInstance, RecordingAccountDefaultConfigurationInstanceMetadata, RecordingAccountDefaultConfigurationList, RecordingAccountDefaultConfigurationListResponse, RecordingAccountDefaultConfigurationPage, RecordingContext, RecordingInstance, RecordingInstanceMetadata, RecordingList, RecordingListResponse, RecordingPage, TranscriptionContext, TranscriptionInstance, TranscriptionInstanceMetadata, TranscriptionList, TranscriptionListResponse, TranscriptionPage, TypeContext, TypeInstance, TypeInstanceMetadata, TypeList, TypeListResponse, TypePage
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
30
|
# File 'lib/twilio-ruby/rest/voice/v2.rb', line 21
def initialize(domain)
super
@version = 'v2'
@account_default_configuration = nil
@configurations = nil
@recording = nil
@recording_account_default_configuration = nil
@transcription = nil
@type = nil
end
|
Instance Method Details
51
52
53
54
55
56
57
58
59
60
61
|
# File 'lib/twilio-ruby/rest/voice/v2.rb', line 51
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
|
66
67
68
69
70
71
72
73
74
75
76
|
# File 'lib/twilio-ruby/rest/voice/v2.rb', line 66
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
|
#recording_account_default_configuration ⇒ Twilio::REST::Voice::V2::recordingAccountDefaultConfigurationContext
#to_s ⇒ Object
Provide a user friendly representation
141
142
143
|
# File 'lib/twilio-ruby/rest/voice/v2.rb', line 141
def to_s
'<Twilio::REST::Voice::V2>';
end
|
86
87
88
89
90
91
92
93
94
95
96
|
# File 'lib/twilio-ruby/rest/voice/v2.rb', line 86
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
|
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
|
# File 'lib/twilio-ruby/rest/voice/v2.rb', line 102
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
|