Class: Twilio::REST::FlexApi::V1::InteractionContext::InteractionChannelContext::InteractionChannelParticipantInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::FlexApi::V1::InteractionContext::InteractionChannelContext::InteractionChannelParticipantInstance
- Defined in:
- lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_participant.rb
Instance Method Summary collapse
-
#channel_sid ⇒ String
The Channel Sid for this Participant.
-
#context ⇒ InteractionChannelParticipantContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#initialize(version, payload, interaction_sid: nil, channel_sid: nil, sid: nil) ⇒ InteractionChannelParticipantInstance
constructor
Initialize the InteractionChannelParticipantInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#interaction_sid ⇒ String
The Interaction Sid for this channel.
-
#routing_properties ⇒ Hash
The Participant’s routing properties.
-
#sid ⇒ String
The unique string created by Twilio to identify an Interaction Channel Participant resource.
-
#to_s ⇒ Object
Provide a user friendly representation.
- #type ⇒ Type
-
#update(status: nil) ⇒ InteractionChannelParticipantInstance
Update the InteractionChannelParticipantInstance.
- #url ⇒ String
Constructor Details
#initialize(version, payload, interaction_sid: nil, channel_sid: nil, sid: nil) ⇒ InteractionChannelParticipantInstance
Initialize the InteractionChannelParticipantInstance
265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 |
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_participant.rb', line 265 def initialize(version, payload , interaction_sid: nil, channel_sid: nil, sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'type' => payload['type'], 'interaction_sid' => payload['interaction_sid'], 'channel_sid' => payload['channel_sid'], 'url' => payload['url'], 'routing_properties' => payload['routing_properties'], } # 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
#channel_sid ⇒ String
Returns The Channel Sid for this Participant.
314 315 316 |
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_participant.rb', line 314 def channel_sid @properties['channel_sid'] end |
#context ⇒ InteractionChannelParticipantContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
287 288 289 290 291 292 |
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_participant.rb', line 287 def context unless @instance_context @instance_context = InteractionChannelParticipantContext.new(@version , @params['interaction_sid'], @params['channel_sid'], @params['sid']) end @instance_context end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
352 353 354 355 |
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_participant.rb', line 352 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.FlexApi.V1.InteractionChannelParticipantInstance #{values}>" end |
#interaction_sid ⇒ String
Returns The Interaction Sid for this channel.
308 309 310 |
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_participant.rb', line 308 def interaction_sid @properties['interaction_sid'] end |
#routing_properties ⇒ Hash
Returns The Participant’s routing properties.
326 327 328 |
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_participant.rb', line 326 def routing_properties @properties['routing_properties'] end |
#sid ⇒ String
Returns The unique string created by Twilio to identify an Interaction Channel Participant resource.
296 297 298 |
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_participant.rb', line 296 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
345 346 347 348 |
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_participant.rb', line 345 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.FlexApi.V1.InteractionChannelParticipantInstance #{values}>" end |
#type ⇒ Type
302 303 304 |
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_participant.rb', line 302 def type @properties['type'] end |
#update(status: nil) ⇒ InteractionChannelParticipantInstance
Update the InteractionChannelParticipantInstance
334 335 336 337 338 339 340 341 |
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_participant.rb', line 334 def update( status: nil ) context.update( status: status, ) end |
#url ⇒ String
320 321 322 |
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_participant.rb', line 320 def url @properties['url'] end |