From a65cd86dc79d0509c81c93867976e237c1491f3a Mon Sep 17 00:00:00 2001 From: Kedar Khaire Date: Tue, 13 Aug 2024 17:46:02 +0530 Subject: [PATCH] Added support of AttributesProperty to ApiProduct (#371) --- src/Api/ApigeeX/Entity/ApiProduct.php | 2 ++ src/Api/ApigeeX/Entity/ApiProductInterface.php | 2 ++ src/Entity/Property/AttributesPropertyAwareTrait.php | 6 +++--- src/Entity/Property/AttributesPropertyInterface.php | 6 +++--- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/Api/ApigeeX/Entity/ApiProduct.php b/src/Api/ApigeeX/Entity/ApiProduct.php index 42fbee47..d2cdedee 100755 --- a/src/Api/ApigeeX/Entity/ApiProduct.php +++ b/src/Api/ApigeeX/Entity/ApiProduct.php @@ -19,12 +19,14 @@ namespace Apigee\Edge\Api\ApigeeX\Entity; use Apigee\Edge\Api\Monetization\Entity\Entity; +use Apigee\Edge\Entity\Property\AttributesPropertyAwareTrait; use Apigee\Edge\Entity\Property\DescriptionPropertyAwareTrait; use Apigee\Edge\Entity\Property\DisplayNamePropertyAwareTrait; use Apigee\Edge\Entity\Property\NamePropertyAwareTrait; class ApiProduct extends Entity implements ApiProductInterface { + use AttributesPropertyAwareTrait; use DescriptionPropertyAwareTrait; use DisplayNamePropertyAwareTrait; use NamePropertyAwareTrait; diff --git a/src/Api/ApigeeX/Entity/ApiProductInterface.php b/src/Api/ApigeeX/Entity/ApiProductInterface.php index beb82a8b..4e377bf6 100755 --- a/src/Api/ApigeeX/Entity/ApiProductInterface.php +++ b/src/Api/ApigeeX/Entity/ApiProductInterface.php @@ -18,11 +18,13 @@ namespace Apigee\Edge\Api\ApigeeX\Entity; +use Apigee\Edge\Entity\Property\AttributesPropertyInterface; use Apigee\Edge\Entity\Property\DescriptionPropertyInterface; use Apigee\Edge\Entity\Property\DisplayNamePropertyInterface; use Apigee\Edge\Entity\Property\NamePropertyInterface; interface ApiProductInterface extends + AttributesPropertyInterface, DescriptionPropertyInterface, DisplayNamePropertyInterface, NamePropertyInterface diff --git a/src/Entity/Property/AttributesPropertyAwareTrait.php b/src/Entity/Property/AttributesPropertyAwareTrait.php index e7f8214e..e443f8fe 100644 --- a/src/Entity/Property/AttributesPropertyAwareTrait.php +++ b/src/Entity/Property/AttributesPropertyAwareTrait.php @@ -23,17 +23,17 @@ /** * Trait AttributesPropertyAwareTrait. * - * @see \Apigee\Edge\Entity\Property\AttributesPropertyInterface + * @see AttributesPropertyInterface */ trait AttributesPropertyAwareTrait { - /** @var \Apigee\Edge\Structure\AttributesProperty */ + /** @var AttributesProperty */ protected $attributes; /** * {@inheritdoc} */ - public function getAttributes(): AttributesProperty + public function getAttributes(): ?AttributesProperty { return $this->attributes; } diff --git a/src/Entity/Property/AttributesPropertyInterface.php b/src/Entity/Property/AttributesPropertyInterface.php index 67f5d121..438db722 100644 --- a/src/Entity/Property/AttributesPropertyInterface.php +++ b/src/Entity/Property/AttributesPropertyInterface.php @@ -28,12 +28,12 @@ interface AttributesPropertyInterface { /** - * @return \Apigee\Edge\Structure\AttributesProperty + * @return AttributesProperty */ - public function getAttributes(): AttributesProperty; + public function getAttributes(): ?AttributesProperty; /** - * @param \Apigee\Edge\Structure\AttributesProperty $attributes + * @param AttributesProperty $attributes */ public function setAttributes(AttributesProperty $attributes): void;