Class: Twilio::REST::Insights::V1::ConferenceContext
- Inherits:
-
Twilio::REST::InstanceContext
- Object
- Twilio::REST::InstanceContext
- Twilio::REST::Insights::V1::ConferenceContext
- Defined in:
- lib/twilio-ruby/rest/insights/v1/conference.rb,
lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb
Defined Under Namespace
Classes: ConferenceParticipantContext, ConferenceParticipantInstance, ConferenceParticipantInstanceMetadata, ConferenceParticipantList, ConferenceParticipantListResponse, ConferenceParticipantPage, ConferenceParticipantPageMetadata
Instance Method Summary collapse
-
#conference_participants(participant_sid = :unset) ⇒ ConferenceParticipantList, ConferenceParticipantContext
Access the conference_participants.
-
#fetch ⇒ ConferenceInstance
Fetch the ConferenceInstance.
-
#fetch_with_metadata ⇒ ConferenceInstance
Fetch the ConferenceInstanceMetadata.
-
#initialize(version, conference_sid) ⇒ ConferenceContext
constructor
Initialize the ConferenceContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, conference_sid) ⇒ ConferenceContext
Initialize the ConferenceContext
247 248 249 250 251 252 253 254 255 256 257 |
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 247 def initialize(version, conference_sid) super(version) # Path Solution @solution = { conference_sid: conference_sid, } @uri = "/Conferences/#{@solution[:conference_sid]}" # Dependents @conference_participants = nil end |
Instance Method Details
#conference_participants(participant_sid = :unset) ⇒ ConferenceParticipantList, ConferenceParticipantContext
Access the conference_participants
306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 |
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 306 def conference_participants(participant_sid=:unset) raise ArgumentError, 'participant_sid cannot be nil' if participant_sid.nil? if participant_sid != :unset return ConferenceParticipantContext.new(@version, @solution[:conference_sid],participant_sid ) end unless @conference_participants @conference_participants = ConferenceParticipantList.new( @version, conference_sid: @solution[:conference_sid], ) end @conference_participants end |
#fetch ⇒ ConferenceInstance
Fetch the ConferenceInstance
261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 |
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 261 def fetch headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, headers: headers) ConferenceInstance.new( @version, payload, conference_sid: @solution[:conference_sid], ) end |
#fetch_with_metadata ⇒ ConferenceInstance
Fetch the ConferenceInstanceMetadata
280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 |
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 280 def headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) response = @version.('GET', @uri, headers: headers) conference_instance = ConferenceInstance.new( @version, response.body, conference_sid: @solution[:conference_sid], ) ConferenceInstanceMetadata.new( @version, conference_instance, response.headers, response.status_code ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
331 332 333 334 |
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 331 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Insights.V1.ConferenceContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
324 325 326 327 |
# File 'lib/twilio-ruby/rest/insights/v1/conference.rb', line 324 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Insights.V1.ConferenceContext #{context}>" end |