Class: Twilio::REST::Sync::V1::ServiceContext::DocumentPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Sync::V1::ServiceContext::DocumentPageMetadata
- Defined in:
- lib/twilio-ruby/rest/sync/v1/service/document.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#document_page ⇒ Object
readonly
Returns the value of attribute document_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ DocumentPageMetadata
constructor
A new instance of DocumentPageMetadata.
- #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) ⇒ DocumentPageMetadata
Returns a new instance of DocumentPageMetadata.
506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 |
# File 'lib/twilio-ruby/rest/sync/v1/service/document.rb', line 506 def initialize(version, response, solution, limit) super(version, response) @document_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @document_page << DocumentListResponse.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
#document_page ⇒ Object (readonly)
Returns the value of attribute document_page.
504 505 506 |
# File 'lib/twilio-ruby/rest/sync/v1/service/document.rb', line 504 def document_page @document_page end |
Instance Method Details
#each ⇒ Object
522 523 524 525 526 |
# File 'lib/twilio-ruby/rest/sync/v1/service/document.rb', line 522 def each @document_page.each do |record| yield record end end |
#to_s ⇒ Object
528 529 530 |
# File 'lib/twilio-ruby/rest/sync/v1/service/document.rb', line 528 def to_s '<Twilio::REST::Sync::V1PageMetadata>'; end |