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 SID of the Account that created this Conference resource.

  • sid (String) (defaults to: nil)

    The Twilio-provided string that uniquely identifies the Conference resource to fetch


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

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

Returns The SID of the Account that created this resource.

Returns:

  • (String)

    The SID of the Account that created this resource


376
377
378
# File 'lib/twilio-ruby/rest/api/v2010/account/conference.rb', line 376

def 
  @properties['account_sid']
end

#api_versionString

Returns The API version used to create this conference.

Returns:

  • (String)

    The API version used to create this conference


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

def api_version
  @properties['api_version']
end

#call_sid_ending_conferenceString

Returns The call SID that caused the conference to end.

Returns:

  • (String)

    The call SID that caused the conference to end


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

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

Returns:


367
368
369
370
371
372
# File 'lib/twilio-ruby/rest/api/v2010/account/conference.rb', line 367

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

#date_createdTime

Returns The RFC 2822 date and time in GMT that this resource was created.

Returns:

  • (Time)

    The RFC 2822 date and time in GMT that this resource was created


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

def date_created
  @properties['date_created']
end

#date_updatedTime

Returns The RFC 2822 date and time in GMT that this resource was last updated.

Returns:

  • (Time)

    The RFC 2822 date and time in GMT that this resource was last updated


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

def date_updated
  @properties['date_updated']
end

#fetchConferenceInstance

Fetch the ConferenceInstance

Returns:


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

def fetch
  context.fetch
end

#friendly_nameString

Returns A string that you assigned to describe this conference room.

Returns:

  • (String)

    A string that you assigned to describe this conference room


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

def friendly_name
  @properties['friendly_name']
end

#inspectObject

Provide a detailed, user friendly representation


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

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

#participantsparticipants

Access the participants

Returns:


471
472
473
# File 'lib/twilio-ruby/rest/api/v2010/account/conference.rb', line 471

def participants
  context.participants
end

#reason_conference_endedconference.ReasonConferenceEnded

Returns The reason why a conference ended.

Returns:

  • (conference.ReasonConferenceEnded)

    The reason why a conference ended.


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

def reason_conference_ended
  @properties['reason_conference_ended']
end

#recordingsrecordings

Access the recordings

Returns:


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

def recordings
  context.recordings
end

#regionString

Returns A string that represents the Twilio Region where the conference was mixed.

Returns:

  • (String)

    A string that represents the Twilio Region where the conference was mixed


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

def region
  @properties['region']
end

#sidString

Returns The unique string that identifies this resource.

Returns:

  • (String)

    The unique string that identifies this resource


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

def sid
  @properties['sid']
end

#statusconference.Status

Returns The status of this conference.

Returns:

  • (conference.Status)

    The status of this conference


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

def status
  @properties['status']
end

#subresource_urisString

Returns A list of related resources identified by their relative URIs.

Returns:

  • (String)

    A list of related resources identified by their relative URIs


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

def subresource_uris
  @properties['subresource_uris']
end

#to_sObject

Provide a user friendly representation


484
485
486
487
# File 'lib/twilio-ruby/rest/api/v2010/account/conference.rb', line 484

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)

    The new status of the resource. Can be: Can be: `init`, `in-progress`, or `completed`. Specifying `completed` will end the conference and hang up all participants

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

    The URL we should call to announce something into the conference. The URL can return an MP3, a WAV, or a TwiML document with `<Play>` or `<Say>`.

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

    The HTTP method used to call `announce_url`. Can be: `GET` or `POST` and the default is `POST`

Returns:


464
465
466
# 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

Returns The URI of this resource, relative to `api.twilio.com`.

Returns:


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

def uri
  @properties['uri']
end