Class: Twilio::REST::Conversations::V1::RolePageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Conversations::V1::RolePageMetadata
- Defined in:
- lib/twilio-ruby/rest/conversations/v1/role.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#role_page ⇒ Object
readonly
Returns the value of attribute role_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ RolePageMetadata
constructor
A new instance of RolePageMetadata.
- #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) ⇒ RolePageMetadata
Returns a new instance of RolePageMetadata.
467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 |
# File 'lib/twilio-ruby/rest/conversations/v1/role.rb', line 467 def initialize(version, response, solution, limit) super(version, response) @role_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @role_page << RoleListResponse.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
#role_page ⇒ Object (readonly)
Returns the value of attribute role_page.
465 466 467 |
# File 'lib/twilio-ruby/rest/conversations/v1/role.rb', line 465 def role_page @role_page end |
Instance Method Details
#each ⇒ Object
483 484 485 486 487 |
# File 'lib/twilio-ruby/rest/conversations/v1/role.rb', line 483 def each @role_page.each do |record| yield record end end |
#to_s ⇒ Object
489 490 491 |
# File 'lib/twilio-ruby/rest/conversations/v1/role.rb', line 489 def to_s '<Twilio::REST::Conversations::V1PageMetadata>'; end |