Class: Seatsio::Event
- Inherits:
-
Object
- Object
- Seatsio::Event
- Defined in:
- lib/seatsio/domain.rb
Instance Attribute Summary collapse
-
#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.
-
#key ⇒ Object
Returns the value of attribute key.
-
#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.
-
#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.
Constructor Details
#initialize(data) ⇒ Event
Returns a new instance of Event.
132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
# File 'lib/seatsio/domain.rb', line 132 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 |
Instance Attribute Details
#channels ⇒ Object
Returns the value of attribute channels.
128 129 130 |
# File 'lib/seatsio/domain.rb', line 128 def channels @channels end |
#chart_key ⇒ Object
Returns the value of attribute chart_key.
128 129 130 |
# File 'lib/seatsio/domain.rb', line 128 def chart_key @chart_key end |
#created_on ⇒ Object
Returns the value of attribute created_on.
128 129 130 |
# File 'lib/seatsio/domain.rb', line 128 def created_on @created_on end |
#for_sale_config ⇒ Object
Returns the value of attribute for_sale_config.
128 129 130 |
# File 'lib/seatsio/domain.rb', line 128 def for_sale_config @for_sale_config end |
#id ⇒ Object
Returns the value of attribute id.
128 129 130 |
# File 'lib/seatsio/domain.rb', line 128 def id @id end |
#key ⇒ Object
Returns the value of attribute key.
128 129 130 |
# File 'lib/seatsio/domain.rb', line 128 def key @key end |
#social_distancing_ruleset_key ⇒ Object
Returns the value of attribute social_distancing_ruleset_key.
128 129 130 |
# File 'lib/seatsio/domain.rb', line 128 def @social_distancing_ruleset_key end |
#supports_best_available ⇒ Object
Returns the value of attribute supports_best_available.
128 129 130 |
# File 'lib/seatsio/domain.rb', line 128 def supports_best_available @supports_best_available end |
#table_booking_config ⇒ Object
Returns the value of attribute table_booking_config.
128 129 130 |
# File 'lib/seatsio/domain.rb', line 128 def table_booking_config @table_booking_config end |
#updated_on ⇒ Object
Returns the value of attribute updated_on.
128 129 130 |
# File 'lib/seatsio/domain.rb', line 128 def updated_on @updated_on end |