Dmitriy | Инициализация.

This commit is contained in:
27 changed files with 1464 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
<?php
namespace Cosmopet\PriceUpdates\Classes;
class ParseProductError {
/**
* @var string Артикул товара
*/
private string $sku;
/**
* @var string Сообщение об ошибке
*/
private string $message;
public function __construct(string $sku, string $message) {
$this->setSku($sku);
$this->setMessage($message);
}
public function getSku(): string {
return $this->sku;
}
public function setSku(string $sku): ParseProductError {
$this->sku = $sku;
return $this;
}
public function getMessage(): string {
return $this->message;
}
public function setMesage(string $message): ParseProductError {
$this->message = $message;
return $this;
}
public function toArray(): array {
return [
"sku" => $this->getSku(),
"message" => $this->getMessage(),
];
}
}