Class: Twilio::REST::Memory::V1::ConversationSummaryInstance

Inherits:
InstanceResource show all
Defined in:
lib/twilio-ruby/rest/memory/v1/conversation_summary.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, store_id: nil, profile_id: nil, summary_id: nil) ⇒ ConversationSummaryInstance

Initialize the ConversationSummaryInstance

Parameters:

  • version (Version)

    Version that contains the resource

  • payload (Hash)

    payload that contains response from Twilio

  • account_sid (String)

    The SID of the Account that created this ConversationSummary resource.

  • sid (String)

    The SID of the Call resource to fetch.



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

#contentString

Returns The main content of the summary.

Returns:

  • (String)

    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

#contextConversationSummaryContext

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context

Returns:



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_idString

Returns A unique identifier for the conversation using Twilio Type ID (TTID) format.

Returns:

  • (String)

    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_atTime

Returns The timestamp when the summary was created.

Returns:

  • (Time)

    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

#deleteBoolean

Delete the ConversationSummaryInstance

Returns:

  • (Boolean)

    True if delete succeeds, false otherwise



755
756
757
758
# File 'lib/twilio-ruby/rest/memory/v1/conversation_summary.rb', line 755

def delete

    context.delete
end

#fetchConversationSummaryInstance

Fetch the ConversationSummaryInstance

Returns:



763
764
765
766
# File 'lib/twilio-ruby/rest/memory/v1/conversation_summary.rb', line 763

def fetch

    context.fetch
end

#idString

Returns A unique identifier for the summary using Twilio Type ID (TTID) format.

Returns:

  • (String)

    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

#inspectObject

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

#messageString

Returns Confirmation message for the operation.

Returns:

  • (String)

    Confirmation message for the operation.



706
707
708
# File 'lib/twilio-ruby/rest/memory/v1/conversation_summary.rb', line 706

def message
    @properties['message']
end

#occurred_atTime

Returns The timestamp when the summary was originally created.

Returns:

  • (Time)

    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

Parameters:

  • summary_core_patch (SummaryCorePatch) (defaults to: nil)

Returns:



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

#sourceString

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.

Returns:

  • (String)

    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_sObject

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_atTime

Returns The timestamp when the summary was last updated.

Returns:

  • (Time)

    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