Class: Twilio::REST::Api::V2010::AccountContext::ConferenceContext::ParticipantInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Api::V2010::AccountContext::ConferenceContext::ParticipantInstance
- Defined in:
- lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the Account that created the resource.
-
#call_sid ⇒ String
The SID of the Call the resource is associated with.
-
#call_sid_to_coach ⇒ String
The SID of the participant who is being ‘coached`.
-
#coaching ⇒ Boolean
Indicates if the participant changed to coach.
-
#conference_sid ⇒ String
The SID of the conference the participant is in.
-
#context ⇒ ParticipantContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#date_created ⇒ Time
The RFC 2822 date and time in GMT that the resource was created.
-
#date_updated ⇒ Time
The RFC 2822 date and time in GMT that the resource was last updated.
-
#delete ⇒ Boolean
Delete the ParticipantInstance.
-
#end_conference_on_exit ⇒ Boolean
Whether the conference ends when the participant leaves.
-
#fetch ⇒ ParticipantInstance
Fetch the ParticipantInstance.
-
#hold ⇒ Boolean
Whether the participant is on hold.
-
#initialize(version, payload, account_sid: nil, conference_sid: nil, call_sid: nil) ⇒ ParticipantInstance
constructor
Initialize the ParticipantInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#label ⇒ String
The label of this participant.
-
#muted ⇒ Boolean
Whether the participant is muted.
-
#start_conference_on_enter ⇒ Boolean
Whether the conference starts when the participant joins the conference.
-
#status ⇒ participant.Status
The status of the participant’s call in a session.
-
#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.
-
#uri ⇒ String
The URI of the resource, relative to ‘api.twilio.com`.
Constructor Details
#initialize(version, payload, account_sid: nil, conference_sid: nil, call_sid: nil) ⇒ ParticipantInstance
Initialize the ParticipantInstance
495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 495 def initialize(version, payload, account_sid: nil, conference_sid: nil, call_sid: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'call_sid' => payload['call_sid'], 'label' => payload['label'], 'call_sid_to_coach' => payload['call_sid_to_coach'], 'coaching' => payload['coaching'], 'conference_sid' => payload['conference_sid'], 'date_created' => Twilio.deserialize_rfc2822(payload['date_created']), 'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']), 'end_conference_on_exit' => payload['end_conference_on_exit'], 'muted' => payload['muted'], 'hold' => payload['hold'], 'start_conference_on_enter' => payload['start_conference_on_enter'], 'status' => payload['status'], 'uri' => payload['uri'], } # Context @instance_context = nil @params = { 'account_sid' => account_sid, 'conference_sid' => conference_sid, 'call_sid' => call_sid || @properties['call_sid'], } end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the Account that created the resource.
543 544 545 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 543 def account_sid @properties['account_sid'] end |
#call_sid ⇒ String
Returns The SID of the Call the resource is associated with.
549 550 551 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 549 def call_sid @properties['call_sid'] end |
#call_sid_to_coach ⇒ String
Returns The SID of the participant who is being ‘coached`.
561 562 563 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 561 def call_sid_to_coach @properties['call_sid_to_coach'] end |
#coaching ⇒ Boolean
Returns Indicates if the participant changed to coach.
567 568 569 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 567 def coaching @properties['coaching'] end |
#conference_sid ⇒ String
Returns The SID of the conference the participant is in.
573 574 575 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 573 def conference_sid @properties['conference_sid'] end |
#context ⇒ ParticipantContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
529 530 531 532 533 534 535 536 537 538 539 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 529 def context unless @instance_context @instance_context = ParticipantContext.new( @version, @params['account_sid'], @params['conference_sid'], @params['call_sid'], ) end @instance_context end |
#date_created ⇒ Time
Returns The RFC 2822 date and time in GMT that the resource was created.
579 580 581 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 579 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The RFC 2822 date and time in GMT that the resource was last updated.
585 586 587 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 585 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Delete the ParticipantInstance
689 690 691 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 689 def delete context.delete end |
#end_conference_on_exit ⇒ Boolean
Returns Whether the conference ends when the participant leaves.
591 592 593 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 591 def end_conference_on_exit @properties['end_conference_on_exit'] end |
#fetch ⇒ ParticipantInstance
Fetch the ParticipantInstance
628 629 630 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 628 def fetch context.fetch end |
#hold ⇒ Boolean
Returns Whether the participant is on hold.
603 604 605 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 603 def hold @properties['hold'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
702 703 704 705 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 702 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Api.V2010.ParticipantInstance #{values}>" end |
#label ⇒ String
Returns The label of this participant.
555 556 557 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 555 def label @properties['label'] end |
#muted ⇒ Boolean
Returns Whether the participant is muted.
597 598 599 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 597 def muted @properties['muted'] end |
#start_conference_on_enter ⇒ Boolean
Returns Whether the conference starts when the participant joins the conference.
609 610 611 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 609 def start_conference_on_enter @properties['start_conference_on_enter'] end |
#status ⇒ participant.Status
Returns The status of the participant’s call in a session.
615 616 617 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 615 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
695 696 697 698 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 695 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Api.V2010.ParticipantInstance #{values}>" 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
669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 669 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) context.update( muted: muted, hold: hold, hold_url: hold_url, hold_method: hold_method, announce_url: announce_url, announce_method: announce_method, wait_url: wait_url, wait_method: wait_method, beep_on_exit: beep_on_exit, end_conference_on_exit: end_conference_on_exit, coaching: coaching, call_sid_to_coach: call_sid_to_coach, ) end |
#uri ⇒ String
Returns The URI of the resource, relative to ‘api.twilio.com`.
621 622 623 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 621 def uri @properties['uri'] end |