Class: Twilio::REST::Taskrouter::V1::WorkspaceContext::WorkflowContext::WorkflowRealTimeStatisticsContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Taskrouter::V1::WorkspaceContext::WorkflowContext::WorkflowRealTimeStatisticsContext
- Defined in:
- lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_real_time_statistics.rb
Instance Method Summary collapse
-
#fetch(task_channel: :unset) ⇒ WorkflowRealTimeStatisticsInstance
Fetch the WorkflowRealTimeStatisticsInstance.
-
#initialize(version, workspace_sid, workflow_sid) ⇒ WorkflowRealTimeStatisticsContext
constructor
Initialize the WorkflowRealTimeStatisticsContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, workspace_sid, workflow_sid) ⇒ WorkflowRealTimeStatisticsContext
Initialize the WorkflowRealTimeStatisticsContext
53 54 55 56 57 58 59 60 61 |
# File 'lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_real_time_statistics.rb', line 53 def initialize(version, workspace_sid, workflow_sid) super(version) # Path Solution @solution = { workspace_sid: workspace_sid, workflow_sid: workflow_sid, } @uri = "/Workspaces/#{@solution[:workspace_sid]}/Workflows/#{@solution[:workflow_sid]}/RealTimeStatistics" end |
Instance Method Details
#fetch(task_channel: :unset) ⇒ WorkflowRealTimeStatisticsInstance
Fetch the WorkflowRealTimeStatisticsInstance
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_real_time_statistics.rb', line 66 def fetch( task_channel: :unset ) params = Twilio::Values.of({ 'TaskChannel' => task_channel, }) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, params: params, headers: headers) WorkflowRealTimeStatisticsInstance.new( @version, payload, workspace_sid: @solution[:workspace_sid], workflow_sid: @solution[:workflow_sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
98 99 100 101 |
# File 'lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_real_time_statistics.rb', line 98 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Taskrouter.V1.WorkflowRealTimeStatisticsContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
91 92 93 94 |
# File 'lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_real_time_statistics.rb', line 91 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Taskrouter.V1.WorkflowRealTimeStatisticsContext #{context}>" end |