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



298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 298

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



352
353
354
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 352

def 
    @properties['account_sid']
end

#conference_participantsconference_participants

Access the conference_participants



493
494
495
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 493

def conference_participants
    context.conference_participants
end

#conference_sidString



346
347
348
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 346

def conference_sid
    @properties['conference_sid']
end

#connect_duration_secondsString



388
389
390
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 388

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



337
338
339
340
341
342
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 337

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

#create_timeTime



364
365
366
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 364

def create_time
    @properties['create_time']
end

#detected_issuesHash



448
449
450
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 448

def detected_issues
    @properties['detected_issues']
end

#duration_secondsString



382
383
384
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 382

def duration_seconds
    @properties['duration_seconds']
end

#end_reasonConferenceEndReason



418
419
420
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 418

def end_reason
    @properties['end_reason']
end

#end_timeTime



376
377
378
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 376

def end_time
    @properties['end_time']
end

#ended_byString



424
425
426
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 424

def ended_by
    @properties['ended_by']
end

#fetchConferenceInstance

Fetch the ConferenceInstance



485
486
487
488
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 485

def fetch

    context.fetch
end

#friendly_nameString



358
359
360
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 358

def friendly_name
    @properties['friendly_name']
end

#inspectObject

Provide a detailed, user friendly representation



506
507
508
509
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 506

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


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

def links
    @properties['links']
end

#max_concurrent_participantsString



406
407
408
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 406

def max_concurrent_participants
    @properties['max_concurrent_participants']
end

#max_participantsString



400
401
402
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 400

def max_participants
    @properties['max_participants']
end

#mixer_regionRegion



430
431
432
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 430

def mixer_region
    @properties['mixer_region']
end

#mixer_region_requestedRegion



436
437
438
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 436

def mixer_region_requested
    @properties['mixer_region_requested']
end

#processing_stateProcessingState



466
467
468
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 466

def processing_state
    @properties['processing_state']
end

#recording_enabledBoolean



442
443
444
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 442

def recording_enabled
    @properties['recording_enabled']
end

#start_timeTime



370
371
372
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 370

def start_time
    @properties['start_time']
end

#statusConferenceStatus



394
395
396
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 394

def status
    @properties['status']
end

#tag_infoHash



460
461
462
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 460

def tag_info
    @properties['tag_info']
end

#tagsArray<Tag>



454
455
456
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 454

def tags
    @properties['tags']
end

#to_sObject

Provide a user friendly representation



499
500
501
502
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 499

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

#unique_participantsString



412
413
414
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 412

def unique_participants
    @properties['unique_participants']
end

#urlString



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

def url
    @properties['url']
end