Class: VoiceML::ConferenceList

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

Overview

Paginated ‘GET /Conferences` response.

Constant Summary

Constants included from Pageable

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 = {}) ⇒ ConferenceList

Returns a new instance of ConferenceList.



36
37
38
39
# File 'lib/voiceml/models/conferences.rb', line 36

def initialize(hash = {})
  assign_page_fields(hash)
  @conferences = (hash['conferences'] || []).map { |c| Conference.from_hash(c) }
end

Instance Attribute Details

#conferencesObject (readonly)

Returns the value of attribute conferences.



34
35
36
# File 'lib/voiceml/models/conferences.rb', line 34

def conferences
  @conferences
end

Class Method Details

.from_hash(hash) ⇒ Object



41
42
43
# File 'lib/voiceml/models/conferences.rb', line 41

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