Class: Twilio::REST::Memory::V1::StorePageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Memory::V1::StorePageMetadata
- Defined in:
- lib/twilio-ruby/rest/memory/v1/store.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#store_page ⇒ Object
readonly
Returns the value of attribute store_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ StorePageMetadata
constructor
A new instance of StorePageMetadata.
- #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) ⇒ StorePageMetadata
Returns a new instance of StorePageMetadata.
498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 |
# File 'lib/twilio-ruby/rest/memory/v1/store.rb', line 498 def initialize(version, response, solution, limit) super(version, response) @store_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @store_page << StoreListResponse.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
#store_page ⇒ Object (readonly)
Returns the value of attribute store_page.
496 497 498 |
# File 'lib/twilio-ruby/rest/memory/v1/store.rb', line 496 def store_page @store_page end |
Instance Method Details
#each ⇒ Object
514 515 516 517 518 |
# File 'lib/twilio-ruby/rest/memory/v1/store.rb', line 514 def each @store_page.each do |record| yield record end end |
#to_s ⇒ Object
520 521 522 |
# File 'lib/twilio-ruby/rest/memory/v1/store.rb', line 520 def to_s '<Twilio::REST::Memory::V1PageMetadata>'; end |