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.
-
#nullables ⇒ Object
An array for nullable fields.
-
#optionals ⇒ Object
An array for optional fields.
Methods inherited from BaseModel
Constructor Details
#initialize(participant = nil, token = nil) ⇒ AccountsParticipantsResponse
Returns a new instance of AccountsParticipantsResponse.
43 44 45 46 47 |
# File 'lib/bandwidth/web_rtc_lib/web_rtc/models/accounts_participants_response.rb', line 43 def initialize(participant = nil, token = nil) @participant = participant unless participant == SKIP @token = token unless token == SKIP end |
Instance Attribute Details
#participant ⇒ Participant
A participant object
14 15 16 |
# File 'lib/bandwidth/web_rtc_lib/web_rtc/models/accounts_participants_response.rb', line 14 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
20 21 22 |
# File 'lib/bandwidth/web_rtc_lib/web_rtc/models/accounts_participants_response.rb', line 20 def token @token end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/bandwidth/web_rtc_lib/web_rtc/models/accounts_participants_response.rb', line 50 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.key?('token') ? hash['token'] : SKIP # Create object from extracted values. AccountsParticipantsResponse.new(participant, token) end |
.names ⇒ Object
A mapping from model property names to API property names.
23 24 25 26 27 28 |
# File 'lib/bandwidth/web_rtc_lib/web_rtc/models/accounts_participants_response.rb', line 23 def self.names @_hash = {} if @_hash.nil? @_hash['participant'] = 'participant' @_hash['token'] = 'token' @_hash end |
Instance Method Details
#nullables ⇒ Object
An array for nullable fields
39 40 41 |
# File 'lib/bandwidth/web_rtc_lib/web_rtc/models/accounts_participants_response.rb', line 39 def nullables [] end |
#optionals ⇒ Object
An array for optional fields
31 32 33 34 35 36 |
# File 'lib/bandwidth/web_rtc_lib/web_rtc/models/accounts_participants_response.rb', line 31 def optionals %w[ participant token ] end |