class Twilio::REST::IpMessaging::V2

Public Class Methods

new(domain) click to toggle source

Initialize the V2 version of IpMessaging

Calls superclass method Twilio::REST::Version::new
   # File lib/twilio-ruby/rest/ip_messaging/v2.rb
15 def initialize(domain)
16   super
17   @version = 'v2'
18   @credentials = nil
19   @services = nil
20 end

Public Instance Methods

credentials(sid=:unset) click to toggle source

@param [String] sid The sid @return [Twilio::REST::Ip_messaging::V2::CredentialContext] if sid was passed. @return [Twilio::REST::Ip_messaging::V2::CredentialList]

   # File lib/twilio-ruby/rest/ip_messaging/v2.rb
26 def credentials(sid=:unset)
27   if sid.nil?
28       raise ArgumentError, 'sid cannot be nil'
29   end
30   if sid == :unset
31       @credentials ||= CredentialList.new self
32   else
33       CredentialContext.new(self, sid)
34   end
35 end
services(sid=:unset) click to toggle source

@param [String] sid The sid @return [Twilio::REST::Ip_messaging::V2::ServiceContext] if sid was passed. @return [Twilio::REST::Ip_messaging::V2::ServiceList]

   # File lib/twilio-ruby/rest/ip_messaging/v2.rb
41 def services(sid=:unset)
42   if sid.nil?
43       raise ArgumentError, 'sid cannot be nil'
44   end
45   if sid == :unset
46       @services ||= ServiceList.new self
47   else
48       ServiceContext.new(self, sid)
49   end
50 end
to_s() click to toggle source

Provide a user friendly representation

   # File lib/twilio-ruby/rest/ip_messaging/v2.rb
54 def to_s
55   '<Twilio::REST::IpMessaging::V2>'
56 end