Class: Twilio::REST::Monitor::V1::EventListResponse

Inherits:
InstanceListResource show all
Defined in:
lib/twilio-ruby/rest/monitor/v1/event.rb,
lib/twilio-ruby/rest/monitor/v1/event.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, key, limit = :unset) ⇒ EventListResponse

Returns a new instance of EventListResponse.

Parameters:

  • instance (Array<EventInstance>)
  • headers (Hash{String => Object})
  • status_code (Integer)


311
312
313
314
315
316
317
# File 'lib/twilio-ruby/rest/monitor/v1/event.rb', line 311

def initialize(version, payload, key)
   @event_instance = payload.body[key].map do |data|
    EventInstance.new(version, data)
   end
   @headers = payload.headers
   @status_code = payload.status_code
end

Instance Method Details

#eventObject



400
401
402
# File 'lib/twilio-ruby/rest/monitor/v1/event.rb', line 400

def event
    @event
end

#event_instanceObject



319
320
321
# File 'lib/twilio-ruby/rest/monitor/v1/event.rb', line 319

def event_instance
    @instance
end

#headersObject



404
405
406
# File 'lib/twilio-ruby/rest/monitor/v1/event.rb', line 404

def headers
  @headers
end

#status_codeObject



408
409
410
# File 'lib/twilio-ruby/rest/monitor/v1/event.rb', line 408

def status_code
  @status_code
end