Class: Twilio::REST::FlexApi::V2::FlexUserPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::FlexApi::V2::FlexUserPageMetadata
- Defined in:
- lib/twilio-ruby/rest/flex_api/v2/flex_user.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#flex_user_page ⇒ Object
readonly
Returns the value of attribute flex_user_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ FlexUserPageMetadata
constructor
A new instance of FlexUserPageMetadata.
- #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) ⇒ FlexUserPageMetadata
Returns a new instance of FlexUserPageMetadata.
275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 |
# File 'lib/twilio-ruby/rest/flex_api/v2/flex_user.rb', line 275 def initialize(version, response, solution, limit) super(version, response) @flex_user_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @flex_user_page << FlexUserListResponse.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
#flex_user_page ⇒ Object (readonly)
Returns the value of attribute flex_user_page.
273 274 275 |
# File 'lib/twilio-ruby/rest/flex_api/v2/flex_user.rb', line 273 def flex_user_page @flex_user_page end |
Instance Method Details
#each ⇒ Object
291 292 293 294 295 |
# File 'lib/twilio-ruby/rest/flex_api/v2/flex_user.rb', line 291 def each @flex_user_page.each do |record| yield record end end |
#to_s ⇒ Object
297 298 299 |
# File 'lib/twilio-ruby/rest/flex_api/v2/flex_user.rb', line 297 def to_s '<Twilio::REST::FlexApi::V2PageMetadata>'; end |