class Twilio::REST::Chat::V1
Public Class Methods
new(domain)
click to toggle source
Initialize the V1
version of Chat
Calls superclass method
Twilio::REST::Version::new
# File lib/twilio-ruby/rest/chat/v1.rb 15 def initialize(domain) 16 super 17 @version = 'v1' 18 @credentials = nil 19 @services = nil 20 end
Public Instance Methods
credentials(sid=:unset)
click to toggle source
@param [String] sid The Twilio-provided string that uniquely identifies the
Credential resource to fetch.
@return [Twilio::REST::Chat::V1::CredentialContext] if sid was passed. @return [Twilio::REST::Chat::V1::CredentialList]
# File lib/twilio-ruby/rest/chat/v1.rb 27 def credentials(sid=:unset) 28 if sid.nil? 29 raise ArgumentError, 'sid cannot be nil' 30 end 31 if sid == :unset 32 @credentials ||= CredentialList.new self 33 else 34 CredentialContext.new(self, sid) 35 end 36 end
services(sid=:unset)
click to toggle source
@param [String] sid The Twilio-provided string that uniquely identifies the
Service resource to fetch.
@return [Twilio::REST::Chat::V1::ServiceContext] if sid was passed. @return [Twilio::REST::Chat::V1::ServiceList]
# File lib/twilio-ruby/rest/chat/v1.rb 43 def services(sid=:unset) 44 if sid.nil? 45 raise ArgumentError, 'sid cannot be nil' 46 end 47 if sid == :unset 48 @services ||= ServiceList.new self 49 else 50 ServiceContext.new(self, sid) 51 end 52 end
to_s()
click to toggle source
Provide a user friendly representation
# File lib/twilio-ruby/rest/chat/v1.rb 56 def to_s 57 '<Twilio::REST::Chat::V1>' 58 end