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
Account SID.
-
#call_direction ⇒ conference_participant.CallDirection
Call direction of the participant.
-
#call_sid ⇒ String
Unique SID identifier of the call.
-
#call_status ⇒ conference_participant.CallStatus
Call status of the call that generated the participant.
-
#call_type ⇒ conference_participant.CallType
The Call Type of this Conference Participant.
-
#coached_participants ⇒ Array[String]
Call SIDs coached by this participant.
-
#conference_region ⇒ conference_participant.Region
The Conference Region of this Conference Participant.
-
#conference_sid ⇒ String
Conference SID.
-
#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.
-
#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 ⇒ conference_participant.JitterBufferSize
The Jitter Buffer Size of this Conference Participant.
-
#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
Estimated time in queue at call creation.
-
#outbound_time_in_queue ⇒ String
Actual time in queue (seconds).
-
#participant_region ⇒ conference_participant.Region
Twilio region where the participant media originates.
-
#participant_sid ⇒ String
SID for this participant.
-
#processing_state ⇒ conference_participant.ProcessingState
Processing state of the Participant Summary.
-
#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
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 227 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, 'participant_sid' => participant_sid || @properties['participant_sid'], } end |
Instance Method Details
#account_sid ⇒ String
Returns Account SID.
310 311 312 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 310 def account_sid @properties['account_sid'] end |
#call_direction ⇒ conference_participant.CallDirection
Returns Call direction of the participant.
316 317 318 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 316 def call_direction @properties['call_direction'] end |
#call_sid ⇒ String
Returns Unique SID identifier of the call.
304 305 306 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 304 def call_sid @properties['call_sid'] end |
#call_status ⇒ conference_participant.CallStatus
Returns Call status of the call that generated the participant.
334 335 336 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 334 def call_status @properties['call_status'] end |
#call_type ⇒ conference_participant.CallType
Returns The Call Type of this Conference Participant.
412 413 414 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 412 def call_type @properties['call_type'] end |
#coached_participants ⇒ Array[String]
Returns Call SIDs coached by this participant.
394 395 396 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 394 def coached_participants @properties['coached_participants'] end |
#conference_region ⇒ conference_participant.Region
Returns The Conference Region of this Conference Participant.
406 407 408 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 406 def conference_region @properties['conference_region'] end |
#conference_sid ⇒ String
Returns Conference SID.
298 299 300 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 298 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
273 274 275 276 277 278 279 280 281 282 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 273 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.
340 341 342 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 340 def country_code @properties['country_code'] end |
#duration_seconds ⇒ String
Returns Participant durations in seconds.
364 365 366 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 364 def duration_seconds @properties['duration_seconds'] end |
#events ⇒ Hash
Returns Object containing information of actions taken by participants. Nested resource URLs.
430 431 432 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 430 def events @properties['events'] end |
#fetch(events: :unset, metrics: :unset) ⇒ ConferenceParticipantInstance
Fetch the ConferenceParticipantInstance
452 453 454 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 452 def fetch(events: :unset, metrics: :unset) context.fetch(events: events, metrics: metrics, ) end |
#from ⇒ String
Returns Caller ID of the calling party.
322 323 324 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 322 def from @properties['from'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
465 466 467 468 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 465 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.
388 389 390 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 388 def is_coach @properties['is_coach'] end |
#is_moderator ⇒ Boolean
Returns Boolean. Indicates whether participant had startConferenceOnEnter=true or endConferenceOnExit=true.
346 347 348 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 346 def is_moderator @properties['is_moderator'] end |
#jitter_buffer_size ⇒ conference_participant.JitterBufferSize
Returns The Jitter Buffer Size of this Conference Participant.
382 383 384 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 382 def jitter_buffer_size @properties['jitter_buffer_size'] end |
#join_time ⇒ Time
Returns ISO 8601 timestamp of participant join event.
352 353 354 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 352 def join_time @properties['join_time'] end |
#label ⇒ String
Returns The user-specified label of this participant.
292 293 294 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 292 def label @properties['label'] end |
#leave_time ⇒ Time
Returns ISO 8601 timestamp of participant leave event.
358 359 360 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 358 def leave_time @properties['leave_time'] end |
#metrics ⇒ Hash
Returns Object. Contains participant quality metrics.
436 437 438 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 436 def metrics @properties['metrics'] end |
#outbound_queue_length ⇒ String
Returns Estimated time in queue at call creation.
370 371 372 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 370 def outbound_queue_length @properties['outbound_queue_length'] end |
#outbound_time_in_queue ⇒ String
Returns Actual time in queue (seconds).
376 377 378 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 376 def outbound_time_in_queue @properties['outbound_time_in_queue'] end |
#participant_region ⇒ conference_participant.Region
Returns Twilio region where the participant media originates.
400 401 402 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 400 def participant_region @properties['participant_region'] end |
#participant_sid ⇒ String
Returns SID for this participant.
286 287 288 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 286 def participant_sid @properties['participant_sid'] end |
#processing_state ⇒ conference_participant.ProcessingState
Returns Processing state of the Participant Summary.
418 419 420 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 418 def processing_state @properties['processing_state'] end |
#properties ⇒ Hash
Returns Participant properties and metadata.
424 425 426 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 424 def properties @properties['properties'] end |
#to ⇒ String
Returns Called party.
328 329 330 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 328 def to @properties['to'] end |
#to_s ⇒ Object
Provide a user friendly representation
458 459 460 461 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 458 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.
442 443 444 |
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 442 def url @properties['url'] end |