Class: Bandwidth::ConferenceDetail

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

Overview

ConferenceDetail Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(id = nil, name = nil, created_time = nil, completed_time = nil, conference_event_url = nil, conference_event_method = nil, tag = nil, active_members = nil) ⇒ ConferenceDetail

Returns a new instance of ConferenceDetail.



55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# File 'lib/bandwidth/voice_lib/voice/models/conference_detail.rb', line 55

def initialize(id = nil,
               name = nil,
               created_time = nil,
               completed_time = nil,
               conference_event_url = nil,
               conference_event_method = nil,
               tag = nil,
               active_members = nil)
  @id = id
  @name = name
  @created_time = created_time
  @completed_time = completed_time
  @conference_event_url = conference_event_url
  @conference_event_method = conference_event_method
  @tag = tag
  @active_members = active_members
end

Instance Attribute Details

#active_membersList of ConferenceMemberDetail

TODO: Write general description for this method

Returns:



39
40
41
# File 'lib/bandwidth/voice_lib/voice/models/conference_detail.rb', line 39

def active_members
  @active_members
end

#completed_timeLong

TODO: Write general description for this method

Returns:

  • (Long)


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

def completed_time
  @completed_time
end

#conference_event_methodConferenceEventMethodEnum

TODO: Write general description for this method



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

def conference_event_method
  @conference_event_method
end

#conference_event_urlString

TODO: Write general description for this method

Returns:

  • (String)


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

def conference_event_url
  @conference_event_url
end

#created_timeLong

TODO: Write general description for this method

Returns:

  • (Long)


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

def created_time
  @created_time
end

#idString

TODO: Write general description for this method

Returns:

  • (String)


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

def id
  @id
end

#nameString

TODO: Write general description for this method

Returns:

  • (String)


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

def name
  @name
end

#tagString

TODO: Write general description for this method

Returns:

  • (String)


35
36
37
# File 'lib/bandwidth/voice_lib/voice/models/conference_detail.rb', line 35

def tag
  @tag
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# File 'lib/bandwidth/voice_lib/voice/models/conference_detail.rb', line 74

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  id = hash['id']
  name = hash['name']
  created_time = hash['createdTime']
  completed_time = hash['completedTime']
  conference_event_url = hash['conferenceEventUrl']
  conference_event_method = hash['conferenceEventMethod']
  tag = hash['tag']
  # Parameter is an array, so we need to iterate through it
  active_members = nil
  unless hash['activeMembers'].nil?
    active_members = []
    hash['activeMembers'].each do |structure|
      active_members << (ConferenceMemberDetail.from_hash(structure) if structure)
    end
  end

  # Create object from extracted values.
  ConferenceDetail.new(id,
                       name,
                       created_time,
                       completed_time,
                       conference_event_url,
                       conference_event_method,
                       tag,
                       active_members)
end

.namesObject

A mapping from model property names to API property names.



42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/bandwidth/voice_lib/voice/models/conference_detail.rb', line 42

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['id'] = 'id'
  @_hash['name'] = 'name'
  @_hash['created_time'] = 'createdTime'
  @_hash['completed_time'] = 'completedTime'
  @_hash['conference_event_url'] = 'conferenceEventUrl'
  @_hash['conference_event_method'] = 'conferenceEventMethod'
  @_hash['tag'] = 'tag'
  @_hash['active_members'] = 'activeMembers'
  @_hash
end