Class: Twilio::REST::Trunking

Inherits:
Domain
  • Object
show all
Defined in:
lib/twilio-ruby/rest/trunking.rb,
lib/twilio-ruby/rest/trunking/v1.rb,
lib/twilio-ruby/rest/trunking/v1/trunk.rb,
lib/twilio-ruby/rest/trunking/v1/trunk/phone_number.rb,
lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb,
lib/twilio-ruby/rest/trunking/v1/trunk/origination_url.rb,
lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb

Defined Under Namespace

Classes: V1

Instance Attribute Summary

Attributes inherited from Domain

#client

Instance Method Summary collapse

Methods inherited from Domain

#absolute_url, #request

Constructor Details

#initialize(twilio) ⇒ Trunking

Initialize the Trunking Domain



12
13
14
15
16
17
18
19
20
21
# File 'lib/twilio-ruby/rest/trunking.rb', line 12

def initialize(twilio)
  super

  @base_url = 'https://trunking.twilio.com'
  @host = 'trunking.twilio.com'
  @port = 443

  # Versions
  @v1 = nil
end

Instance Method Details

#to_sObject

Provide a user friendly representation



39
40
41
# File 'lib/twilio-ruby/rest/trunking.rb', line 39

def to_s
  '#<Twilio::REST::Trunking>'
end

#trunks(sid = :unset) ⇒ Twilio::REST::Trunking::V1::TrunkInstance, Twilio::REST::Trunking::V1::TrunkList

Parameters:

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

    The sid

Returns:



33
34
35
# File 'lib/twilio-ruby/rest/trunking.rb', line 33

def trunks(sid=:unset)
  self.v1.trunks(sid)
end

#v1Object

Version v1 of trunking



25
26
27
# File 'lib/twilio-ruby/rest/trunking.rb', line 25

def v1
  @v1 ||= V1.new self
end