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
The SID of the Account that created the resource.
-
#context ⇒ InteractionContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#data ⇒ String
A JSON string that includes the message body of message interactions.
-
#date_created ⇒ Time
The ISO 8601 date and time in GMT when the Interaction was created.
-
#date_updated ⇒ Time
The ISO 8601 date and time in GMT when the resource was last updated.
-
#delete ⇒ Boolean
Deletes the InteractionInstance.
-
#fetch ⇒ InteractionInstance
Fetch a InteractionInstance.
-
#inbound_participant_sid ⇒ String
The SID of the inbound Participant resource.
-
#inbound_resource_sid ⇒ String
The SID of the inbound resource.
-
#inbound_resource_status ⇒ interaction.ResourceStatus
The inbound resource status of the Interaction.
-
#inbound_resource_type ⇒ String
The inbound resource type.
-
#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
The SID of the outbound Participant.
-
#outbound_resource_sid ⇒ String
The SID of the outbound resource.
-
#outbound_resource_status ⇒ interaction.ResourceStatus
The outbound resource status of the Interaction.
-
#outbound_resource_type ⇒ String
The outbound resource type.
-
#outbound_resource_url ⇒ String
The URL of the Twilio outbound resource.
-
#service_sid ⇒ String
The SID of the resource’s parent Service.
-
#session_sid ⇒ String
The SID of the resource’s parent Session.
-
#sid ⇒ String
The unique string that identifies the resource.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#type ⇒ interaction.Type
The Type of the Interaction.
-
#url ⇒ String
The absolute URL of the Interaction resource.
Constructor Details
#initialize(version, payload, service_sid: nil, session_sid: nil, sid: nil) ⇒ InteractionInstance
Initialize the InteractionInstance
239 240 241 242 243 244 245 246 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 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb', line 239 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 The SID of the Account that created the resource.
310 311 312 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb', line 310 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
278 279 280 281 282 283 284 285 286 287 288 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb', line 278 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 A JSON string that includes the message body of message interactions.
316 317 318 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb', line 316 def data @properties['data'] end |
#date_created ⇒ Time
Returns The ISO 8601 date and time in GMT when the Interaction was created.
388 389 390 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb', line 388 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The ISO 8601 date and time in GMT when the resource was last updated.
394 395 396 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb', line 394 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Deletes the InteractionInstance
414 415 416 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb', line 414 def delete context.delete end |
#fetch ⇒ InteractionInstance
Fetch a InteractionInstance
407 408 409 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb', line 407 def fetch context.fetch end |
#inbound_participant_sid ⇒ String
Returns The SID of the inbound Participant resource.
328 329 330 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb', line 328 def inbound_participant_sid @properties['inbound_participant_sid'] end |
#inbound_resource_sid ⇒ String
Returns The SID of the inbound resource.
334 335 336 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb', line 334 def inbound_resource_sid @properties['inbound_resource_sid'] end |
#inbound_resource_status ⇒ interaction.ResourceStatus
Returns The inbound resource status of the Interaction.
340 341 342 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb', line 340 def inbound_resource_status @properties['inbound_resource_status'] end |
#inbound_resource_type ⇒ String
Returns The inbound resource type.
346 347 348 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb', line 346 def inbound_resource_type @properties['inbound_resource_type'] end |
#inbound_resource_url ⇒ String
Returns The URL of the Twilio inbound resource.
352 353 354 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb', line 352 def inbound_resource_url @properties['inbound_resource_url'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
427 428 429 430 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb', line 427 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Proxy.V1.InteractionInstance #{values}>" end |
#outbound_participant_sid ⇒ String
Returns The SID of the outbound Participant.
358 359 360 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb', line 358 def outbound_participant_sid @properties['outbound_participant_sid'] end |
#outbound_resource_sid ⇒ String
Returns The SID of the outbound resource.
364 365 366 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb', line 364 def outbound_resource_sid @properties['outbound_resource_sid'] end |
#outbound_resource_status ⇒ interaction.ResourceStatus
Returns The outbound resource status of the Interaction.
370 371 372 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb', line 370 def outbound_resource_status @properties['outbound_resource_status'] end |
#outbound_resource_type ⇒ String
Returns The outbound resource type.
376 377 378 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb', line 376 def outbound_resource_type @properties['outbound_resource_type'] end |
#outbound_resource_url ⇒ String
Returns The URL of the Twilio outbound resource.
382 383 384 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb', line 382 def outbound_resource_url @properties['outbound_resource_url'] end |
#service_sid ⇒ String
Returns The SID of the resource’s parent Service.
304 305 306 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb', line 304 def service_sid @properties['service_sid'] end |
#session_sid ⇒ String
Returns The SID of the resource’s parent Session.
298 299 300 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb', line 298 def session_sid @properties['session_sid'] end |
#sid ⇒ String
Returns The unique string that identifies the resource.
292 293 294 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb', line 292 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
420 421 422 423 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb', line 420 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Proxy.V1.InteractionInstance #{values}>" end |
#type ⇒ interaction.Type
Returns The Type of the Interaction.
322 323 324 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb', line 322 def type @properties['type'] end |
#url ⇒ String
Returns The absolute URL of the Interaction resource.
400 401 402 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb', line 400 def url @properties['url'] end |