Class: Twilio::REST::Insights::V1::RoomPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Insights::V1::RoomPageMetadata
- Defined in:
- lib/twilio-ruby/rest/insights/v1/room.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#room_page ⇒ Object
readonly
Returns the value of attribute room_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ RoomPageMetadata
constructor
A new instance of RoomPageMetadata.
- #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) ⇒ RoomPageMetadata
Returns a new instance of RoomPageMetadata.
373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 373 def initialize(version, response, solution, limit) super(version, response) @room_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @room_page << RoomListResponse.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
#room_page ⇒ Object (readonly)
Returns the value of attribute room_page.
371 372 373 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 371 def room_page @room_page end |
Instance Method Details
#each ⇒ Object
389 390 391 392 393 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 389 def each @room_page.each do |record| yield record end end |
#to_s ⇒ Object
395 396 397 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 395 def to_s '<Twilio::REST::Insights::V1PageMetadata>'; end |