lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb in twilio-ruby-5.2.3 vs lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb in twilio-ruby-5.3.0
- old
+ new
@@ -209,10 +209,12 @@
}
@uri = "/Workspaces/#{@solution[:workspace_sid]}/Workflows/#{@solution[:sid]}"
# Dependents
@statistics = nil
+ @workflow_real_time_statistics = nil
+ @workflow_cumulative_statistics = nil
end
##
# Fetch a WorkflowInstance
# @return [WorkflowInstance] Fetched WorkflowInstance
@@ -283,10 +285,34 @@
@solution[:sid],
)
end
##
+ # Access the workflow_real_time_statistics
+ # @return [WorkflowRealTimeStatisticsList]
+ # @return [WorkflowRealTimeStatisticsContext]
+ def workflow_real_time_statistics
+ WorkflowRealTimeStatisticsContext.new(
+ @version,
+ @solution[:workspace_sid],
+ @solution[:sid],
+ )
+ end
+
+ ##
+ # Access the workflow_cumulative_statistics
+ # @return [WorkflowCumulativeStatisticsList]
+ # @return [WorkflowCumulativeStatisticsContext]
+ def workflow_cumulative_statistics
+ WorkflowCumulativeStatisticsContext.new(
+ @version,
+ @solution[:workspace_sid],
+ @solution[:sid],
+ )
+ end
+
+ ##
# Provide a user friendly representation
def to_s
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
"#<Twilio.Taskrouter.V1.WorkflowContext #{context}>"
end
@@ -457,9 +483,23 @@
##
# Access the statistics
# @return [statistics] statistics
def statistics
context.statistics
+ end
+
+ ##
+ # Access the workflow_real_time_statistics
+ # @return [workflow_real_time_statistics] workflow_real_time_statistics
+ def workflow_real_time_statistics
+ context.workflow_real_time_statistics
+ end
+
+ ##
+ # Access the workflow_cumulative_statistics
+ # @return [workflow_cumulative_statistics] workflow_cumulative_statistics
+ def workflow_cumulative_statistics
+ context.workflow_cumulative_statistics
end
##
# Provide a user friendly representation
def to_s
\ No newline at end of file