Class: Twilio::REST::Api::V2010::AccountContext::ConferenceContext::ParticipantContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Api::V2010::AccountContext::ConferenceContext::ParticipantContext
- Defined in:
- lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb
Instance Method Summary collapse
-
#delete ⇒ Boolean
Deletes the ParticipantInstance.
-
#fetch ⇒ ParticipantInstance
Fetch a ParticipantInstance.
-
#initialize(version, account_sid, conference_sid, call_sid) ⇒ ParticipantContext
constructor
Initialize the ParticipantContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(muted: :unset, hold: :unset, hold_url: :unset, hold_method: :unset, announce_url: :unset, announce_method: :unset, wait_url: :unset, wait_method: :unset, beep_on_exit: :unset, end_conference_on_exit: :unset, coaching: :unset, call_sid_to_coach: :unset) ⇒ ParticipantInstance
Update the ParticipantInstance.
Constructor Details
#initialize(version, account_sid, conference_sid, call_sid) ⇒ ParticipantContext
Initialize the ParticipantContext
343 344 345 346 347 348 349 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 343 def initialize(version, account_sid, conference_sid, call_sid) super(version) # Path Solution @solution = {account_sid: account_sid, conference_sid: conference_sid, call_sid: call_sid, } @uri = "/Accounts/#{@solution[:account_sid]}/Conferences/#{@solution[:conference_sid]}/Participants/#{@solution[:call_sid]}.json" end |
Instance Method Details
#delete ⇒ Boolean
Deletes the ParticipantInstance
443 444 445 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 443 def delete @version.delete('delete', @uri) end |
#fetch ⇒ ParticipantInstance
Fetch a ParticipantInstance
354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 354 def fetch params = Twilio::Values.of({}) payload = @version.fetch( 'GET', @uri, params, ) ParticipantInstance.new( @version, payload, account_sid: @solution[:account_sid], conference_sid: @solution[:conference_sid], call_sid: @solution[:call_sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
456 457 458 459 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 456 def inspect context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Api.V2010.ParticipantContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
449 450 451 452 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 449 def to_s context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Api.V2010.ParticipantContext #{context}>" end |
#update(muted: :unset, hold: :unset, hold_url: :unset, hold_method: :unset, announce_url: :unset, announce_method: :unset, wait_url: :unset, wait_method: :unset, beep_on_exit: :unset, end_conference_on_exit: :unset, coaching: :unset, call_sid_to_coach: :unset) ⇒ ParticipantInstance
Update the ParticipantInstance
409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 409 def update(muted: :unset, hold: :unset, hold_url: :unset, hold_method: :unset, announce_url: :unset, announce_method: :unset, wait_url: :unset, wait_method: :unset, beep_on_exit: :unset, end_conference_on_exit: :unset, coaching: :unset, call_sid_to_coach: :unset) data = Twilio::Values.of({ 'Muted' => muted, 'Hold' => hold, 'HoldUrl' => hold_url, 'HoldMethod' => hold_method, 'AnnounceUrl' => announce_url, 'AnnounceMethod' => announce_method, 'WaitUrl' => wait_url, 'WaitMethod' => wait_method, 'BeepOnExit' => beep_on_exit, 'EndConferenceOnExit' => end_conference_on_exit, 'Coaching' => coaching, 'CallSidToCoach' => call_sid_to_coach, }) payload = @version.update( 'POST', @uri, data: data, ) ParticipantInstance.new( @version, payload, account_sid: @solution[:account_sid], conference_sid: @solution[:conference_sid], call_sid: @solution[:call_sid], ) end |