Class: Twilio::REST::Assistants::V1::Session::MessageInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Assistants::V1::Session::MessageInstance
- Defined in:
- lib/twilio-ruby/rest/assistants/v1/session/message.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the Message resource.
-
#assistant_id ⇒ String
The Assistant ID.
-
#content ⇒ Hash
The content of the message.
-
#date_created ⇒ Time
The date and time in GMT when the Message was created specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
-
#date_updated ⇒ Time
The date and time in GMT when the Message was last updated specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
-
#id ⇒ String
The message ID.
-
#identity ⇒ String
The identity of the user.
-
#initialize(version, payload, session_id: nil) ⇒ MessageInstance
constructor
Initialize the MessageInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#meta ⇒ Hash
The metadata of the message.
-
#role ⇒ String
The role of the user associated with the message.
-
#session_id ⇒ String
The Session ID.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, payload, session_id: nil) ⇒ MessageInstance
Initialize the MessageInstance
261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 |
# File 'lib/twilio-ruby/rest/assistants/v1/session/message.rb', line 261 def initialize(version, payload , session_id: nil) super(version) # Marshaled Properties @properties = { 'id' => payload['id'], 'account_sid' => payload['account_sid'], 'assistant_id' => payload['assistant_id'], 'session_id' => payload['session_id'], 'identity' => payload['identity'], 'role' => payload['role'], 'content' => payload['content'], 'meta' => payload['meta'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), } end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the Message resource.
289 290 291 |
# File 'lib/twilio-ruby/rest/assistants/v1/session/message.rb', line 289 def account_sid @properties['account_sid'] end |
#assistant_id ⇒ String
Returns The Assistant ID.
295 296 297 |
# File 'lib/twilio-ruby/rest/assistants/v1/session/message.rb', line 295 def assistant_id @properties['assistant_id'] end |
#content ⇒ Hash
Returns The content of the message.
319 320 321 |
# File 'lib/twilio-ruby/rest/assistants/v1/session/message.rb', line 319 def content @properties['content'] end |
#date_created ⇒ Time
Returns The date and time in GMT when the Message was created specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
331 332 333 |
# File 'lib/twilio-ruby/rest/assistants/v1/session/message.rb', line 331 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date and time in GMT when the Message was last updated specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
337 338 339 |
# File 'lib/twilio-ruby/rest/assistants/v1/session/message.rb', line 337 def date_updated @properties['date_updated'] end |
#id ⇒ String
Returns The message ID.
283 284 285 |
# File 'lib/twilio-ruby/rest/assistants/v1/session/message.rb', line 283 def id @properties['id'] end |
#identity ⇒ String
Returns The identity of the user.
307 308 309 |
# File 'lib/twilio-ruby/rest/assistants/v1/session/message.rb', line 307 def identity @properties['identity'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
349 350 351 |
# File 'lib/twilio-ruby/rest/assistants/v1/session/message.rb', line 349 def inspect "<Twilio.Assistants.V1.MessageInstance>" end |
#meta ⇒ Hash
Returns The metadata of the message.
325 326 327 |
# File 'lib/twilio-ruby/rest/assistants/v1/session/message.rb', line 325 def @properties['meta'] end |
#role ⇒ String
Returns The role of the user associated with the message.
313 314 315 |
# File 'lib/twilio-ruby/rest/assistants/v1/session/message.rb', line 313 def role @properties['role'] end |
#session_id ⇒ String
Returns The Session ID.
301 302 303 |
# File 'lib/twilio-ruby/rest/assistants/v1/session/message.rb', line 301 def session_id @properties['session_id'] end |
#to_s ⇒ Object
Provide a user friendly representation
343 344 345 |
# File 'lib/twilio-ruby/rest/assistants/v1/session/message.rb', line 343 def to_s "<Twilio.Assistants.V1.MessageInstance>" end |