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.



377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 377

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_sidString

Returns The SID of the Account that created the Transfer.

Returns:

  • (String)

    The SID of the Account that created the Transfer.



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

def 
    @properties['account_sid']
end

#channel_sidString

Returns The Channel Sid for this Transfer.

Returns:

  • (String)

    The Channel Sid for this Transfer.



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

def channel_sid
    @properties['channel_sid']
end

#contextInteractionTransferContext

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

Returns:



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

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

#date_createdTime

Returns The date and time when the Transfer was created.

Returns:

  • (Time)

    The date and time when the Transfer was created.



490
491
492
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 490

def date_created
    @properties['date_created']
end

#date_updatedTime

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

Returns:

  • (Time)

    The date and time when the Transfer was last updated.



496
497
498
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 496

def date_updated
    @properties['date_updated']
end

#execution_sidString

Returns The Execution SID associated with the Transfer.

Returns:

  • (String)

    The Execution SID associated with the Transfer.



448
449
450
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 448

def execution_sid
    @properties['execution_sid']
end

#fetchInteractionTransferInstance

Fetch the InteractionTransferInstance

Returns:



509
510
511
512
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 509

def fetch

    context.fetch
end

#fromString

Returns The SID of the Participant initiating the Transfer.

Returns:

  • (String)

    The SID of the Participant initiating the Transfer.



466
467
468
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 466

def from
    @properties['from']
end

#inspectObject

Provide a detailed, user friendly representation



534
535
536
537
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 534

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

#instance_sidString

Returns The SID of the Instance associated with the Transfer.

Returns:

  • (String)

    The SID of the Instance associated with the Transfer.



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

def instance_sid
    @properties['instance_sid']
end

#interaction_sidString

Returns The Interaction Sid for this channel.

Returns:

  • (String)

    The Interaction Sid for this channel.



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

def interaction_sid
    @properties['interaction_sid']
end

#note_sidString

Returns The SID of the Note associated with the Transfer.

Returns:

  • (String)

    The SID of the Note associated with the Transfer.



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

def note_sid
    @properties['note_sid']
end

#sidString

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.



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

def sid
    @properties['sid']
end

#statusTransferStatus

Returns:

  • (TransferStatus)


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

def status
    @properties['status']
end

#summary_sidString

Returns The SID of the Summary associated with the Transfer.

Returns:

  • (String)

    The SID of the Summary associated with the Transfer.



484
485
486
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 484

def summary_sid
    @properties['summary_sid']
end

#toString

Returns The SID of the Participant receiving the Transfer.

Returns:

  • (String)

    The SID of the Participant receiving the Transfer.



472
473
474
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 472

def to
    @properties['to']
end

#to_sObject

Provide a user friendly representation



527
528
529
530
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 527

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

#typeTransferType

Returns:

  • (TransferType)


454
455
456
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 454

def type
    @properties['type']
end

#update(body: :unset) ⇒ InteractionTransferInstance

Update the InteractionTransferInstance

Parameters:

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

Returns:



518
519
520
521
522
523
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 518

def update(body: :unset
)

    context.update(
    )
end

#urlString

Returns:

  • (String)


502
503
504
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 502

def url
    @properties['url']
end