Skip to content

Commit

Permalink
Expose numNotForSale in EventObjectInfo (#118)
Browse files Browse the repository at this point in the history
Co-authored-by: Steve Chaloner <[email protected]>
  • Loading branch information
schaloner and Steve Chaloner authored Jun 10, 2024
1 parent 0cb92b9 commit e5cb957
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Events/EventObjectInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ class EventObjectInfo
* @var int
*/
public $numHeld;
/**
* @var int
*/
public $numNotForSale;
/**
* @var object
*/
Expand Down
10 changes: 10 additions & 0 deletions tests/Events/MarkObjectsAsNotForSaleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

0 comments on commit e5cb957

Please sign in to comment.