Class: Twilio::REST::Insights::V1::ConferenceContext::ConferenceParticipantInstance
- Inherits:
-
Twilio::REST::InstanceResource
- Object
- Twilio::REST::InstanceResource
- Twilio::REST::Insights::V1::ConferenceContext::ConferenceParticipantInstance
- Defined in:
- lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The unique SID identifier of the Account.
- #call_direction ⇒ CallDirection
-
#call_sid ⇒ String
Unique SID identifier of the call that generated the Participant resource.
- #call_status ⇒ CallStatus
- #call_type ⇒ CallType
-
#coached_participants ⇒ Array<String>
Call SIDs coached by this participant.
- #conference_region ⇒ Region
-
#conference_sid ⇒ String
The unique SID identifier of the Conference.
-
#context ⇒ ConferenceParticipantContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#country_code ⇒ String
ISO alpha-2 country code of the participant based on caller ID or called number.
-
#duration_seconds ⇒ String
Participant durations in seconds.
-
#events ⇒ Hash
Object containing information of actions taken by participants.
-
#fetch(events: :unset, metrics: :unset) ⇒ ConferenceParticipantInstance
Fetch the ConferenceParticipantInstance.
-
#from ⇒ String
Caller ID of the calling party.
-
#initialize(version, payload, conference_sid: nil, participant_sid: nil) ⇒ ConferenceParticipantInstance
constructor
Initialize the ConferenceParticipantInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#is_coach ⇒ Boolean
Boolean.
-
#is_moderator ⇒ Boolean
Boolean.
- #jitter_buffer_size ⇒ JitterBufferSize
-
#join_time ⇒ Time
ISO 8601 timestamp of participant join event.
-
#label ⇒ String
The user-specified label of this participant.
-
#leave_time ⇒ Time
ISO 8601 timestamp of participant leave event.
-
#metrics ⇒ Hash
Object.
-
#outbound_queue_length ⇒ String
Add Participant API only.
-
#outbound_time_in_queue ⇒ String
Add Participant API only.
- #participant_region ⇒ Region
-
#participant_sid ⇒ String
SID for this participant.
- #processing_state ⇒ ProcessingState
-
#properties ⇒ Hash
Participant properties and metadata.
-
#to ⇒ String
Called party.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#url ⇒ String
The URL of this resource.
Constructor Details
#initialize(version, payload, conference_sid: nil, participant_sid: nil) ⇒ ConferenceParticipantInstance
Initialize the ConferenceParticipantInstance
430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 430 def initialize(version, payload , conference_sid: nil, participant_sid: nil) super(version) # Marshaled Properties @properties = { 'participant_sid' => payload['participant_sid'], 'label' => payload['label'], 'conference_sid' => payload['conference_sid'], 'call_sid' => payload['call_sid'], 'account_sid' => payload['account_sid'], 'call_direction' => payload['call_direction'], 'from' => payload['from'], 'to' => payload['to'], 'call_status' => payload['call_status'], 'country_code' => payload['country_code'], 'is_moderator' => payload['is_moderator'], 'join_time' => Twilio.deserialize_iso8601_datetime(payload['join_time']), 'leave_time' => Twilio.deserialize_iso8601_datetime(payload['leave_time']), 'duration_seconds' => payload['duration_seconds'] == nil ? payload['duration_seconds'] : payload['duration_seconds'].to_i, 'outbound_queue_length' => payload['outbound_queue_length'] == nil ? payload['outbound_queue_length'] : payload['outbound_queue_length'].to_i, 'outbound_time_in_queue' => payload['outbound_time_in_queue'] == nil ? payload['outbound_time_in_queue'] : payload['outbound_time_in_queue'].to_i, 'jitter_buffer_size' => payload['jitter_buffer_size'], 'is_coach' => payload['is_coach'], 'coached_participants' => payload['coached_participants'], 'participant_region' => payload['participant_region'], 'conference_region' => payload['conference_region'], 'call_type' => payload['call_type'], 'processing_state' => payload['processing_state'], 'properties' => payload['properties'], 'events' => payload['events'], 'metrics' => payload['metrics'], 'url' => payload['url'], } # Context @instance_context = nil @params = { 'conference_sid' => conference_sid || @properties['conference_sid'] ,'participant_sid' => participant_sid || @properties['participant_sid'] , } end |
Instance Method Details
#account_sid ⇒ String
Returns The unique SID identifier of the Account.
507 508 509 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 507 def account_sid @properties['account_sid'] end |
#call_direction ⇒ CallDirection
513 514 515 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 513 def call_direction @properties['call_direction'] end |
#call_sid ⇒ String
Returns Unique SID identifier of the call that generated the Participant resource.
501 502 503 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 501 def call_sid @properties['call_sid'] end |
#call_status ⇒ CallStatus
531 532 533 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 531 def call_status @properties['call_status'] end |
#call_type ⇒ CallType
609 610 611 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 609 def call_type @properties['call_type'] end |
#coached_participants ⇒ Array<String>
Returns Call SIDs coached by this participant.
591 592 593 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 591 def coached_participants @properties['coached_participants'] end |
#conference_region ⇒ Region
603 604 605 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 603 def conference_region @properties['conference_region'] end |
#conference_sid ⇒ String
Returns The unique SID identifier of the Conference.
495 496 497 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 495 def conference_sid @properties['conference_sid'] end |
#context ⇒ ConferenceParticipantContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
474 475 476 477 478 479 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 474 def context unless @instance_context @instance_context = ConferenceParticipantContext.new(@version , @params['conference_sid'], @params['participant_sid']) end @instance_context end |
#country_code ⇒ String
Returns ISO alpha-2 country code of the participant based on caller ID or called number.
537 538 539 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 537 def country_code @properties['country_code'] end |
#duration_seconds ⇒ String
Returns Participant durations in seconds.
561 562 563 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 561 def duration_seconds @properties['duration_seconds'] end |
#events ⇒ Hash
Returns Object containing information of actions taken by participants. Contains a dictionary of URL links to nested resources of this Conference Participant.
627 628 629 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 627 def events @properties['events'] end |
#fetch(events: :unset, metrics: :unset) ⇒ ConferenceParticipantInstance
Fetch the ConferenceParticipantInstance
648 649 650 651 652 653 654 655 656 657 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 648 def fetch( events: :unset, metrics: :unset ) context.fetch( events: events, metrics: metrics, ) end |
#from ⇒ String
Returns Caller ID of the calling party.
519 520 521 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 519 def from @properties['from'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
668 669 670 671 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 668 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Insights.V1.ConferenceParticipantInstance #{values}>" end |
#is_coach ⇒ Boolean
Returns Boolean. Indicated whether participant was a coach.
585 586 587 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 585 def is_coach @properties['is_coach'] end |
#is_moderator ⇒ Boolean
Returns Boolean. Indicates whether participant had startConferenceOnEnter=true or endConferenceOnExit=true.
543 544 545 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 543 def is_moderator @properties['is_moderator'] end |
#jitter_buffer_size ⇒ JitterBufferSize
579 580 581 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 579 def jitter_buffer_size @properties['jitter_buffer_size'] end |
#join_time ⇒ Time
Returns ISO 8601 timestamp of participant join event.
549 550 551 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 549 def join_time @properties['join_time'] end |
#label ⇒ String
Returns The user-specified label of this participant.
489 490 491 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 489 def label @properties['label'] end |
#leave_time ⇒ Time
Returns ISO 8601 timestamp of participant leave event.
555 556 557 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 555 def leave_time @properties['leave_time'] end |
#metrics ⇒ Hash
Returns Object. Contains participant call quality metrics.
633 634 635 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 633 def metrics @properties['metrics'] end |
#outbound_queue_length ⇒ String
Returns Add Participant API only. Estimated time in queue at call creation.
567 568 569 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 567 def outbound_queue_length @properties['outbound_queue_length'] end |
#outbound_time_in_queue ⇒ String
Returns Add Participant API only. Actual time in queue in seconds.
573 574 575 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 573 def outbound_time_in_queue @properties['outbound_time_in_queue'] end |
#participant_region ⇒ Region
597 598 599 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 597 def participant_region @properties['participant_region'] end |
#participant_sid ⇒ String
Returns SID for this participant.
483 484 485 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 483 def participant_sid @properties['participant_sid'] end |
#processing_state ⇒ ProcessingState
615 616 617 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 615 def processing_state @properties['processing_state'] end |
#properties ⇒ Hash
Returns Participant properties and metadata.
621 622 623 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 621 def properties @properties['properties'] end |
#to ⇒ String
Returns Called party.
525 526 527 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 525 def to @properties['to'] end |
#to_s ⇒ Object
Provide a user friendly representation
661 662 663 664 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 661 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Insights.V1.ConferenceParticipantInstance #{values}>" end |
#url ⇒ String
Returns The URL of this resource.
639 640 641 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 639 def url @properties['url'] end |