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

Parameters:

  • version (Version)

    Version that contains the resource

  • payload (Hash)

    payload that contains response from Twilio

  • account_sid (String) (defaults to: nil)

    The unique id of the [Account](www.twilio.com/docs/api/rest/account) responsible for creating this conference.

  • sid (String) (defaults to: nil)

    The conference Sid that uniquely identifies this resource



338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
# File 'lib/twilio-ruby/rest/api/v2010/account/conference.rb', line 338

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'],
  }

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

Instance Method Details

#account_sidString

Returns The unique sid that identifies this account.

Returns:

  • (String)

    The unique sid that identifies this account



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

def 
  @properties['account_sid']
end

#api_versionString

Returns The api_version.

Returns:

  • (String)

    The api_version



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

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

Returns:



364
365
366
367
368
369
# File 'lib/twilio-ruby/rest/api/v2010/account/conference.rb', line 364

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

#date_createdTime

Returns The date this resource was created.

Returns:

  • (Time)

    The date this resource was created



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

def date_created
  @properties['date_created']
end

#date_updatedTime

Returns The date this resource was last updated.

Returns:

  • (Time)

    The date this resource was last updated



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

def date_updated
  @properties['date_updated']
end

#fetchConferenceInstance

Fetch a ConferenceInstance

Returns:



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

def fetch
  context.fetch
end

#friendly_nameString

Returns A human readable description of this resource.

Returns:

  • (String)

    A human readable description of this resource



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

def friendly_name
  @properties['friendly_name']
end

#inspectObject

Provide a detailed, user friendly representation



474
475
476
477
# File 'lib/twilio-ruby/rest/api/v2010/account/conference.rb', line 474

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

#participantsparticipants

Access the participants

Returns:



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

def participants
  context.participants
end

#recordingsrecordings

Access the recordings

Returns:



461
462
463
# File 'lib/twilio-ruby/rest/api/v2010/account/conference.rb', line 461

def recordings
  context.recordings
end

#regionString

Returns A string representing the Twilio Region where the conference was mixed.

Returns:

  • (String)

    A string representing the Twilio Region where the conference was mixed.



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

def region
  @properties['region']
end

#sidString

Returns A string that uniquely identifies this conference.

Returns:

  • (String)

    A string that uniquely identifies this conference



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

def sid
  @properties['sid']
end

#statusconference.Status

Returns The status of the conference.

Returns:

  • (conference.Status)

    The status of the conference



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

def status
  @properties['status']
end

#subresource_urisString

Returns The subresource_uris.

Returns:

  • (String)

    The subresource_uris



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

def subresource_uris
  @properties['subresource_uris']
end

#to_sObject

Provide a user friendly representation



467
468
469
470
# File 'lib/twilio-ruby/rest/api/v2010/account/conference.rb', line 467

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

Parameters:

  • status (conference.UpdateStatus) (defaults to: :unset)

    Specifying ‘completed` will end the conference and kick all participants

  • announce_url (String) (defaults to: :unset)

    The ‘AnnounceUrl’ attribute lets you specify a URL for announcing something into a conference. The URL may return an MP3, a WAV or a TwiML document with ‘<Play>` or `<Say>`.

  • announce_method (String) (defaults to: :unset)

    Specify GET or POST, defaults to POST

Returns:



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

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

#uriString

Returns The URI for this resource.

Returns:

  • (String)

    The URI for this resource



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

def uri
  @properties['uri']
end