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


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

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 (Date) (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:


32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/twilio-ruby/rest/voice/v1.rb', line 32

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:


51
52
53
54
55
56
57
58
59
60
# File 'lib/twilio-ruby/rest/voice/v1.rb', line 51

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:


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

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)

80
81
82
# File 'lib/twilio-ruby/rest/voice/v1.rb', line 80

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:


89
90
91
92
93
94
95
96
97
98
# File 'lib/twilio-ruby/rest/voice/v1.rb', line 89

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:


105
106
107
108
109
110
111
112
113
114
# File 'lib/twilio-ruby/rest/voice/v1.rb', line 105

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


118
119
120
# File 'lib/twilio-ruby/rest/voice/v1.rb', line 118

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