class Twilio::REST::Taskrouter::V1::WorkspaceContext::EventContext

Public Class Methods

new(version, workspace_sid, sid) click to toggle source

Initialize the EventContext @param [Version] version Version that contains the resource @param [String] workspace_sid The SID of the Workspace with the Event to fetch. @param [String] sid The SID of the Event resource to fetch. @return [EventContext] EventContext

Calls superclass method Twilio::REST::InstanceContext::new
    # File lib/twilio-ruby/rest/taskrouter/v1/workspace/event.rb
264 def initialize(version, workspace_sid, sid)
265   super(version)
266 
267   # Path Solution
268   @solution = {workspace_sid: workspace_sid, sid: sid, }
269   @uri = "/Workspaces/#{@solution[:workspace_sid]}/Events/#{@solution[:sid]}"
270 end

Public Instance Methods

fetch() click to toggle source

Fetch the EventInstance @return [EventInstance] Fetched EventInstance

    # File lib/twilio-ruby/rest/taskrouter/v1/workspace/event.rb
275 def fetch
276   payload = @version.fetch('GET', @uri)
277 
278   EventInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid], sid: @solution[:sid], )
279 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/taskrouter/v1/workspace/event.rb
290 def inspect
291   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
292   "#<Twilio.Taskrouter.V1.EventContext #{context}>"
293 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/taskrouter/v1/workspace/event.rb
283 def to_s
284   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
285   "#<Twilio.Taskrouter.V1.EventContext #{context}>"
286 end