class Twilio::REST::Preview::Understand::AssistantContext::TaskContext::FieldContext

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, sid) click to toggle source

Initialize the FieldContext @param [Version] version Version that contains the resource @param [String] assistant_sid The unique ID of the Assistant. @param [String] task_sid The unique ID of the Task associated with this Field. @param [String] sid A 34 character string that uniquely identifies this

resource.

@return [FieldContext] FieldContext

Calls superclass method Twilio::REST::InstanceContext::new
    # File lib/twilio-ruby/rest/preview/understand/assistant/task/field.rb
188 def initialize(version, assistant_sid, task_sid, sid)
189   super(version)
190 
191   # Path Solution
192   @solution = {assistant_sid: assistant_sid, task_sid: task_sid, sid: sid, }
193   @uri = "/Assistants/#{@solution[:assistant_sid]}/Tasks/#{@solution[:task_sid]}/Fields/#{@solution[:sid]}"
194 end

Public Instance Methods

delete() click to toggle source

Delete the FieldInstance @return [Boolean] true if delete succeeds, false otherwise

    # File lib/twilio-ruby/rest/preview/understand/assistant/task/field.rb
214 def delete
215    @version.delete('DELETE', @uri)
216 end
fetch() click to toggle source

Fetch the FieldInstance @return [FieldInstance] Fetched FieldInstance

    # File lib/twilio-ruby/rest/preview/understand/assistant/task/field.rb
199 def fetch
200   payload = @version.fetch('GET', @uri)
201 
202   FieldInstance.new(
203       @version,
204       payload,
205       assistant_sid: @solution[:assistant_sid],
206       task_sid: @solution[:task_sid],
207       sid: @solution[:sid],
208   )
209 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/preview/understand/assistant/task/field.rb
227 def inspect
228   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
229   "#<Twilio.Preview.Understand.FieldContext #{context}>"
230 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/preview/understand/assistant/task/field.rb
220 def to_s
221   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
222   "#<Twilio.Preview.Understand.FieldContext #{context}>"
223 end