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
129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/message.rb', line 129 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.
159 160 161 |
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/message.rb', line 159 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.
171 172 173 |
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/message.rb', line 171 def account_sid @properties['account_sid'] end |
#body ⇒ String
Returns If successful, the body of the generated response.
177 178 179 |
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/message.rb', line 177 def body @properties['body'] end |
#error ⇒ String
Returns The error message if generation was not successful.
183 184 185 |
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/message.rb', line 183 def error @properties['error'] end |
#flagged ⇒ Boolean
Returns If successful, this property will denote whether the response was flagged or not.
153 154 155 |
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/message.rb', line 153 def flagged @properties['flagged'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
195 196 197 |
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/message.rb', line 195 def inspect "<Twilio.Assistants.V1.MessageInstance>" end |
#session_id ⇒ String
Returns The unique name for the session.
165 166 167 |
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/message.rb', line 165 def session_id @properties['session_id'] end |
#status ⇒ String
Returns success or failure based on whether the request successfully generated a response.
147 148 149 |
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/message.rb', line 147 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
189 190 191 |
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/message.rb', line 189 def to_s "<Twilio.Assistants.V1.MessageInstance>" end |