Class: Twilio::REST::Preview::Understand::AssistantContext::TaskContext::FieldContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Preview::Understand::AssistantContext::TaskContext::FieldContext
- Defined in:
- lib/twilio-ruby/rest/preview/understand/assistant/task/field.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
-
#delete ⇒ Boolean
Deletes the FieldInstance.
-
#fetch ⇒ FieldInstance
Fetch a FieldInstance.
-
#initialize(version, assistant_sid, task_sid, sid) ⇒ FieldContext
constructor
Initialize the FieldContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, assistant_sid, task_sid, sid) ⇒ FieldContext
Initialize the FieldContext
195 196 197 198 199 200 201 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/task/field.rb', line 195 def initialize(version, assistant_sid, task_sid, sid) super(version) # Path Solution @solution = {assistant_sid: assistant_sid, task_sid: task_sid, sid: sid, } @uri = "/Assistants/#{@solution[:assistant_sid]}/Tasks/#{@solution[:task_sid]}/Fields/#{@solution[:sid]}" end |
Instance Method Details
#delete ⇒ Boolean
Deletes the FieldInstance
227 228 229 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/task/field.rb', line 227 def delete @version.delete('delete', @uri) end |
#fetch ⇒ FieldInstance
Fetch a FieldInstance
206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/task/field.rb', line 206 def fetch params = Twilio::Values.of({}) payload = @version.fetch( 'GET', @uri, params, ) FieldInstance.new( @version, payload, assistant_sid: @solution[:assistant_sid], task_sid: @solution[:task_sid], sid: @solution[:sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
240 241 242 243 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/task/field.rb', line 240 def inspect context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Preview.Understand.FieldContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
233 234 235 236 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/task/field.rb', line 233 def to_s context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Preview.Understand.FieldContext #{context}>" end |