Class: VoiceML::RecordingList
- Inherits:
-
Object
- Object
- VoiceML::RecordingList
- Includes:
- Pageable
- Defined in:
- lib/voiceml/models/recordings.rb
Overview
‘GET /Recordings` (account-scoped) and `GET /Calls/Sid/Recordings` (per-call) response. The per-call form populates only `recordings`; pagination fields remain `nil`.
Constant Summary
Constants included from Pageable
Instance Attribute Summary collapse
-
#recordings ⇒ Object
readonly
Returns the value of attribute recordings.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(hash = {}) ⇒ RecordingList
constructor
A new instance of RecordingList.
Methods included from Pageable
Constructor Details
#initialize(hash = {}) ⇒ RecordingList
Returns a new instance of RecordingList.
37 38 39 40 |
# File 'lib/voiceml/models/recordings.rb', line 37 def initialize(hash = {}) assign_page_fields(hash) @recordings = (hash['recordings'] || []).map { |r| Recording.from_hash(r) } end |
Instance Attribute Details
#recordings ⇒ Object (readonly)
Returns the value of attribute recordings.
35 36 37 |
# File 'lib/voiceml/models/recordings.rb', line 35 def recordings @recordings end |
Class Method Details
.from_hash(hash) ⇒ Object
42 43 44 |
# File 'lib/voiceml/models/recordings.rb', line 42 def self.from_hash(hash) new(hash || {}) end |