Skip to content

Commit

Permalink
Exposed season status overridden quantity (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
mroloux authored Apr 24, 2024
1 parent 8919497 commit a508c78
Show file tree
Hide file tree
Showing 2 changed files with 19 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 @@ -143,4 +143,8 @@ class EventObjectInfo
* @var int
*/
public $maxOccupancy;
/**
* @var int
*/
public $seasonStatusOverriddenQuantity;
}
15 changes: 15 additions & 0 deletions tests/Reports/Events/EventReportsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Seatsio\Events\EventObjectInfo;
use Seatsio\Events\ObjectProperties;
use Seatsio\Events\TableBookingConfig;
use Seatsio\Seasons\SeasonCreationParams;
use Seatsio\SeatsioClientTest;

class EventReportsTest extends SeatsioClientTest
Expand Down Expand Up @@ -48,6 +49,7 @@ public function testReportItemProperties()
self::assertEquals("A-2", $reportItem->rightNeighbour);
self::assertEquals("channel1", $reportItem->channel);
self::assertNotNull($reportItem->distanceToFocalPoint);
self::assertEquals(0, $reportItem->seasonStatusOverriddenQuantity);

$gaItem = $report["GA1"][0];
self::assertFalse($gaItem->variableOccupancy);
Expand All @@ -68,6 +70,19 @@ public function testHoldToken()
self::assertEquals("$holdToken->holdToken", $reportItem->holdToken);
}

public function testSeasonStatusOverriddenQuantity()
{
$chartKey = $this->createTestChart();
$season = $this->seatsioClient->seasons->create($chartKey, (new SeasonCreationParams())->setNumberOfEvents(1));
$event = $season->events[0];
$this->seatsioClient->events->overrideSeasonStatus($event->key, ["A-1"]);

$report = $this->seatsioClient->eventReports->byLabel($event->key);

$reportItem = $report["A-1"][0];
self::assertEquals(1, $reportItem->seasonStatusOverriddenQuantity);
}

public function testReportItemPropertiesForGA()
{
$chartKey = $this->createTestChart();
Expand Down

0 comments on commit a508c78

Please sign in to comment.