Class: Twilio::REST::Preview::Understand::AssistantContext::IntentContext::IntentStatisticsInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Preview::Understand::AssistantContext::IntentContext::IntentStatisticsInstance
- Defined in:
- lib/twilio-ruby/rest/preview/understand/assistant/intent/intent_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 ⇒ IntentStatisticsContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#fetch ⇒ IntentStatisticsInstance
Fetch a IntentStatisticsInstance.
-
#fields_count ⇒ String
The total number of Fields associated with this Intent.
-
#initialize(version, payload, assistant_sid: nil, intent_sid: nil) ⇒ IntentStatisticsInstance
constructor
Initialize the IntentStatisticsInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#intent_sid ⇒ String
The unique ID of the Intent associated with this Field.
-
#samples_count ⇒ String
The total number of Samples associated with this Intent.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#url ⇒ String
The url.
Constructor Details
#initialize(version, payload, assistant_sid: nil, intent_sid: nil) ⇒ IntentStatisticsInstance
Initialize the IntentStatisticsInstance
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/intent/intent_statistics.rb', line 131 def initialize(version, payload, assistant_sid: nil, intent_sid: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'assistant_sid' => payload['assistant_sid'], 'intent_sid' => payload['intent_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, 'intent_sid' => intent_sid, } end |
Instance Method Details
#account_sid ⇒ String
Returns The unique ID of the Account that created this Field.
166 167 168 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/intent/intent_statistics.rb', line 166 def account_sid @properties['account_sid'] end |
#assistant_sid ⇒ String
Returns The unique ID of the parent Assistant.
172 173 174 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/intent/intent_statistics.rb', line 172 def assistant_sid @properties['assistant_sid'] end |
#context ⇒ IntentStatisticsContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
153 154 155 156 157 158 159 160 161 162 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/intent/intent_statistics.rb', line 153 def context unless @instance_context @instance_context = IntentStatisticsContext.new( @version, @params['assistant_sid'], @params['intent_sid'], ) end @instance_context end |
#fetch ⇒ IntentStatisticsInstance
Fetch a IntentStatisticsInstance
203 204 205 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/intent/intent_statistics.rb', line 203 def fetch context.fetch end |
#fields_count ⇒ String
Returns The total number of Fields associated with this Intent.
190 191 192 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/intent/intent_statistics.rb', line 190 def fields_count @properties['fields_count'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
216 217 218 219 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/intent/intent_statistics.rb', line 216 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.Understand.IntentStatisticsInstance #{values}>" end |
#intent_sid ⇒ String
Returns The unique ID of the Intent associated with this Field.
178 179 180 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/intent/intent_statistics.rb', line 178 def intent_sid @properties['intent_sid'] end |
#samples_count ⇒ String
Returns The total number of Samples associated with this Intent.
184 185 186 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/intent/intent_statistics.rb', line 184 def samples_count @properties['samples_count'] end |
#to_s ⇒ Object
Provide a user friendly representation
209 210 211 212 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/intent/intent_statistics.rb', line 209 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.Understand.IntentStatisticsInstance #{values}>" end |
#url ⇒ String
Returns The url.
196 197 198 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/intent/intent_statistics.rb', line 196 def url @properties['url'] end |