Class: Twilio::REST::Api::V2010::AccountContext::CallContext::StreamPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Api::V2010::AccountContext::CallContext::StreamPageMetadata
- Defined in:
- lib/twilio-ruby/rest/api/v2010/account/call/stream.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#stream_page ⇒ Object
readonly
Returns the value of attribute stream_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ StreamPageMetadata
constructor
A new instance of StreamPageMetadata.
- #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) ⇒ StreamPageMetadata
Returns a new instance of StreamPageMetadata.
1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/stream.rb', line 1495 def initialize(version, response, solution, limit) super(version, response) @stream_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @stream_page << StreamListResponse.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
#stream_page ⇒ Object (readonly)
Returns the value of attribute stream_page.
1493 1494 1495 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/stream.rb', line 1493 def stream_page @stream_page end |
Instance Method Details
#each ⇒ Object
1511 1512 1513 1514 1515 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/stream.rb', line 1511 def each @stream_page.each do |record| yield record end end |
#to_s ⇒ Object
1517 1518 1519 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/stream.rb', line 1517 def to_s '<Twilio::REST::Api::V2010PageMetadata>'; end |