diff --git a/src/Events/Events.php b/src/Events/Events.php index 9f224c5..f31f7ed 100644 --- a/src/Events/Events.php +++ b/src/Events/Events.php @@ -434,15 +434,17 @@ public function book($eventKeyOrKeys, $objectOrObjects, $holdToken = null, $orde * @param $number int * @param $categories string[] * @param $holdToken string + * @param $extraData array + * @param $ticketTypes string[] * @param $orderId string * @param $keepExtraData boolean * @param $ignoreChannels boolean * @param $channelKeys string[] * @return BestAvailableObjects */ - public function bookBestAvailable($eventKey, $number, $categories = null, $holdToken = null, $orderId = null, $keepExtraData = null, $ignoreChannels = null, $channelKeys = null) + public function bookBestAvailable($eventKey, $number, $categories = null, $holdToken = null, $extraData = null, $ticketTypes = null, $orderId = null, $keepExtraData = null, $ignoreChannels = null, $channelKeys = null) { - return $this::changeBestAvailableObjectStatus($eventKey, $number, ObjectStatus::$BOOKED, $categories, $holdToken, $orderId, $keepExtraData, $ignoreChannels, $channelKeys); + return $this::changeBestAvailableObjectStatus($eventKey, $number, ObjectStatus::$BOOKED, $categories, $holdToken, $extraData, $ticketTypes, $orderId, $keepExtraData, $ignoreChannels, $channelKeys); } /** @@ -480,15 +482,17 @@ public function hold($eventKeyOrKeys, $objectOrObjects, $holdToken, $orderId = n * @param $number int * @param $categories string[] * @param $holdToken string + * @param $extraData array + * @param $ticketTypes string[] * @param $orderId string * @param $keepExtraData boolean * @param $ignoreChannels boolean * @param $channelKeys string[] * @return BestAvailableObjects */ - public function holdBestAvailable($eventKey, $number, $holdToken, $categories = null, $orderId = null, $keepExtraData = null, $ignoreChannels = null, $channelKeys = null) + public function holdBestAvailable($eventKey, $number, $holdToken, $categories = null, $extraData = null, $ticketTypes = null, $orderId = null, $keepExtraData = null, $ignoreChannels = null, $channelKeys = null) { - return $this::changeBestAvailableObjectStatus($eventKey, $number, ObjectStatus::$HELD, $categories, $holdToken, $orderId, $keepExtraData, $ignoreChannels, $channelKeys); + return $this::changeBestAvailableObjectStatus($eventKey, $number, ObjectStatus::$HELD, $categories, $holdToken, $extraData, $ticketTypes, $orderId, $keepExtraData, $ignoreChannels, $channelKeys); } /** @@ -498,14 +502,14 @@ public function holdBestAvailable($eventKey, $number, $holdToken, $categories = * @param $categories string[] * @param $holdToken string * @param $extraData array + * @param $ticketTypes string[] * @param $orderId string * @param $keepExtraData boolean * @param $ignoreChannels boolean * @param $channelKeys string[] - * @param $ticketTypes string[] * @return BestAvailableObjects */ - public function changeBestAvailableObjectStatus($eventKey, $number, $status, $categories = null, $holdToken = null, $extraData = null, $orderId = null, $keepExtraData = null, $ignoreChannels = null, $channelKeys = null, $ticketTypes = null) + public function changeBestAvailableObjectStatus($eventKey, $number, $status, $categories = null, $holdToken = null, $extraData = null, $ticketTypes = null, $orderId = null, $keepExtraData = null, $ignoreChannels = null, $channelKeys = null) { $request = new \stdClass(); $bestAvailable = new \stdClass(); diff --git a/tests/Events/ChangeBestAvailableObjectStatusTest.php b/tests/Events/ChangeBestAvailableObjectStatusTest.php index 46aa702..dece811 100644 --- a/tests/Events/ChangeBestAvailableObjectStatusTest.php +++ b/tests/Events/ChangeBestAvailableObjectStatusTest.php @@ -74,7 +74,7 @@ public function testTicketTypes() $chartKey = $this->createTestChart(); $event = $this->seatsioClient->events->create($chartKey); - $bestAvailableObjects = $this->seatsioClient->events->changeBestAvailableObjectStatus($event->key, 2, "lolzor", null, null, null, null, null, null, null, ["adult", "child"]); + $bestAvailableObjects = $this->seatsioClient->events->changeBestAvailableObjectStatus($event->key, 2, "lolzor", null, null, null, ["adult", "child"]); self::assertEquals(["B-4", "B-5"], $bestAvailableObjects->objects, '', 0.0, 10, true); $b4Status = $this->seatsioClient->events->retrieveObjectStatus($event->key, "B-4"); @@ -101,7 +101,7 @@ public function testOrderId() $chartKey = $this->createTestChart(); $event = $this->seatsioClient->events->create($chartKey); - $bestAvailableObjects = $this->seatsioClient->events->changeBestAvailableObjectStatus($event->key, 1, "lolzor", null, null, null, "anOrder"); + $bestAvailableObjects = $this->seatsioClient->events->changeBestAvailableObjectStatus($event->key, 1, "lolzor", null, null, null, null, "anOrder"); $objectStatus = $this->seatsioClient->events->retrieveObjectStatus($event->key, $bestAvailableObjects->objects[0]); self::assertEquals("anOrder", $objectStatus->orderId); @@ -138,7 +138,7 @@ public function testKeepExtraData() $extraData = ["foo" => "bar"]; $this->seatsioClient->events->updateExtraData($event->key, "B-5", $extraData); - $this->seatsioClient->events->changeBestAvailableObjectStatus($event->key, 1, "lolzor", null, null, null, null, true); + $this->seatsioClient->events->changeBestAvailableObjectStatus($event->key, 1, "lolzor", null, null, null, null, null, true); $objectStatus = $this->seatsioClient->events->retrieveObjectStatus($event->key, "B-5"); self::assertEquals((object)$extraData, $objectStatus->extraData); @@ -155,7 +155,7 @@ public function testChannelKeys() "channelKey1" => ["B-6"] ]); - $bestAvailableObjects = $this->seatsioClient->events->changeBestAvailableObjectStatus($event->key, 1, "lolzor", null, null, null, null, null, null, ["channelKey1"]); + $bestAvailableObjects = $this->seatsioClient->events->changeBestAvailableObjectStatus($event->key, 1, "lolzor", null, null, null, null, null, null, null, ["channelKey1"]); self::assertEquals(["B-6"], $bestAvailableObjects->objects); } @@ -171,7 +171,7 @@ public function testIgnoreChannels() "channelKey1" => ["B-5"] ]); - $bestAvailableObjects = $this->seatsioClient->events->changeBestAvailableObjectStatus($event->key, 1, "lolzor", null, null, null, null, null, true); + $bestAvailableObjects = $this->seatsioClient->events->changeBestAvailableObjectStatus($event->key, 1, "lolzor", null, null, null, null, null, null, true); self::assertEquals(["B-5"], $bestAvailableObjects->objects); }