Class: Twilio::REST::FlexApi::V1::ChannelInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::FlexApi::V1::ChannelInstance
- Defined in:
- lib/twilio-ruby/rest/flex_api/v1/channel.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The ID of the account that owns this Workflow.
-
#context ⇒ ChannelContext
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 ChannelInstance.
-
#fetch ⇒ ChannelInstance
Fetch a ChannelInstance.
-
#flex_flow_sid ⇒ String
The unique ID of the FlexFlow.
-
#initialize(version, payload, sid: nil) ⇒ ChannelInstance
constructor
Initialize the ChannelInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#sid ⇒ String
Flex Chat Channel Sid.
-
#task_sid ⇒ String
TaskRouter Task Sid.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#url ⇒ String
The url.
-
#user_sid ⇒ String
Chat User Sid.
Constructor Details
#initialize(version, payload, sid: nil) ⇒ ChannelInstance
Initialize the ChannelInstance
242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 |
# File 'lib/twilio-ruby/rest/flex_api/v1/channel.rb', line 242 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'], 'user_sid' => payload['user_sid'], 'task_sid' => payload['task_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.
275 276 277 |
# File 'lib/twilio-ruby/rest/flex_api/v1/channel.rb', line 275 def account_sid @properties['account_sid'] end |
#context ⇒ ChannelContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
266 267 268 269 270 271 |
# File 'lib/twilio-ruby/rest/flex_api/v1/channel.rb', line 266 def context unless @instance_context @instance_context = ChannelContext.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.
311 312 313 |
# File 'lib/twilio-ruby/rest/flex_api/v1/channel.rb', line 311 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.
317 318 319 |
# File 'lib/twilio-ruby/rest/flex_api/v1/channel.rb', line 317 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Deletes the ChannelInstance
331 332 333 |
# File 'lib/twilio-ruby/rest/flex_api/v1/channel.rb', line 331 def delete context.delete end |
#fetch ⇒ ChannelInstance
Fetch a ChannelInstance
324 325 326 |
# File 'lib/twilio-ruby/rest/flex_api/v1/channel.rb', line 324 def fetch context.fetch end |
#flex_flow_sid ⇒ String
Returns The unique ID of the FlexFlow.
281 282 283 |
# File 'lib/twilio-ruby/rest/flex_api/v1/channel.rb', line 281 def flex_flow_sid @properties['flex_flow_sid'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
344 345 346 347 |
# File 'lib/twilio-ruby/rest/flex_api/v1/channel.rb', line 344 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.FlexApi.V1.ChannelInstance #{values}>" end |
#sid ⇒ String
Returns Flex Chat Channel Sid.
287 288 289 |
# File 'lib/twilio-ruby/rest/flex_api/v1/channel.rb', line 287 def sid @properties['sid'] end |
#task_sid ⇒ String
Returns TaskRouter Task Sid.
299 300 301 |
# File 'lib/twilio-ruby/rest/flex_api/v1/channel.rb', line 299 def task_sid @properties['task_sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
337 338 339 340 |
# File 'lib/twilio-ruby/rest/flex_api/v1/channel.rb', line 337 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.FlexApi.V1.ChannelInstance #{values}>" end |
#url ⇒ String
Returns The url.
305 306 307 |
# File 'lib/twilio-ruby/rest/flex_api/v1/channel.rb', line 305 def url @properties['url'] end |
#user_sid ⇒ String
Returns Chat User Sid.
293 294 295 |
# File 'lib/twilio-ruby/rest/flex_api/v1/channel.rb', line 293 def user_sid @properties['user_sid'] end |