Class: Twilio::REST::Conversations::V1::UserPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Conversations::V1::UserPageMetadata
- Defined in:
- lib/twilio-ruby/rest/conversations/v1/user.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#user_page ⇒ Object
readonly
Returns the value of attribute user_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ UserPageMetadata
constructor
A new instance of UserPageMetadata.
- #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) ⇒ UserPageMetadata
Returns a new instance of UserPageMetadata.
519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 |
# File 'lib/twilio-ruby/rest/conversations/v1/user.rb', line 519 def initialize(version, response, solution, limit) super(version, response) @user_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @user_page << UserListResponse.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
#user_page ⇒ Object (readonly)
Returns the value of attribute user_page.
517 518 519 |
# File 'lib/twilio-ruby/rest/conversations/v1/user.rb', line 517 def user_page @user_page end |
Instance Method Details
#each ⇒ Object
535 536 537 538 539 |
# File 'lib/twilio-ruby/rest/conversations/v1/user.rb', line 535 def each @user_page.each do |record| yield record end end |
#to_s ⇒ Object
541 542 543 |
# File 'lib/twilio-ruby/rest/conversations/v1/user.rb', line 541 def to_s '<Twilio::REST::Conversations::V1PageMetadata>'; end |