Class: VoiceML::ApplicationList

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

Overview

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

Returns a new instance of ApplicationList.



37
38
39
40
# File 'lib/voiceml/models/applications.rb', line 37

def initialize(hash = {})
  assign_page_fields(hash)
  @applications = (hash['applications'] || []).map { |a| Application.from_hash(a) }
end

Instance Attribute Details

#applicationsObject (readonly)

Returns the value of attribute applications.



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

def applications
  @applications
end

Class Method Details

.from_hash(hash) ⇒ Object



42
43
44
# File 'lib/voiceml/models/applications.rb', line 42

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