Skip to content

Commit

Permalink
Added support of AttributesProperty to ApiProduct (#371)
Browse files Browse the repository at this point in the history
  • Loading branch information
kedarkhaire authored Aug 13, 2024
1 parent f80f26d commit a65cd86
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
2 changes: 2 additions & 0 deletions src/Api/ApigeeX/Entity/ApiProduct.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions src/Api/ApigeeX/Entity/ApiProductInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/Entity/Property/AttributesPropertyAwareTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
6 changes: 3 additions & 3 deletions src/Entity/Property/AttributesPropertyInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit a65cd86

Please sign in to comment.