lib/twilio-ruby/rest/chat/v3.rb in twilio-ruby-5.77.0 vs lib/twilio-ruby/rest/chat/v3.rb in twilio-ruby-6.0.0.pre.rc.1

- old
+ new

@@ -1,48 +1,71 @@ ## -# This code was generated by -# \ / _ _ _| _ _ -# | (_)\/(_)(_|\/| |(/_ v1.0.0 -# / / +# This code was generated by +# ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ +# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ +# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ # -# frozen_string_literal: true +# Twilio - Chat +# This is the public Twilio REST API. +# +# NOTE: This class is auto generated by OpenAPI Generator. +# https://openapi-generator.tech +# Do not edit the class manually. +# module Twilio - module REST - class Chat - class V3 < Version - ## - # Initialize the V3 version of Chat - def initialize(domain) - super - @version = 'v3' - @channels = nil - end + 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 + ## + # @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 serviceSid 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 + ## + # @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 - - ## - # Provide a user friendly representation - def to_s - '<Twilio::REST::Chat::V3>' - end - end end - end -end \ No newline at end of file +end