Class: Twilio::REST::FlexApi::V1::InsightsSegmentsPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::FlexApi::V1::InsightsSegmentsPageMetadata
- Defined in:
- lib/twilio-ruby/rest/flex_api/v1/insights_segments.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#insights_segments_page ⇒ Object
readonly
Returns the value of attribute insights_segments_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ InsightsSegmentsPageMetadata
constructor
A new instance of InsightsSegmentsPageMetadata.
- #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) ⇒ InsightsSegmentsPageMetadata
Returns a new instance of InsightsSegmentsPageMetadata.
211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_segments.rb', line 211 def initialize(version, response, solution, limit) super(version, response) @insights_segments_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @insights_segments_page << InsightsSegmentsListResponse.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_segments_page ⇒ Object (readonly)
Returns the value of attribute insights_segments_page.
209 210 211 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_segments.rb', line 209 def insights_segments_page @insights_segments_page end |
Instance Method Details
#each ⇒ Object
227 228 229 230 231 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_segments.rb', line 227 def each @insights_segments_page.each do |record| yield record end end |
#to_s ⇒ Object
233 234 235 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_segments.rb', line 233 def to_s '<Twilio::REST::FlexApi::V1PageMetadata>'; end |