Class: Twilio::REST::Preview::Understand::AssistantContext::TaskContext::TaskStatisticsInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Preview::Understand::AssistantContext::TaskContext::TaskStatisticsInstance
- Defined in:
- lib/twilio-ruby/rest/preview/understand/assistant/task/task_statistics.rb
Overview
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 [email protected].
Instance Method Summary collapse
-
#account_sid ⇒ String
The unique ID of the Account that created this Field.
-
#assistant_sid ⇒ String
The unique ID of the parent Assistant.
-
#context ⇒ TaskStatisticsContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#fetch ⇒ TaskStatisticsInstance
Fetch a TaskStatisticsInstance.
-
#fields_count ⇒ String
The total number of Fields associated with this Task.
-
#initialize(version, payload, assistant_sid: nil, task_sid: nil) ⇒ TaskStatisticsInstance
constructor
Initialize the TaskStatisticsInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#samples_count ⇒ String
The total number of Samples associated with this Task.
-
#task_sid ⇒ String
The unique ID of the Task associated with this Field.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#url ⇒ String
The url.
Constructor Details
#initialize(version, payload, assistant_sid: nil, task_sid: nil) ⇒ TaskStatisticsInstance
Initialize the TaskStatisticsInstance
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/task/task_statistics.rb', line 129 def initialize(version, payload, assistant_sid: nil, task_sid: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'assistant_sid' => payload['assistant_sid'], 'task_sid' => payload['task_sid'], 'samples_count' => payload['samples_count'].to_i, 'fields_count' => payload['fields_count'].to_i, 'url' => payload['url'], } # Context @instance_context = nil @params = {'assistant_sid' => assistant_sid, 'task_sid' => task_sid, } end |
Instance Method Details
#account_sid ⇒ String
Returns The unique ID of the Account that created this Field.
164 165 166 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/task/task_statistics.rb', line 164 def account_sid @properties['account_sid'] end |
#assistant_sid ⇒ String
Returns The unique ID of the parent Assistant.
170 171 172 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/task/task_statistics.rb', line 170 def assistant_sid @properties['assistant_sid'] end |
#context ⇒ TaskStatisticsContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
151 152 153 154 155 156 157 158 159 160 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/task/task_statistics.rb', line 151 def context unless @instance_context @instance_context = TaskStatisticsContext.new( @version, @params['assistant_sid'], @params['task_sid'], ) end @instance_context end |
#fetch ⇒ TaskStatisticsInstance
Fetch a TaskStatisticsInstance
201 202 203 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/task/task_statistics.rb', line 201 def fetch context.fetch end |
#fields_count ⇒ String
Returns The total number of Fields associated with this Task.
188 189 190 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/task/task_statistics.rb', line 188 def fields_count @properties['fields_count'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
214 215 216 217 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/task/task_statistics.rb', line 214 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.Understand.TaskStatisticsInstance #{values}>" end |
#samples_count ⇒ String
Returns The total number of Samples associated with this Task.
182 183 184 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/task/task_statistics.rb', line 182 def samples_count @properties['samples_count'] end |
#task_sid ⇒ String
Returns The unique ID of the Task associated with this Field.
176 177 178 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/task/task_statistics.rb', line 176 def task_sid @properties['task_sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
207 208 209 210 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/task/task_statistics.rb', line 207 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.Understand.TaskStatisticsInstance #{values}>" end |
#url ⇒ String
Returns The url.
194 195 196 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/task/task_statistics.rb', line 194 def url @properties['url'] end |