Class: Twilio::REST::FlexApi::V1::InsightsAssessmentsCommentPageMetadata

Inherits:
PageMetadata
  • Object
show all
Defined in:
lib/twilio-ruby/rest/flex_api/v1/insights_assessments_comment.rb

Constant Summary

Constants inherited from PageMetadata

PageMetadata::META_KEYS

Instance Attribute Summary collapse

Instance Method Summary collapse

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) ⇒ InsightsAssessmentsCommentPageMetadata

Returns a new instance of InsightsAssessmentsCommentPageMetadata.



307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_assessments_comment.rb', line 307

def initialize(version, response, solution, limit)
    super(version, response)
    @insights_assessments_comment_page = []
    @limit = limit
    key = get_key(response.body)
    records = 0
    while( limit != :unset && records < limit )
        @insights_assessments_comment_page << InsightsAssessmentsCommentListResponse.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

#insights_assessments_comment_pageObject (readonly)

Returns the value of attribute insights_assessments_comment_page.



305
306
307
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_assessments_comment.rb', line 305

def insights_assessments_comment_page
  @insights_assessments_comment_page
end

Instance Method Details

#eachObject



323
324
325
326
327
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_assessments_comment.rb', line 323

def each
    @insights_assessments_comment_page.each do |record|
      yield record
    end
end

#to_sObject



329
330
331
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_assessments_comment.rb', line 329

def to_s
  '<Twilio::REST::FlexApi::V1PageMetadata>';
end