Class: VoiceML::ParticipantList

Inherits:
Object
  • Object
show all
Includes:
Pageable
Defined in:
lib/voiceml/models/conferences.rb

Overview

Paginated ‘GET /Conferences/Sid/Participants` response.

Constant Summary

Constants included from Pageable

VoiceML::Pageable::PAGE_FIELDS

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Pageable

#assign_page_fields

Constructor Details

#initialize(hash = {}) ⇒ ParticipantList

Returns a new instance of ParticipantList.



76
77
78
79
# File 'lib/voiceml/models/conferences.rb', line 76

def initialize(hash = {})
  assign_page_fields(hash)
  @participants = (hash['participants'] || []).map { |p| Participant.from_hash(p) }
end

Instance Attribute Details

#participantsObject (readonly)

Returns the value of attribute participants.



74
75
76
# File 'lib/voiceml/models/conferences.rb', line 74

def participants
  @participants
end

Class Method Details

.from_hash(hash) ⇒ Object



81
82
83
# File 'lib/voiceml/models/conferences.rb', line 81

def self.from_hash(hash)
  new(hash || {})
end