class Twilio::REST::Autopilot::V1::AssistantContext::TaskContext::TaskStatisticsContext
PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
Public Class Methods
new(version, assistant_sid, task_sid)
click to toggle source
Initialize the TaskStatisticsContext
@param [Version] version Version
that contains the resource @param [String] assistant_sid The SID of the
{Assistant}[https://www.twilio.com/docs/autopilot/api/assistant] that is the parent of the resource to fetch.
@param [String] task_sid The SID of the
{Task}[https://www.twilio.com/docs/autopilot/api/task] that is associated with the resource to fetch.
@return [TaskStatisticsContext] TaskStatisticsContext
Calls superclass method
Twilio::REST::InstanceContext::new
# File lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_statistics.rb 91 def initialize(version, assistant_sid, task_sid) 92 super(version) 93 94 # Path Solution 95 @solution = {assistant_sid: assistant_sid, task_sid: task_sid, } 96 @uri = "/Assistants/#{@solution[:assistant_sid]}/Tasks/#{@solution[:task_sid]}/Statistics" 97 end
Public Instance Methods
fetch()
click to toggle source
Fetch the TaskStatisticsInstance
@return [TaskStatisticsInstance] Fetched TaskStatisticsInstance
# File lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_statistics.rb 102 def fetch 103 payload = @version.fetch('GET', @uri) 104 105 TaskStatisticsInstance.new( 106 @version, 107 payload, 108 assistant_sid: @solution[:assistant_sid], 109 task_sid: @solution[:task_sid], 110 ) 111 end
inspect()
click to toggle source
Provide a detailed, user friendly representation
# File lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_statistics.rb 122 def inspect 123 context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') 124 "#<Twilio.Autopilot.V1.TaskStatisticsContext #{context}>" 125 end
to_s()
click to toggle source
Provide a user friendly representation
# File lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_statistics.rb 115 def to_s 116 context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') 117 "#<Twilio.Autopilot.V1.TaskStatisticsContext #{context}>" 118 end