class Twilio::REST::Chat::V2
Public Class Methods
new(domain)
click to toggle source
Initialize the V2
version of Chat
Calls superclass method
Twilio::REST::Version::new
# File lib/twilio-ruby/rest/chat/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 of the Credential resource to fetch. @return [Twilio::REST::Chat::V2::CredentialContext] if sid was passed. @return [Twilio::REST::Chat::V2::CredentialList]
# File lib/twilio-ruby/rest/chat/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 of the Service resource to fetch. @return [Twilio::REST::Chat::V2::ServiceContext] if sid was passed. @return [Twilio::REST::Chat::V2::ServiceList]
# File lib/twilio-ruby/rest/chat/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/chat/v2.rb 54 def to_s 55 '<Twilio::REST::Chat::V2>' 56 end