class Twilio::REST::Taskrouter::V1::WorkspaceContext::WorkflowContext::WorkflowRealTimeStatisticsContext

Public Class Methods

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

Initialize the WorkflowRealTimeStatisticsContext @param [Version] version Version that contains the resource @param [String] workspace_sid The SID of the Workspace with the Workflow to

fetch.

@param [String] workflow_sid Returns the list of Tasks that are being controlled

by the Workflow with the specified SID value.

@return [WorkflowRealTimeStatisticsContext] WorkflowRealTimeStatisticsContext

Calls superclass method Twilio::REST::InstanceContext::new
   # File lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_real_time_statistics.rb
81 def initialize(version, workspace_sid, workflow_sid)
82   super(version)
83 
84   # Path Solution
85   @solution = {workspace_sid: workspace_sid, workflow_sid: workflow_sid, }
86   @uri = "/Workspaces/#{@solution[:workspace_sid]}/Workflows/#{@solution[:workflow_sid]}/RealTimeStatistics"
87 end

Public Instance Methods

fetch(task_channel: :unset) click to toggle source

Fetch the WorkflowRealTimeStatisticsInstance @param [String] task_channel Only calculate real-time statistics on this

TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`,
`sms`, or `default`.

@return [WorkflowRealTimeStatisticsInstance] Fetched WorkflowRealTimeStatisticsInstance

    # File lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_real_time_statistics.rb
 95 def fetch(task_channel: :unset)
 96   params = Twilio::Values.of({'TaskChannel' => task_channel, })
 97 
 98   payload = @version.fetch('GET', @uri, params: params)
 99 
100   WorkflowRealTimeStatisticsInstance.new(
101       @version,
102       payload,
103       workspace_sid: @solution[:workspace_sid],
104       workflow_sid: @solution[:workflow_sid],
105   )
106 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_real_time_statistics.rb
117 def inspect
118   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
119   "#<Twilio.Taskrouter.V1.WorkflowRealTimeStatisticsContext #{context}>"
120 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_real_time_statistics.rb
110 def to_s
111   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
112   "#<Twilio.Taskrouter.V1.WorkflowRealTimeStatisticsContext #{context}>"
113 end