Class: Twilio::REST::Insights::V1::CallSummariesInstance

Inherits:
Twilio::REST::InstanceResource show all
Defined in:
lib/twilio-ruby/rest/insights/v1/call_summaries.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload) ⇒ CallSummariesInstance

Initialize the CallSummariesInstance

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 CallSummaries resource.

  • sid (String)

    The SID of the Call resource to fetch.



539
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
# File 'lib/twilio-ruby/rest/insights/v1/call_summaries.rb', line 539

def initialize(version, payload )
    super(version)
    
    
    # Marshaled Properties
    @properties = { 
        'account_sid' => payload['account_sid'],
        'call_sid' => payload['call_sid'],
        'answered_by' => payload['answered_by'],
        'call_type' => payload['call_type'],
        'call_state' => payload['call_state'],
        'processing_state' => payload['processing_state'],
        'created_time' => Twilio.deserialize_iso8601_datetime(payload['created_time']),
        'start_time' => Twilio.deserialize_iso8601_datetime(payload['start_time']),
        'end_time' => Twilio.deserialize_iso8601_datetime(payload['end_time']),
        'duration' => payload['duration'] == nil ? payload['duration'] : payload['duration'].to_i,
        'connect_duration' => payload['connect_duration'] == nil ? payload['connect_duration'] : payload['connect_duration'].to_i,
        'from' => payload['from'],
        'to' => payload['to'],
        'carrier_edge' => payload['carrier_edge'],
        'client_edge' => payload['client_edge'],
        'sdk_edge' => payload['sdk_edge'],
        'sip_edge' => payload['sip_edge'],
        'tags' => payload['tags'],
        'url' => payload['url'],
        'attributes' => payload['attributes'],
        'properties' => payload['properties'],
        'trust' => payload['trust'],
        'annotation' => payload['annotation'],
    }
end

Instance Method Details

#account_sidString

Returns The unique SID identifier of the Account.

Returns:

  • (String)

    The unique SID identifier of the Account.



574
575
576
# File 'lib/twilio-ruby/rest/insights/v1/call_summaries.rb', line 574

def 
    @properties['account_sid']
end

#annotationHash

Returns:

  • (Hash)


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

def annotation
    @properties['annotation']
end

#answered_byAnsweredBy

Returns:

  • (AnsweredBy)


586
587
588
# File 'lib/twilio-ruby/rest/insights/v1/call_summaries.rb', line 586

def answered_by
    @properties['answered_by']
end

#attributesHash

Returns Attributes capturing call-flow-specific details.

Returns:

  • (Hash)

    Attributes capturing call-flow-specific details.



688
689
690
# File 'lib/twilio-ruby/rest/insights/v1/call_summaries.rb', line 688

def attributes
    @properties['attributes']
end

#call_sidString

Returns The unique SID identifier of the Call.

Returns:

  • (String)

    The unique SID identifier of the Call.



580
581
582
# File 'lib/twilio-ruby/rest/insights/v1/call_summaries.rb', line 580

def call_sid
    @properties['call_sid']
end

#call_stateCallState

Returns:

  • (CallState)


598
599
600
# File 'lib/twilio-ruby/rest/insights/v1/call_summaries.rb', line 598

def call_state
    @properties['call_state']
end

#call_typeCallType

Returns:

  • (CallType)


592
593
594
# File 'lib/twilio-ruby/rest/insights/v1/call_summaries.rb', line 592

def call_type
    @properties['call_type']
end

#carrier_edgeHash

Returns Contains metrics and properties for the Twilio media gateway of a PSTN call.

Returns:

  • (Hash)

    Contains metrics and properties for the Twilio media gateway of a PSTN call.



652
653
654
# File 'lib/twilio-ruby/rest/insights/v1/call_summaries.rb', line 652

def carrier_edge
    @properties['carrier_edge']
end

#client_edgeHash

Returns Contains metrics and properties for the Twilio media gateway of a Client call.

Returns:

  • (Hash)

    Contains metrics and properties for the Twilio media gateway of a Client call.



658
659
660
# File 'lib/twilio-ruby/rest/insights/v1/call_summaries.rb', line 658

def client_edge
    @properties['client_edge']
end

#connect_durationString

Returns Duration between when the call was answered and when it ended.

Returns:

  • (String)

    Duration between when the call was answered and when it ended



634
635
636
# File 'lib/twilio-ruby/rest/insights/v1/call_summaries.rb', line 634

def connect_duration
    @properties['connect_duration']
end

#created_timeTime

Returns The time at which the Call was created, given in ISO 8601 format. Can be different from start_time in the event of queueing due to CPS.

Returns:

  • (Time)

    The time at which the Call was created, given in ISO 8601 format. Can be different from start_time in the event of queueing due to CPS



610
611
612
# File 'lib/twilio-ruby/rest/insights/v1/call_summaries.rb', line 610

def created_time
    @properties['created_time']
end

#durationString

Returns Duration between when the call was initiated and the call was ended.

Returns:

  • (String)

    Duration between when the call was initiated and the call was ended



628
629
630
# File 'lib/twilio-ruby/rest/insights/v1/call_summaries.rb', line 628

def duration
    @properties['duration']
end

#end_timeTime

Returns The time at which the Call was ended, given in ISO 8601 format.

Returns:

  • (Time)

    The time at which the Call was ended, given in ISO 8601 format.



622
623
624
# File 'lib/twilio-ruby/rest/insights/v1/call_summaries.rb', line 622

def end_time
    @properties['end_time']
end

#fromHash

Returns The calling party.

Returns:

  • (Hash)

    The calling party.



640
641
642
# File 'lib/twilio-ruby/rest/insights/v1/call_summaries.rb', line 640

def from
    @properties['from']
end

#inspectObject

Provide a detailed, user friendly representation



718
719
720
# File 'lib/twilio-ruby/rest/insights/v1/call_summaries.rb', line 718

def inspect
    "<Twilio.Insights.V1.CallSummariesInstance>"
end

#processing_stateProcessingState

Returns:

  • (ProcessingState)


604
605
606
# File 'lib/twilio-ruby/rest/insights/v1/call_summaries.rb', line 604

def processing_state
    @properties['processing_state']
end

#propertiesHash

Returns Contains edge-agnostic call-level details.

Returns:

  • (Hash)

    Contains edge-agnostic call-level details.



694
695
696
# File 'lib/twilio-ruby/rest/insights/v1/call_summaries.rb', line 694

def properties
    @properties['properties']
end

#sdk_edgeHash

Returns Contains metrics and properties for the SDK sensor library for Client calls.

Returns:

  • (Hash)

    Contains metrics and properties for the SDK sensor library for Client calls.



664
665
666
# File 'lib/twilio-ruby/rest/insights/v1/call_summaries.rb', line 664

def sdk_edge
    @properties['sdk_edge']
end

#sip_edgeHash

Returns Contains metrics and properties for the Twilio media gateway of a SIP Interface or Trunking call.

Returns:

  • (Hash)

    Contains metrics and properties for the Twilio media gateway of a SIP Interface or Trunking call.



670
671
672
# File 'lib/twilio-ruby/rest/insights/v1/call_summaries.rb', line 670

def sip_edge
    @properties['sip_edge']
end

#start_timeTime

Returns The time at which the Call was started, given in ISO 8601 format.

Returns:

  • (Time)

    The time at which the Call was started, given in ISO 8601 format.



616
617
618
# File 'lib/twilio-ruby/rest/insights/v1/call_summaries.rb', line 616

def start_time
    @properties['start_time']
end

#tagsArray<String>

Returns Tags applied to calls by Voice Insights analysis indicating a condition that could result in subjective degradation of the call quality.

Returns:

  • (Array<String>)

    Tags applied to calls by Voice Insights analysis indicating a condition that could result in subjective degradation of the call quality.



676
677
678
# File 'lib/twilio-ruby/rest/insights/v1/call_summaries.rb', line 676

def tags
    @properties['tags']
end

#toHash

Returns The called party.

Returns:

  • (Hash)

    The called party.



646
647
648
# File 'lib/twilio-ruby/rest/insights/v1/call_summaries.rb', line 646

def to
    @properties['to']
end

#to_sObject

Provide a user friendly representation



712
713
714
# File 'lib/twilio-ruby/rest/insights/v1/call_summaries.rb', line 712

def to_s
    "<Twilio.Insights.V1.CallSummariesInstance>"
end

#trustHash

Returns Contains trusted communications details including Branded Call and verified caller ID.

Returns:

  • (Hash)

    Contains trusted communications details including Branded Call and verified caller ID.



700
701
702
# File 'lib/twilio-ruby/rest/insights/v1/call_summaries.rb', line 700

def trust
    @properties['trust']
end

#urlString

Returns The URL of this resource.

Returns:

  • (String)

    The URL of this resource.



682
683
684
# File 'lib/twilio-ruby/rest/insights/v1/call_summaries.rb', line 682

def url
    @properties['url']
end