Class: Twilio::REST::FlexApi::V1::InsightsSettingsAnswerSetsPageMetadata

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

Returns a new instance of InsightsSettingsAnswerSetsPageMetadata.



124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_settings_answer_sets.rb', line 124

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

Returns the value of attribute insights_settings_answer_sets_page.



122
123
124
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_settings_answer_sets.rb', line 122

def insights_settings_answer_sets_page
  @insights_settings_answer_sets_page
end

Instance Method Details

#eachObject



140
141
142
143
144
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_settings_answer_sets.rb', line 140

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

#to_sObject



146
147
148
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_settings_answer_sets.rb', line 146

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