Class: Twilio::REST::FlexApi::V1::InteractionContext::InteractionChannelContext::InteractionTransferInstance

Inherits:
InstanceResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, interaction_sid: nil, channel_sid: nil, sid: nil) ⇒ InteractionTransferInstance

Initialize the InteractionTransferInstance

Parameters:

  • version (Version) —

    Version that contains the resource

  • payload (Hash) —

    payload that contains response from Twilio

  • account_sid (String) —

    The SID of the Account that created this InteractionTransfer resource.

  • sid (String) (defaults to: nil) —

    The SID of the Call resource to fetch.



318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 318

def initialize(version, payload , interaction_sid: nil, channel_sid: nil, sid: nil)
    super(version)
    
    
    # Marshaled Properties
    @properties = { 
        'sid' => payload['sid'],
        'instance_sid' => payload['instance_sid'],
        'account_sid' => payload['account_sid'],
        'interaction_sid' => payload['interaction_sid'],
        'channel_sid' => payload['channel_sid'],
        'execution_sid' => payload['execution_sid'],
        'type' => payload['type'],
        'status' => payload['status'],
        'from' => payload['from'],
        'to' => payload['to'],
        'note_sid' => payload['note_sid'],
        'summary_sid' => payload['summary_sid'],
        '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 = { 'interaction_sid' => interaction_sid  || @properties['interaction_sid']  ,'channel_sid' => channel_sid  || @properties['channel_sid']  ,'sid' => sid  || @properties['sid']  , }
end

Instance Method Details

#account_sid ⇒ String

Returns The SID of the Account that created the Transfer.

Returns:

  • (String) —

    The SID of the Account that created the Transfer.



371
372
373
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 371

def 
    @properties['account_sid']
end

#channel_sid ⇒ String

Returns The Channel Sid for this Transfer.

Returns:

  • (String) —

    The Channel Sid for this Transfer.



383
384
385
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 383

def channel_sid
    @properties['channel_sid']
end

#context ⇒ InteractionTransferContext

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

Returns:



350
351
352
353
354
355
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 350

def context
    unless @instance_context
        @instance_context = InteractionTransferContext.new(@version , @params['interaction_sid'], @params['channel_sid'], @params['sid'])
    end
    @instance_context
end

#date_created ⇒ Time

Returns The date and time when the Transfer was created.

Returns:

  • (Time) —

    The date and time when the Transfer was created.



431
432
433
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 431

def date_created
    @properties['date_created']
end

#date_updated ⇒ Time

Returns The date and time when the Transfer was last updated.

Returns:

  • (Time) —

    The date and time when the Transfer was last updated.



437
438
439
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 437

def date_updated
    @properties['date_updated']
end

#execution_sid ⇒ String

Returns The Execution SID associated with the Transfer.

Returns:

  • (String) —

    The Execution SID associated with the Transfer.



389
390
391
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 389

def execution_sid
    @properties['execution_sid']
end

#fetch ⇒ InteractionTransferInstance

Fetch the InteractionTransferInstance

Returns:



450
451
452
453
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 450

def fetch

    context.fetch
end

#from ⇒ String

Returns The SID of the Participant initiating the Transfer.

Returns:

  • (String) —

    The SID of the Participant initiating the Transfer.



407
408
409
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 407

def from
    @properties['from']
end

#inspect ⇒ Object

Provide a detailed, user friendly representation



476
477
478
479
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 476

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

#instance_sid ⇒ String

Returns The SID of the Instance associated with the Transfer.

Returns:

  • (String) —

    The SID of the Instance associated with the Transfer.



365
366
367
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 365

def instance_sid
    @properties['instance_sid']
end

#interaction_sid ⇒ String

Returns The Interaction Sid for this channel.

Returns:

  • (String) —

    The Interaction Sid for this channel.



377
378
379
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 377

def interaction_sid
    @properties['interaction_sid']
end

#note_sid ⇒ String

Returns The SID of the Note associated with the Transfer.

Returns:

  • (String) —

    The SID of the Note associated with the Transfer.



419
420
421
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 419

def note_sid
    @properties['note_sid']
end

#sid ⇒ String

Returns The unique string created by Twilio to identify an Interaction Transfer resource.

Returns:

  • (String) —

    The unique string created by Twilio to identify an Interaction Transfer resource.



359
360
361
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 359

def sid
    @properties['sid']
end

#status ⇒ TransferStatus

Returns:

  • (TransferStatus)


401
402
403
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 401

def status
    @properties['status']
end

#summary_sid ⇒ String

Returns The SID of the Summary associated with the Transfer.

Returns:

  • (String) —

    The SID of the Summary associated with the Transfer.



425
426
427
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 425

def summary_sid
    @properties['summary_sid']
end

#to ⇒ String

Returns The SID of the Participant receiving the Transfer.

Returns:

  • (String) —

    The SID of the Participant receiving the Transfer.



413
414
415
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 413

def to
    @properties['to']
end

#to_s ⇒ Object

Provide a user friendly representation



469
470
471
472
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 469

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

#type ⇒ TransferType

Returns:

  • (TransferType)


395
396
397
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 395

def type
    @properties['type']
end

#update(body: :unset) ⇒ InteractionTransferInstance

Update the InteractionTransferInstance

Parameters:

  • body (Object) (defaults to: :unset)

Returns:



459
460
461
462
463
464
465
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 459

def update(body: :unset
)

    context.update(
        body: body, 
    )
end

#url ⇒ String

Returns:

  • (String)


443
444
445
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 443

def url
    @properties['url']
end