Class: Twilio::REST::Insights::V1::ConferenceInstance

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

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, conference_sid: nil) ⇒ ConferenceInstance

Initialize the ConferenceInstance

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

  • sid (String)

    The SID of the Call resource to fetch.



475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 475

def initialize(version, payload , conference_sid: nil)
    super(version)
    
    
    # Marshaled Properties
    @properties = { 
        'conference_sid' => payload['conference_sid'],
        'account_sid' => payload['account_sid'],
        'friendly_name' => payload['friendly_name'],
        'create_time' => Twilio.deserialize_iso8601_datetime(payload['create_time']),
        'start_time' => Twilio.deserialize_iso8601_datetime(payload['start_time']),
        'end_time' => Twilio.deserialize_iso8601_datetime(payload['end_time']),
        'duration_seconds' => payload['duration_seconds'] == nil ? payload['duration_seconds'] : payload['duration_seconds'].to_i,
        'connect_duration_seconds' => payload['connect_duration_seconds'] == nil ? payload['connect_duration_seconds'] : payload['connect_duration_seconds'].to_i,
        'status' => payload['status'],
        'max_participants' => payload['max_participants'] == nil ? payload['max_participants'] : payload['max_participants'].to_i,
        'max_concurrent_participants' => payload['max_concurrent_participants'] == nil ? payload['max_concurrent_participants'] : payload['max_concurrent_participants'].to_i,
        'unique_participants' => payload['unique_participants'] == nil ? payload['unique_participants'] : payload['unique_participants'].to_i,
        'end_reason' => payload['end_reason'],
        'ended_by' => payload['ended_by'],
        'mixer_region' => payload['mixer_region'],
        'mixer_region_requested' => payload['mixer_region_requested'],
        'recording_enabled' => payload['recording_enabled'],
        'detected_issues' => payload['detected_issues'],
        'tags' => payload['tags'],
        'tag_info' => payload['tag_info'],
        'processing_state' => payload['processing_state'],
        'url' => payload['url'],
        'links' => payload['links'],
    }

    # Context
    @instance_context = nil
    @params = { 'conference_sid' => conference_sid  || @properties['conference_sid']  , }
end

Instance Method Details

#account_sidString

Returns The unique SID identifier of the Account.

Returns:

  • (String)

    The unique SID identifier of the Account.



530
531
532
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 530

def 
    @properties['account_sid']
end

#conference_participantsconference_participants

Access the conference_participants

Returns:



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

def conference_participants
    context.conference_participants
end

#conference_sidString

Returns The unique SID identifier of the Conference.

Returns:

  • (String)

    The unique SID identifier of the Conference.



524
525
526
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 524

def conference_sid
    @properties['conference_sid']
end

#connect_duration_secondsString

Returns Duration of the between conference start event and conference end event in seconds.

Returns:

  • (String)

    Duration of the between conference start event and conference end event in seconds.



566
567
568
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 566

def connect_duration_seconds
    @properties['connect_duration_seconds']
end

#contextConferenceContext

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

Returns:



515
516
517
518
519
520
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 515

def context
    unless @instance_context
        @instance_context = ConferenceContext.new(@version , @params['conference_sid'])
    end
    @instance_context
end

#create_timeTime

Returns Conference creation date and time in ISO 8601 format.

Returns:

  • (Time)

    Conference creation date and time in ISO 8601 format.



542
543
544
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 542

def create_time
    @properties['create_time']
end

#detected_issuesHash

Returns Potential issues detected by Twilio during the conference.

Returns:

  • (Hash)

    Potential issues detected by Twilio during the conference.



626
627
628
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 626

def detected_issues
    @properties['detected_issues']
end

#duration_secondsString

Returns Conference duration in seconds.

Returns:

  • (String)

    Conference duration in seconds.



560
561
562
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 560

def duration_seconds
    @properties['duration_seconds']
end

#end_reasonConferenceEndReason

Returns:

  • (ConferenceEndReason)


596
597
598
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 596

def end_reason
    @properties['end_reason']
end

#end_timeTime

Returns Conference end date and time in ISO 8601 format.

Returns:

  • (Time)

    Conference end date and time in ISO 8601 format.



554
555
556
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 554

def end_time
    @properties['end_time']
end

#ended_byString

Returns Call SID of the participant whose actions ended the conference.

Returns:

  • (String)

    Call SID of the participant whose actions ended the conference.



602
603
604
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 602

def ended_by
    @properties['ended_by']
end

#fetchConferenceInstance

Fetch the ConferenceInstance

Returns:



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

def fetch

    context.fetch
end

#friendly_nameString

Returns Custom label for the conference resource, up to 64 characters.

Returns:

  • (String)

    Custom label for the conference resource, up to 64 characters.



536
537
538
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 536

def friendly_name
    @properties['friendly_name']
end

#inspectObject

Provide a detailed, user friendly representation



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

def inspect
    values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
    "<Twilio.Insights.V1.ConferenceInstance #{values}>"
end

Returns Contains a dictionary of URL links to nested resources of this Conference.

Returns:

  • (Hash)

    Contains a dictionary of URL links to nested resources of this Conference.



656
657
658
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 656

def links
    @properties['links']
end

#max_concurrent_participantsString

Returns Actual maximum number of concurrent participants in the conference.

Returns:

  • (String)

    Actual maximum number of concurrent participants in the conference.



584
585
586
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 584

def max_concurrent_participants
    @properties['max_concurrent_participants']
end

#max_participantsString

Returns Maximum number of concurrent participants as specified by the configuration.

Returns:

  • (String)

    Maximum number of concurrent participants as specified by the configuration.



578
579
580
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 578

def max_participants
    @properties['max_participants']
end

#mixer_regionRegion

Returns:

  • (Region)


608
609
610
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 608

def mixer_region
    @properties['mixer_region']
end

#mixer_region_requestedRegion

Returns:

  • (Region)


614
615
616
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 614

def mixer_region_requested
    @properties['mixer_region_requested']
end

#processing_stateProcessingState

Returns:

  • (ProcessingState)


644
645
646
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 644

def processing_state
    @properties['processing_state']
end

#recording_enabledBoolean

Returns Boolean. Indicates whether recording was enabled at the conference mixer.

Returns:

  • (Boolean)

    Boolean. Indicates whether recording was enabled at the conference mixer.



620
621
622
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 620

def recording_enabled
    @properties['recording_enabled']
end

#start_timeTime

Returns Timestamp in ISO 8601 format when the conference started. Conferences do not start until at least two participants join, at least one of whom has startConferenceOnEnter=true.

Returns:

  • (Time)

    Timestamp in ISO 8601 format when the conference started. Conferences do not start until at least two participants join, at least one of whom has startConferenceOnEnter=true.



548
549
550
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 548

def start_time
    @properties['start_time']
end

#statusConferenceStatus

Returns:

  • (ConferenceStatus)


572
573
574
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 572

def status
    @properties['status']
end

#tag_infoHash

Returns Object. Contains details about conference tags including severity.

Returns:

  • (Hash)

    Object. Contains details about conference tags including severity.



638
639
640
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 638

def tag_info
    @properties['tag_info']
end

#tagsArray<Tag>

Returns Tags for detected conference conditions and participant behaviors which may be of interest.

Returns:

  • (Array<Tag>)

    Tags for detected conference conditions and participant behaviors which may be of interest.



632
633
634
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 632

def tags
    @properties['tags']
end

#to_sObject

Provide a user friendly representation



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

def to_s
    values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
    "<Twilio.Insights.V1.ConferenceInstance #{values}>"
end

#unique_participantsString

Returns Unique conference participants based on caller ID.

Returns:

  • (String)

    Unique conference participants based on caller ID.



590
591
592
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 590

def unique_participants
    @properties['unique_participants']
end

#urlString

Returns The URL of this resource.

Returns:

  • (String)

    The URL of this resource.



650
651
652
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 650

def url
    @properties['url']
end