Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support of AttributesProperty to ApiProduct #371

Merged
merged 2 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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