class Twilio::REST::Proxy::V1::ServiceContext::SessionContext::ParticipantInstance
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
Public Class Methods
Initialize the ParticipantInstance
@param [Version] version Version
that contains the resource @param [Hash] payload payload that contains response from Twilio
@param [String] service_sid
The SID of the resource's parent
{Service}[https://www.twilio.com/docs/proxy/api/service] resource.
@param [String] session_sid
The SID of the parent
{Session}[https://www.twilio.com/docs/proxy/api/session] resource.
@param [String] sid The Twilio-provided string that uniquely identifies the
Participant resource to fetch.
@return [ParticipantInstance] ParticipantInstance
Twilio::REST::InstanceResource::new
# File lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb 305 def initialize(version, payload, service_sid: nil, session_sid: nil, sid: nil) 306 super(version) 307 308 # Marshaled Properties 309 @properties = { 310 'sid' => payload['sid'], 311 'session_sid' => payload['session_sid'], 312 'service_sid' => payload['service_sid'], 313 'account_sid' => payload['account_sid'], 314 'friendly_name' => payload['friendly_name'], 315 'identifier' => payload['identifier'], 316 'proxy_identifier' => payload['proxy_identifier'], 317 'proxy_identifier_sid' => payload['proxy_identifier_sid'], 318 'date_deleted' => Twilio.deserialize_iso8601_datetime(payload['date_deleted']), 319 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 320 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 321 'url' => payload['url'], 322 'links' => payload['links'], 323 } 324 325 # Context 326 @instance_context = nil 327 @params = { 328 'service_sid' => service_sid, 329 'session_sid' => session_sid, 330 'sid' => sid || @properties['sid'], 331 } 332 end
Public Instance Methods
@return [String] The SID of the Account that created the resource
# File lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb 370 def account_sid 371 @properties['account_sid'] 372 end
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context @return [ParticipantContext] ParticipantContext
for this ParticipantInstance
# File lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb 338 def context 339 unless @instance_context 340 @instance_context = ParticipantContext.new( 341 @version, 342 @params['service_sid'], 343 @params['session_sid'], 344 @params['sid'], 345 ) 346 end 347 @instance_context 348 end
@return [Time] The ISO 8601 date and time in GMT when the resource was created
# File lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb 406 def date_created 407 @properties['date_created'] 408 end
@return [Time] The ISO 8601 date the Participant was removed
# File lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb 400 def date_deleted 401 @properties['date_deleted'] 402 end
@return [Time] The ISO 8601 date and time in GMT when the resource was last updated
# File lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb 412 def date_updated 413 @properties['date_updated'] 414 end
Delete the ParticipantInstance
@return [Boolean] true if delete succeeds, false otherwise
# File lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb 438 def delete 439 context.delete 440 end
Fetch the ParticipantInstance
@return [ParticipantInstance] Fetched ParticipantInstance
# File lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb 431 def fetch 432 context.fetch 433 end
@return [String] The string that you assigned to describe the participant
# File lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb 376 def friendly_name 377 @properties['friendly_name'] 378 end
@return [String] The phone number or channel identifier of the Participant
# File lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb 382 def identifier 383 @properties['identifier'] 384 end
Provide a detailed, user friendly representation
# File lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb 458 def inspect 459 values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") 460 "<Twilio.Proxy.V1.ParticipantInstance #{values}>" 461 end
@return [String] The URLs to resources related the participant
# File lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb 424 def links 425 @properties['links'] 426 end
Access the message_interactions
@return [message_interactions] message_interactions
# File lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb 445 def message_interactions 446 context.message_interactions 447 end
@return [String] The phone number or short code of the participant's partner
# File lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb 388 def proxy_identifier 389 @properties['proxy_identifier'] 390 end
@return [String] The SID of the Proxy
Identifier assigned to the Participant
# File lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb 394 def proxy_identifier_sid 395 @properties['proxy_identifier_sid'] 396 end
@return [String] The SID of the resource's parent Service
# File lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb 364 def service_sid 365 @properties['service_sid'] 366 end
@return [String] The SID of the resource's parent Session
# File lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb 358 def session_sid 359 @properties['session_sid'] 360 end
@return [String] The unique string that identifies the resource
# File lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb 352 def sid 353 @properties['sid'] 354 end
Provide a user friendly representation
# File lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb 451 def to_s 452 values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") 453 "<Twilio.Proxy.V1.ParticipantInstance #{values}>" 454 end
@return [String] The absolute URL of the Participant resource
# File lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb 418 def url 419 @properties['url'] 420 end