class Twilio::REST::Preview::Understand::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 unique ID of the parent Assistant. @param [String] task_sid The unique ID of the Task associated with this Field. @return [TaskStatisticsContext] TaskStatisticsContext

Calls superclass method Twilio::REST::InstanceContext::new
   # File lib/twilio-ruby/rest/preview/understand/assistant/task/task_statistics.rb
83 def initialize(version, assistant_sid, task_sid)
84   super(version)
85 
86   # Path Solution
87   @solution = {assistant_sid: assistant_sid, task_sid: task_sid, }
88   @uri = "/Assistants/#{@solution[:assistant_sid]}/Tasks/#{@solution[:task_sid]}/Statistics"
89 end

Public Instance Methods

fetch() click to toggle source

Fetch the TaskStatisticsInstance @return [TaskStatisticsInstance] Fetched TaskStatisticsInstance

    # File lib/twilio-ruby/rest/preview/understand/assistant/task/task_statistics.rb
 94 def fetch
 95   payload = @version.fetch('GET', @uri)
 96 
 97   TaskStatisticsInstance.new(
 98       @version,
 99       payload,
100       assistant_sid: @solution[:assistant_sid],
101       task_sid: @solution[:task_sid],
102   )
103 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/preview/understand/assistant/task/task_statistics.rb
114 def inspect
115   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
116   "#<Twilio.Preview.Understand.TaskStatisticsContext #{context}>"
117 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/preview/understand/assistant/task/task_statistics.rb
107 def to_s
108   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
109   "#<Twilio.Preview.Understand.TaskStatisticsContext #{context}>"
110 end