Sha256: 96364eab1417c00d61131ad4a6da7362a8f50865a1756984b642f9ff452ef5d3

Contents?: true

Size: 1.26 KB

Versions: 28

Compression:

Stored size: 1.26 KB

Contents

##
# This code was generated by
# \ / _    _  _|   _  _
#  | (_)\/(_)(_|\/| |(/_  v1.0.0
#       /       /
#
# frozen_string_literal: true

module Twilio
  module REST
    class Chat
      class V3 < Version
        ##
        # Initialize the V3 version of Chat
        def initialize(domain)
          super
          @version = 'v3'
          @channels = nil
        end

        ##
        # @param [String] service_sid The unique SID identifier of the Service.
        # @param [String] sid A 34 character string that uniquely identifies this Channel.
        # @return [Twilio::REST::Chat::V3::ChannelContext] if sid was passed.
        # @return [Twilio::REST::Chat::V3::ChannelList]
        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

        ##
        # Provide a user friendly representation
        def to_s
          '<Twilio::REST::Chat::V3>'
        end
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
twilio-ruby-5.77.0 lib/twilio-ruby/rest/chat/v3.rb
twilio-ruby-5.76.0 lib/twilio-ruby/rest/chat/v3.rb
twilio-ruby-5.75.0 lib/twilio-ruby/rest/chat/v3.rb
twilio-ruby-5.74.5 lib/twilio-ruby/rest/chat/v3.rb
twilio-ruby-5.74.4 lib/twilio-ruby/rest/chat/v3.rb
twilio-ruby-5.74.3 lib/twilio-ruby/rest/chat/v3.rb
twilio-ruby-5.74.2 lib/twilio-ruby/rest/chat/v3.rb
twilio-ruby-5.74.1 lib/twilio-ruby/rest/chat/v3.rb
twilio-ruby-5.74.0 lib/twilio-ruby/rest/chat/v3.rb
twilio-ruby-5.73.4 lib/twilio-ruby/rest/chat/v3.rb
twilio-ruby-5.73.3 lib/twilio-ruby/rest/chat/v3.rb
twilio-ruby-5.73.2 lib/twilio-ruby/rest/chat/v3.rb
twilio-ruby-5.73.1 lib/twilio-ruby/rest/chat/v3.rb
twilio-ruby-5.73.0 lib/twilio-ruby/rest/chat/v3.rb
twilio-ruby-5.72.1 lib/twilio-ruby/rest/chat/v3.rb
twilio-ruby-5.72.0 lib/twilio-ruby/rest/chat/v3.rb
twilio-ruby-5.71.0 lib/twilio-ruby/rest/chat/v3.rb
twilio-ruby-5.70.1 lib/twilio-ruby/rest/chat/v3.rb
twilio-ruby-5.70.0 lib/twilio-ruby/rest/chat/v3.rb
twilio-ruby-5.69.0 lib/twilio-ruby/rest/chat/v3.rb