From d816a31b77bb6e3b688c99dee763be468135bc0a Mon Sep 17 00:00:00 2001
From: "ct-sdks[bot]" <153784748+ct-sdks[bot]@users.noreply.github.com>
Date: Thu, 21 Dec 2023 13:45:01 +0000
Subject: [PATCH] build(codegen): updating SDK
---
changes.md | 2 +
.../src/Models/Error/ErrorObjectModel.php | 1 -
.../Models/Error/GraphQLErrorObjectModel.php | 1 -
.../Models/Error/GraphQLNotEnabledError.php | 21 ----
.../Error/GraphQLNotEnabledErrorBuilder.php | 33 ------
.../GraphQLNotEnabledErrorCollection.php | 56 ---------
.../Error/GraphQLNotEnabledErrorModel.php | 71 ------------
.../src/Models/Error/NotEnabledError.php | 34 ------
.../Models/Error/NotEnabledErrorBuilder.php | 63 -----------
.../Error/NotEnabledErrorCollection.php | 56 ---------
.../src/Models/Error/NotEnabledErrorModel.php | 106 ------------------
references.txt | 1 +
12 files changed, 3 insertions(+), 442 deletions(-)
delete mode 100644 lib/commercetools-api/src/Models/Error/GraphQLNotEnabledError.php
delete mode 100644 lib/commercetools-api/src/Models/Error/GraphQLNotEnabledErrorBuilder.php
delete mode 100644 lib/commercetools-api/src/Models/Error/GraphQLNotEnabledErrorCollection.php
delete mode 100644 lib/commercetools-api/src/Models/Error/GraphQLNotEnabledErrorModel.php
delete mode 100644 lib/commercetools-api/src/Models/Error/NotEnabledError.php
delete mode 100644 lib/commercetools-api/src/Models/Error/NotEnabledErrorBuilder.php
delete mode 100644 lib/commercetools-api/src/Models/Error/NotEnabledErrorCollection.php
delete mode 100644 lib/commercetools-api/src/Models/Error/NotEnabledErrorModel.php
diff --git a/changes.md b/changes.md
index dabcc197c49..fe3add43a70 100644
--- a/changes.md
+++ b/changes.md
@@ -118,6 +118,8 @@
Removed Type(s)
+- :warning: removed type `NotEnabledError`
+- :warning: removed type `GraphQLNotEnabledError`
- :warning: removed type `CustomerMessagePayload`
diff --git a/lib/commercetools-api/src/Models/Error/ErrorObjectModel.php b/lib/commercetools-api/src/Models/Error/ErrorObjectModel.php
index c3ee5940711..0afe7f130cd 100644
--- a/lib/commercetools-api/src/Models/Error/ErrorObjectModel.php
+++ b/lib/commercetools-api/src/Models/Error/ErrorObjectModel.php
@@ -86,7 +86,6 @@ final class ErrorObjectModel extends JsonObjectModel implements ErrorObject
'MissingTaxRateForCountry' => MissingTaxRateForCountryErrorModel::class,
'MoneyOverflow' => MoneyOverflowErrorModel::class,
'NoMatchingProductDiscountFound' => NoMatchingProductDiscountFoundErrorModel::class,
- 'NotEnabled' => NotEnabledErrorModel::class,
'ObjectNotFound' => ObjectNotFoundErrorModel::class,
'OutOfStock' => OutOfStockErrorModel::class,
'OverCapacity' => OverCapacityErrorModel::class,
diff --git a/lib/commercetools-api/src/Models/Error/GraphQLErrorObjectModel.php b/lib/commercetools-api/src/Models/Error/GraphQLErrorObjectModel.php
index ffe735a5c5a..3ff73f19df1 100644
--- a/lib/commercetools-api/src/Models/Error/GraphQLErrorObjectModel.php
+++ b/lib/commercetools-api/src/Models/Error/GraphQLErrorObjectModel.php
@@ -80,7 +80,6 @@ final class GraphQLErrorObjectModel extends JsonObjectModel implements GraphQLEr
'MissingTaxRateForCountry' => GraphQLMissingTaxRateForCountryErrorModel::class,
'MoneyOverflow' => GraphQLMoneyOverflowErrorModel::class,
'NoMatchingProductDiscountFound' => GraphQLNoMatchingProductDiscountFoundErrorModel::class,
- 'NotEnabled' => GraphQLNotEnabledErrorModel::class,
'ObjectNotFound' => GraphQLObjectNotFoundErrorModel::class,
'OutOfStock' => GraphQLOutOfStockErrorModel::class,
'OverCapacity' => GraphQLOverCapacityErrorModel::class,
diff --git a/lib/commercetools-api/src/Models/Error/GraphQLNotEnabledError.php b/lib/commercetools-api/src/Models/Error/GraphQLNotEnabledError.php
deleted file mode 100644
index 5baea325791..00000000000
--- a/lib/commercetools-api/src/Models/Error/GraphQLNotEnabledError.php
+++ /dev/null
@@ -1,21 +0,0 @@
-
- */
-final class GraphQLNotEnabledErrorBuilder implements Builder
-{
- public function build(): GraphQLNotEnabledError
- {
- return new GraphQLNotEnabledErrorModel(
- );
- }
-
- public static function of(): GraphQLNotEnabledErrorBuilder
- {
- return new self();
- }
-}
diff --git a/lib/commercetools-api/src/Models/Error/GraphQLNotEnabledErrorCollection.php b/lib/commercetools-api/src/Models/Error/GraphQLNotEnabledErrorCollection.php
deleted file mode 100644
index 8ce2cfe9392..00000000000
--- a/lib/commercetools-api/src/Models/Error/GraphQLNotEnabledErrorCollection.php
+++ /dev/null
@@ -1,56 +0,0 @@
-
- * @method GraphQLNotEnabledError current()
- * @method GraphQLNotEnabledError end()
- * @method GraphQLNotEnabledError at($offset)
- */
-class GraphQLNotEnabledErrorCollection extends GraphQLErrorObjectCollection
-{
- /**
- * @psalm-assert GraphQLNotEnabledError $value
- * @psalm-param GraphQLNotEnabledError|stdClass $value
- * @throws InvalidArgumentException
- *
- * @return GraphQLNotEnabledErrorCollection
- */
- public function add($value)
- {
- if (!$value instanceof GraphQLNotEnabledError) {
- throw new InvalidArgumentException();
- }
- $this->store($value);
-
- return $this;
- }
-
- /**
- * @psalm-return callable(int):?GraphQLNotEnabledError
- */
- protected function mapper()
- {
- return function (?int $index): ?GraphQLNotEnabledError {
- $data = $this->get($index);
- if ($data instanceof stdClass) {
- /** @var GraphQLNotEnabledError $data */
- $data = GraphQLNotEnabledErrorModel::of($data);
- $this->set($data, $index);
- }
-
- return $data;
- };
- }
-}
diff --git a/lib/commercetools-api/src/Models/Error/GraphQLNotEnabledErrorModel.php b/lib/commercetools-api/src/Models/Error/GraphQLNotEnabledErrorModel.php
deleted file mode 100644
index dd8c238d28b..00000000000
--- a/lib/commercetools-api/src/Models/Error/GraphQLNotEnabledErrorModel.php
+++ /dev/null
@@ -1,71 +0,0 @@
-code = $code ?? self::DISCRIMINATOR_VALUE;
- }
-
- /**
- *
- * @return null|string
- */
- public function getCode()
- {
- if (is_null($this->code)) {
- /** @psalm-var ?string $data */
- $data = $this->raw(self::FIELD_CODE);
- if (is_null($data)) {
- return null;
- }
- $this->code = (string) $data;
- }
-
- return $this->code;
- }
-
-
-
- /**
- * @return mixed
- */
- public function by(string $key)
- {
- $data = $this->raw($key);
- if (is_null($data)) {
- return null;
- }
-
- return $data;
- }
-}
diff --git a/lib/commercetools-api/src/Models/Error/NotEnabledError.php b/lib/commercetools-api/src/Models/Error/NotEnabledError.php
deleted file mode 100644
index 52d2266e817..00000000000
--- a/lib/commercetools-api/src/Models/Error/NotEnabledError.php
+++ /dev/null
@@ -1,34 +0,0 @@
-"The category recommendations API is not yet enabled for your project."
- *
-
- * @return null|string
- */
- public function getMessage();
-
- /**
- * @param ?string $message
- */
- public function setMessage(?string $message): void;
-}
diff --git a/lib/commercetools-api/src/Models/Error/NotEnabledErrorBuilder.php b/lib/commercetools-api/src/Models/Error/NotEnabledErrorBuilder.php
deleted file mode 100644
index ff7d613fa9d..00000000000
--- a/lib/commercetools-api/src/Models/Error/NotEnabledErrorBuilder.php
+++ /dev/null
@@ -1,63 +0,0 @@
-
- */
-final class NotEnabledErrorBuilder implements Builder
-{
- /**
-
- * @var ?string
- */
- private $message;
-
- /**
- * "The category recommendations API is not yet enabled for your project."
- *
-
- * @return null|string
- */
- public function getMessage()
- {
- return $this->message;
- }
-
- /**
- * @param ?string $message
- * @return $this
- */
- public function withMessage(?string $message)
- {
- $this->message = $message;
-
- return $this;
- }
-
-
- public function build(): NotEnabledError
- {
- return new NotEnabledErrorModel(
- $this->message
- );
- }
-
- public static function of(): NotEnabledErrorBuilder
- {
- return new self();
- }
-}
diff --git a/lib/commercetools-api/src/Models/Error/NotEnabledErrorCollection.php b/lib/commercetools-api/src/Models/Error/NotEnabledErrorCollection.php
deleted file mode 100644
index 8253fc37f40..00000000000
--- a/lib/commercetools-api/src/Models/Error/NotEnabledErrorCollection.php
+++ /dev/null
@@ -1,56 +0,0 @@
-
- * @method NotEnabledError current()
- * @method NotEnabledError end()
- * @method NotEnabledError at($offset)
- */
-class NotEnabledErrorCollection extends ErrorObjectCollection
-{
- /**
- * @psalm-assert NotEnabledError $value
- * @psalm-param NotEnabledError|stdClass $value
- * @throws InvalidArgumentException
- *
- * @return NotEnabledErrorCollection
- */
- public function add($value)
- {
- if (!$value instanceof NotEnabledError) {
- throw new InvalidArgumentException();
- }
- $this->store($value);
-
- return $this;
- }
-
- /**
- * @psalm-return callable(int):?NotEnabledError
- */
- protected function mapper()
- {
- return function (?int $index): ?NotEnabledError {
- $data = $this->get($index);
- if ($data instanceof stdClass) {
- /** @var NotEnabledError $data */
- $data = NotEnabledErrorModel::of($data);
- $this->set($data, $index);
- }
-
- return $data;
- };
- }
-}
diff --git a/lib/commercetools-api/src/Models/Error/NotEnabledErrorModel.php b/lib/commercetools-api/src/Models/Error/NotEnabledErrorModel.php
deleted file mode 100644
index 35378e18090..00000000000
--- a/lib/commercetools-api/src/Models/Error/NotEnabledErrorModel.php
+++ /dev/null
@@ -1,106 +0,0 @@
-message = $message;
- $this->code = $code ?? self::DISCRIMINATOR_VALUE;
- }
-
- /**
- *
- * @return null|string
- */
- public function getCode()
- {
- if (is_null($this->code)) {
- /** @psalm-var ?string $data */
- $data = $this->raw(self::FIELD_CODE);
- if (is_null($data)) {
- return null;
- }
- $this->code = (string) $data;
- }
-
- return $this->code;
- }
-
- /**
- * "The category recommendations API is not yet enabled for your project."
- *
- *
- * @return null|string
- */
- public function getMessage()
- {
- if (is_null($this->message)) {
- /** @psalm-var ?string $data */
- $data = $this->raw(self::FIELD_MESSAGE);
- if (is_null($data)) {
- return null;
- }
- $this->message = (string) $data;
- }
-
- return $this->message;
- }
-
-
- /**
- * @param ?string $message
- */
- public function setMessage(?string $message): void
- {
- $this->message = $message;
- }
-
- /**
- * @return mixed
- */
- public function by(string $key)
- {
- $data = $this->raw($key);
- if (is_null($data)) {
- return null;
- }
-
- return $data;
- }
-}
diff --git a/references.txt b/references.txt
index f2176b1cc91..212da6d509d 100644
--- a/references.txt
+++ b/references.txt
@@ -174,3 +174,4 @@ c633a41c164e2dbf2201dd9856c18d5336b0ac5d
70d15e13efcbf54dd231b1f2cfbec50da95de1a3
8f05884799f311b3f09307fb57c2846383c96371
de39b32f1f157ed82869e1c07c1963615d571f87
+d29ffbb65f68b7dd7623956b7e6151454bea2fea