Class: Bandwidth::ConferenceMemberState
- Defined in:
- lib/bandwidth/voice_lib/voice/models/conference_member_state.rb
Overview
ConferenceMemberState Model.
Instance Attribute Summary collapse
-
#call_id ⇒ String
TODO: Write general description for this method.
-
#call_ids_to_coach ⇒ List of String
TODO: Write general description for this method.
-
#conference_id ⇒ String
TODO: Write general description for this method.
-
#hold ⇒ Boolean
TODO: Write general description for this method.
-
#member_url ⇒ String
TODO: Write general description for this method.
-
#mute ⇒ Boolean
TODO: Write general description for this method.
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(call_id = nil, conference_id = nil, member_url = nil, mute = nil, hold = nil, call_ids_to_coach = nil) ⇒ ConferenceMemberState
constructor
A new instance of ConferenceMemberState.
-
#nullables ⇒ Object
An array for nullable fields.
-
#optionals ⇒ Object
An array for optional fields.
Methods inherited from BaseModel
Constructor Details
#initialize(call_id = nil, conference_id = nil, member_url = nil, mute = nil, hold = nil, call_ids_to_coach = nil) ⇒ ConferenceMemberState
Returns a new instance of ConferenceMemberState.
67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/bandwidth/voice_lib/voice/models/conference_member_state.rb', line 67 def initialize(call_id = nil, conference_id = nil, member_url = nil, mute = nil, hold = nil, call_ids_to_coach = nil) @call_id = call_id unless call_id == SKIP @conference_id = conference_id unless conference_id == SKIP @member_url = member_url unless member_url == SKIP @mute = mute unless mute == SKIP @hold = hold unless hold == SKIP @call_ids_to_coach = call_ids_to_coach unless call_ids_to_coach == SKIP end |
Instance Attribute Details
#call_id ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/bandwidth/voice_lib/voice/models/conference_member_state.rb', line 14 def call_id @call_id end |
#call_ids_to_coach ⇒ List of String
TODO: Write general description for this method
34 35 36 |
# File 'lib/bandwidth/voice_lib/voice/models/conference_member_state.rb', line 34 def call_ids_to_coach @call_ids_to_coach end |
#conference_id ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/bandwidth/voice_lib/voice/models/conference_member_state.rb', line 18 def conference_id @conference_id end |
#hold ⇒ Boolean
TODO: Write general description for this method
30 31 32 |
# File 'lib/bandwidth/voice_lib/voice/models/conference_member_state.rb', line 30 def hold @hold end |
#member_url ⇒ String
TODO: Write general description for this method
22 23 24 |
# File 'lib/bandwidth/voice_lib/voice/models/conference_member_state.rb', line 22 def member_url @member_url end |
#mute ⇒ Boolean
TODO: Write general description for this method
26 27 28 |
# File 'lib/bandwidth/voice_lib/voice/models/conference_member_state.rb', line 26 def mute @mute end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/bandwidth/voice_lib/voice/models/conference_member_state.rb', line 82 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. call_id = hash.key?('callId') ? hash['callId'] : SKIP conference_id = hash.key?('conferenceId') ? hash['conferenceId'] : SKIP member_url = hash.key?('memberUrl') ? hash['memberUrl'] : SKIP mute = hash.key?('mute') ? hash['mute'] : SKIP hold = hash.key?('hold') ? hash['hold'] : SKIP call_ids_to_coach = hash.key?('callIdsToCoach') ? hash['callIdsToCoach'] : SKIP # Create object from extracted values. ConferenceMemberState.new(call_id, conference_id, member_url, mute, hold, call_ids_to_coach) end |
.names ⇒ Object
A mapping from model property names to API property names.
37 38 39 40 41 42 43 44 45 46 |
# File 'lib/bandwidth/voice_lib/voice/models/conference_member_state.rb', line 37 def self.names @_hash = {} if @_hash.nil? @_hash['call_id'] = 'callId' @_hash['conference_id'] = 'conferenceId' @_hash['member_url'] = 'memberUrl' @_hash['mute'] = 'mute' @_hash['hold'] = 'hold' @_hash['call_ids_to_coach'] = 'callIdsToCoach' @_hash end |
Instance Method Details
#nullables ⇒ Object
An array for nullable fields
61 62 63 64 65 |
# File 'lib/bandwidth/voice_lib/voice/models/conference_member_state.rb', line 61 def nullables %w[ call_ids_to_coach ] end |
#optionals ⇒ Object
An array for optional fields
49 50 51 52 53 54 55 56 57 58 |
# File 'lib/bandwidth/voice_lib/voice/models/conference_member_state.rb', line 49 def optionals %w[ call_id conference_id member_url mute hold call_ids_to_coach ] end |