Class: Twilio::REST::Insights::V1::ConferenceContext::ConferenceParticipantInstance

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

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, conference_sid: nil, participant_sid: nil) ⇒ ConferenceParticipantInstance

Initialize the ConferenceParticipantInstance



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
268
269
270
271
272
273
274
275
276
277
278
279
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 242

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_sidString



318
319
320
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 318

def 
    @properties['account_sid']
end

#call_directionCallDirection



324
325
326
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 324

def call_direction
    @properties['call_direction']
end

#call_sidString



312
313
314
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 312

def call_sid
    @properties['call_sid']
end

#call_statusCallStatus



342
343
344
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 342

def call_status
    @properties['call_status']
end

#call_typeCallType



420
421
422
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 420

def call_type
    @properties['call_type']
end

#coached_participantsArray<String>



402
403
404
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 402

def coached_participants
    @properties['coached_participants']
end

#conference_regionRegion



414
415
416
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 414

def conference_region
    @properties['conference_region']
end

#conference_sidString



306
307
308
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 306

def conference_sid
    @properties['conference_sid']
end

#contextConferenceParticipantContext

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



285
286
287
288
289
290
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 285

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

#country_codeString



348
349
350
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 348

def country_code
    @properties['country_code']
end

#duration_secondsString



372
373
374
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 372

def duration_seconds
    @properties['duration_seconds']
end

#eventsHash



438
439
440
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 438

def events
    @properties['events']
end

#fetch(events: :unset, metrics: :unset) ⇒ ConferenceParticipantInstance

Fetch the ConferenceParticipantInstance



459
460
461
462
463
464
465
466
467
468
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 459

def fetch(
    events: :unset, 
    metrics: :unset
)

    context.fetch(
        events: events, 
        metrics: metrics, 
    )
end

#fromString



330
331
332
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 330

def from
    @properties['from']
end

#inspectObject

Provide a detailed, user friendly representation



479
480
481
482
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 479

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

#is_coachBoolean



396
397
398
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 396

def is_coach
    @properties['is_coach']
end

#is_moderatorBoolean



354
355
356
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 354

def is_moderator
    @properties['is_moderator']
end

#jitter_buffer_sizeJitterBufferSize



390
391
392
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 390

def jitter_buffer_size
    @properties['jitter_buffer_size']
end

#join_timeTime



360
361
362
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 360

def join_time
    @properties['join_time']
end

#labelString



300
301
302
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 300

def label
    @properties['label']
end

#leave_timeTime



366
367
368
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 366

def leave_time
    @properties['leave_time']
end

#metricsHash



444
445
446
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 444

def metrics
    @properties['metrics']
end

#outbound_queue_lengthString



378
379
380
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 378

def outbound_queue_length
    @properties['outbound_queue_length']
end

#outbound_time_in_queueString



384
385
386
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 384

def outbound_time_in_queue
    @properties['outbound_time_in_queue']
end

#participant_regionRegion



408
409
410
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 408

def participant_region
    @properties['participant_region']
end

#participant_sidString



294
295
296
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 294

def participant_sid
    @properties['participant_sid']
end

#processing_stateProcessingState



426
427
428
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 426

def processing_state
    @properties['processing_state']
end

#propertiesHash



432
433
434
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 432

def properties
    @properties['properties']
end

#toString



336
337
338
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 336

def to
    @properties['to']
end

#to_sObject

Provide a user friendly representation



472
473
474
475
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 472

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

#urlString



450
451
452
# File 'lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb', line 450

def url
    @properties['url']
end