Class: Twilio::REST::Memory::V1::ImportPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Memory::V1::ImportPageMetadata
- Defined in:
- lib/twilio-ruby/rest/memory/v1/import.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#import_page ⇒ Object
readonly
Returns the value of attribute import_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ ImportPageMetadata
constructor
A new instance of ImportPageMetadata.
- #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) ⇒ ImportPageMetadata
Returns a new instance of ImportPageMetadata.
387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 |
# File 'lib/twilio-ruby/rest/memory/v1/import.rb', line 387 def initialize(version, response, solution, limit) super(version, response) @import_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @import_page << ImportListResponse.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
#import_page ⇒ Object (readonly)
Returns the value of attribute import_page.
385 386 387 |
# File 'lib/twilio-ruby/rest/memory/v1/import.rb', line 385 def import_page @import_page end |
Instance Method Details
#each ⇒ Object
403 404 405 406 407 |
# File 'lib/twilio-ruby/rest/memory/v1/import.rb', line 403 def each @import_page.each do |record| yield record end end |
#to_s ⇒ Object
409 410 411 |
# File 'lib/twilio-ruby/rest/memory/v1/import.rb', line 409 def to_s '<Twilio::REST::Memory::V1PageMetadata>'; end |