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 SID of the [Account](www.twilio.com/docs/iam/api/account) that created the Flex Flow resource and owns this Workflow.
- #channel_type ⇒ ChannelType
-
#chat_service_sid ⇒ String
The SID of the chat service.
-
#contact_identity ⇒ String
The channel contact’s Identity.
-
#context ⇒ FlexFlowContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#date_created ⇒ Time
The date and time in GMT when the resource was created specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
-
#date_updated ⇒ Time
The date and time in GMT when the resource was last updated specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
-
#delete ⇒ Boolean
Delete the FlexFlowInstance.
-
#enabled ⇒ Boolean
Whether the Flex Flow is enabled.
-
#fetch ⇒ FlexFlowInstance
Fetch the FlexFlowInstance.
-
#friendly_name ⇒ String
The string that you assigned to describe the resource.
-
#initialize(version, payload, sid: nil) ⇒ FlexFlowInstance
constructor
Initialize the FlexFlowInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#integration ⇒ Hash
An object that contains specific parameters for the integration.
- #integration_type ⇒ IntegrationType
-
#janitor_enabled ⇒ Boolean
When enabled, the Messaging Channel Janitor will remove active Proxy sessions if the associated Task is deleted outside of the Flex UI.
-
#long_lived ⇒ Boolean
When enabled, Flex will keep the chat channel active so that it may be used for subsequent interactions with a contact identity.
-
#sid ⇒ String
The unique string that we created to identify the Flex Flow resource.
-
#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, janitor_enabled: :unset, integration_retry_count: :unset) ⇒ FlexFlowInstance
Update the FlexFlowInstance.
-
#url ⇒ String
The absolute URL of the Flex Flow resource.
Constructor Details
#initialize(version, payload, sid: nil) ⇒ FlexFlowInstance
Initialize the FlexFlowInstance
383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 383 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'], 'janitor_enabled' => payload['janitor_enabled'], 'url' => payload['url'], } # Context @instance_context = nil @params = { 'sid' => sid || @properties['sid'] , } end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the Flex Flow resource and owns this Workflow.
422 423 424 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 422 def account_sid @properties['account_sid'] end |
#channel_type ⇒ ChannelType
458 459 460 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 458 def channel_type @properties['channel_type'] end |
#chat_service_sid ⇒ String
Returns The SID of the chat service.
452 453 454 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 452 def chat_service_sid @properties['chat_service_sid'] end |
#contact_identity ⇒ String
Returns The channel contact’s Identity.
464 465 466 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 464 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
413 414 415 416 417 418 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 413 def context unless @instance_context @instance_context = FlexFlowContext.new(@version , @params['sid']) end @instance_context end |
#date_created ⇒ Time
Returns The date and time in GMT when the resource was created specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
428 429 430 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 428 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date and time in GMT when the resource was last updated specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
434 435 436 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 434 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Delete the FlexFlowInstance
507 508 509 510 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 507 def delete context.delete end |
#enabled ⇒ Boolean
Returns Whether the Flex Flow is enabled.
470 471 472 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 470 def enabled @properties['enabled'] end |
#fetch ⇒ FlexFlowInstance
Fetch the FlexFlowInstance
515 516 517 518 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 515 def fetch context.fetch end |
#friendly_name ⇒ String
Returns The string that you assigned to describe the resource.
446 447 448 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 446 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
590 591 592 593 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 590 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.FlexApi.V1.FlexFlowInstance #{values}>" end |
#integration ⇒ Hash
Returns An object that contains specific parameters for the integration.
482 483 484 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 482 def integration @properties['integration'] end |
#integration_type ⇒ IntegrationType
476 477 478 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 476 def integration_type @properties['integration_type'] end |
#janitor_enabled ⇒ Boolean
Returns When enabled, the Messaging Channel Janitor will remove active Proxy sessions if the associated Task is deleted outside of the Flex UI. Defaults to ‘false`.
494 495 496 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 494 def janitor_enabled @properties['janitor_enabled'] end |
#long_lived ⇒ Boolean
Returns When enabled, Flex will keep the chat channel active so that it may be used for subsequent interactions with a contact identity. Defaults to ‘false`.
488 489 490 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 488 def long_lived @properties['long_lived'] end |
#sid ⇒ String
Returns The unique string that we created to identify the Flex Flow resource.
440 441 442 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 440 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
583 584 585 586 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 583 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, janitor_enabled: :unset, integration_retry_count: :unset) ⇒ FlexFlowInstance
Update the FlexFlowInstance
540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 540 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, janitor_enabled: :unset, integration_retry_count: :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, janitor_enabled: janitor_enabled, integration_retry_count: integration_retry_count, ) end |
#url ⇒ String
Returns The absolute URL of the Flex Flow resource.
500 501 502 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 500 def url @properties['url'] end |