diff --git a/src/Product.php b/src/Product.php index 28a5983..19aed28 100644 --- a/src/Product.php +++ b/src/Product.php @@ -240,6 +240,24 @@ public function setMpn($mpn) return $this; } + /** + * Sets identifier_exists code of the product. (yes / no) + * + * @param string $identifierExists + * + * @return $this + * @throws InvalidArgumentException + */ + public function setIdentifierExists($identifierExists) + { + $identifierExists = strtolower($identifierExists); + if (!in_array($identifierExists, ['yes', 'no'])) { + throw new InvalidArgumentException("identifier_exists property should be one of 'yes' or 'no'"); + } + $this->setAttribute('identifier_exists', $identifierExists, false); + return $this; + } + /** * Sets condition of the product. *