Class: Twilio::REST::Preview::Understand::AssistantContext::FieldTypeContext::FieldValueContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Preview::Understand::AssistantContext::FieldTypeContext::FieldValueContext
- Defined in:
- lib/twilio-ruby/rest/preview/understand/assistant/field_type/field_value.rb
Overview
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 [email protected].
Instance Method Summary collapse
-
#delete ⇒ Boolean
Delete the FieldValueInstance.
-
#fetch ⇒ FieldValueInstance
Fetch the FieldValueInstance.
-
#initialize(version, assistant_sid, field_type_sid, sid) ⇒ FieldValueContext
constructor
Initialize the FieldValueContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, assistant_sid, field_type_sid, sid) ⇒ FieldValueContext
Initialize the FieldValueContext
172 173 174 175 176 177 178 179 180 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/field_type/field_value.rb', line 172 def initialize(version, assistant_sid, field_type_sid, sid) super(version) # Path Solution @solution = { assistant_sid: assistant_sid, field_type_sid: field_type_sid, sid: sid, } @uri = "/Assistants/#{@solution[:assistant_sid]}/FieldTypes/#{@solution[:field_type_sid]}/FieldValues/#{@solution[:sid]}" end |
Instance Method Details
#delete ⇒ Boolean
Delete the FieldValueInstance
184 185 186 187 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/field_type/field_value.rb', line 184 def delete @version.delete('DELETE', @uri) end |
#fetch ⇒ FieldValueInstance
Fetch the FieldValueInstance
192 193 194 195 196 197 198 199 200 201 202 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/field_type/field_value.rb', line 192 def fetch payload = @version.fetch('GET', @uri) FieldValueInstance.new( @version, payload, assistant_sid: @solution[:assistant_sid], field_type_sid: @solution[:field_type_sid], sid: @solution[:sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
214 215 216 217 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/field_type/field_value.rb', line 214 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Preview.Understand.FieldValueContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
207 208 209 210 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/field_type/field_value.rb', line 207 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Preview.Understand.FieldValueContext #{context}>" end |