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.
-
#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_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.
-
#object_categories ⇒ Object
Returns the value of attribute object_categories.
-
#social_distancing_ruleset_key ⇒ Object
Returns the value of attribute social_distancing_ruleset_key.
-
#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.
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 |
# File 'lib/seatsio/domain.rb', line 170 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'] @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'] end |
Instance Attribute Details
#categories ⇒ Object
Returns the value of attribute categories.
164 165 166 |
# File 'lib/seatsio/domain.rb', line 164 def categories @categories end |
#channels ⇒ Object
Returns the value of attribute channels.
164 165 166 |
# File 'lib/seatsio/domain.rb', line 164 def channels @channels end |
#chart_key ⇒ Object
Returns the value of attribute chart_key.
164 165 166 |
# File 'lib/seatsio/domain.rb', line 164 def chart_key @chart_key end |
#created_on ⇒ Object
Returns the value of attribute created_on.
164 165 166 |
# File 'lib/seatsio/domain.rb', line 164 def created_on @created_on end |
#for_sale_config ⇒ Object
Returns the value of attribute for_sale_config.
164 165 166 |
# File 'lib/seatsio/domain.rb', line 164 def for_sale_config @for_sale_config end |
#id ⇒ Object
Returns the value of attribute id.
164 165 166 |
# File 'lib/seatsio/domain.rb', line 164 def id @id end |
#is_event_in_season ⇒ Object
Returns the value of attribute is_event_in_season.
164 165 166 |
# File 'lib/seatsio/domain.rb', line 164 def is_event_in_season @is_event_in_season end |
#is_partial_season ⇒ Object
Returns the value of attribute is_partial_season.
164 165 166 |
# File 'lib/seatsio/domain.rb', line 164 def is_partial_season @is_partial_season end |
#is_top_level_season ⇒ Object
Returns the value of attribute is_top_level_season.
164 165 166 |
# File 'lib/seatsio/domain.rb', line 164 def is_top_level_season @is_top_level_season end |
#key ⇒ Object
Returns the value of attribute key.
164 165 166 |
# File 'lib/seatsio/domain.rb', line 164 def key @key end |
#object_categories ⇒ Object
Returns the value of attribute object_categories.
164 165 166 |
# File 'lib/seatsio/domain.rb', line 164 def object_categories @object_categories end |
#social_distancing_ruleset_key ⇒ Object
Returns the value of attribute social_distancing_ruleset_key.
164 165 166 |
# File 'lib/seatsio/domain.rb', line 164 def @social_distancing_ruleset_key end |
#supports_best_available ⇒ Object
Returns the value of attribute supports_best_available.
164 165 166 |
# File 'lib/seatsio/domain.rb', line 164 def supports_best_available @supports_best_available end |
#table_booking_config ⇒ Object
Returns the value of attribute table_booking_config.
164 165 166 |
# File 'lib/seatsio/domain.rb', line 164 def table_booking_config @table_booking_config end |
#top_level_season_key ⇒ Object
Returns the value of attribute top_level_season_key.
164 165 166 |
# File 'lib/seatsio/domain.rb', line 164 def top_level_season_key @top_level_season_key end |
#updated_on ⇒ Object
Returns the value of attribute updated_on.
164 165 166 |
# File 'lib/seatsio/domain.rb', line 164 def updated_on @updated_on end |
Class Method Details
Instance Method Details
#is_season ⇒ Object
191 192 193 |
# File 'lib/seatsio/domain.rb', line 191 def is_season false end |