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

Inherits:
InstanceResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb

Overview

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

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, service_sid: nil, session_sid: nil, participant_sid: nil, sid: nil) ⇒ MessageInteractionInstance

Initialize the MessageInteractionInstance

Parameters:

  • version (Version)

    Version that contains the resource

  • payload (Hash)

    payload that contains response from Twilio

  • service_sid (String) (defaults to: nil)

    The unique SID identifier of the Service.

  • session_sid (String) (defaults to: nil)

    The unique SID identifier of the Session.

  • participant_sid (String) (defaults to: nil)

    The unique SID identifier of the Participant.

  • sid (String) (defaults to: nil)

    A 34 character string that uniquely identifies this Message Interaction.



250
251
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
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 250

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'],
      'type' => payload['type'],
      '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_sidString

Returns Account Sid.

Returns:

  • (String)

    Account Sid.



324
325
326
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 324

def 
  @properties['account_sid']
end

#contextMessageInteractionContext

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context

Returns:



291
292
293
294
295
296
297
298
299
300
301
302
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 291

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

#dataString

Returns Further details about an interaction.

Returns:

  • (String)

    Further details about an interaction.



330
331
332
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 330

def data
  @properties['data']
end

#date_createdTime

Returns The date this Message Interaction was created.

Returns:

  • (Time)

    The date this Message Interaction was created



408
409
410
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 408

def date_created
  @properties['date_created']
end

#date_updatedTime

Returns The date this Message Interaction was updated.

Returns:

  • (Time)

    The date this Message Interaction was updated



414
415
416
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 414

def date_updated
  @properties['date_updated']
end

#fetchMessageInteractionInstance

Fetch a MessageInteractionInstance

Returns:



427
428
429
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 427

def fetch
  context.fetch
end

#inbound_participant_sidString

Returns Inbound Participant Sid.

Returns:

  • (String)

    Inbound Participant Sid.



348
349
350
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 348

def inbound_participant_sid
  @properties['inbound_participant_sid']
end

#inbound_resource_sidString

Returns Inbound Resource Sid.

Returns:

  • (String)

    Inbound Resource Sid.



354
355
356
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 354

def inbound_resource_sid
  @properties['inbound_resource_sid']
end

#inbound_resource_statusmessage_interaction.ResourceStatus

Returns The Inbound Resource Status of this Message Interaction.

Returns:

  • (message_interaction.ResourceStatus)

    The Inbound Resource Status of this Message Interaction



360
361
362
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 360

def inbound_resource_status
  @properties['inbound_resource_status']
end

#inbound_resource_typeString

Returns The type of the Inbound Resource, Call or Message.

Returns:

  • (String)

    The type of the Inbound Resource, Call or Message.



366
367
368
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 366

def inbound_resource_type
  @properties['inbound_resource_type']
end

#inbound_resource_urlString

Returns The URL of the Twilio resource.

Returns:

  • (String)

    The URL of the Twilio resource.



372
373
374
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 372

def inbound_resource_url
  @properties['inbound_resource_url']
end

#inspectObject

Provide a detailed, user friendly representation



440
441
442
443
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 440

def inspect
  values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
  "<Twilio.Proxy.V1.MessageInteractionInstance #{values}>"
end

#outbound_participant_sidString

Returns Outbound Participant Sid.

Returns:

  • (String)

    Outbound Participant Sid.



378
379
380
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 378

def outbound_participant_sid
  @properties['outbound_participant_sid']
end

#outbound_resource_sidString

Returns Outbound Resource Sid.

Returns:

  • (String)

    Outbound Resource Sid.



384
385
386
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 384

def outbound_resource_sid
  @properties['outbound_resource_sid']
end

#outbound_resource_statusmessage_interaction.ResourceStatus

Returns The Outbound Resource Status of this Message Interaction.

Returns:

  • (message_interaction.ResourceStatus)

    The Outbound Resource Status of this Message Interaction



390
391
392
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 390

def outbound_resource_status
  @properties['outbound_resource_status']
end

#outbound_resource_typeString

Returns The type of the Outbound Resource, Call or Message.

Returns:

  • (String)

    The type of the Outbound Resource, Call or Message.



396
397
398
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 396

def outbound_resource_type
  @properties['outbound_resource_type']
end

#outbound_resource_urlString

Returns The URL of the Twilio resource.

Returns:

  • (String)

    The URL of the Twilio resource.



402
403
404
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 402

def outbound_resource_url
  @properties['outbound_resource_url']
end

#participant_sidString

Returns Participant Sid.

Returns:

  • (String)

    Participant Sid.



342
343
344
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 342

def participant_sid
  @properties['participant_sid']
end

#service_sidString

Returns Service Sid.

Returns:

  • (String)

    Service Sid.



318
319
320
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 318

def service_sid
  @properties['service_sid']
end

#session_sidString

Returns Session Sid.

Returns:

  • (String)

    Session Sid.



312
313
314
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 312

def session_sid
  @properties['session_sid']
end

#sidString

Returns A string that uniquely identifies this Message Interaction.

Returns:

  • (String)

    A string that uniquely identifies this Message Interaction.



306
307
308
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 306

def sid
  @properties['sid']
end

#to_sObject

Provide a user friendly representation



433
434
435
436
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 433

def to_s
  values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
  "<Twilio.Proxy.V1.MessageInteractionInstance #{values}>"
end

#typemessage_interaction.Type

Returns The Type of this Message Interaction.

Returns:

  • (message_interaction.Type)

    The Type of this Message Interaction



336
337
338
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 336

def type
  @properties['type']
end

#urlString

Returns The URL of this resource.

Returns:

  • (String)

    The URL of this resource.



420
421
422
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 420

def url
  @properties['url']
end