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

Attributes inherited from Twilio::REST::Version

#domain

Instance Method Summary collapse

Methods inherited from Twilio::REST::Version

#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

#archived_calls(date = :unset, sid = :unset) ⇒ Twilio::REST::Voice::V1::ArchivedCallContext, Twilio::REST::Voice::V1::ArchivedCallList

Parameters:

  • date (String) (defaults to: :unset)

    The date of the Call in UTC.

  • sid (String) (defaults to: :unset)

    The Twilio-provided Call SID that uniquely identifies the Call resource to delete

Returns:



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

#byoc_trunks(sid = :unset) ⇒ Twilio::REST::Voice::V1::ByocTrunkContext, Twilio::REST::Voice::V1::ByocTrunkList

Parameters:

  • sid (String) (defaults to: :unset)

    The Twilio-provided string that uniquely identifies the BYOC Trunk resource to fetch.

Returns:



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

#connection_policies(sid = :unset) ⇒ Twilio::REST::Voice::V1::ConnectionPolicyContext, Twilio::REST::Voice::V1::ConnectionPolicyList

Parameters:

  • sid (String) (defaults to: :unset)

    The unique string that we created to identify the Connection Policy resource to fetch.

Returns:



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

#dialing_permissionsTwilio::REST::Voice::V1::DialingPermissionsList



98
99
100
# File 'lib/twilio-ruby/rest/voice/v1.rb', line 98

def dialing_permissions
    @dialing_permissions ||= DialingPermissionsList.new self
end

#ip_records(sid = :unset) ⇒ Twilio::REST::Voice::V1::IpRecordContext, Twilio::REST::Voice::V1::IpRecordList

Parameters:

  • sid (String) (defaults to: :unset)

    The Twilio-provided string that uniquely identifies the IP Record resource to fetch.

Returns:



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

#source_ip_mappings(sid = :unset) ⇒ Twilio::REST::Voice::V1::SourceIpMappingContext, Twilio::REST::Voice::V1::SourceIpMappingList

Parameters:

  • sid (String) (defaults to: :unset)

    The Twilio-provided string that uniquely identifies the IP Record resource to fetch.

Returns:



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_sObject

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