Class: Twilio::REST::Proxy::V1::ServiceContext::SessionContext::InteractionInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Proxy::V1::ServiceContext::SessionContext::InteractionInstance
- Defined in:
- lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb
Overview
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
Instance Method Summary collapse
-
#account_sid ⇒ String
Account Sid.
-
#context ⇒ InteractionContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#data ⇒ String
Further details about an interaction.
-
#date_created ⇒ Time
The date this Interaction was created.
-
#date_updated ⇒ Time
The date this Interaction was updated.
-
#delete ⇒ Boolean
Deletes the InteractionInstance.
-
#fetch ⇒ InteractionInstance
Fetch a InteractionInstance.
-
#inbound_participant_sid ⇒ String
Inbound Participant Sid.
-
#inbound_resource_sid ⇒ String
Inbound Resource Sid.
-
#inbound_resource_status ⇒ interaction.ResourceStatus
The Inbound Resource Status of this Interaction.
-
#inbound_resource_type ⇒ String
The type of the Inbound Resource, Call or Message.
-
#inbound_resource_url ⇒ String
The URL of the Twilio inbound resource.
-
#initialize(version, payload, service_sid: nil, session_sid: nil, sid: nil) ⇒ InteractionInstance
constructor
Initialize the InteractionInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#outbound_participant_sid ⇒ String
Outbound Participant Sid.
-
#outbound_resource_sid ⇒ String
Outbound Resource Sid.
-
#outbound_resource_status ⇒ interaction.ResourceStatus
The Outbound Resource Status of this Interaction.
-
#outbound_resource_type ⇒ String
The type of the Outbound Resource, Call or Message.
-
#outbound_resource_url ⇒ String
The URL of the Twilio outbound resource.
-
#service_sid ⇒ String
Service Sid.
-
#session_sid ⇒ String
Session Sid.
-
#sid ⇒ String
A string that uniquely identifies this Interaction.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#type ⇒ interaction.Type
The Type of this Interaction.
-
#url ⇒ String
The URL of this resource.
Constructor Details
#initialize(version, payload, service_sid: nil, session_sid: nil, sid: nil) ⇒ InteractionInstance
Initialize the InteractionInstance
247 248 249 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 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb', line 247 def initialize(version, payload, service_sid: nil, session_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'], '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, 'sid' => sid || @properties['sid'], } end |
Instance Method Details
#account_sid ⇒ String
Returns Account Sid.
318 319 320 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb', line 318 def account_sid @properties['account_sid'] end |
#context ⇒ InteractionContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
286 287 288 289 290 291 292 293 294 295 296 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb', line 286 def context unless @instance_context @instance_context = InteractionContext.new( @version, @params['service_sid'], @params['session_sid'], @params['sid'], ) end @instance_context end |
#data ⇒ String
Returns Further details about an interaction.
324 325 326 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb', line 324 def data @properties['data'] end |
#date_created ⇒ Time
Returns The date this Interaction was created.
396 397 398 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb', line 396 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date this Interaction was updated.
402 403 404 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb', line 402 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Deletes the InteractionInstance
422 423 424 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb', line 422 def delete context.delete end |
#fetch ⇒ InteractionInstance
Fetch a InteractionInstance
415 416 417 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb', line 415 def fetch context.fetch end |
#inbound_participant_sid ⇒ String
Returns Inbound Participant Sid.
336 337 338 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb', line 336 def inbound_participant_sid @properties['inbound_participant_sid'] end |
#inbound_resource_sid ⇒ String
Returns Inbound Resource Sid.
342 343 344 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb', line 342 def inbound_resource_sid @properties['inbound_resource_sid'] end |
#inbound_resource_status ⇒ interaction.ResourceStatus
Returns The Inbound Resource Status of this Interaction.
348 349 350 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb', line 348 def inbound_resource_status @properties['inbound_resource_status'] end |
#inbound_resource_type ⇒ String
Returns The type of the Inbound Resource, Call or Message.
354 355 356 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb', line 354 def inbound_resource_type @properties['inbound_resource_type'] end |
#inbound_resource_url ⇒ String
Returns The URL of the Twilio inbound resource.
360 361 362 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb', line 360 def inbound_resource_url @properties['inbound_resource_url'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
435 436 437 438 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb', line 435 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Proxy.V1.InteractionInstance #{values}>" end |
#outbound_participant_sid ⇒ String
Returns Outbound Participant Sid.
366 367 368 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb', line 366 def outbound_participant_sid @properties['outbound_participant_sid'] end |
#outbound_resource_sid ⇒ String
Returns Outbound Resource Sid.
372 373 374 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb', line 372 def outbound_resource_sid @properties['outbound_resource_sid'] end |
#outbound_resource_status ⇒ interaction.ResourceStatus
Returns The Outbound Resource Status of this Interaction.
378 379 380 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb', line 378 def outbound_resource_status @properties['outbound_resource_status'] end |
#outbound_resource_type ⇒ String
Returns The type of the Outbound Resource, Call or Message.
384 385 386 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb', line 384 def outbound_resource_type @properties['outbound_resource_type'] end |
#outbound_resource_url ⇒ String
Returns The URL of the Twilio outbound resource.
390 391 392 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb', line 390 def outbound_resource_url @properties['outbound_resource_url'] end |
#service_sid ⇒ String
Returns Service Sid.
312 313 314 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb', line 312 def service_sid @properties['service_sid'] end |
#session_sid ⇒ String
Returns Session Sid.
306 307 308 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb', line 306 def session_sid @properties['session_sid'] end |
#sid ⇒ String
Returns A string that uniquely identifies this Interaction.
300 301 302 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb', line 300 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
428 429 430 431 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb', line 428 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Proxy.V1.InteractionInstance #{values}>" end |
#type ⇒ interaction.Type
Returns The Type of this Interaction.
330 331 332 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb', line 330 def type @properties['type'] end |
#url ⇒ String
Returns The URL of this resource.
408 409 410 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb', line 408 def url @properties['url'] end |