Class: VoiceML::SiprecList

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

Overview

Paginated ‘GET /Calls/Sid/Siprec` 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 = {}) ⇒ SiprecList

Returns a new instance of SiprecList.



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

def initialize(hash = {})
  assign_page_fields(hash)
  @siprec = (hash['siprec'] || []).map { |s| SiprecSession.from_hash(s) }
end

Instance Attribute Details

#siprecObject (readonly)

Returns the value of attribute siprec.



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

def siprec
  @siprec
end

Class Method Details

.from_hash(hash) ⇒ Object



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

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