Class: Twilio::REST::Insights::V2::ReportPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Insights::V2::ReportPageMetadata
- Defined in:
- lib/twilio-ruby/rest/insights/v2/report.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#report_page ⇒ Object
readonly
Returns the value of attribute report_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ ReportPageMetadata
constructor
A new instance of ReportPageMetadata.
- #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) ⇒ ReportPageMetadata
Returns a new instance of ReportPageMetadata.
687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 |
# File 'lib/twilio-ruby/rest/insights/v2/report.rb', line 687 def initialize(version, response, solution, limit) super(version, response) @report_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @report_page << ReportListResponse.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
#report_page ⇒ Object (readonly)
Returns the value of attribute report_page.
685 686 687 |
# File 'lib/twilio-ruby/rest/insights/v2/report.rb', line 685 def report_page @report_page end |
Instance Method Details
#each ⇒ Object
703 704 705 706 707 |
# File 'lib/twilio-ruby/rest/insights/v2/report.rb', line 703 def each @report_page.each do |record| yield record end end |
#to_s ⇒ Object
709 710 711 |
# File 'lib/twilio-ruby/rest/insights/v2/report.rb', line 709 def to_s '<Twilio::REST::Insights::V2PageMetadata>'; end |