class Twilio::REST::Preview::Understand::AssistantContext::FieldTypeContext::FieldValueContext

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

Initialize the FieldValueContext @param [Version] version Version that contains the resource @param [String] assistant_sid The assistant_sid @param [String] field_type_sid The field_type_sid @param [String] sid The sid @return [FieldValueContext] FieldValueContext

Calls superclass method Twilio::REST::InstanceContext::new
    # File lib/twilio-ruby/rest/preview/understand/assistant/field_type/field_value.rb
194 def initialize(version, assistant_sid, field_type_sid, sid)
195   super(version)
196 
197   # Path Solution
198   @solution = {assistant_sid: assistant_sid, field_type_sid: field_type_sid, sid: sid, }
199   @uri = "/Assistants/#{@solution[:assistant_sid]}/FieldTypes/#{@solution[:field_type_sid]}/FieldValues/#{@solution[:sid]}"
200 end

Public Instance Methods

delete() click to toggle source

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

    # File lib/twilio-ruby/rest/preview/understand/assistant/field_type/field_value.rb
220 def delete
221    @version.delete('DELETE', @uri)
222 end
fetch() click to toggle source

Fetch the FieldValueInstance @return [FieldValueInstance] Fetched FieldValueInstance

    # File lib/twilio-ruby/rest/preview/understand/assistant/field_type/field_value.rb
205 def fetch
206   payload = @version.fetch('GET', @uri)
207 
208   FieldValueInstance.new(
209       @version,
210       payload,
211       assistant_sid: @solution[:assistant_sid],
212       field_type_sid: @solution[:field_type_sid],
213       sid: @solution[:sid],
214   )
215 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/preview/understand/assistant/field_type/field_value.rb
233 def inspect
234   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
235   "#<Twilio.Preview.Understand.FieldValueContext #{context}>"
236 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/preview/understand/assistant/field_type/field_value.rb
226 def to_s
227   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
228   "#<Twilio.Preview.Understand.FieldValueContext #{context}>"
229 end