Class: Twilio::REST::Insights::V1::CallPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Insights::V1::CallPageMetadata
- Defined in:
- lib/twilio-ruby/rest/insights/v1/call.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#call_page ⇒ Object
readonly
Returns the value of attribute call_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ CallPageMetadata
constructor
A new instance of CallPageMetadata.
- #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) ⇒ CallPageMetadata
Returns a new instance of CallPageMetadata.
246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 |
# File 'lib/twilio-ruby/rest/insights/v1/call.rb', line 246 def initialize(version, response, solution, limit) super(version, response) @call_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @call_page << CallListResponse.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
#call_page ⇒ Object (readonly)
Returns the value of attribute call_page.
244 245 246 |
# File 'lib/twilio-ruby/rest/insights/v1/call.rb', line 244 def call_page @call_page end |
Instance Method Details
#each ⇒ Object
262 263 264 265 266 |
# File 'lib/twilio-ruby/rest/insights/v1/call.rb', line 262 def each @call_page.each do |record| yield record end end |
#to_s ⇒ Object
268 269 270 |
# File 'lib/twilio-ruby/rest/insights/v1/call.rb', line 268 def to_s '<Twilio::REST::Insights::V1PageMetadata>'; end |