class Twilio::REST::FlexApi::V1::WebChannelInstance
Public Class Methods
Initialize the WebChannelInstance
@param [Version] version Version
that contains the resource @param [Hash] payload payload that contains response from Twilio
@param [String] sid The SID of the WebChannel resource to fetch. @return [WebChannelInstance] WebChannelInstance
Twilio::REST::InstanceResource::new
# File lib/twilio-ruby/rest/flex_api/v1/web_channel.rb 235 def initialize(version, payload, sid: nil) 236 super(version) 237 238 # Marshaled Properties 239 @properties = { 240 'account_sid' => payload['account_sid'], 241 'flex_flow_sid' => payload['flex_flow_sid'], 242 'sid' => payload['sid'], 243 'url' => payload['url'], 244 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 245 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 246 } 247 248 # Context 249 @instance_context = nil 250 @params = {'sid' => sid || @properties['sid'], } 251 end
Public Instance Methods
@return [String] The SID of the Account that created the resource and owns this Workflow
# File lib/twilio-ruby/rest/flex_api/v1/web_channel.rb 266 def account_sid 267 @properties['account_sid'] 268 end
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context @return [WebChannelContext] WebChannelContext
for this WebChannelInstance
# File lib/twilio-ruby/rest/flex_api/v1/web_channel.rb 257 def context 258 unless @instance_context 259 @instance_context = WebChannelContext.new(@version, @params['sid'], ) 260 end 261 @instance_context 262 end
@return [Time] The ISO 8601 date and time in GMT when the resource was created
# File lib/twilio-ruby/rest/flex_api/v1/web_channel.rb 290 def date_created 291 @properties['date_created'] 292 end
@return [Time] The ISO 8601 date and time in GMT when the resource was last updated
# File lib/twilio-ruby/rest/flex_api/v1/web_channel.rb 296 def date_updated 297 @properties['date_updated'] 298 end
Delete the WebChannelInstance
@return [Boolean] true if delete succeeds, false otherwise
# File lib/twilio-ruby/rest/flex_api/v1/web_channel.rb 320 def delete 321 context.delete 322 end
Fetch the WebChannelInstance
@return [WebChannelInstance] Fetched WebChannelInstance
# File lib/twilio-ruby/rest/flex_api/v1/web_channel.rb 303 def fetch 304 context.fetch 305 end
@return [String] The SID of the Flex Flow
# File lib/twilio-ruby/rest/flex_api/v1/web_channel.rb 272 def flex_flow_sid 273 @properties['flex_flow_sid'] 274 end
Provide a detailed, user friendly representation
# File lib/twilio-ruby/rest/flex_api/v1/web_channel.rb 333 def inspect 334 values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") 335 "<Twilio.FlexApi.V1.WebChannelInstance #{values}>" 336 end
@return [String] The unique string that identifies the WebChannel resource
# File lib/twilio-ruby/rest/flex_api/v1/web_channel.rb 278 def sid 279 @properties['sid'] 280 end
Provide a user friendly representation
# File lib/twilio-ruby/rest/flex_api/v1/web_channel.rb 326 def to_s 327 values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") 328 "<Twilio.FlexApi.V1.WebChannelInstance #{values}>" 329 end
Update the WebChannelInstance
@param [web_channel.ChatStatus] chat_status The chat status. Can only be
`inactive`.
@param [String] post_engagement_data The post-engagement data. @return [WebChannelInstance] Updated WebChannelInstance
# File lib/twilio-ruby/rest/flex_api/v1/web_channel.rb 313 def update(chat_status: :unset, post_engagement_data: :unset) 314 context.update(chat_status: chat_status, post_engagement_data: post_engagement_data, ) 315 end
@return [String] The absolute URL of the WebChannel resource
# File lib/twilio-ruby/rest/flex_api/v1/web_channel.rb 284 def url 285 @properties['url'] 286 end