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.



183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 183

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.



235
236
237
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 235

def 
    @properties['account_sid']
end

#channel_sidString

Returns The Channel Sid for this Transfer.

Returns:

  • (String)

    The Channel Sid for this Transfer.



247
248
249
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 247

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:



214
215
216
217
218
219
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 214

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.



295
296
297
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 295

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.



301
302
303
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 301

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.



253
254
255
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 253

def execution_sid
    @properties['execution_sid']
end

#fetchInteractionTransferInstance

Fetch the InteractionTransferInstance

Returns:



314
315
316
317
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 314

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.



271
272
273
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 271

def from
    @properties['from']
end

#inspectObject

Provide a detailed, user friendly representation



339
340
341
342
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 339

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.



229
230
231
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 229

def instance_sid
    @properties['instance_sid']
end

#interaction_sidString

Returns The Interaction Sid for this channel.

Returns:

  • (String)

    The Interaction Sid for this channel.



241
242
243
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 241

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.



283
284
285
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 283

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.



223
224
225
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 223

def sid
    @properties['sid']
end

#statusTransferStatus

Returns:

  • (TransferStatus)


265
266
267
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 265

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.



289
290
291
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 289

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.



277
278
279
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 277

def to
    @properties['to']
end

#to_sObject

Provide a user friendly representation



332
333
334
335
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 332

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

#typeTransferType

Returns:

  • (TransferType)


259
260
261
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 259

def type
    @properties['type']
end

#update(body: :unset) ⇒ InteractionTransferInstance

Update the InteractionTransferInstance

Parameters:

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

Returns:



323
324
325
326
327
328
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 323

def update(body: :unset
)

    context.update(
    )
end

#urlString

Returns:

  • (String)


307
308
309
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb', line 307

def url
    @properties['url']
end