Class: Bandwidth::ConferenceDetail
- Defined in:
- lib/bandwidth/voice_lib/voice/models/conference_detail.rb
Overview
ConferenceDetail Model.
Instance Attribute Summary collapse
-
#active_members ⇒ List of ConferenceMemberDetail
TODO: Write general description for this method.
-
#completed_time ⇒ DateTime
TODO: Write general description for this method.
-
#conference_event_method ⇒ ConferenceEventMethodEnum
TODO: Write general description for this method.
-
#conference_event_url ⇒ String
TODO: Write general description for this method.
-
#created_time ⇒ DateTime
TODO: Write general description for this method.
-
#id ⇒ String
TODO: Write general description for this method.
-
#name ⇒ String
TODO: Write general description for this method.
-
#tag ⇒ String
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(id = nil, name = nil, created_time = nil, completed_time = nil, conference_event_url = nil, conference_event_method = nil, tag = nil, active_members = nil) ⇒ ConferenceDetail
constructor
A new instance of ConferenceDetail.
Methods inherited from BaseModel
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.
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/bandwidth/voice_lib/voice/models/conference_detail.rb', line 56 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_members ⇒ List of ConferenceMemberDetail
TODO: Write general description for this method
40 41 42 |
# File 'lib/bandwidth/voice_lib/voice/models/conference_detail.rb', line 40 def active_members @active_members end |
#completed_time ⇒ DateTime
TODO: Write general description for this method
24 25 26 |
# File 'lib/bandwidth/voice_lib/voice/models/conference_detail.rb', line 24 def completed_time @completed_time end |
#conference_event_method ⇒ ConferenceEventMethodEnum
TODO: Write general description for this method
32 33 34 |
# File 'lib/bandwidth/voice_lib/voice/models/conference_detail.rb', line 32 def conference_event_method @conference_event_method end |
#conference_event_url ⇒ String
TODO: Write general description for this method
28 29 30 |
# File 'lib/bandwidth/voice_lib/voice/models/conference_detail.rb', line 28 def conference_event_url @conference_event_url end |
#created_time ⇒ DateTime
TODO: Write general description for this method
20 21 22 |
# File 'lib/bandwidth/voice_lib/voice/models/conference_detail.rb', line 20 def created_time @created_time end |
#id ⇒ String
TODO: Write general description for this method
12 13 14 |
# File 'lib/bandwidth/voice_lib/voice/models/conference_detail.rb', line 12 def id @id end |
#name ⇒ String
TODO: Write general description for this method
16 17 18 |
# File 'lib/bandwidth/voice_lib/voice/models/conference_detail.rb', line 16 def name @name end |
#tag ⇒ String
TODO: Write general description for this method
36 37 38 |
# File 'lib/bandwidth/voice_lib/voice/models/conference_detail.rb', line 36 def tag @tag end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 104 105 106 |
# File 'lib/bandwidth/voice_lib/voice/models/conference_detail.rb', line 75 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. id = hash['id'] name = hash['name'] created_time = APIHelper.rfc3339(hash['createdTime']) if hash['createdTime'] completed_time = APIHelper.rfc3339(hash['completedTime']) if 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 |
.names ⇒ Object
A mapping from model property names to API property names.
43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/bandwidth/voice_lib/voice/models/conference_detail.rb', line 43 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 |