Class: Twilio::REST::Preview::Understand::AssistantContext::ModelBuildContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Preview::Understand::AssistantContext::ModelBuildContext
- Defined in:
- lib/twilio-ruby/rest/preview/understand/assistant/model_build.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 ModelBuildInstance.
-
#fetch ⇒ ModelBuildInstance
Fetch the ModelBuildInstance.
-
#initialize(version, assistant_sid, sid) ⇒ ModelBuildContext
constructor
Initialize the ModelBuildContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(unique_name: :unset) ⇒ ModelBuildInstance
Update the ModelBuildInstance.
Constructor Details
#initialize(version, assistant_sid, sid) ⇒ ModelBuildContext
Initialize the ModelBuildContext
172 173 174 175 176 177 178 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/model_build.rb', line 172 def initialize(version, assistant_sid, sid) super(version) # Path Solution @solution = {assistant_sid: assistant_sid, sid: sid, } @uri = "/Assistants/#{@solution[:assistant_sid]}/ModelBuilds/#{@solution[:sid]}" end |
Instance Method Details
#delete ⇒ Boolean
Delete the ModelBuildInstance
216 217 218 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/model_build.rb', line 216 def delete @version.delete('DELETE', @uri) end |
#fetch ⇒ ModelBuildInstance
Fetch the ModelBuildInstance
183 184 185 186 187 188 189 190 191 192 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/model_build.rb', line 183 def fetch payload = @version.fetch('GET', @uri) ModelBuildInstance.new( @version, payload, assistant_sid: @solution[:assistant_sid], sid: @solution[:sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
229 230 231 232 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/model_build.rb', line 229 def inspect context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Preview.Understand.ModelBuildContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
222 223 224 225 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/model_build.rb', line 222 def to_s context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Preview.Understand.ModelBuildContext #{context}>" end |
#update(unique_name: :unset) ⇒ ModelBuildInstance
Update the ModelBuildInstance
200 201 202 203 204 205 206 207 208 209 210 211 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/model_build.rb', line 200 def update(unique_name: :unset) data = Twilio::Values.of({'UniqueName' => unique_name, }) payload = @version.update('POST', @uri, data: data) ModelBuildInstance.new( @version, payload, assistant_sid: @solution[:assistant_sid], sid: @solution[:sid], ) end |