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](www.twilio.com/docs/iam/api/account) that created the Participant resource.
-
#call_sid ⇒ String
The SID of the [Call](www.twilio.com/docs/voice/api/call-resource) the Participant resource is associated with.
-
#call_sid_to_coach ⇒ String
The SID of the participant who is being ‘coached`.
-
#coaching ⇒ Boolean
Whether the participant is coaching another call.
-
#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 date and time in GMT that the resource was created specified in [RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.
-
#date_updated ⇒ Time
The date and time in GMT that the resource was last updated specified in [RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.
-
#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 user-specified label of this participant, if one was given when the participant was created.
-
#muted ⇒ Boolean
Whether the participant is muted.
-
#queue_time ⇒ String
The wait time in milliseconds before participant’s call is placed.
-
#start_conference_on_enter ⇒ Boolean
Whether the conference starts when the participant joins the conference, if it has not already started.
- #status ⇒ 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, 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
936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 936 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'], 'queue_time' => payload['queue_time'], 'uri' => payload['uri'], } # Context @instance_context = nil @params = { 'account_sid' => account_sid ,'conference_sid' => conference_sid || @properties['conference_sid'] ,'call_sid' => call_sid || @properties['call_sid'] , } end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the Participant resource.
977 978 979 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 977 def account_sid @properties['account_sid'] end |
#call_sid ⇒ String
Returns The SID of the [Call](www.twilio.com/docs/voice/api/call-resource) the Participant resource is associated with.
983 984 985 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 983 def call_sid @properties['call_sid'] end |
#call_sid_to_coach ⇒ String
Returns The SID of the participant who is being ‘coached`. The participant being coached is the only participant who can hear the participant who is `coaching`.
995 996 997 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 995 def call_sid_to_coach @properties['call_sid_to_coach'] end |
#coaching ⇒ Boolean
Returns Whether the participant is coaching another call. Can be: ‘true` or `false`. If not present, defaults to `false` unless `call_sid_to_coach` is defined. If `true`, `call_sid_to_coach` must be defined.
1001 1002 1003 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 1001 def coaching @properties['coaching'] end |
#conference_sid ⇒ String
Returns The SID of the conference the participant is in.
1007 1008 1009 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 1007 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
968 969 970 971 972 973 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 968 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 and time in GMT that the resource was created specified in [RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.
1013 1014 1015 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 1013 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date and time in GMT that the resource was last updated specified in [RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.
1019 1020 1021 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 1019 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Delete the ParticipantInstance
1068 1069 1070 1071 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 1068 def delete context.delete end |
#end_conference_on_exit ⇒ Boolean
Returns Whether the conference ends when the participant leaves. Can be: ‘true` or `false` and the default is `false`. If `true`, the conference ends and all other participants drop out when the participant leaves.
1025 1026 1027 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 1025 def end_conference_on_exit @properties['end_conference_on_exit'] end |
#fetch ⇒ ParticipantInstance
Fetch the ParticipantInstance
1076 1077 1078 1079 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 1076 def fetch context.fetch end |
#hold ⇒ Boolean
Returns Whether the participant is on hold. Can be ‘true` or `false`.
1037 1038 1039 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 1037 def hold @properties['hold'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
1136 1137 1138 1139 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 1136 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Api.V2010.ParticipantInstance #{values}>" end |
#label ⇒ String
Returns The user-specified label of this participant, if one was given when the participant was created. This may be used to fetch, update or delete the participant.
989 990 991 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 989 def label @properties['label'] end |
#muted ⇒ Boolean
Returns Whether the participant is muted. Can be ‘true` or `false`.
1031 1032 1033 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 1031 def muted @properties['muted'] end |
#queue_time ⇒ String
Returns The wait time in milliseconds before participant’s call is placed. Only available in the response to a create participant request.
1055 1056 1057 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 1055 def queue_time @properties['queue_time'] end |
#start_conference_on_enter ⇒ Boolean
Returns Whether the conference starts when the participant joins the conference, if it has not already started. Can be: ‘true` or `false` and the default is `true`. If `false` and the conference has not started, the participant is muted and hears background music until another participant starts the conference.
1043 1044 1045 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 1043 def start_conference_on_enter @properties['start_conference_on_enter'] end |
#status ⇒ Status
1049 1050 1051 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 1049 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
1129 1130 1131 1132 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 1129 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
1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 1096 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`.
1061 1062 1063 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb', line 1061 def uri @properties['uri'] end |