class Twilio::REST::Monitor::V1::AlertContext
Public Class Methods
new(version, sid)
click to toggle source
Initialize the AlertContext
@param [Version] version Version
that contains the resource @param [String] sid The SID of the Alert resource to fetch. @return [AlertContext] AlertContext
Calls superclass method
Twilio::REST::InstanceContext::new
# File lib/twilio-ruby/rest/monitor/v1/alert.rb 186 def initialize(version, sid) 187 super(version) 188 189 # Path Solution 190 @solution = {sid: sid, } 191 @uri = "/Alerts/#{@solution[:sid]}" 192 end
Public Instance Methods
fetch()
click to toggle source
Fetch the AlertInstance
@return [AlertInstance] Fetched AlertInstance
# File lib/twilio-ruby/rest/monitor/v1/alert.rb 197 def fetch 198 payload = @version.fetch('GET', @uri) 199 200 AlertInstance.new(@version, payload, sid: @solution[:sid], ) 201 end
inspect()
click to toggle source
Provide a detailed, user friendly representation
# File lib/twilio-ruby/rest/monitor/v1/alert.rb 212 def inspect 213 context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') 214 "#<Twilio.Monitor.V1.AlertContext #{context}>" 215 end
to_s()
click to toggle source
Provide a user friendly representation
# File lib/twilio-ruby/rest/monitor/v1/alert.rb 205 def to_s 206 context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') 207 "#<Twilio.Monitor.V1.AlertContext #{context}>" 208 end