From 819f3462a4e40f244182ef7337622ed8f178694f Mon Sep 17 00:00:00 2001 From: Casper Bakker Date: Fri, 5 Jul 2024 14:54:17 +0200 Subject: [PATCH] Update to latest OpenApi specs --- src/Client.php | 6 ++++-- src/Enum/ReducedOrderItemFulfilmentMethod.php | 10 ++++++++++ src/Enum/ReducedOrderItemFulfilmentStatus.php | 10 ++++++++++ src/Model/ReducedOrderItem.php | 12 +++++++----- src/OpenApi/retailer.json | 18 ++++++++++++++---- 5 files changed, 45 insertions(+), 11 deletions(-) create mode 100644 src/Enum/ReducedOrderItemFulfilmentMethod.php create mode 100644 src/Enum/ReducedOrderItemFulfilmentStatus.php diff --git a/src/Client.php b/src/Client.php index 1534bf3..3e2f0f5 100644 --- a/src/Client.php +++ b/src/Client.php @@ -729,8 +729,10 @@ public function updateOfferStock(string $offerId, Model\UpdateOfferStockRequest * @param int|null $page The requested page number with a page size of 50 items. * @param Enum\GetOrdersFulfilmentMethod|null $fulfilmentMethod Fulfilled by the retailer (FBR) or fulfilled by * bol.com (FBB). In order to retrieve both FBR and FBB orders, ALL can be used as a parameter. - * @param Enum\GetOrdersStatus|null $status To filter on order status. You can filter on either all orders - * independent from their status, open orders (excluding shipped and cancelled orders), and shipped orders. + * @param Enum\GetOrdersStatus|null $status You can filter orders based on their status with the following options: + * all orders, which include every order regardless of its current status; open orders, which show only the active + * orders excluding those that have been shipped or cancelled; and shipped orders, which display only the orders + * that have been shipped. * @param int|null $changeIntervalMinute To filter on the period in minutes during which the latest change was * performed on an order item. * @param string|null $latestChangeDate To filter on the date on which the latest change was performed on an order diff --git a/src/Enum/ReducedOrderItemFulfilmentMethod.php b/src/Enum/ReducedOrderItemFulfilmentMethod.php new file mode 100644 index 0000000..1f0ce2a --- /dev/null +++ b/src/Enum/ReducedOrderItemFulfilmentMethod.php @@ -0,0 +1,10 @@ + [ 'model' => null, 'enum' => null, 'array' => false ], 'ean' => [ 'model' => null, 'enum' => null, 'array' => false ], - 'fulfilmentMethod' => [ 'model' => null, 'enum' => null, 'array' => false ], - 'fulfilmentStatus' => [ 'model' => null, 'enum' => null, 'array' => false ], + 'fulfilmentMethod' => [ 'model' => null, 'enum' => Enum\ReducedOrderItemFulfilmentMethod::class, 'array' => false ], + 'fulfilmentStatus' => [ 'model' => null, 'enum' => Enum\ReducedOrderItemFulfilmentStatus::class, 'array' => false ], 'quantity' => [ 'model' => null, 'enum' => null, 'array' => false ], 'quantityShipped' => [ 'model' => null, 'enum' => null, 'array' => false ], 'quantityCancelled' => [ 'model' => null, 'enum' => null, 'array' => false ], @@ -41,13 +41,15 @@ public function getModelDefinition(): array public $ean; /** - * @var string The fulfilment method. Fulfilled by the retailer (FBR) or fulfilled by bol.com (FBB). + * @var Enum\ReducedOrderItemFulfilmentMethod The fulfilment method. Fulfilled by the retailer (FBR) or fulfilled by + * bol.com (FBB). */ public $fulfilmentMethod; /** - * @var string To filter on order status. You can filter on either all orders independent from their status, open - * orders (excluding shipped and cancelled orders), and shipped orders. + * @var Enum\ReducedOrderItemFulfilmentStatus This field indicates the processing state of an order. It can have two + * values: "OPEN," which corresponds to active order items excluding those that have been shipped or cancelled, and + * "HANDLED," which means the order item has either been shipped or cancelled. */ public $fulfilmentStatus; diff --git a/src/OpenApi/retailer.json b/src/OpenApi/retailer.json index e9e0665..a8f5071 100644 --- a/src/OpenApi/retailer.json +++ b/src/OpenApi/retailer.json @@ -1638,6 +1638,7 @@ "required": false, "schema": { "type": "string", + "default": "FBR", "enum": [ "FBR", "FBB", @@ -1648,10 +1649,11 @@ { "name": "status", "in": "query", - "description": "To filter on order status. You can filter on either all orders independent from their status, open orders (excluding shipped and cancelled orders), and shipped orders.", + "description": "You can filter orders based on their status with the following options: all orders, which include every order regardless of its current status; open orders, which show only the active orders excluding those that have been shipped or cancelled; and shipped orders, which display only the orders that have been shipped.", "required": false, "schema": { "type": "string", + "default": "OPEN", "enum": [ "OPEN", "SHIPPED", @@ -9108,12 +9110,20 @@ "fulfilmentMethod": { "type": "string", "description": "The fulfilment method. Fulfilled by the retailer (FBR) or fulfilled by bol.com (FBB).", - "example": "FBR" + "example": "FBR", + "enum": [ + "FBR", + "FBB" + ] }, "fulfilmentStatus": { "type": "string", - "description": "To filter on order status. You can filter on either all orders independent from their status, open orders (excluding shipped and cancelled orders), and shipped orders.", - "example": "OPEN" + "description": "This field indicates the processing state of an order. It can have two values: \"OPEN,\" which corresponds to active order items excluding those that have been shipped or cancelled, and \"HANDLED,\" which means the order item has either been shipped or cancelled.", + "example": "OPEN", + "enum": [ + "OPEN", + "HANDLED" + ] }, "quantity": { "type": "integer",