class Seatsio::Event
def self.create_list(list = [])
def self.create_list(list = []) result = [] list.each do |item| result << Event.new(item) end return result end
def initialize(data)
def initialize(data) @id = data['id'] @key = data['key'] @chart_key = data['chartKey'] @supports_best_available = data['supportsBestAvailable'] @table_booking_config = TableBookingConfig::from_json(data['tableBookingConfig']) @for_sale_config = ForSaleConfig.new(data['forSaleConfig']) if data['forSaleConfig'] @created_on = parse_date(data['createdOn']) @updated_on = parse_date(data['updatedOn']) @channels = data['channels'].map { |d| Channel.new(d['key'], d['name'], d['color'], d['index'], d['objects']) } if data['channels'] @social_distancing_ruleset_key = data['socialDistancingRulesetKey'] end