Class: Twilio::REST::Chat::V3
- Defined in:
- lib/twilio-ruby/rest/chat/v3.rb,
lib/twilio-ruby/rest/chat/v3/channel.rb
Defined Under Namespace
Classes: ChannelContext, ChannelInstance, ChannelList, ChannelPage
Instance Attribute Summary
Attributes inherited from Version
Instance Method Summary collapse
- #channels(service_sid = :unset, sid = :unset) ⇒ Twilio::REST::Chat::V3::ChannelContext, Twilio::REST::Chat::V3::ChannelList
-
#initialize(domain) ⇒ V3
constructor
Initialize the V3 version of Chat.
-
#to_s ⇒ Object
Provide a user friendly representation.
Methods inherited from Version
#absolute_url, #create, #delete, #exception, #fetch, #page, #read_limits, #relative_uri, #request, #stream, #update
Constructor Details
#initialize(domain) ⇒ V3
Initialize the V3 version of Chat
21 22 23 24 25 |
# File 'lib/twilio-ruby/rest/chat/v3.rb', line 21 def initialize(domain) super @version = 'v3' @channels = nil end |
Instance Method Details
#channels(service_sid = :unset, sid = :unset) ⇒ Twilio::REST::Chat::V3::ChannelContext, Twilio::REST::Chat::V3::ChannelList
32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/twilio-ruby/rest/chat/v3.rb', line 32 def channels(service_sid=:unset, sid=:unset) if service_sid.nil? raise ArgumentError, 'service_sid cannot be nil' end if sid.nil? raise ArgumentError, 'sid cannot be nil' end if service_sid == :unset && sid == :unset @channels ||= ChannelList.new self else ChannelContext.new(self, service_sid, sid) end end |
#to_s ⇒ Object
Provide a user friendly representation
65 66 67 |
# File 'lib/twilio-ruby/rest/chat/v3.rb', line 65 def to_s '<Twilio::REST::Chat::V3>'; end |