Class: Twilio::REST::FlexApi::V1::InsightsQuestionnairesPageMetadata

Inherits:
PageMetadata
  • Object
show all
Defined in:
lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.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) ⇒ InsightsQuestionnairesPageMetadata

Returns a new instance of InsightsQuestionnairesPageMetadata.



527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb', line 527

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

Returns the value of attribute insights_questionnaires_page.



525
526
527
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb', line 525

def insights_questionnaires_page
  @insights_questionnaires_page
end

Instance Method Details

#eachObject



543
544
545
546
547
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb', line 543

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

#to_sObject



549
550
551
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb', line 549

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