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



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
288
289
290
291
292
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 257

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



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

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



298
299
300
301
302
303
304
305
306
307
308
309
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 298

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



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

def data
  @properties['data']
end

#date_createdTime



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

def date_created
  @properties['date_created']
end

#date_updatedTime



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

def date_updated
  @properties['date_updated']
end

#fetchMessageInteractionInstance

Fetch the MessageInteractionInstance



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

def fetch
  context.fetch
end

#inbound_participant_sidString



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

def inbound_participant_sid
  @properties['inbound_participant_sid']
end

#inbound_resource_sidString



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

def inbound_resource_sid
  @properties['inbound_resource_sid']
end

#inbound_resource_statusmessage_interaction.ResourceStatus



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

def inbound_resource_status
  @properties['inbound_resource_status']
end

#inbound_resource_typeString



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

def inbound_resource_type
  @properties['inbound_resource_type']
end

#inbound_resource_urlString



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

def inbound_resource_url
  @properties['inbound_resource_url']
end

#inspectObject

Provide a detailed, user friendly representation



447
448
449
450
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 447

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

#outbound_participant_sidString



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

def outbound_participant_sid
  @properties['outbound_participant_sid']
end

#outbound_resource_sidString



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

def outbound_resource_sid
  @properties['outbound_resource_sid']
end

#outbound_resource_statusmessage_interaction.ResourceStatus



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

def outbound_resource_status
  @properties['outbound_resource_status']
end

#outbound_resource_typeString



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

def outbound_resource_type
  @properties['outbound_resource_type']
end

#outbound_resource_urlString



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

def outbound_resource_url
  @properties['outbound_resource_url']
end

#participant_sidString



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

def participant_sid
  @properties['participant_sid']
end

#service_sidString



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

def service_sid
  @properties['service_sid']
end

#session_sidString



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

def session_sid
  @properties['session_sid']
end

#sidString



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

def sid
  @properties['sid']
end

#to_sObject

Provide a user friendly representation



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

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

#typemessage_interaction.Type



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

def type
  @properties['type']
end

#urlString



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

def url
  @properties['url']
end