Class: Twilio::REST::FlexApi::V1::WebChannelInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::FlexApi::V1::WebChannelInstance
- Defined in:
- lib/twilio-ruby/rest/flex_api/v1/web_channel.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The ID of the account that owns this Workflow.
-
#context ⇒ WebChannelContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#date_created ⇒ Time
The time the Flex Chat Channel was created, given as GMT in ISO 8601 format.
-
#date_updated ⇒ Time
The time the Flex Chat Channel was last updated, given as GMT in ISO 8601 format.
-
#delete ⇒ Boolean
Deletes the WebChannelInstance.
-
#fetch ⇒ WebChannelInstance
Fetch a WebChannelInstance.
-
#flex_flow_sid ⇒ String
The unique ID of the FlexFlow.
-
#initialize(version, payload, sid: nil) ⇒ WebChannelInstance
constructor
Initialize the WebChannelInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#sid ⇒ String
Flex Chat Channel Sid.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(chat_status: :unset, post_engagement_data: :unset) ⇒ WebChannelInstance
Update the WebChannelInstance.
-
#url ⇒ String
The url.
Constructor Details
#initialize(version, payload, sid: nil) ⇒ WebChannelInstance
Initialize the WebChannelInstance
252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 |
# File 'lib/twilio-ruby/rest/flex_api/v1/web_channel.rb', line 252 def initialize(version, payload, sid: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'flex_flow_sid' => payload['flex_flow_sid'], 'sid' => payload['sid'], 'url' => payload['url'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), } # Context @instance_context = nil @params = {'sid' => sid || @properties['sid'], } end |
Instance Method Details
#account_sid ⇒ String
Returns The ID of the account that owns this Workflow.
283 284 285 |
# File 'lib/twilio-ruby/rest/flex_api/v1/web_channel.rb', line 283 def account_sid @properties['account_sid'] end |
#context ⇒ WebChannelContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
274 275 276 277 278 279 |
# File 'lib/twilio-ruby/rest/flex_api/v1/web_channel.rb', line 274 def context unless @instance_context @instance_context = WebChannelContext.new(@version, @params['sid'], ) end @instance_context end |
#date_created ⇒ Time
Returns The time the Flex Chat Channel was created, given as GMT in ISO 8601 format.
307 308 309 |
# File 'lib/twilio-ruby/rest/flex_api/v1/web_channel.rb', line 307 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The time the Flex Chat Channel was last updated, given as GMT in ISO 8601 format.
313 314 315 |
# File 'lib/twilio-ruby/rest/flex_api/v1/web_channel.rb', line 313 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Deletes the WebChannelInstance
337 338 339 |
# File 'lib/twilio-ruby/rest/flex_api/v1/web_channel.rb', line 337 def delete context.delete end |
#fetch ⇒ WebChannelInstance
Fetch a WebChannelInstance
320 321 322 |
# File 'lib/twilio-ruby/rest/flex_api/v1/web_channel.rb', line 320 def fetch context.fetch end |
#flex_flow_sid ⇒ String
Returns The unique ID of the FlexFlow.
289 290 291 |
# File 'lib/twilio-ruby/rest/flex_api/v1/web_channel.rb', line 289 def flex_flow_sid @properties['flex_flow_sid'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
350 351 352 353 |
# File 'lib/twilio-ruby/rest/flex_api/v1/web_channel.rb', line 350 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.FlexApi.V1.WebChannelInstance #{values}>" end |
#sid ⇒ String
Returns Flex Chat Channel Sid.
295 296 297 |
# File 'lib/twilio-ruby/rest/flex_api/v1/web_channel.rb', line 295 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
343 344 345 346 |
# File 'lib/twilio-ruby/rest/flex_api/v1/web_channel.rb', line 343 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.FlexApi.V1.WebChannelInstance #{values}>" end |
#update(chat_status: :unset, post_engagement_data: :unset) ⇒ WebChannelInstance
Update the WebChannelInstance
330 331 332 |
# File 'lib/twilio-ruby/rest/flex_api/v1/web_channel.rb', line 330 def update(chat_status: :unset, post_engagement_data: :unset) context.update(chat_status: chat_status, post_engagement_data: post_engagement_data, ) end |
#url ⇒ String
Returns The url.
301 302 303 |
# File 'lib/twilio-ruby/rest/flex_api/v1/web_channel.rb', line 301 def url @properties['url'] end |