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
556 557 558 559 560 561 562 563 564 565 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 556 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
569 570 571 572 573 574 575 576 577 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 569 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
582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 582 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
601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 601 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
622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 622 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
784 785 786 787 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 784 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Api.V2010.ParticipantContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
777 778 779 780 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 777 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
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 692 693 694 695 696 697 698 699 700 701 702 703 704 705 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 661 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
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 760 761 762 763 764 765 766 767 768 769 770 771 772 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 722 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 |