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/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: 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


15
16
17
18
19
20
21
22
23
# File 'lib/twilio-ruby/rest/voice/v1.rb', line 15

def initialize(domain)
  super
  @version = 'v1'
  @byoc_trunks = nil
  @connection_policies = nil
  @dialing_permissions = nil
  @ip_records = nil
  @source_ip_mappings = nil
end

Instance Method Details

#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:


30
31
32
33
34
35
36
37
38
39
# File 'lib/twilio-ruby/rest/voice/v1.rb', line 30

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:


46
47
48
49
50
51
52
53
54
55
# File 'lib/twilio-ruby/rest/voice/v1.rb', line 46

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::DialingPermissionsContext

Returns:

  • (Twilio::REST::Voice::V1::DialingPermissionsContext)

59
60
61
# File 'lib/twilio-ruby/rest/voice/v1.rb', line 59

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:


68
69
70
71
72
73
74
75
76
77
# File 'lib/twilio-ruby/rest/voice/v1.rb', line 68

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:


84
85
86
87
88
89
90
91
92
93
# File 'lib/twilio-ruby/rest/voice/v1.rb', line 84

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


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

def to_s
  '<Twilio::REST::Voice::V1>'
end