Class: Twilio::REST::Voice::V1
- Inherits:
-
Twilio::REST::Version
show all
- Defined in:
- lib/twilio-ruby/rest/voice/v1.rb,
lib/twilio-ruby/rest/voice/v1/ip_record.rb,
lib/twilio-ruby/rest/voice/v1/byoc_trunk.rb,
lib/twilio-ruby/rest/voice/v1/archived_call.rb,
lib/twilio-ruby/rest/voice/v1/connection_policy.rb,
lib/twilio-ruby/rest/voice/v1/source_ip_mapping.rb,
lib/twilio-ruby/rest/voice/v1/dialing_permissions.rb,
lib/twilio-ruby/rest/voice/v1/dialing_permissions/country.rb,
lib/twilio-ruby/rest/voice/v1/dialing_permissions/settings.rb,
lib/twilio-ruby/rest/voice/v1/dialing_permissions/bulk_country_update.rb,
lib/twilio-ruby/rest/voice/v1/connection_policy/connection_policy_target.rb,
lib/twilio-ruby/rest/voice/v1/dialing_permissions/country/highrisk_special_prefix.rb
Defined Under Namespace
Classes: ArchivedCallContext, ArchivedCallInstance, ArchivedCallList, ArchivedCallPage, ByocTrunkContext, ByocTrunkInstance, ByocTrunkList, ByocTrunkPage, ConnectionPolicyContext, ConnectionPolicyInstance, ConnectionPolicyList, ConnectionPolicyPage, DialingPermissionsInstance, DialingPermissionsList, DialingPermissionsPage, IpRecordContext, IpRecordInstance, IpRecordList, IpRecordPage, SourceIpMappingContext, SourceIpMappingInstance, SourceIpMappingList, SourceIpMappingPage
Instance Attribute Summary
#domain
Instance Method Summary
collapse
#absolute_url, #create, #delete, #exception, #fetch, #page, #read_limits, #relative_uri, #request, #stream, #update
Constructor Details
#initialize(domain) ⇒ V1
Initialize the V1 version of Voice
21
22
23
24
25
26
27
28
29
30
|
# File 'lib/twilio-ruby/rest/voice/v1.rb', line 21
def initialize(domain)
super
@version = 'v1'
@archived_calls = nil
@byoc_trunks = nil
@connection_policies = nil
@dialing_permissions = nil
@ip_records = nil
@source_ip_mappings = nil
end
|
Instance Method Details
37
38
39
40
41
42
43
44
45
46
47
48
49
|
# File 'lib/twilio-ruby/rest/voice/v1.rb', line 37
def archived_calls(date=:unset, sid=:unset)
if date.nil?
raise ArgumentError, 'date cannot be nil'
end
if sid.nil?
raise ArgumentError, 'sid cannot be nil'
end
if date == :unset && sid == :unset
@archived_calls ||= ArchivedCallList.new self
else
ArchivedCallContext.new(self, date, sid)
end
end
|
72
73
74
75
76
77
78
79
80
81
|
# File 'lib/twilio-ruby/rest/voice/v1.rb', line 72
def byoc_trunks(sid=:unset)
if sid.nil?
raise ArgumentError, 'sid cannot be nil'
end
if sid == :unset
@byoc_trunks ||= ByocTrunkList.new self
else
ByocTrunkContext.new(self, sid)
end
end
|
86
87
88
89
90
91
92
93
94
95
|
# File 'lib/twilio-ruby/rest/voice/v1.rb', line 86
def connection_policies(sid=:unset)
if sid.nil?
raise ArgumentError, 'sid cannot be nil'
end
if sid == :unset
@connection_policies ||= ConnectionPolicyList.new self
else
ConnectionPolicyContext.new(self, sid)
end
end
|
98
99
100
|
# File 'lib/twilio-ruby/rest/voice/v1.rb', line 98
def dialing_permissions
@dialing_permissions ||= DialingPermissionsList.new self
end
|
105
106
107
108
109
110
111
112
113
114
|
# File 'lib/twilio-ruby/rest/voice/v1.rb', line 105
def ip_records(sid=:unset)
if sid.nil?
raise ArgumentError, 'sid cannot be nil'
end
if sid == :unset
@ip_records ||= IpRecordList.new self
else
IpRecordContext.new(self, sid)
end
end
|
119
120
121
122
123
124
125
126
127
128
|
# File 'lib/twilio-ruby/rest/voice/v1.rb', line 119
def source_ip_mappings(sid=:unset)
if sid.nil?
raise ArgumentError, 'sid cannot be nil'
end
if sid == :unset
@source_ip_mappings ||= SourceIpMappingList.new self
else
SourceIpMappingContext.new(self, sid)
end
end
|
#to_s ⇒ Object
Provide a user friendly representation
131
132
133
|
# File 'lib/twilio-ruby/rest/voice/v1.rb', line 131
def to_s
'<Twilio::REST::Voice::V1>';
end
|