class Twilio::REST::Proxy::V1::ServiceContext::SessionContext::ParticipantContext::MessageInteractionInstance

PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.

Public Class Methods

new(version, payload, service_sid: nil, session_sid: nil, participant_sid: nil, sid: nil) click to toggle source

Initialize the MessageInteractionInstance @param [Version] version Version that contains the resource @param [Hash] payload payload that contains response from Twilio @param [String] service_sid The SID of the parent

{Service}[https://www.twilio.com/docs/proxy/api/service] resource.

@param [String] session_sid The SID of the parent

{Session}[https://www.twilio.com/docs/proxy/api/session] resource.

@param [String] participant_sid The SID of the

{Participant}[https://www.twilio.com/docs/proxy/api/participant] resource.

@param [String] sid The Twilio-provided string that uniquely identifies the

MessageInteraction resource to fetch.

@return [MessageInteractionInstance] MessageInteractionInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb
257 def initialize(version, payload, service_sid: nil, session_sid: nil, participant_sid: nil, sid: nil)
258   super(version)
259 
260   # Marshaled Properties
261   @properties = {
262       'sid' => payload['sid'],
263       'session_sid' => payload['session_sid'],
264       'service_sid' => payload['service_sid'],
265       'account_sid' => payload['account_sid'],
266       'data' => payload['data'],
267       'type' => payload['type'],
268       'participant_sid' => payload['participant_sid'],
269       'inbound_participant_sid' => payload['inbound_participant_sid'],
270       'inbound_resource_sid' => payload['inbound_resource_sid'],
271       'inbound_resource_status' => payload['inbound_resource_status'],
272       'inbound_resource_type' => payload['inbound_resource_type'],
273       'inbound_resource_url' => payload['inbound_resource_url'],
274       'outbound_participant_sid' => payload['outbound_participant_sid'],
275       'outbound_resource_sid' => payload['outbound_resource_sid'],
276       'outbound_resource_status' => payload['outbound_resource_status'],
277       'outbound_resource_type' => payload['outbound_resource_type'],
278       'outbound_resource_url' => payload['outbound_resource_url'],
279       'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
280       'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
281       'url' => payload['url'],
282   }
283 
284   # Context
285   @instance_context = nil
286   @params = {
287       'service_sid' => service_sid,
288       'session_sid' => session_sid,
289       'participant_sid' => participant_sid,
290       'sid' => sid || @properties['sid'],
291   }
292 end

Public Instance Methods

account_sid() click to toggle source

@return [String] The SID of the Account that created the resource

    # File lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb
331 def account_sid
332   @properties['account_sid']
333 end
context() click to toggle source

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context @return [MessageInteractionContext] MessageInteractionContext for this MessageInteractionInstance

    # File lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb
298 def context
299   unless @instance_context
300     @instance_context = MessageInteractionContext.new(
301         @version,
302         @params['service_sid'],
303         @params['session_sid'],
304         @params['participant_sid'],
305         @params['sid'],
306     )
307   end
308   @instance_context
309 end
data() click to toggle source

@return [String] A JSON string that includes the message body sent to the participant

    # File lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb
337 def data
338   @properties['data']
339 end
date_created() click to toggle source

@return [Time] The ISO 8601 date and time in GMT when the resource was created

    # File lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb
415 def date_created
416   @properties['date_created']
417 end
date_updated() click to toggle source

@return [Time] The ISO 8601 date and time in GMT when the resource was last updated

    # File lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb
421 def date_updated
422   @properties['date_updated']
423 end
fetch() click to toggle source

Fetch the MessageInteractionInstance @return [MessageInteractionInstance] Fetched MessageInteractionInstance

    # File lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb
434 def fetch
435   context.fetch
436 end
inbound_participant_sid() click to toggle source

@return [String] Always empty for Message Interactions

    # File lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb
355 def inbound_participant_sid
356   @properties['inbound_participant_sid']
357 end
inbound_resource_sid() click to toggle source

@return [String] Always empty for Message Interactions

    # File lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb
361 def inbound_resource_sid
362   @properties['inbound_resource_sid']
363 end
inbound_resource_status() click to toggle source

@return [message_interaction.ResourceStatus] Always empty for Message Interactions

    # File lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb
367 def inbound_resource_status
368   @properties['inbound_resource_status']
369 end
inbound_resource_type() click to toggle source

@return [String] Always empty for Message Interactions

    # File lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb
373 def inbound_resource_type
374   @properties['inbound_resource_type']
375 end
inbound_resource_url() click to toggle source

@return [String] Always empty for Message Interactions

    # File lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb
379 def inbound_resource_url
380   @properties['inbound_resource_url']
381 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb
447 def inspect
448   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
449   "<Twilio.Proxy.V1.MessageInteractionInstance #{values}>"
450 end
outbound_participant_sid() click to toggle source

@return [String] The SID of the outbound Participant resource

    # File lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb
385 def outbound_participant_sid
386   @properties['outbound_participant_sid']
387 end
outbound_resource_sid() click to toggle source

@return [String] The SID of the outbound Message resource

    # File lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb
391 def outbound_resource_sid
392   @properties['outbound_resource_sid']
393 end
outbound_resource_status() click to toggle source

@return [message_interaction.ResourceStatus] The outbound resource status

    # File lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb
397 def outbound_resource_status
398   @properties['outbound_resource_status']
399 end
outbound_resource_type() click to toggle source

@return [String] The outbound resource type

    # File lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb
403 def outbound_resource_type
404   @properties['outbound_resource_type']
405 end
outbound_resource_url() click to toggle source

@return [String] The URL of the Twilio message resource

    # File lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb
409 def outbound_resource_url
410   @properties['outbound_resource_url']
411 end
participant_sid() click to toggle source

@return [String] The SID of the Participant resource

    # File lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb
349 def participant_sid
350   @properties['participant_sid']
351 end
service_sid() click to toggle source

@return [String] The SID of the resource's parent Service

    # File lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb
325 def service_sid
326   @properties['service_sid']
327 end
session_sid() click to toggle source

@return [String] The SID of the resource's parent Session

    # File lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb
319 def session_sid
320   @properties['session_sid']
321 end
sid() click to toggle source

@return [String] The unique string that identifies the resource

    # File lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb
313 def sid
314   @properties['sid']
315 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb
440 def to_s
441   values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
442   "<Twilio.Proxy.V1.MessageInteractionInstance #{values}>"
443 end
type() click to toggle source

@return [message_interaction.Type] The Type of Message Interaction

    # File lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb
343 def type
344   @properties['type']
345 end
url() click to toggle source

@return [String] The absolute URL of the MessageInteraction resource

    # File lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb
427 def url
428   @properties['url']
429 end