Class: Seatsio::Event
- Inherits:
-
Object
- Object
- Seatsio::Event
- Defined in:
- lib/seatsio/domain.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#categories ⇒ Object
Returns the value of attribute categories.
-
#channels ⇒ Object
Returns the value of attribute channels.
-
#chart_key ⇒ Object
Returns the value of attribute chart_key.
-
#created_on ⇒ Object
Returns the value of attribute created_on.
-
#date ⇒ Object
Returns the value of attribute date.
-
#for_sale_config ⇒ Object
Returns the value of attribute for_sale_config.
-
#id ⇒ Object
Returns the value of attribute id.
-
#is_event_in_season ⇒ Object
Returns the value of attribute is_event_in_season.
-
#is_in_the_past ⇒ Object
Returns the value of attribute is_in_the_past.
-
#is_partial_season ⇒ Object
Returns the value of attribute is_partial_season.
-
#is_top_level_season ⇒ Object
Returns the value of attribute is_top_level_season.
-
#key ⇒ Object
Returns the value of attribute key.
-
#name ⇒ Object
Returns the value of attribute name.
-
#object_categories ⇒ Object
Returns the value of attribute object_categories.
-
#partial_season_keys_for_event ⇒ Object
Returns the value of attribute partial_season_keys_for_event.
-
#supports_best_available ⇒ Object
Returns the value of attribute supports_best_available.
-
#table_booking_config ⇒ Object
Returns the value of attribute table_booking_config.
-
#top_level_season_key ⇒ Object
Returns the value of attribute top_level_season_key.
-
#updated_on ⇒ Object
Returns the value of attribute updated_on.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data) ⇒ Event
constructor
A new instance of Event.
- #is_season ⇒ Object
Constructor Details
#initialize(data) ⇒ Event
Returns a new instance of Event.
200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 |
# File 'lib/seatsio/domain.rb', line 200 def initialize(data) @id = data['id'] @key = data['key'] @chart_key = data['chartKey'] @name = data['name'] @date = Date.iso8601(data['date']) if data['date'] @supports_best_available = data['supportsBestAvailable'] @table_booking_config = TableBookingConfig::from_json(data['tableBookingConfig']) @for_sale_config = ForSaleConfig::from_json(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'] @is_top_level_season = data['isTopLevelSeason'] @is_partial_season = data['isPartialSeason'] @is_event_in_season = data['isEventInSeason'] @top_level_season_key = data['topLevelSeasonKey'] @object_categories = data['objectCategories'] @categories = Category.create_list(data['categories']) if data['categories'] @is_in_the_past = data['isInThePast'] @partial_season_keys_for_event = data['partialSeasonKeysForEvent'] end |
Instance Attribute Details
#categories ⇒ Object
Returns the value of attribute categories.
194 195 196 |
# File 'lib/seatsio/domain.rb', line 194 def categories @categories end |
#channels ⇒ Object
Returns the value of attribute channels.
194 195 196 |
# File 'lib/seatsio/domain.rb', line 194 def channels @channels end |
#chart_key ⇒ Object
Returns the value of attribute chart_key.
194 195 196 |
# File 'lib/seatsio/domain.rb', line 194 def chart_key @chart_key end |
#created_on ⇒ Object
Returns the value of attribute created_on.
194 195 196 |
# File 'lib/seatsio/domain.rb', line 194 def created_on @created_on end |
#date ⇒ Object
Returns the value of attribute date.
194 195 196 |
# File 'lib/seatsio/domain.rb', line 194 def date @date end |
#for_sale_config ⇒ Object
Returns the value of attribute for_sale_config.
194 195 196 |
# File 'lib/seatsio/domain.rb', line 194 def for_sale_config @for_sale_config end |
#id ⇒ Object
Returns the value of attribute id.
194 195 196 |
# File 'lib/seatsio/domain.rb', line 194 def id @id end |
#is_event_in_season ⇒ Object
Returns the value of attribute is_event_in_season.
194 195 196 |
# File 'lib/seatsio/domain.rb', line 194 def is_event_in_season @is_event_in_season end |
#is_in_the_past ⇒ Object
Returns the value of attribute is_in_the_past.
194 195 196 |
# File 'lib/seatsio/domain.rb', line 194 def is_in_the_past @is_in_the_past end |
#is_partial_season ⇒ Object
Returns the value of attribute is_partial_season.
194 195 196 |
# File 'lib/seatsio/domain.rb', line 194 def is_partial_season @is_partial_season end |
#is_top_level_season ⇒ Object
Returns the value of attribute is_top_level_season.
194 195 196 |
# File 'lib/seatsio/domain.rb', line 194 def is_top_level_season @is_top_level_season end |
#key ⇒ Object
Returns the value of attribute key.
194 195 196 |
# File 'lib/seatsio/domain.rb', line 194 def key @key end |
#name ⇒ Object
Returns the value of attribute name.
194 195 196 |
# File 'lib/seatsio/domain.rb', line 194 def name @name end |
#object_categories ⇒ Object
Returns the value of attribute object_categories.
194 195 196 |
# File 'lib/seatsio/domain.rb', line 194 def object_categories @object_categories end |
#partial_season_keys_for_event ⇒ Object
Returns the value of attribute partial_season_keys_for_event.
194 195 196 |
# File 'lib/seatsio/domain.rb', line 194 def partial_season_keys_for_event @partial_season_keys_for_event end |
#supports_best_available ⇒ Object
Returns the value of attribute supports_best_available.
194 195 196 |
# File 'lib/seatsio/domain.rb', line 194 def supports_best_available @supports_best_available end |
#table_booking_config ⇒ Object
Returns the value of attribute table_booking_config.
194 195 196 |
# File 'lib/seatsio/domain.rb', line 194 def table_booking_config @table_booking_config end |
#top_level_season_key ⇒ Object
Returns the value of attribute top_level_season_key.
194 195 196 |
# File 'lib/seatsio/domain.rb', line 194 def top_level_season_key @top_level_season_key end |
#updated_on ⇒ Object
Returns the value of attribute updated_on.
194 195 196 |
# File 'lib/seatsio/domain.rb', line 194 def updated_on @updated_on end |
Class Method Details
Instance Method Details
#is_season ⇒ Object
224 225 226 |
# File 'lib/seatsio/domain.rb', line 224 def is_season false end |