Class: Twilio::REST::Intelligence::V3::ConversationInstance
- Inherits:
-
Twilio::REST::InstanceResource
- Object
- Twilio::REST::InstanceResource
- Twilio::REST::Intelligence::V3::ConversationInstance
- Defined in:
- lib/twilio-ruby/rest/intelligence/v3/conversation.rb
Instance Method Summary collapse
-
#account_id ⇒ String
The ID of the account that owns the Conversation.
-
#channel_ids ⇒ Array<String>
The underlying channel resource ‘id`s associated with this Conversation, such as a Call ID or Message ID.
-
#channels ⇒ Array<Channel>
The communication channel(s) included in the Conversation.
-
#communications ⇒ Array<Communication>
Metadata for the Communications that make up the Conversation.
-
#context ⇒ ConversationContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#conversation_configuration_id ⇒ String
The ‘id` of the Configuration for a Conversation.
-
#created_at ⇒ Time
Timestamp for when the Conversation was created.
-
#fetch ⇒ ConversationInstance
Fetch the ConversationInstance.
-
#id ⇒ String
The ‘id` of the Conversation attached to the Operator Result.
-
#initialize(version, payload, id: nil) ⇒ ConversationInstance
constructor
Initialize the ConversationInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#intelligence_configuration_ids ⇒ Array<String>
The Intelligence Configuration(s) associated with the Conversation.
-
#name ⇒ String
Display name of the Conversation.
-
#operator_result_ids ⇒ Array<String>
List of Operator Result IDs generated from this Conversation.
-
#participants ⇒ Array<Participant>
Metadata for Participants of the Conversation.
- #status ⇒ ConversationStatus
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#updated_at ⇒ Time
Timestamp for when the Conversation was last updated.
Constructor Details
#initialize(version, payload, id: nil) ⇒ ConversationInstance
Initialize the ConversationInstance
460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 |
# File 'lib/twilio-ruby/rest/intelligence/v3/conversation.rb', line 460 def initialize(version, payload , id: nil) apiV1Version = ApiV1Version.new version.domain, version super(apiV1Version) # Marshaled Properties @properties = { 'id' => payload['id'], 'account_id' => payload['account_id'], 'name' => payload['name'], 'status' => payload['status'], 'created_at' => Twilio.deserialize_iso8601_datetime(payload['created_at']), 'updated_at' => Twilio.deserialize_iso8601_datetime(payload['updated_at']), 'intelligence_configuration_ids' => payload['intelligence_configuration_ids'], 'conversation_configuration_id' => payload['conversation_configuration_id'], 'channels' => payload['channels'], 'channel_ids' => payload['channel_ids'], 'participants' => payload['participants'], 'communications' => payload['communications'], 'operator_result_ids' => payload['operator_result_ids'], } # Context @instance_context = nil @params = { 'id' => id || @properties['id'] , } end |
Instance Method Details
#account_id ⇒ String
Returns The ID of the account that owns the Conversation.
506 507 508 |
# File 'lib/twilio-ruby/rest/intelligence/v3/conversation.rb', line 506 def account_id @properties['account_id'] end |
#channel_ids ⇒ Array<String>
Returns The underlying channel resource ‘id`s associated with this Conversation, such as a Call ID or Message ID.
554 555 556 |
# File 'lib/twilio-ruby/rest/intelligence/v3/conversation.rb', line 554 def channel_ids @properties['channel_ids'] end |
#channels ⇒ Array<Channel>
Returns The communication channel(s) included in the Conversation.
548 549 550 |
# File 'lib/twilio-ruby/rest/intelligence/v3/conversation.rb', line 548 def channels @properties['channels'] end |
#communications ⇒ Array<Communication>
Returns Metadata for the Communications that make up the Conversation.
566 567 568 |
# File 'lib/twilio-ruby/rest/intelligence/v3/conversation.rb', line 566 def communications @properties['communications'] end |
#context ⇒ ConversationContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
491 492 493 494 495 496 |
# File 'lib/twilio-ruby/rest/intelligence/v3/conversation.rb', line 491 def context unless @instance_context @instance_context = ConversationContext.new(@version , @params['id']) end @instance_context end |
#conversation_configuration_id ⇒ String
Returns The ‘id` of the Configuration for a Conversation.
542 543 544 |
# File 'lib/twilio-ruby/rest/intelligence/v3/conversation.rb', line 542 def conversation_configuration_id @properties['conversation_configuration_id'] end |
#created_at ⇒ Time
Returns Timestamp for when the Conversation was created.
524 525 526 |
# File 'lib/twilio-ruby/rest/intelligence/v3/conversation.rb', line 524 def created_at @properties['created_at'] end |
#fetch ⇒ ConversationInstance
Fetch the ConversationInstance
579 580 581 582 |
# File 'lib/twilio-ruby/rest/intelligence/v3/conversation.rb', line 579 def fetch context.fetch end |
#id ⇒ String
Returns The ‘id` of the Conversation attached to the Operator Result.
500 501 502 |
# File 'lib/twilio-ruby/rest/intelligence/v3/conversation.rb', line 500 def id @properties['id'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
593 594 595 596 |
# File 'lib/twilio-ruby/rest/intelligence/v3/conversation.rb', line 593 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Intelligence.V3.ConversationInstance #{values}>" end |
#intelligence_configuration_ids ⇒ Array<String>
Returns The Intelligence Configuration(s) associated with the Conversation.
536 537 538 |
# File 'lib/twilio-ruby/rest/intelligence/v3/conversation.rb', line 536 def intelligence_configuration_ids @properties['intelligence_configuration_ids'] end |
#name ⇒ String
Returns Display name of the Conversation.
512 513 514 |
# File 'lib/twilio-ruby/rest/intelligence/v3/conversation.rb', line 512 def name @properties['name'] end |
#operator_result_ids ⇒ Array<String>
Returns List of Operator Result IDs generated from this Conversation.
572 573 574 |
# File 'lib/twilio-ruby/rest/intelligence/v3/conversation.rb', line 572 def operator_result_ids @properties['operator_result_ids'] end |
#participants ⇒ Array<Participant>
Returns Metadata for Participants of the Conversation.
560 561 562 |
# File 'lib/twilio-ruby/rest/intelligence/v3/conversation.rb', line 560 def participants @properties['participants'] end |
#status ⇒ ConversationStatus
518 519 520 |
# File 'lib/twilio-ruby/rest/intelligence/v3/conversation.rb', line 518 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
586 587 588 589 |
# File 'lib/twilio-ruby/rest/intelligence/v3/conversation.rb', line 586 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Intelligence.V3.ConversationInstance #{values}>" end |
#updated_at ⇒ Time
Returns Timestamp for when the Conversation was last updated.
530 531 532 |
# File 'lib/twilio-ruby/rest/intelligence/v3/conversation.rb', line 530 def updated_at @properties['updated_at'] end |