class Twilio::REST::FlexApi::V1::ChannelContext
Public Class Methods
new(version, sid)
click to toggle source
Initialize the ChannelContext
@param [Version] version Version
that contains the resource @param [String] sid The SID of the Flex chat channel resource to fetch. @return [ChannelContext] ChannelContext
Calls superclass method
Twilio::REST::InstanceContext::new
# File lib/twilio-ruby/rest/flex_api/v1/channel.rb 184 def initialize(version, sid) 185 super(version) 186 187 # Path Solution 188 @solution = {sid: sid, } 189 @uri = "/Channels/#{@solution[:sid]}" 190 end
Public Instance Methods
delete()
click to toggle source
Delete the ChannelInstance
@return [Boolean] true if delete succeeds, false otherwise
# File lib/twilio-ruby/rest/flex_api/v1/channel.rb 204 def delete 205 @version.delete('DELETE', @uri) 206 end
fetch()
click to toggle source
Fetch the ChannelInstance
@return [ChannelInstance] Fetched ChannelInstance
# File lib/twilio-ruby/rest/flex_api/v1/channel.rb 195 def fetch 196 payload = @version.fetch('GET', @uri) 197 198 ChannelInstance.new(@version, payload, sid: @solution[:sid], ) 199 end
inspect()
click to toggle source
Provide a detailed, user friendly representation
# File lib/twilio-ruby/rest/flex_api/v1/channel.rb 217 def inspect 218 context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') 219 "#<Twilio.FlexApi.V1.ChannelContext #{context}>" 220 end
to_s()
click to toggle source
Provide a user friendly representation
# File lib/twilio-ruby/rest/flex_api/v1/channel.rb 210 def to_s 211 context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') 212 "#<Twilio.FlexApi.V1.ChannelContext #{context}>" 213 end