Class: Twilio::REST::Monitor::V1::EventPageMetadata
- Inherits:
-
PageMetadata
- Object
- PageMetadata
- Twilio::REST::Monitor::V1::EventPageMetadata
- Defined in:
- lib/twilio-ruby/rest/monitor/v1/event.rb
Constant Summary
Constants inherited from PageMetadata
Instance Attribute Summary collapse
-
#event_page ⇒ Object
readonly
Returns the value of attribute event_page.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(version, response, solution, limit) ⇒ EventPageMetadata
constructor
A new instance of EventPageMetadata.
- #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) ⇒ EventPageMetadata
Returns a new instance of EventPageMetadata.
357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 |
# File 'lib/twilio-ruby/rest/monitor/v1/event.rb', line 357 def initialize(version, response, solution, limit) super(version, response) @event_page = [] @limit = limit key = get_key(response.body) records = 0 while( limit != :unset && records < limit ) @event_page << EventListResponse.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
#event_page ⇒ Object (readonly)
Returns the value of attribute event_page.
355 356 357 |
# File 'lib/twilio-ruby/rest/monitor/v1/event.rb', line 355 def event_page @event_page end |
Instance Method Details
#each ⇒ Object
373 374 375 376 377 |
# File 'lib/twilio-ruby/rest/monitor/v1/event.rb', line 373 def each @event_page.each do |record| yield record end end |
#to_s ⇒ Object
379 380 381 |
# File 'lib/twilio-ruby/rest/monitor/v1/event.rb', line 379 def to_s '<Twilio::REST::Monitor::V1PageMetadata>'; end |