Class: Twilio::REST::Preview::Understand::AssistantContext::IntentContext::IntentActionsInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Preview::Understand::AssistantContext::IntentContext::IntentActionsInstance
- Defined in:
- lib/twilio-ruby/rest/preview/understand/assistant/intent/intent_actions.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
-
#account_sid ⇒ String
The unique ID of the Account that created this Field.
-
#assistant_sid ⇒ String
The unique ID of the parent Assistant.
-
#context ⇒ IntentActionsContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#data ⇒ Hash
The data.
-
#fetch ⇒ IntentActionsInstance
Fetch a IntentActionsInstance.
-
#initialize(version, payload, assistant_sid: nil, intent_sid: nil) ⇒ IntentActionsInstance
constructor
Initialize the IntentActionsInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#intent_sid ⇒ String
The unique ID of the Intent.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(actions: :unset) ⇒ IntentActionsInstance
Update the IntentActionsInstance.
-
#url ⇒ String
The url.
Constructor Details
#initialize(version, payload, assistant_sid: nil, intent_sid: nil) ⇒ IntentActionsInstance
Initialize the IntentActionsInstance
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/intent/intent_actions.rb', line 151 def initialize(version, payload, assistant_sid: nil, intent_sid: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'assistant_sid' => payload['assistant_sid'], 'intent_sid' => payload['intent_sid'], 'url' => payload['url'], 'data' => payload['data'], } # Context @instance_context = nil @params = {'assistant_sid' => assistant_sid, 'intent_sid' => intent_sid, } end |
Instance Method Details
#account_sid ⇒ String
Returns The unique ID of the Account that created this Field.
185 186 187 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/intent/intent_actions.rb', line 185 def account_sid @properties['account_sid'] end |
#assistant_sid ⇒ String
Returns The unique ID of the parent Assistant.
191 192 193 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/intent/intent_actions.rb', line 191 def assistant_sid @properties['assistant_sid'] end |
#context ⇒ IntentActionsContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
172 173 174 175 176 177 178 179 180 181 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/intent/intent_actions.rb', line 172 def context unless @instance_context @instance_context = IntentActionsContext.new( @version, @params['assistant_sid'], @params['intent_sid'], ) end @instance_context end |
#data ⇒ Hash
Returns The data.
209 210 211 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/intent/intent_actions.rb', line 209 def data @properties['data'] end |
#fetch ⇒ IntentActionsInstance
Fetch a IntentActionsInstance
216 217 218 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/intent/intent_actions.rb', line 216 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
238 239 240 241 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/intent/intent_actions.rb', line 238 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.Understand.IntentActionsInstance #{values}>" end |
#intent_sid ⇒ String
Returns The unique ID of the Intent.
197 198 199 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/intent/intent_actions.rb', line 197 def intent_sid @properties['intent_sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
231 232 233 234 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/intent/intent_actions.rb', line 231 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.Understand.IntentActionsInstance #{values}>" end |
#update(actions: :unset) ⇒ IntentActionsInstance
Update the IntentActionsInstance
225 226 227 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/intent/intent_actions.rb', line 225 def update(actions: :unset) context.update(actions: actions, ) end |
#url ⇒ String
Returns The url.
203 204 205 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/intent/intent_actions.rb', line 203 def url @properties['url'] end |