class Twilio::REST::Autopilot::V1::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 SID of the

{Assistant}[https://www.twilio.com/docs/autopilot/api/assistant] that is the
parent of the Task associated with the resource to fetch.

@param [String] task_sid The SID of the

{Task}[https://www.twilio.com/docs/autopilot/api/task] resource associated with
the Field resource to fetch.

@param [String] sid The Twilio-provided string that uniquely identifies the

Field resource to fetch.

@return [FieldContext] FieldContext

Calls superclass method Twilio::REST::InstanceContext::new
    # File lib/twilio-ruby/rest/autopilot/v1/assistant/task/field.rb
197 def initialize(version, assistant_sid, task_sid, sid)
198   super(version)
199 
200   # Path Solution
201   @solution = {assistant_sid: assistant_sid, task_sid: task_sid, sid: sid, }
202   @uri = "/Assistants/#{@solution[:assistant_sid]}/Tasks/#{@solution[:task_sid]}/Fields/#{@solution[:sid]}"
203 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/autopilot/v1/assistant/task/field.rb
223 def delete
224    @version.delete('DELETE', @uri)
225 end
fetch() click to toggle source

Fetch the FieldInstance @return [FieldInstance] Fetched FieldInstance

    # File lib/twilio-ruby/rest/autopilot/v1/assistant/task/field.rb
208 def fetch
209   payload = @version.fetch('GET', @uri)
210 
211   FieldInstance.new(
212       @version,
213       payload,
214       assistant_sid: @solution[:assistant_sid],
215       task_sid: @solution[:task_sid],
216       sid: @solution[:sid],
217   )
218 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/autopilot/v1/assistant/task/field.rb
236 def inspect
237   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
238   "#<Twilio.Autopilot.V1.FieldContext #{context}>"
239 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/autopilot/v1/assistant/task/field.rb
229 def to_s
230   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
231   "#<Twilio.Autopilot.V1.FieldContext #{context}>"
232 end