Class: Twilio::REST::Voice::V1::ArchivedCallPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Voice::V1::ArchivedCallPageMetadata
- Defined in:
- lib/twilio-ruby/rest/voice/v1/archived_call.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#archived_call_page ⇒ Object
readonly
Returns the value of attribute archived_call_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ ArchivedCallPageMetadata
constructor
A new instance of ArchivedCallPageMetadata.
- #to_s ⇒ Object
Methods inherited from PageMetadata
#get_key, #next_page, #next_page_url, #previous_page, #previous_page_url, #process_response
Constructor Details
#initialize(version, response, solution, limit) ⇒ ArchivedCallPageMetadata
Returns a new instance of ArchivedCallPageMetadata.
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 |
# File 'lib/twilio-ruby/rest/voice/v1/archived_call.rb', line 189 def initialize(version, response, solution, limit) super(version, response) @archived_call_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @archived_call_page << ArchivedCallListResponse.new(version, @payload, key, limit - records) @payload = self.next_page break unless @payload records += @payload.body[key].size end # Path Solution @solution = solution end |
Instance Attribute Details
#archived_call_page ⇒ Object (readonly)
Returns the value of attribute archived_call_page.
187 188 189 |
# File 'lib/twilio-ruby/rest/voice/v1/archived_call.rb', line 187 def archived_call_page @archived_call_page end |
Instance Method Details
#each ⇒ Object
205 206 207 208 209 |
# File 'lib/twilio-ruby/rest/voice/v1/archived_call.rb', line 205 def each @archived_call_page.each do |record| yield record end end |
#to_s ⇒ Object
211 212 213 |
# File 'lib/twilio-ruby/rest/voice/v1/archived_call.rb', line 211 def to_s '<Twilio::REST::Voice::V1PageMetadata>'; end |