Class: Twilio::REST::Api::V2010::AccountContext::RecordingContext::AddOnResultContext::PayloadPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Api::V2010::AccountContext::RecordingContext::AddOnResultContext::PayloadPageMetadata
- Defined in:
- lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#payload_page ⇒ Object
readonly
Returns the value of attribute payload_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ PayloadPageMetadata
constructor
A new instance of PayloadPageMetadata.
- #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) ⇒ PayloadPageMetadata
Returns a new instance of PayloadPageMetadata.
376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb', line 376 def initialize(version, response, solution, limit) super(version, response) @payload_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @payload_page << PayloadListResponse.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
#payload_page ⇒ Object (readonly)
Returns the value of attribute payload_page.
374 375 376 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb', line 374 def payload_page @payload_page end |
Instance Method Details
#each ⇒ Object
392 393 394 395 396 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb', line 392 def each @payload_page.each do |record| yield record end end |
#to_s ⇒ Object
398 399 400 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb', line 398 def to_s '<Twilio::REST::Api::V2010PageMetadata>'; end |