diff --git a/lib/seatsio/domain.rb b/lib/seatsio/domain.rb index 7a4df1a..f1e9bce 100644 --- a/lib/seatsio/domain.rb +++ b/lib/seatsio/domain.rb @@ -391,8 +391,8 @@ class EventObjectInfo :ticket_type, :num_booked, :num_free, :num_held, :for_sale, :section, :is_accessible, :is_companion_seat, :has_restricted_view, :displayed_object_type, :left_neighbour, :right_neighbour, :is_available, :channel, - :book_as_a_whole, :distance_to_focal_point, :holds, :num_seats, - :variable_occupancy, :min_occupancy, :max_occupancy, :season_status_overridden_quantity + :book_as_a_whole, :distance_to_focal_point, :holds, :num_seats, :variable_occupancy, + :min_occupancy, :max_occupancy, :season_status_overridden_quantity, :num_not_for_sale def initialize(data) @status = data['status'] @@ -429,6 +429,7 @@ def initialize(data) @min_occupancy = data['minOccupancy'] @max_occupancy = data['maxOccupancy'] @season_status_overridden_quantity = data['seasonStatusOverriddenQuantity'] + @num_not_for_sale = data['numNotForSale'] end end diff --git a/test/events/mark_objects_as_not_for_sale_test.rb b/test/events/mark_objects_as_not_for_sale_test.rb index 783d6ee..2e28384 100644 --- a/test/events/mark_objects_as_not_for_sale_test.rb +++ b/test/events/mark_objects_as_not_for_sale_test.rb @@ -38,4 +38,14 @@ def test_categories assert_equal([], retrieved_event.for_sale_config.objects) assert_equal(["cat1", "cat2"], retrieved_event.for_sale_config.categories) end + + def test_num_not_for_sale_is_correctly_exposed + chart_key = create_test_chart + event = @seatsio.events.create chart_key: chart_key + + @seatsio.events.mark_as_not_for_sale key: event.key, area_places: { 'GA1' => 3 } + + ga1_info = @seatsio.events.retrieve_object_info(key: event.key, label: 'GA1') + assert_equal(3, ga1_info.num_not_for_sale) + end end