Class: Twilio::REST::Api::V2010::AccountContext::ConferenceInstance

Inherits:
InstanceResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/api/v2010/account/conference.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, account_sid: nil, sid: nil) ⇒ ConferenceInstance

Initialize the ConferenceInstance



343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
# File 'lib/twilio-ruby/rest/api/v2010/account/conference.rb', line 343

def initialize(version, payload , account_sid: nil, sid: nil)
    super(version)
    
    # Marshaled Properties
    @properties = { 
        'account_sid' => payload['account_sid'],
        'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
        'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
        'api_version' => payload['api_version'],
        'friendly_name' => payload['friendly_name'],
        'region' => payload['region'],
        'sid' => payload['sid'],
        'status' => payload['status'],
        'uri' => payload['uri'],
        'subresource_uris' => payload['subresource_uris'],
        'reason_conference_ended' => payload['reason_conference_ended'],
        'call_sid_ending_conference' => payload['call_sid_ending_conference'],
    }

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

Instance Method Details

#account_sidString



380
381
382
# File 'lib/twilio-ruby/rest/api/v2010/account/conference.rb', line 380

def 
    @properties['account_sid']
end

#api_versionString



398
399
400
# File 'lib/twilio-ruby/rest/api/v2010/account/conference.rb', line 398

def api_version
    @properties['api_version']
end

#call_sid_ending_conferenceString



446
447
448
# File 'lib/twilio-ruby/rest/api/v2010/account/conference.rb', line 446

def call_sid_ending_conference
    @properties['call_sid_ending_conference']
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



371
372
373
374
375
376
# File 'lib/twilio-ruby/rest/api/v2010/account/conference.rb', line 371

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

#date_createdTime



386
387
388
# File 'lib/twilio-ruby/rest/api/v2010/account/conference.rb', line 386

def date_created
    @properties['date_created']
end

#date_updatedTime



392
393
394
# File 'lib/twilio-ruby/rest/api/v2010/account/conference.rb', line 392

def date_updated
    @properties['date_updated']
end

#fetchConferenceInstance

Fetch the ConferenceInstance



453
454
455
456
# File 'lib/twilio-ruby/rest/api/v2010/account/conference.rb', line 453

def fetch

    context.fetch
end

#friendly_nameString



404
405
406
# File 'lib/twilio-ruby/rest/api/v2010/account/conference.rb', line 404

def friendly_name
    @properties['friendly_name']
end

#inspectObject

Provide a detailed, user friendly representation



500
501
502
503
# File 'lib/twilio-ruby/rest/api/v2010/account/conference.rb', line 500

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

#participantsparticipants

Access the participants



487
488
489
# File 'lib/twilio-ruby/rest/api/v2010/account/conference.rb', line 487

def participants
    context.participants
end

#reason_conference_endedReasonConferenceEnded



440
441
442
# File 'lib/twilio-ruby/rest/api/v2010/account/conference.rb', line 440

def reason_conference_ended
    @properties['reason_conference_ended']
end

#recordingsrecordings

Access the recordings



480
481
482
# File 'lib/twilio-ruby/rest/api/v2010/account/conference.rb', line 480

def recordings
    context.recordings
end

#regionString



410
411
412
# File 'lib/twilio-ruby/rest/api/v2010/account/conference.rb', line 410

def region
    @properties['region']
end

#sidString



416
417
418
# File 'lib/twilio-ruby/rest/api/v2010/account/conference.rb', line 416

def sid
    @properties['sid']
end

#statusStatus



422
423
424
# File 'lib/twilio-ruby/rest/api/v2010/account/conference.rb', line 422

def status
    @properties['status']
end

#subresource_urisHash



434
435
436
# File 'lib/twilio-ruby/rest/api/v2010/account/conference.rb', line 434

def subresource_uris
    @properties['subresource_uris']
end

#to_sObject

Provide a user friendly representation



493
494
495
496
# File 'lib/twilio-ruby/rest/api/v2010/account/conference.rb', line 493

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

#update(status: :unset, announce_url: :unset, announce_method: :unset) ⇒ ConferenceInstance

Update the ConferenceInstance



464
465
466
467
468
469
470
471
472
473
474
475
# File 'lib/twilio-ruby/rest/api/v2010/account/conference.rb', line 464

def update(
    status: :unset, 
    announce_url: :unset, 
    announce_method: :unset
)

    context.update(
        status: status, 
        announce_url: announce_url, 
        announce_method: announce_method, 
    )
end

#uriString



428
429
430
# File 'lib/twilio-ruby/rest/api/v2010/account/conference.rb', line 428

def uri
    @properties['uri']
end