Class: Twilio::REST::Proxy::V1::ServiceContext::SessionContext::ParticipantPageMetadata
- Inherits:
-
Twilio::REST::PageMetadata
- Object
- Twilio::REST::PageMetadata
- Twilio::REST::Proxy::V1::ServiceContext::SessionContext::ParticipantPageMetadata
- Defined in:
- lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb
Constant Summary
Constants inherited from Twilio::REST::PageMetadata
Twilio::REST::PageMetadata::META_KEYS
Instance Attribute Summary collapse
-
#participant_page ⇒ Object
readonly
Returns the value of attribute participant_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ ParticipantPageMetadata
constructor
A new instance of ParticipantPageMetadata.
- #to_s ⇒ Object
Methods inherited from Twilio::REST::PageMetadata
#get_key, #next_page, #next_page_url, #previous_page, #previous_page_url, #process_response
Constructor Details
#initialize(version, response, solution, limit) ⇒ ParticipantPageMetadata
Returns a new instance of ParticipantPageMetadata.
448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb', line 448 def initialize(version, response, solution, limit) super(version, response) @participant_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @participant_page << ParticipantListResponse.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
#participant_page ⇒ Object (readonly)
Returns the value of attribute participant_page.
446 447 448 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb', line 446 def participant_page @participant_page end |
Instance Method Details
#each ⇒ Object
464 465 466 467 468 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb', line 464 def each @participant_page.each do |record| yield record end end |
#to_s ⇒ Object
470 471 472 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb', line 470 def to_s '<Twilio::REST::Proxy::V1PageMetadata>'; end |