Class: Twilio::REST::FlexApi::V1::InteractionContext::InteractionChannelContext::InteractionChannelParticipantContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::FlexApi::V1::InteractionContext::InteractionChannelContext::InteractionChannelParticipantContext
- Defined in:
- lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_participant.rb
Instance Method Summary collapse
-
#initialize(version, interaction_sid, channel_sid, sid) ⇒ InteractionChannelParticipantContext
constructor
Initialize the InteractionChannelParticipantContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(status: nil) ⇒ InteractionChannelParticipantInstance
Update the InteractionChannelParticipantInstance.
Constructor Details
#initialize(version, interaction_sid, channel_sid, sid) ⇒ InteractionChannelParticipantContext
Initialize the InteractionChannelParticipantContext
174 175 176 177 178 179 180 181 182 |
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_participant.rb', line 174 def initialize(version, interaction_sid, channel_sid, sid) super(version) # Path Solution @solution = { interaction_sid: interaction_sid, channel_sid: channel_sid, sid: sid, } @uri = "/Interactions/#{@solution[:interaction_sid]}/Channels/#{@solution[:channel_sid]}/Participants/#{@solution[:sid]}" end |
Instance Method Details
#inspect ⇒ Object
Provide a detailed, user friendly representation
221 222 223 224 |
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_participant.rb', line 221 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.FlexApi.V1.InteractionChannelParticipantContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
214 215 216 217 |
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_participant.rb', line 214 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.FlexApi.V1.InteractionChannelParticipantContext #{context}>" end |
#update(status: nil) ⇒ InteractionChannelParticipantInstance
Update the InteractionChannelParticipantInstance
187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 |
# File 'lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_participant.rb', line 187 def update( status: nil ) data = Twilio::Values.of({ 'Status' => status, }) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.update('POST', @uri, data: data, headers: headers) InteractionChannelParticipantInstance.new( @version, payload, interaction_sid: @solution[:interaction_sid], channel_sid: @solution[:channel_sid], sid: @solution[:sid], ) end |