Class: Bandwidth::ConferenceMemberState

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/bandwidth/voice_lib/voice/models/conference_member_state.rb

Overview

ConferenceMemberState Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

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.



45
46
47
48
49
50
51
52
53
54
55
56
57
# File 'lib/bandwidth/voice_lib/voice/models/conference_member_state.rb', line 45

def initialize(call_id = nil,
               conference_id = nil,
               member_url = nil,
               mute = nil,
               hold = nil,
               call_ids_to_coach = nil)
  @call_id = call_id
  @conference_id = conference_id
  @member_url = member_url
  @mute = mute
  @hold = hold
  @call_ids_to_coach = call_ids_to_coach
end

Instance Attribute Details

#call_idString

TODO: Write general description for this method

Returns:

  • (String)


11
12
13
# File 'lib/bandwidth/voice_lib/voice/models/conference_member_state.rb', line 11

def call_id
  @call_id
end

#call_ids_to_coachList of String

TODO: Write general description for this method

Returns:

  • (List of String)


31
32
33
# File 'lib/bandwidth/voice_lib/voice/models/conference_member_state.rb', line 31

def call_ids_to_coach
  @call_ids_to_coach
end

#conference_idString

TODO: Write general description for this method

Returns:

  • (String)


15
16
17
# File 'lib/bandwidth/voice_lib/voice/models/conference_member_state.rb', line 15

def conference_id
  @conference_id
end

#holdBoolean

TODO: Write general description for this method

Returns:

  • (Boolean)


27
28
29
# File 'lib/bandwidth/voice_lib/voice/models/conference_member_state.rb', line 27

def hold
  @hold
end

#member_urlString

TODO: Write general description for this method

Returns:

  • (String)


19
20
21
# File 'lib/bandwidth/voice_lib/voice/models/conference_member_state.rb', line 19

def member_url
  @member_url
end

#muteBoolean

TODO: Write general description for this method

Returns:

  • (Boolean)


23
24
25
# File 'lib/bandwidth/voice_lib/voice/models/conference_member_state.rb', line 23

def mute
  @mute
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# File 'lib/bandwidth/voice_lib/voice/models/conference_member_state.rb', line 60

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.

  call_id = hash['callId']
  conference_id = hash['conferenceId']
  member_url = hash['memberUrl']
  mute = hash['mute']
  hold = hash['hold']
  call_ids_to_coach = hash['callIdsToCoach']

  # Create object from extracted values.

  ConferenceMemberState.new(call_id,
                            conference_id,
                            member_url,
                            mute,
                            hold,
                            call_ids_to_coach)
end

.namesObject

A mapping from model property names to API property names.



34
35
36
37
38
39
40
41
42
43
# File 'lib/bandwidth/voice_lib/voice/models/conference_member_state.rb', line 34

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