Class: Twilio::REST::Monitor::V1
- Defined in:
- lib/twilio-ruby/rest/monitor/v1.rb,
lib/twilio-ruby/rest/monitor/v1/alert.rb,
lib/twilio-ruby/rest/monitor/v1/event.rb
Defined Under Namespace
Classes: AlertContext, AlertInstance, AlertList, AlertPage, EventContext, EventInstance, EventList, EventPage
Instance Attribute Summary
Attributes inherited from Version
Instance Method Summary collapse
- #alerts(sid = :unset) ⇒ Twilio::REST::Monitor::V1::AlertContext, Twilio::REST::Monitor::V1::AlertList
- #events(sid = :unset) ⇒ Twilio::REST::Monitor::V1::EventContext, Twilio::REST::Monitor::V1::EventList
-
#initialize(domain) ⇒ V1
constructor
Initialize the V1 version of Monitor.
-
#to_s ⇒ Object
Provide a user friendly representation.
Methods inherited from Version
#absolute_url, #create, #delete, #exception, #fetch, #page, #read_limits, #relative_uri, #request, #stream, #update
Constructor Details
#initialize(domain) ⇒ V1
Initialize the V1 version of Monitor
21 22 23 24 25 26 |
# File 'lib/twilio-ruby/rest/monitor/v1.rb', line 21 def initialize(domain) super @version = 'v1' @alerts = nil @events = nil end |
Instance Method Details
#alerts(sid = :unset) ⇒ Twilio::REST::Monitor::V1::AlertContext, Twilio::REST::Monitor::V1::AlertList
32 33 34 35 36 37 38 39 40 41 |
# File 'lib/twilio-ruby/rest/monitor/v1.rb', line 32 def alerts(sid=:unset) if sid.nil? raise ArgumentError, 'sid cannot be nil' end if sid == :unset @alerts ||= AlertList.new self else AlertContext.new(self, sid) end end |
#events(sid = :unset) ⇒ Twilio::REST::Monitor::V1::EventContext, Twilio::REST::Monitor::V1::EventList
46 47 48 49 50 51 52 53 54 55 |
# File 'lib/twilio-ruby/rest/monitor/v1.rb', line 46 def events(sid=:unset) if sid.nil? raise ArgumentError, 'sid cannot be nil' end if sid == :unset @events ||= EventList.new self else EventContext.new(self, sid) end end |
#to_s ⇒ Object
Provide a user friendly representation
58 59 60 |
# File 'lib/twilio-ruby/rest/monitor/v1.rb', line 58 def to_s '<Twilio::REST::Monitor::V1>'; end |