Class: VoiceML::QueueMemberList

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

Overview

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

Returns a new instance of QueueMemberList.



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

def initialize(hash = {})
  assign_page_fields(hash)
  @queue_members = (hash['queue_members'] || []).map { |m| QueueMember.from_hash(m) }
end

Instance Attribute Details

#queue_membersObject (readonly)

Returns the value of attribute queue_members.



71
72
73
# File 'lib/voiceml/models/queues.rb', line 71

def queue_members
  @queue_members
end

Class Method Details

.from_hash(hash) ⇒ Object



78
79
80
# File 'lib/voiceml/models/queues.rb', line 78

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