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
Delete the ParticipantInstance.
-
#delete_with_metadata ⇒ Boolean
Delete the ParticipantInstanceMetadata.
-
#fetch ⇒ ParticipantInstance
Fetch the ParticipantInstance.
-
#fetch_with_metadata ⇒ ParticipantInstance
Fetch the ParticipantInstanceMetadata.
-
#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.
-
#update_with_metadata(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 ParticipantInstanceMetadata.
Constructor Details
#initialize(version, account_sid, conference_sid, call_sid) ⇒ ParticipantContext
Initialize the ParticipantContext
542 543 544 545 546 547 548 549 550 551 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 542 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
Delete the ParticipantInstance
555 556 557 558 559 560 561 562 563 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 555 def delete headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) @version.delete('DELETE', @uri, headers: headers) end |
#delete_with_metadata ⇒ Boolean
Delete the ParticipantInstanceMetadata
568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 568 def headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) response = @version.('DELETE', @uri, headers: headers) participant_instance = ParticipantInstance.new( @version, response.body, account_sid: @solution[:account_sid], sid: @solution[:sid], ) ParticipantInstanceMetadata.new(@version, participant_instance, response.headers, response.status_code) end |
#fetch ⇒ ParticipantInstance
Fetch the ParticipantInstance
587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 587 def fetch headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, headers: headers) ParticipantInstance.new( @version, payload, account_sid: @solution[:account_sid], conference_sid: @solution[:conference_sid], call_sid: @solution[:call_sid], ) end |
#fetch_with_metadata ⇒ ParticipantInstance
Fetch the ParticipantInstanceMetadata
608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 608 def headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) response = @version.('GET', @uri, headers: headers) participant_instance = ParticipantInstance.new( @version, response.body, account_sid: @solution[:account_sid], conference_sid: @solution[:conference_sid], call_sid: @solution[:call_sid], ) ParticipantInstanceMetadata.new( @version, participant_instance, response.headers, response.status_code ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
770 771 772 773 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 770 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Api.V2010.ParticipantContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
763 764 765 766 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 763 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
647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 647 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, }) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.update('POST', @uri, data: data, headers: headers) ParticipantInstance.new( @version, payload, account_sid: @solution[:account_sid], conference_sid: @solution[:conference_sid], call_sid: @solution[:call_sid], ) end |
#update_with_metadata(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 ParticipantInstanceMetadata
708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 708 def ( 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, }) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) response = @version.('POST', @uri, data: data, headers: headers) participant_instance = ParticipantInstance.new( @version, response.body, account_sid: @solution[:account_sid], conference_sid: @solution[:conference_sid], call_sid: @solution[:call_sid], ) ParticipantInstanceMetadata.new( @version, participant_instance, response.headers, response.status_code ) end |