Class: Twilio::REST::FlexApi::V1::FlexFlowInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::FlexApi::V1::FlexFlowInstance
- Defined in:
- lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The ID of the account that owns this Workflow.
-
#channel_type ⇒ flex_flow.ChannelType
Channel type.
-
#chat_service_sid ⇒ String
Service Sid.
-
#contact_identity ⇒ String
Channel contact Identity.
-
#context ⇒ FlexFlowContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#date_created ⇒ Time
The time the FlexFlow was created, given as GMT in ISO 8601 format.
-
#date_updated ⇒ Time
The time the FlexFlow was last updated, given as GMT in ISO 8601 format.
-
#delete ⇒ Boolean
Deletes the FlexFlowInstance.
-
#enabled ⇒ Boolean
Boolean flag for enabling or disabling the FlexFlow.
-
#fetch ⇒ FlexFlowInstance
Fetch a FlexFlowInstance.
-
#friendly_name ⇒ String
Human readable description of this FlexFlow.
-
#initialize(version, payload, sid: nil) ⇒ FlexFlowInstance
constructor
Initialize the FlexFlowInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#integration ⇒ Hash
Integration block.
-
#integration_type ⇒ flex_flow.IntegrationType
Integration type.
-
#long_lived ⇒ Boolean
Long Lived flag for new Channel.
-
#sid ⇒ String
The unique ID of the FlexFlow.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(friendly_name: :unset, chat_service_sid: :unset, channel_type: :unset, contact_identity: :unset, enabled: :unset, integration_type: :unset, integration_flow_sid: :unset, integration_url: :unset, integration_workspace_sid: :unset, integration_workflow_sid: :unset, integration_channel: :unset, integration_timeout: :unset, integration_priority: :unset, integration_creation_on_message: :unset, long_lived: :unset) ⇒ FlexFlowInstance
Update the FlexFlowInstance.
-
#url ⇒ String
The url.
Constructor Details
#initialize(version, payload, sid: nil) ⇒ FlexFlowInstance
Initialize the FlexFlowInstance
321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 321 def initialize(version, payload, sid: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 'sid' => payload['sid'], 'friendly_name' => payload['friendly_name'], 'chat_service_sid' => payload['chat_service_sid'], 'channel_type' => payload['channel_type'], 'contact_identity' => payload['contact_identity'], 'enabled' => payload['enabled'], 'integration_type' => payload['integration_type'], 'integration' => payload['integration'], 'long_lived' => payload['long_lived'], 'url' => payload['url'], } # 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.
359 360 361 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 359 def account_sid @properties['account_sid'] end |
#channel_type ⇒ flex_flow.ChannelType
Returns Channel type.
395 396 397 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 395 def channel_type @properties['channel_type'] end |
#chat_service_sid ⇒ String
Returns Service Sid.
389 390 391 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 389 def chat_service_sid @properties['chat_service_sid'] end |
#contact_identity ⇒ String
Returns Channel contact Identity.
401 402 403 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 401 def contact_identity @properties['contact_identity'] end |
#context ⇒ FlexFlowContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
350 351 352 353 354 355 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 350 def context unless @instance_context @instance_context = FlexFlowContext.new(@version, @params['sid'], ) end @instance_context end |
#date_created ⇒ Time
Returns The time the FlexFlow was created, given as GMT in ISO 8601 format.
365 366 367 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 365 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The time the FlexFlow was last updated, given as GMT in ISO 8601 format.
371 372 373 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 371 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Deletes the FlexFlowInstance
494 495 496 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 494 def delete context.delete end |
#enabled ⇒ Boolean
Returns Boolean flag for enabling or disabling the FlexFlow.
407 408 409 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 407 def enabled @properties['enabled'] end |
#fetch ⇒ FlexFlowInstance
Fetch a FlexFlowInstance
438 439 440 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 438 def fetch context.fetch end |
#friendly_name ⇒ String
Returns Human readable description of this FlexFlow.
383 384 385 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 383 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
507 508 509 510 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 507 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.FlexApi.V1.FlexFlowInstance #{values}>" end |
#integration ⇒ Hash
Returns Integration block.
419 420 421 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 419 def integration @properties['integration'] end |
#integration_type ⇒ flex_flow.IntegrationType
Returns Integration type.
413 414 415 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 413 def integration_type @properties['integration_type'] end |
#long_lived ⇒ Boolean
Returns Long Lived flag for new Channel.
425 426 427 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 425 def long_lived @properties['long_lived'] end |
#sid ⇒ String
Returns The unique ID of the FlexFlow.
377 378 379 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 377 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
500 501 502 503 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 500 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.FlexApi.V1.FlexFlowInstance #{values}>" end |
#update(friendly_name: :unset, chat_service_sid: :unset, channel_type: :unset, contact_identity: :unset, enabled: :unset, integration_type: :unset, integration_flow_sid: :unset, integration_url: :unset, integration_workspace_sid: :unset, integration_workflow_sid: :unset, integration_channel: :unset, integration_timeout: :unset, integration_priority: :unset, integration_creation_on_message: :unset, long_lived: :unset) ⇒ FlexFlowInstance
Update the FlexFlowInstance
471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 471 def update(friendly_name: :unset, chat_service_sid: :unset, channel_type: :unset, contact_identity: :unset, enabled: :unset, integration_type: :unset, integration_flow_sid: :unset, integration_url: :unset, integration_workspace_sid: :unset, integration_workflow_sid: :unset, integration_channel: :unset, integration_timeout: :unset, integration_priority: :unset, integration_creation_on_message: :unset, long_lived: :unset) context.update( friendly_name: friendly_name, chat_service_sid: chat_service_sid, channel_type: channel_type, contact_identity: contact_identity, enabled: enabled, integration_type: integration_type, integration_flow_sid: integration_flow_sid, integration_url: integration_url, integration_workspace_sid: integration_workspace_sid, integration_workflow_sid: integration_workflow_sid, integration_channel: integration_channel, integration_timeout: integration_timeout, integration_priority: integration_priority, integration_creation_on_message: , long_lived: long_lived, ) end |
#url ⇒ String
Returns The url.
431 432 433 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 431 def url @properties['url'] end |