Class: Twilio::REST::Preview::Proxy::ServiceContext::SessionContext::ParticipantContext::MessageInteractionInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Preview::Proxy::ServiceContext::SessionContext::ParticipantContext::MessageInteractionInstance
- Defined in:
- lib/twilio-ruby/rest/preview/proxy/service/session/participant/message_interaction.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
Account Sid.
-
#context ⇒ MessageInteractionContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#data ⇒ String
What happened in this Interaction.
-
#date_created ⇒ Time
The date this Interaction was created.
-
#date_updated ⇒ Time
The date this Interaction was updated.
-
#fetch ⇒ MessageInteractionInstance
Fetch a MessageInteractionInstance.
-
#inbound_participant_sid ⇒ String
The inbound_participant_sid.
-
#inbound_resource_sid ⇒ String
The SID of the inbound resource.
-
#inbound_resource_status ⇒ message_interaction.ResourceStatus
The Inbound Resource Status of this Interaction.
-
#inbound_resource_type ⇒ String
The Twilio object type of the inbound resource.
-
#inbound_resource_url ⇒ String
The URL of the inbound resource.
-
#initialize(version, payload, service_sid: nil, session_sid: nil, participant_sid: nil, sid: nil) ⇒ MessageInteractionInstance
constructor
Initialize the MessageInteractionInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#outbound_participant_sid ⇒ String
The outbound_participant_sid.
-
#outbound_resource_sid ⇒ String
The SID of the outbound resource.
-
#outbound_resource_status ⇒ message_interaction.ResourceStatus
The Outbound Resource Status of this Interaction.
-
#outbound_resource_type ⇒ String
The Twilio object type of the outbound resource.
-
#outbound_resource_url ⇒ String
The URL of the outbound resource.
-
#participant_sid ⇒ String
The participant_sid.
-
#service_sid ⇒ String
Service Sid.
-
#session_sid ⇒ String
Session Sid.
-
#sid ⇒ String
A string that uniquely identifies this Interaction.
-
#status ⇒ message_interaction.Status
The Status of this Interaction.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#url ⇒ String
The URL of this Interaction.
Constructor Details
#initialize(version, payload, service_sid: nil, session_sid: nil, participant_sid: nil, sid: nil) ⇒ MessageInteractionInstance
Initialize the MessageInteractionInstance
252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 |
# File 'lib/twilio-ruby/rest/preview/proxy/service/session/participant/message_interaction.rb', line 252 def initialize(version, payload, service_sid: nil, session_sid: nil, participant_sid: nil, sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'session_sid' => payload['session_sid'], 'service_sid' => payload['service_sid'], 'account_sid' => payload['account_sid'], 'data' => payload['data'], 'status' => payload['status'], 'participant_sid' => payload['participant_sid'], 'inbound_participant_sid' => payload['inbound_participant_sid'], 'inbound_resource_sid' => payload['inbound_resource_sid'], 'inbound_resource_status' => payload['inbound_resource_status'], 'inbound_resource_type' => payload['inbound_resource_type'], 'inbound_resource_url' => payload['inbound_resource_url'], 'outbound_participant_sid' => payload['outbound_participant_sid'], 'outbound_resource_sid' => payload['outbound_resource_sid'], 'outbound_resource_status' => payload['outbound_resource_status'], 'outbound_resource_type' => payload['outbound_resource_type'], 'outbound_resource_url' => payload['outbound_resource_url'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 'url' => payload['url'], } # Context @instance_context = nil @params = { 'service_sid' => service_sid, 'session_sid' => session_sid, 'participant_sid' => participant_sid, 'sid' => sid || @properties['sid'], } end |
Instance Method Details
#account_sid ⇒ String
Returns Account Sid.
326 327 328 |
# File 'lib/twilio-ruby/rest/preview/proxy/service/session/participant/message_interaction.rb', line 326 def account_sid @properties['account_sid'] end |
#context ⇒ MessageInteractionContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
293 294 295 296 297 298 299 300 301 302 303 304 |
# File 'lib/twilio-ruby/rest/preview/proxy/service/session/participant/message_interaction.rb', line 293 def context unless @instance_context @instance_context = MessageInteractionContext.new( @version, @params['service_sid'], @params['session_sid'], @params['participant_sid'], @params['sid'], ) end @instance_context end |
#data ⇒ String
Returns What happened in this Interaction.
332 333 334 |
# File 'lib/twilio-ruby/rest/preview/proxy/service/session/participant/message_interaction.rb', line 332 def data @properties['data'] end |
#date_created ⇒ Time
Returns The date this Interaction was created.
410 411 412 |
# File 'lib/twilio-ruby/rest/preview/proxy/service/session/participant/message_interaction.rb', line 410 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date this Interaction was updated.
416 417 418 |
# File 'lib/twilio-ruby/rest/preview/proxy/service/session/participant/message_interaction.rb', line 416 def date_updated @properties['date_updated'] end |
#fetch ⇒ MessageInteractionInstance
Fetch a MessageInteractionInstance
429 430 431 |
# File 'lib/twilio-ruby/rest/preview/proxy/service/session/participant/message_interaction.rb', line 429 def fetch context.fetch end |
#inbound_participant_sid ⇒ String
Returns The inbound_participant_sid.
350 351 352 |
# File 'lib/twilio-ruby/rest/preview/proxy/service/session/participant/message_interaction.rb', line 350 def inbound_participant_sid @properties['inbound_participant_sid'] end |
#inbound_resource_sid ⇒ String
Returns The SID of the inbound resource.
356 357 358 |
# File 'lib/twilio-ruby/rest/preview/proxy/service/session/participant/message_interaction.rb', line 356 def inbound_resource_sid @properties['inbound_resource_sid'] end |
#inbound_resource_status ⇒ message_interaction.ResourceStatus
Returns The Inbound Resource Status of this Interaction.
362 363 364 |
# File 'lib/twilio-ruby/rest/preview/proxy/service/session/participant/message_interaction.rb', line 362 def inbound_resource_status @properties['inbound_resource_status'] end |
#inbound_resource_type ⇒ String
Returns The Twilio object type of the inbound resource.
368 369 370 |
# File 'lib/twilio-ruby/rest/preview/proxy/service/session/participant/message_interaction.rb', line 368 def inbound_resource_type @properties['inbound_resource_type'] end |
#inbound_resource_url ⇒ String
Returns The URL of the inbound resource.
374 375 376 |
# File 'lib/twilio-ruby/rest/preview/proxy/service/session/participant/message_interaction.rb', line 374 def inbound_resource_url @properties['inbound_resource_url'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
442 443 444 445 |
# File 'lib/twilio-ruby/rest/preview/proxy/service/session/participant/message_interaction.rb', line 442 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.Proxy.MessageInteractionInstance #{values}>" end |
#outbound_participant_sid ⇒ String
Returns The outbound_participant_sid.
380 381 382 |
# File 'lib/twilio-ruby/rest/preview/proxy/service/session/participant/message_interaction.rb', line 380 def outbound_participant_sid @properties['outbound_participant_sid'] end |
#outbound_resource_sid ⇒ String
Returns The SID of the outbound resource.
386 387 388 |
# File 'lib/twilio-ruby/rest/preview/proxy/service/session/participant/message_interaction.rb', line 386 def outbound_resource_sid @properties['outbound_resource_sid'] end |
#outbound_resource_status ⇒ message_interaction.ResourceStatus
Returns The Outbound Resource Status of this Interaction.
392 393 394 |
# File 'lib/twilio-ruby/rest/preview/proxy/service/session/participant/message_interaction.rb', line 392 def outbound_resource_status @properties['outbound_resource_status'] end |
#outbound_resource_type ⇒ String
Returns The Twilio object type of the outbound resource.
398 399 400 |
# File 'lib/twilio-ruby/rest/preview/proxy/service/session/participant/message_interaction.rb', line 398 def outbound_resource_type @properties['outbound_resource_type'] end |
#outbound_resource_url ⇒ String
Returns The URL of the outbound resource.
404 405 406 |
# File 'lib/twilio-ruby/rest/preview/proxy/service/session/participant/message_interaction.rb', line 404 def outbound_resource_url @properties['outbound_resource_url'] end |
#participant_sid ⇒ String
Returns The participant_sid.
344 345 346 |
# File 'lib/twilio-ruby/rest/preview/proxy/service/session/participant/message_interaction.rb', line 344 def participant_sid @properties['participant_sid'] end |
#service_sid ⇒ String
Returns Service Sid.
320 321 322 |
# File 'lib/twilio-ruby/rest/preview/proxy/service/session/participant/message_interaction.rb', line 320 def service_sid @properties['service_sid'] end |
#session_sid ⇒ String
Returns Session Sid.
314 315 316 |
# File 'lib/twilio-ruby/rest/preview/proxy/service/session/participant/message_interaction.rb', line 314 def session_sid @properties['session_sid'] end |
#sid ⇒ String
Returns A string that uniquely identifies this Interaction.
308 309 310 |
# File 'lib/twilio-ruby/rest/preview/proxy/service/session/participant/message_interaction.rb', line 308 def sid @properties['sid'] end |
#status ⇒ message_interaction.Status
Returns The Status of this Interaction.
338 339 340 |
# File 'lib/twilio-ruby/rest/preview/proxy/service/session/participant/message_interaction.rb', line 338 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
435 436 437 438 |
# File 'lib/twilio-ruby/rest/preview/proxy/service/session/participant/message_interaction.rb', line 435 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.Proxy.MessageInteractionInstance #{values}>" end |
#url ⇒ String
Returns The URL of this Interaction.
422 423 424 |
# File 'lib/twilio-ruby/rest/preview/proxy/service/session/participant/message_interaction.rb', line 422 def url @properties['url'] end |