Skip to content

Commit

Permalink
Merge pull request #27 from plentymarkets/Fix/productTypeDefinitionList
Browse files Browse the repository at this point in the history
Fix product type definition list response model
  • Loading branch information
juri-plenty authored Sep 19, 2024
2 parents c4791a6 + 9b50499 commit f96b8e8
Showing 1 changed file with 30 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ class ProductTypeList implements \ArrayAccess, \JsonSerializable, ModelInterface
*/
protected static /** [COMPAT] array */ $openAPITypes = [
'product_types' => '\Plenty\AmazonPHP\SellingPartner\Model\ProductTypesDefinitions\ProductType[]',
'product_type_version' => 'string',
];

/**
Expand All @@ -69,6 +70,7 @@ class ProductTypeList implements \ArrayAccess, \JsonSerializable, ModelInterface
*/
protected static /** [COMPAT] array */ $openAPIFormats = [
'product_types' => null,
'product_type_version' => null,
];

/**
Expand All @@ -79,6 +81,7 @@ class ProductTypeList implements \ArrayAccess, \JsonSerializable, ModelInterface
*/
protected static /** [COMPAT] array */ $attributeMap = [
'product_types' => 'productTypes',
'product_type_version' => 'productTypeVersion',
];

/**
Expand All @@ -88,6 +91,7 @@ class ProductTypeList implements \ArrayAccess, \JsonSerializable, ModelInterface
*/
protected static /** [COMPAT] array */ $setters = [
'product_types' => 'setProductTypes',
'product_type_version' => 'setProductTypeVersion',
];

/**
Expand All @@ -97,6 +101,7 @@ class ProductTypeList implements \ArrayAccess, \JsonSerializable, ModelInterface
*/
protected static /** [COMPAT] array */ $getters = [
'product_types' => 'getProductTypes',
'product_type_version' => 'getProductTypeVersion',
];

/**
Expand All @@ -115,6 +120,7 @@ class ProductTypeList implements \ArrayAccess, \JsonSerializable, ModelInterface
public function __construct(array $data = null)
{
$this->container['product_types'] = $data['product_types'] ?? null;
$this->container['product_type_version'] = $data['product_type_version'] ?? null;
}

/**
Expand Down Expand Up @@ -200,6 +206,10 @@ public function listInvalidProperties() : array
$invalidProperties[] = "'product_types' can't be null";
}

if ($this->container['product_type_version'] === null) {
$invalidProperties[] = "'product_type_version' can't be null";
}

return $invalidProperties;
}

Expand Down Expand Up @@ -236,6 +246,26 @@ public function setProductTypes(array $product_types) : self
return $this;
}

/**
* Gets product_type_version.
*/
public function getProductTypeVersion() : string
{
return $this->container['product_type_version'];
}

/**
* Sets product_type_version.
*
* @param string $product_type_version amazon product type version identifier
*/
public function setProductTypeVersion(string $product_type_version) : self
{
$this->container['product_type_version'] = $product_type_version;

return $this;
}

/**
* Returns true if offset exists. False otherwise.
*
Expand Down

0 comments on commit f96b8e8

Please sign in to comment.