class Bandwidth::ConferenceState
ConferenceState
Model.
Attributes
active_members[RW]
TODO: Write general description for this method @return [List of ConferenceMemberState]
completed_time[RW]
TODO: Write general description for this method @return [DateTime]
conference_event_method[RW]
TODO: Write general description for this method @return [ConferenceEventMethodEnum]
conference_event_url[RW]
TODO: Write general description for this method @return [String]
created_time[RW]
TODO: Write general description for this method @return [DateTime]
id[RW]
TODO: Write general description for this method @return [String]
name[RW]
TODO: Write general description for this method @return [String]
tag[RW]
TODO: Write general description for this method @return [String]
Public Class Methods
from_hash(hash)
click to toggle source
Creates an instance of the object from a hash.
# File lib/bandwidth/voice_lib/voice/models/conference_state.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 = DateTimeHelper.from_rfc3339(hash['createdTime']) if hash['createdTime'] completed_time = DateTimeHelper.from_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 << (ConferenceMemberState.from_hash(structure) if structure) end end # Create object from extracted values. ConferenceState.new(id, name, created_time, completed_time, conference_event_url, conference_event_method, tag, active_members) end
names()
click to toggle source
A mapping from model property names to API property names.
# File lib/bandwidth/voice_lib/voice/models/conference_state.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
new(id = nil, name = nil, created_time = nil, completed_time = nil, conference_event_url = nil, conference_event_method = nil, tag = nil, active_members = nil)
click to toggle source
# File lib/bandwidth/voice_lib/voice/models/conference_state.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
Public Instance Methods
to_completed_time()
click to toggle source
# File lib/bandwidth/voice_lib/voice/models/conference_state.rb, line 112 def to_completed_time DateTimeHelper.to_rfc3339(completed_time) end
to_created_time()
click to toggle source
# File lib/bandwidth/voice_lib/voice/models/conference_state.rb, line 108 def to_created_time DateTimeHelper.to_rfc3339(created_time) end