Class: Twilio::REST::Memory::V1::ConversationSummaryInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Memory::V1::ConversationSummaryInstance
- Defined in:
- lib/twilio-ruby/rest/memory/v1/conversation_summary.rb
Instance Method Summary collapse
-
#content ⇒ String
The main content of the summary.
-
#context ⇒ ConversationSummaryContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#conversation_id ⇒ String
A unique identifier for the conversation using Twilio Type ID (TTID) format.
-
#created_at ⇒ Time
The timestamp when the summary was created.
-
#delete ⇒ Boolean
Delete the ConversationSummaryInstance.
-
#fetch ⇒ ConversationSummaryInstance
Fetch the ConversationSummaryInstance.
-
#id ⇒ String
A unique identifier for the summary using Twilio Type ID (TTID) format.
-
#initialize(version, payload, store_id: nil, profile_id: nil, summary_id: nil) ⇒ ConversationSummaryInstance
constructor
Initialize the ConversationSummaryInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#message ⇒ String
Confirmation message for the operation.
-
#occurred_at ⇒ Time
The timestamp when the summary was originally created.
-
#patch(summary_core_patch: nil) ⇒ ConversationSummaryInstance
Patch the ConversationSummaryInstance.
-
#source ⇒ String
The source system that generated the summary.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#updated_at ⇒ Time
The timestamp when the summary was last updated.
Constructor Details
#initialize(version, payload, store_id: nil, profile_id: nil, summary_id: nil) ⇒ ConversationSummaryInstance
Initialize the ConversationSummaryInstance
671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 |
# File 'lib/twilio-ruby/rest/memory/v1/conversation_summary.rb', line 671 def initialize(version, payload , store_id: nil, profile_id: nil, summary_id: nil) apiV1Version = ApiV1Version.new version.domain, version super(apiV1Version) # Marshaled Properties @properties = { 'message' => payload['message'], 'source' => payload['source'], 'content' => payload['content'], 'occurred_at' => Twilio.deserialize_iso8601_datetime(payload['occurred_at']), 'conversation_id' => payload['conversation_id'], 'id' => payload['id'], 'created_at' => Twilio.deserialize_iso8601_datetime(payload['created_at']), 'updated_at' => Twilio.deserialize_iso8601_datetime(payload['updated_at']), } # Context @instance_context = nil @params = { 'store_id' => store_id || @properties['store_id'] ,'profile_id' => profile_id || @properties['profile_id'] ,'summary_id' => summary_id || @properties['summary_id'] , } end |
Instance Method Details
#content ⇒ String
Returns The main content of the summary.
718 719 720 |
# File 'lib/twilio-ruby/rest/memory/v1/conversation_summary.rb', line 718 def content @properties['content'] end |
#context ⇒ ConversationSummaryContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
697 698 699 700 701 702 |
# File 'lib/twilio-ruby/rest/memory/v1/conversation_summary.rb', line 697 def context unless @instance_context @instance_context = ConversationSummaryContext.new(@version , @params['store_id'], @params['profile_id'], @params['summary_id']) end @instance_context end |
#conversation_id ⇒ String
Returns A unique identifier for the conversation using Twilio Type ID (TTID) format.
730 731 732 |
# File 'lib/twilio-ruby/rest/memory/v1/conversation_summary.rb', line 730 def conversation_id @properties['conversation_id'] end |
#created_at ⇒ Time
Returns The timestamp when the summary was created.
742 743 744 |
# File 'lib/twilio-ruby/rest/memory/v1/conversation_summary.rb', line 742 def created_at @properties['created_at'] end |
#delete ⇒ Boolean
Delete the ConversationSummaryInstance
755 756 757 758 |
# File 'lib/twilio-ruby/rest/memory/v1/conversation_summary.rb', line 755 def delete context.delete end |
#fetch ⇒ ConversationSummaryInstance
Fetch the ConversationSummaryInstance
763 764 765 766 |
# File 'lib/twilio-ruby/rest/memory/v1/conversation_summary.rb', line 763 def fetch context.fetch end |
#id ⇒ String
Returns A unique identifier for the summary using Twilio Type ID (TTID) format.
736 737 738 |
# File 'lib/twilio-ruby/rest/memory/v1/conversation_summary.rb', line 736 def id @properties['id'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
789 790 791 792 |
# File 'lib/twilio-ruby/rest/memory/v1/conversation_summary.rb', line 789 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Memory.V1.ConversationSummaryInstance #{values}>" end |
#message ⇒ String
Returns Confirmation message for the operation.
706 707 708 |
# File 'lib/twilio-ruby/rest/memory/v1/conversation_summary.rb', line 706 def @properties['message'] end |
#occurred_at ⇒ Time
Returns The timestamp when the summary was originally created.
724 725 726 |
# File 'lib/twilio-ruby/rest/memory/v1/conversation_summary.rb', line 724 def occurred_at @properties['occurred_at'] end |
#patch(summary_core_patch: nil) ⇒ ConversationSummaryInstance
Patch the ConversationSummaryInstance
772 773 774 775 776 777 778 |
# File 'lib/twilio-ruby/rest/memory/v1/conversation_summary.rb', line 772 def patch(summary_core_patch: nil ) context.patch( summary_core_patch: summary_core_patch, ) end |
#source ⇒ String
Returns The source system that generated the summary. Allows letters, numbers, spaces, and URL-safe symbols. Excludes URL-unsafe characters like quotes, angle brackets, and control characters.
712 713 714 |
# File 'lib/twilio-ruby/rest/memory/v1/conversation_summary.rb', line 712 def source @properties['source'] end |
#to_s ⇒ Object
Provide a user friendly representation
782 783 784 785 |
# File 'lib/twilio-ruby/rest/memory/v1/conversation_summary.rb', line 782 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Memory.V1.ConversationSummaryInstance #{values}>" end |
#updated_at ⇒ Time
Returns The timestamp when the summary was last updated.
748 749 750 |
# File 'lib/twilio-ruby/rest/memory/v1/conversation_summary.rb', line 748 def updated_at @properties['updated_at'] end |