Class: Twilio::REST::Monitor::V1::EventContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Monitor::V1::EventContext
- Defined in:
- lib/twilio-ruby/rest/monitor/v1/event.rb
Instance Method Summary collapse
-
#fetch ⇒ EventInstance
Fetch the EventInstance.
-
#initialize(version, sid) ⇒ EventContext
constructor
Initialize the EventContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, sid) ⇒ EventContext
Initialize the EventContext
172 173 174 175 176 177 178 179 180 |
# File 'lib/twilio-ruby/rest/monitor/v1/event.rb', line 172 def initialize(version, sid) super(version) # Path Solution @solution = { sid: sid, } @uri = "/Events/#{@solution[:sid]}" end |
Instance Method Details
#fetch ⇒ EventInstance
Fetch the EventInstance
184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 |
# File 'lib/twilio-ruby/rest/monitor/v1/event.rb', line 184 def fetch headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, headers: headers) EventInstance.new( @version, payload, sid: @solution[:sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
210 211 212 213 |
# File 'lib/twilio-ruby/rest/monitor/v1/event.rb', line 210 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Monitor.V1.EventContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
203 204 205 206 |
# File 'lib/twilio-ruby/rest/monitor/v1/event.rb', line 203 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Monitor.V1.EventContext #{context}>" end |