class Twilio::REST::Monitor::V1
Public Class Methods
new(domain)
click to toggle source
Initialize the V1
version of Monitor
Calls superclass method
Twilio::REST::Version::new
# File lib/twilio-ruby/rest/monitor/v1.rb 15 def initialize(domain) 16 super 17 @version = 'v1' 18 @alerts = nil 19 @events = nil 20 end
Public Instance Methods
alerts(sid=:unset)
click to toggle source
@param [String] sid The SID of the Alert resource to fetch. @return [Twilio::REST::Monitor::V1::AlertContext] if sid was passed. @return [Twilio::REST::Monitor::V1::AlertList]
# File lib/twilio-ruby/rest/monitor/v1.rb 26 def alerts(sid=:unset) 27 if sid.nil? 28 raise ArgumentError, 'sid cannot be nil' 29 end 30 if sid == :unset 31 @alerts ||= AlertList.new self 32 else 33 AlertContext.new(self, sid) 34 end 35 end
events(sid=:unset)
click to toggle source
@param [String] sid The SID of the Event resource to fetch. @return [Twilio::REST::Monitor::V1::EventContext] if sid was passed. @return [Twilio::REST::Monitor::V1::EventList]
# File lib/twilio-ruby/rest/monitor/v1.rb 41 def events(sid=:unset) 42 if sid.nil? 43 raise ArgumentError, 'sid cannot be nil' 44 end 45 if sid == :unset 46 @events ||= EventList.new self 47 else 48 EventContext.new(self, sid) 49 end 50 end
to_s()
click to toggle source
Provide a user friendly representation
# File lib/twilio-ruby/rest/monitor/v1.rb 54 def to_s 55 '<Twilio::REST::Monitor::V1>' 56 end