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
610 611 612 613 614 615 616 617 618 619 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 610 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
623 624 625 626 627 628 629 630 631 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 623 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
636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 636 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
655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 655 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
676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 676 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
838 839 840 841 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 838 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Api.V2010.ParticipantContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
831 832 833 834 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 831 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
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 759 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 715 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
776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 776 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 |