Class: Bandwidth::AccountsParticipantsResponse
- Defined in:
- lib/bandwidth/web_rtc_lib/web_rtc/models/accounts_participants_response.rb
Overview
AccountsParticipantsResponse Model.
Instance Attribute Summary collapse
-
#participant ⇒ Participant
A participant object.
-
#token ⇒ String
Auth token for the returned participant This should be passed to the participant so that they can connect to the platform.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
Instance Method Summary collapse
-
#initialize(participant = nil, token = nil) ⇒ AccountsParticipantsResponse
constructor
A new instance of AccountsParticipantsResponse.
Methods inherited from BaseModel
Constructor Details
#initialize(participant = nil, token = nil) ⇒ AccountsParticipantsResponse
Returns a new instance of AccountsParticipantsResponse.
27 28 29 30 31 |
# File 'lib/bandwidth/web_rtc_lib/web_rtc/models/accounts_participants_response.rb', line 27 def initialize(participant = nil, token = nil) @participant = participant @token = token end |
Instance Attribute Details
#participant ⇒ Participant
A participant object
11 12 13 |
# File 'lib/bandwidth/web_rtc_lib/web_rtc/models/accounts_participants_response.rb', line 11 def participant @participant end |
#token ⇒ String
Auth token for the returned participant This should be passed to the participant so that they can connect to the platform
17 18 19 |
# File 'lib/bandwidth/web_rtc_lib/web_rtc/models/accounts_participants_response.rb', line 17 def token @token end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/bandwidth/web_rtc_lib/web_rtc/models/accounts_participants_response.rb', line 34 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. participant = Participant.from_hash(hash['participant']) if hash['participant'] token = hash['token'] # Create object from extracted values. AccountsParticipantsResponse.new(participant, token) end |
.names ⇒ Object
A mapping from model property names to API property names.
20 21 22 23 24 25 |
# File 'lib/bandwidth/web_rtc_lib/web_rtc/models/accounts_participants_response.rb', line 20 def self.names @_hash = {} if @_hash.nil? @_hash['participant'] = 'participant' @_hash['token'] = 'token' @_hash end |