class Twilio::REST::Autopilot::V1::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
Initialize the FieldValueContext
@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 FieldType associated with the resource to fetch.
@param [String] field_type_sid The SID of the Field Type associated with the
Field Value to fetch.
@param [String] sid The Twilio-provided string that uniquely identifies the
FieldValue resource to fetch.
@return [FieldValueContext] FieldValueContext
Twilio::REST::InstanceContext::new
# File lib/twilio-ruby/rest/autopilot/v1/assistant/field_type/field_value.rb 204 def initialize(version, assistant_sid, field_type_sid, sid) 205 super(version) 206 207 # Path Solution 208 @solution = {assistant_sid: assistant_sid, field_type_sid: field_type_sid, sid: sid, } 209 @uri = "/Assistants/#{@solution[:assistant_sid]}/FieldTypes/#{@solution[:field_type_sid]}/FieldValues/#{@solution[:sid]}" 210 end
Public Instance Methods
Delete the FieldValueInstance
@return [Boolean] true if delete succeeds, false otherwise
# File lib/twilio-ruby/rest/autopilot/v1/assistant/field_type/field_value.rb 230 def delete 231 @version.delete('DELETE', @uri) 232 end
Fetch the FieldValueInstance
@return [FieldValueInstance] Fetched FieldValueInstance
# File lib/twilio-ruby/rest/autopilot/v1/assistant/field_type/field_value.rb 215 def fetch 216 payload = @version.fetch('GET', @uri) 217 218 FieldValueInstance.new( 219 @version, 220 payload, 221 assistant_sid: @solution[:assistant_sid], 222 field_type_sid: @solution[:field_type_sid], 223 sid: @solution[:sid], 224 ) 225 end
Provide a detailed, user friendly representation
# File lib/twilio-ruby/rest/autopilot/v1/assistant/field_type/field_value.rb 243 def inspect 244 context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') 245 "#<Twilio.Autopilot.V1.FieldValueContext #{context}>" 246 end
Provide a user friendly representation
# File lib/twilio-ruby/rest/autopilot/v1/assistant/field_type/field_value.rb 236 def to_s 237 context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') 238 "#<Twilio.Autopilot.V1.FieldValueContext #{context}>" 239 end