class Twilio::REST::Preview::Understand::AssistantContext::FieldTypeInstance
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 FieldTypeInstance
@param [Version] version Version
that contains the resource @param [Hash] payload payload that contains response from Twilio
@param [String] assistant_sid
The unique ID of the Assistant. @param [String] sid The sid @return [FieldTypeInstance] FieldTypeInstance
Twilio::REST::InstanceResource::new
# File lib/twilio-ruby/rest/preview/understand/assistant/field_type.rb 271 def initialize(version, payload, assistant_sid: nil, sid: nil) 272 super(version) 273 274 # Marshaled Properties 275 @properties = { 276 'account_sid' => payload['account_sid'], 277 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 278 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 279 'friendly_name' => payload['friendly_name'], 280 'links' => payload['links'], 281 'assistant_sid' => payload['assistant_sid'], 282 'sid' => payload['sid'], 283 'unique_name' => payload['unique_name'], 284 'url' => payload['url'], 285 } 286 287 # Context 288 @instance_context = nil 289 @params = {'assistant_sid' => assistant_sid, 'sid' => sid || @properties['sid'], } 290 end
Public Instance Methods
@return [String] The unique ID of the Account that created this Field Type.
# File lib/twilio-ruby/rest/preview/understand/assistant/field_type.rb 305 def account_sid 306 @properties['account_sid'] 307 end
@return [String] The unique ID of the Assistant.
# File lib/twilio-ruby/rest/preview/understand/assistant/field_type.rb 335 def assistant_sid 336 @properties['assistant_sid'] 337 end
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context @return [FieldTypeContext] FieldTypeContext
for this FieldTypeInstance
# File lib/twilio-ruby/rest/preview/understand/assistant/field_type.rb 296 def context 297 unless @instance_context 298 @instance_context = FieldTypeContext.new(@version, @params['assistant_sid'], @params['sid'], ) 299 end 300 @instance_context 301 end
@return [Time] The date that this resource was created
# File lib/twilio-ruby/rest/preview/understand/assistant/field_type.rb 311 def date_created 312 @properties['date_created'] 313 end
@return [Time] The date that this resource was last updated
# File lib/twilio-ruby/rest/preview/understand/assistant/field_type.rb 317 def date_updated 318 @properties['date_updated'] 319 end
Delete the FieldTypeInstance
@return [Boolean] true if delete succeeds, false otherwise
# File lib/twilio-ruby/rest/preview/understand/assistant/field_type.rb 378 def delete 379 context.delete 380 end
Fetch the FieldTypeInstance
@return [FieldTypeInstance] Fetched FieldTypeInstance
# File lib/twilio-ruby/rest/preview/understand/assistant/field_type.rb 360 def fetch 361 context.fetch 362 end
Access the field_values
@return [field_values] field_values
# File lib/twilio-ruby/rest/preview/understand/assistant/field_type.rb 385 def field_values 386 context.field_values 387 end
@return [String] A user-provided string that identifies this resource. It is non-unique and can up to 255 characters long.
# File lib/twilio-ruby/rest/preview/understand/assistant/field_type.rb 323 def friendly_name 324 @properties['friendly_name'] 325 end
Provide a detailed, user friendly representation
# File lib/twilio-ruby/rest/preview/understand/assistant/field_type.rb 398 def inspect 399 values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") 400 "<Twilio.Preview.Understand.FieldTypeInstance #{values}>" 401 end
@return [String] The links
# File lib/twilio-ruby/rest/preview/understand/assistant/field_type.rb 329 def links 330 @properties['links'] 331 end
@return [String] A 34 character string that uniquely identifies this resource.
# File lib/twilio-ruby/rest/preview/understand/assistant/field_type.rb 341 def sid 342 @properties['sid'] 343 end
Provide a user friendly representation
# File lib/twilio-ruby/rest/preview/understand/assistant/field_type.rb 391 def to_s 392 values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") 393 "<Twilio.Preview.Understand.FieldTypeInstance #{values}>" 394 end
@return [String] A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long.
# File lib/twilio-ruby/rest/preview/understand/assistant/field_type.rb 347 def unique_name 348 @properties['unique_name'] 349 end
Update the FieldTypeInstance
@param [String] friendly_name
A user-provided string that identifies this
resource. It is non-unique and can up to 255 characters long.
@param [String] unique_name
A user-provided string that uniquely identifies this
resource as an alternative to the sid. Unique up to 64 characters long.
@return [FieldTypeInstance] Updated FieldTypeInstance
# File lib/twilio-ruby/rest/preview/understand/assistant/field_type.rb 371 def update(friendly_name: :unset, unique_name: :unset) 372 context.update(friendly_name: friendly_name, unique_name: unique_name, ) 373 end
@return [String] The url
# File lib/twilio-ruby/rest/preview/understand/assistant/field_type.rb 353 def url 354 @properties['url'] 355 end