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)


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

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



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

def event
    @event
end

#event_instanceObject



327
328
329
# File 'lib/twilio-ruby/rest/monitor/v1/event.rb', line 327

def event_instance
    @instance
end

#headersObject



412
413
414
# File 'lib/twilio-ruby/rest/monitor/v1/event.rb', line 412

def headers
  @headers
end

#status_codeObject



416
417
418
# File 'lib/twilio-ruby/rest/monitor/v1/event.rb', line 416

def status_code
  @status_code
end