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 unique sid that identifies this account.
-
#call_sid ⇒ String
A string that uniquely identifies this call.
-
#conference_sid ⇒ String
A string that uniquely identifies this conference.
-
#context ⇒ ParticipantContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#date_created ⇒ Time
The date this resource was created.
-
#date_updated ⇒ Time
The date this resource was last updated.
-
#delete ⇒ Boolean
Deletes the ParticipantInstance.
-
#end_conference_on_exit ⇒ Boolean
Indicates if the endConferenceOnExit was set.
-
#fetch ⇒ ParticipantInstance
Fetch a ParticipantInstance.
-
#hold ⇒ Boolean
True if this participant is currently held.
-
#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.
-
#muted ⇒ Boolean
Indicates if the participant is muted.
-
#start_conference_on_enter ⇒ Boolean
Indicates if the startConferenceOnEnter attribute was set.
-
#status ⇒ participant.Status
The status.
-
#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) ⇒ ParticipantInstance
Update the ParticipantInstance.
-
#uri ⇒ String
The URI for this resource.
Constructor Details
#initialize(version, payload, account_sid: nil, conference_sid: nil, call_sid: nil) ⇒ ParticipantInstance
Initialize the ParticipantInstance
423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 423 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'], '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 unique sid that identifies this account.
468 469 470 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 468 def account_sid @properties['account_sid'] end |
#call_sid ⇒ String
Returns A string that uniquely identifies this call.
474 475 476 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 474 def call_sid @properties['call_sid'] end |
#conference_sid ⇒ String
Returns A string that uniquely identifies this conference.
480 481 482 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 480 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
454 455 456 457 458 459 460 461 462 463 464 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 454 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 date this resource was created.
486 487 488 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 486 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date this resource was last updated.
492 493 494 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 492 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Deletes the ParticipantInstance
571 572 573 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 571 def delete context.delete end |
#end_conference_on_exit ⇒ Boolean
Returns Indicates if the endConferenceOnExit was set.
498 499 500 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 498 def end_conference_on_exit @properties['end_conference_on_exit'] end |
#fetch ⇒ ParticipantInstance
Fetch a ParticipantInstance
535 536 537 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 535 def fetch context.fetch end |
#hold ⇒ Boolean
Returns true if this participant is currently held.
510 511 512 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 510 def hold @properties['hold'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
584 585 586 587 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 584 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Api.V2010.ParticipantInstance #{values}>" end |
#muted ⇒ Boolean
Returns Indicates if the participant is muted.
504 505 506 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 504 def muted @properties['muted'] end |
#start_conference_on_enter ⇒ Boolean
Returns Indicates if the startConferenceOnEnter attribute was set.
516 517 518 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 516 def start_conference_on_enter @properties['start_conference_on_enter'] end |
#status ⇒ participant.Status
Returns The status.
522 523 524 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 522 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
577 578 579 580 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 577 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) ⇒ ParticipantInstance
Update the ParticipantInstance
557 558 559 560 561 562 563 564 565 566 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 557 def update(muted: :unset, hold: :unset, hold_url: :unset, hold_method: :unset, announce_url: :unset, announce_method: :unset) context.update( muted: muted, hold: hold, hold_url: hold_url, hold_method: hold_method, announce_url: announce_url, announce_method: announce_method, ) end |
#uri ⇒ String
Returns The URI for this resource.
528 529 530 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 528 def uri @properties['uri'] end |