From e5cb9579ca6e421ef9ecb8a45698f4754e6d934d Mon Sep 17 00:00:00 2001 From: Steve Chaloner Date: Mon, 10 Jun 2024 09:17:33 +0200 Subject: [PATCH] Expose numNotForSale in EventObjectInfo (#118) Co-authored-by: Steve Chaloner --- src/Events/EventObjectInfo.php | 4 ++++ tests/Events/MarkObjectsAsNotForSaleTest.php | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/src/Events/EventObjectInfo.php b/src/Events/EventObjectInfo.php index c610084..7e89e01 100644 --- a/src/Events/EventObjectInfo.php +++ b/src/Events/EventObjectInfo.php @@ -79,6 +79,10 @@ class EventObjectInfo * @var int */ public $numHeld; + /** + * @var int + */ + public $numNotForSale; /** * @var object */ diff --git a/tests/Events/MarkObjectsAsNotForSaleTest.php b/tests/Events/MarkObjectsAsNotForSaleTest.php index 33ee502..bbda48d 100644 --- a/tests/Events/MarkObjectsAsNotForSaleTest.php +++ b/tests/Events/MarkObjectsAsNotForSaleTest.php @@ -46,4 +46,14 @@ public function testObjectsAreOptional() self::assertEquals(["cat1", "cat2"], $retrievedEvent->forSaleConfig->categories); } + public function testNumNotForSaleIsCorrectlyExposed() + { + $chartKey = $this->createTestChart(); + $event = $this->seatsioClient->events->create($chartKey); + + $this->seatsioClient->events->markAsNotForSale($event->key, [], ["GA1" => 3]); + + $eventObjectInfo = $this->seatsioClient->events->retrieveObjectInfo($event->key, "GA1"); + self::assertEquals(3, $eventObjectInfo->numNotForSale); + } }