From 00c2ecef2d404fa2895cb6ae28069f6e48f3022a Mon Sep 17 00:00:00 2001 From: mroloux Date: Wed, 16 Sep 2026 14:30:53 +0200 Subject: [PATCH] Exposed area type --- seatsio/domain.py | 2 ++ tests/reports/charts/testChartReports.py | 4 ++++ tests/reports/events/testEventReports.py | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/seatsio/domain.py b/seatsio/domain.py index 2562161..692e63d 100644 --- a/seatsio/domain.py +++ b/seatsio/domain.py @@ -267,6 +267,7 @@ def __init__(self, item_data): self.capacity = item_data.get("capacity") self.book_as_a_whole = item_data.get("bookAsAWhole") self.object_type = item_data.get("objectType") + self.area_type = item_data.get("areaType") self.left_neighbour = item_data.get('leftNeighbour') self.right_neighbour = item_data.get('rightNeighbour') self.distance_to_focal_point = item_data.get('distanceToFocalPoint') @@ -321,6 +322,7 @@ def __init__(self, item_data): self.capacity = item_data.get("capacity") self.book_as_a_whole = item_data.get("bookAsAWhole") self.object_type = item_data.get("objectType") + self.area_type = item_data.get("areaType") self.extra_data = item_data.get("extraData") self.is_accessible = item_data.get("isAccessible") self.is_companion_seat = item_data.get("isCompanionSeat") diff --git a/tests/reports/charts/testChartReports.py b/tests/reports/charts/testChartReports.py index 51ae1f2..5a08443 100644 --- a/tests/reports/charts/testChartReports.py +++ b/tests/reports/charts/testChartReports.py @@ -69,6 +69,7 @@ def test_reportItemPropertiesForGA(self, update_chart, get_report): assert_that(report_item).is_instance(ChartObjectInfo) assert_that(report_item.label).is_equal_to("GA1") assert_that(report_item.object_type).is_equal_to("generalAdmission") + assert_that(report_item.area_type).is_equal_to("generalAdmission") assert_that(report_item.category_label).is_equal_to("Cat1") assert_that(report_item.category_key).is_equal_to("9") assert_that(report_item.section).is_none() @@ -76,6 +77,9 @@ def test_reportItemPropertiesForGA(self, update_chart, get_report): assert_that(report_item.capacity).is_equal_to(100) assert_that(report_item.book_as_a_whole).is_equal_to(False) + report_item = report.get("GA2")[0] + assert_that(report_item.area_type).is_equal_to("generalAdmission") + @parameterized.expand([ [ lambda instance, chart_key: {}, diff --git a/tests/reports/events/testEventReports.py b/tests/reports/events/testEventReports.py index 63c096e..1d8e991 100644 --- a/tests/reports/events/testEventReports.py +++ b/tests/reports/events/testEventReports.py @@ -121,6 +121,7 @@ def test_reportItemPropertiesForGA(self): assert_that(report_item.status).is_equal_to(EventObjectInfo.HELD) assert_that(report_item.label).is_equal_to("GA1") assert_that(report_item.object_type).is_equal_to("generalAdmission") + assert_that(report_item.area_type).is_equal_to("generalAdmission") assert_that(report_item.category_label).is_equal_to("Cat1") assert_that(report_item.category_key).is_equal_to("9") assert_that(report_item.ticket_type).is_none() @@ -144,6 +145,9 @@ def test_reportItemPropertiesForGA(self): assert_that(report_item.displayed_object_type).is_none() assert_that(report_item.parent_displayed_object_type).is_none() + ga_item = report.get("GA2")[0] + assert_that(ga_item.area_type).is_equal_to("generalAdmission") + def test_reportItemPropertiesForTable(self): chart_key = self.create_test_chart_with_tables() event = self.client.events.create(chart_key, table_booking_config=TableBookingConfig.all_by_table())