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.



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

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.



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

def 
    @properties['account_sid']
end

#annotationHash

Returns ‘object` Programmatically labeled annotations for the Call. Developers can update the Call Summary records with Annotation during or after a Call. Annotations can be updated as long as the Call Summary record is addressable via the API. See [Details: Call Summary](www.twilio.com/docs/voice/voice-insights/api/call/details-call-summary#annotation-object) for the object properties.

Returns:



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

def annotation
    @properties['annotation']
end

#answered_byAnsweredBy

Returns:

  • (AnsweredBy)


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

def answered_by
    @properties['answered_by']
end

#attributesHash

Returns ‘object` Attributes capturing call-flow-specific details. See [Details: Call Summary](www.twilio.com/docs/voice/voice-insights/api/call/details-call-summary#attributes-object) for the object properties.

Returns:



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

def attributes
    @properties['attributes']
end

#call_sidString

Returns The unique SID identifier of the Call.

Returns:

  • (String)

    The unique SID identifier of the Call.



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

def call_sid
    @properties['call_sid']
end

#call_stateCallState

Returns:

  • (CallState)


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

def call_state
    @properties['call_state']
end

#call_typeCallType

Returns:

  • (CallType)


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

def call_type
    @properties['call_type']
end

#carrier_edgeHash

Returns ‘object` Contains metrics and properties for the Twilio media gateway of a PSTN call. See [Details: Call Summary](www.twilio.com/docs/voice/voice-insights/api/call/details-call-summary#edges-and-their-properties) for the object properties.

Returns:



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

def carrier_edge
    @properties['carrier_edge']
end

#client_edgeHash

Returns ‘object` Contains metrics and properties for the Twilio media gateway of a Client call. See [Details: Call Summary](www.twilio.com/docs/voice/voice-insights/api/call/details-call-summary#edges-and-their-properties) for the object properties.

Returns:



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

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



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

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



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

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



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

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.



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

def end_time
    @properties['end_time']
end

#fromHash

Returns ‘object` The calling party. See [Details: Call Summary](www.twilio.com/docs/voice/voice-insights/api/call/details-call-summary#tofrom-object) for the object properties.

Returns:



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

def from
    @properties['from']
end

#inspectObject

Provide a detailed, user friendly representation



726
727
728
# File 'lib/twilio-ruby/rest/insights/v1/call_summaries.rb', line 726

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

#processing_stateProcessingState

Returns:

  • (ProcessingState)


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

def processing_state
    @properties['processing_state']
end

#propertiesHash

Returns ‘object` Contains edge-agnostic call-level details. See [Details: Call Summary](www.twilio.com/docs/voice/voice-insights/api/call/details-call-summary#properties-object) for the object properties.

Returns:



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

def properties
    @properties['properties']
end

#sdk_edgeHash

Returns ‘object` Contains metrics and properties for the SDK sensor library for Client calls. See [Details: Call Summary](www.twilio.com/docs/voice/voice-insights/api/call/details-call-summary#edges-and-their-properties) for the object properties.

Returns:



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

def sdk_edge
    @properties['sdk_edge']
end

#sip_edgeHash

Returns ‘object` Contains metrics and properties for the Twilio media gateway of a SIP Interface or Trunking call. See [Details: Call Summary](www.twilio.com/docs/voice/voice-insights/api/call/details-call-summary#edges-and-their-properties) for the object properties.

Returns:



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

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.



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

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.



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

def tags
    @properties['tags']
end

#toHash

Returns ‘object` The called party. See [Details: Call Summary](www.twilio.com/docs/voice/voice-insights/api/call/details-call-summary#tofrom-object) for the object properties.

Returns:



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

def to
    @properties['to']
end

#to_sObject

Provide a user friendly representation



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

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

#trustHash

Returns ‘object` Contains trusted communications details including Branded Call and verified caller ID. See [Details: Call Summary](www.twilio.com/docs/voice/voice-insights/api/call/details-call-summary#trust-object) for the object properties.

Returns:



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

def trust
    @properties['trust']
end

#urlString

Returns The URL of this resource.

Returns:

  • (String)

    The URL of this resource.



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

def url
    @properties['url']
end