Class: VoiceML::QueueList

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

Overview

Paginated ‘GET /Queues` 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 = {}) ⇒ QueueList

Returns a new instance of QueueList.



35
36
37
38
# File 'lib/voiceml/models/queues.rb', line 35

def initialize(hash = {})
  assign_page_fields(hash)
  @queues = (hash['queues'] || []).map { |q| Queue.from_hash(q) }
end

Instance Attribute Details

#queuesObject (readonly)

Returns the value of attribute queues.



33
34
35
# File 'lib/voiceml/models/queues.rb', line 33

def queues
  @queues
end

Class Method Details

.from_hash(hash) ⇒ Object



40
41
42
# File 'lib/voiceml/models/queues.rb', line 40

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