Class: Twilio::REST::Assistants::V1::AssistantContext::MessageInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Assistants::V1::AssistantContext::MessageInstance
- Defined in:
- lib/twilio-ruby/rest/assistants/v1/assistant/message.rb
Instance Method Summary collapse
-
#aborted ⇒ Boolean
This property will denote whether the request was aborted or not.
-
#account_sid ⇒ String
The SID of the [Account](www.twilio.com/docs/iam/api/account) that sent the Message.
-
#body ⇒ String
If successful, the body of the generated response.
-
#error ⇒ String
The error message if generation was not successful.
-
#flagged ⇒ Boolean
If successful, this property will denote whether the response was flagged or not.
-
#initialize(version, payload, id: nil) ⇒ MessageInstance
constructor
Initialize the MessageInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#session_id ⇒ String
The unique name for the session.
-
#status ⇒ String
Success or failure based on whether the request successfully generated a response.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, payload, id: nil) ⇒ MessageInstance
Initialize the MessageInstance
218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 |
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/message.rb', line 218 def initialize(version, payload , id: nil) super(version) # Marshaled Properties @properties = { 'status' => payload['status'], 'flagged' => payload['flagged'], 'aborted' => payload['aborted'], 'session_id' => payload['session_id'], 'account_sid' => payload['account_sid'], 'body' => payload['body'], 'error' => payload['error'], } end |
Instance Method Details
#aborted ⇒ Boolean
Returns This property will denote whether the request was aborted or not.
249 250 251 |
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/message.rb', line 249 def aborted @properties['aborted'] end |
#account_sid ⇒ String
Returns The SID of the [Account](www.twilio.com/docs/iam/api/account) that sent the Message.
261 262 263 |
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/message.rb', line 261 def account_sid @properties['account_sid'] end |
#body ⇒ String
Returns If successful, the body of the generated response.
267 268 269 |
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/message.rb', line 267 def body @properties['body'] end |
#error ⇒ String
Returns The error message if generation was not successful.
273 274 275 |
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/message.rb', line 273 def error @properties['error'] end |
#flagged ⇒ Boolean
Returns If successful, this property will denote whether the response was flagged or not.
243 244 245 |
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/message.rb', line 243 def flagged @properties['flagged'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
285 286 287 |
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/message.rb', line 285 def inspect "<Twilio.Assistants.V1.MessageInstance>" end |
#session_id ⇒ String
Returns The unique name for the session.
255 256 257 |
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/message.rb', line 255 def session_id @properties['session_id'] end |
#status ⇒ String
Returns success or failure based on whether the request successfully generated a response.
237 238 239 |
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/message.rb', line 237 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
279 280 281 |
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/message.rb', line 279 def to_s "<Twilio.Assistants.V1.MessageInstance>" end |