From e737ec4d8376db9cbf85979bd9888f6b0d8f6b80 Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Tue, 1 Oct 2019 15:45:44 +0200 Subject: [PATCH] fixes the statusId of the WebHookModel which can be nullable --- resources/specification/openapi.json | 1 + src/Api/Generated/Model/WebHookModel.php | 10 +++++----- .../Generated/Normalizer/WebHookModelNormalizer.php | 4 +--- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/resources/specification/openapi.json b/resources/specification/openapi.json index 5fd34788..2a1b76ed 100644 --- a/resources/specification/openapi.json +++ b/resources/specification/openapi.json @@ -12690,6 +12690,7 @@ "type": "integer", "minimum": 1, "description": "The id of an order status. Only used with the order-status-changes event.", + "nullable": true, "example": 1 }, "url": { diff --git a/src/Api/Generated/Model/WebHookModel.php b/src/Api/Generated/Model/WebHookModel.php index ca028eb6..b6d129e0 100644 --- a/src/Api/Generated/Model/WebHookModel.php +++ b/src/Api/Generated/Model/WebHookModel.php @@ -25,7 +25,7 @@ class WebHookModel /** * The id of an order status. Only used with the order-status-changes event. * - * @var int + * @var int|null */ protected $statusId; /** @@ -100,20 +100,20 @@ public function setEvent(string $event) : self /** * The id of an order status. Only used with the order-status-changes event. * - * @return int + * @return int|null */ - public function getStatusId() : int + public function getStatusId() : ?int { return $this->statusId; } /** * The id of an order status. Only used with the order-status-changes event. * - * @param int $statusId + * @param int|null $statusId * * @return self */ - public function setStatusId(int $statusId) : self + public function setStatusId(?int $statusId) : self { $this->statusId = $statusId; return $this; diff --git a/src/Api/Generated/Normalizer/WebHookModelNormalizer.php b/src/Api/Generated/Normalizer/WebHookModelNormalizer.php index f73706be..913dddf5 100644 --- a/src/Api/Generated/Normalizer/WebHookModelNormalizer.php +++ b/src/Api/Generated/Normalizer/WebHookModelNormalizer.php @@ -57,9 +57,7 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getEvent()) { $data->{'event'} = $object->getEvent(); } - if (null !== $object->getStatusId()) { - $data->{'statusId'} = $object->getStatusId(); - } + $data->{'statusId'} = $object->getStatusId(); if (null !== $object->getUrl()) { $data->{'url'} = $object->getUrl(); }