- <?php
- declare(strict_types=1);
- namespace Slivki\Response\OnlineOrder\GiftCertificate;
- use JsonSerializable;
- use Slivki\Entity\Director;
- use Slivki\Entity\FoodFilterCounter;
- use Slivki\Entity\Media\DirectorOnlinePaymentLogoMedia;
- use Slivki\Entity\Offer;
- final class SelectGiftCertificatesForBuyOnlyCodesResponse implements JsonSerializable
- {
-     private Offer $offer;
-     private Director $director;
-     private ?FoodFilterCounter $filterAction;
-     private ?DirectorOnlinePaymentLogoMedia $logoMedia;
-     private array $dishes;
-     private array $options;
-     private array $sortList;
-     private array $topDishIDList;
-     private string $categoryName;
-     private string $categoryURL;
-     private string $formAction;
-     private float $minSumForFreeDelivery;
-     private float $minOrderSum;
-     private float $codeCost;
-     private int $visitCount;
-     private ?int $allowedCodesToBuy;
-     private ?int $allowedCodesToBuyBatchCodes;
-     private bool $showDelivery;
-     private bool $pickupEnabled;
-     private bool $deliveryEnabled;
-     private bool $isCertificate;
-     private bool $isBuyOnlyCodeResponse = true;
-     public function __construct(
-         Offer $offer,
-         Director $director,
-         ?FoodFilterCounter $filterAction,
-         ?DirectorOnlinePaymentLogoMedia $logoMedia,
-         array $dishes,
-         array $options,
-         array $sortList,
-         array $topDishIDList,
-         string $categoryName,
-         string $categoryURL,
-         string $formAction,
-         float $minSumForFreeDelivery,
-         float $minOrderSum,
-         float $codeCost,
-         int $visitCount,
-         ?int $allowedCodesToBuy,
-         ?int $allowedCodesToBuyBatchCodes,
-         bool $showDelivery,
-         bool $pickupEnabled,
-         bool $deliveryEnabled,
-         bool $isCertificate
-     ) {
-         $this->offer = $offer;
-         $this->director = $director;
-         $this->filterAction = $filterAction;
-         $this->logoMedia = $logoMedia;
-         $this->dishes = $dishes;
-         $this->options = $options;
-         $this->sortList = $sortList;
-         $this->topDishIDList = $topDishIDList;
-         $this->categoryName = $categoryName;
-         $this->categoryURL = $categoryURL;
-         $this->formAction = $formAction;
-         $this->minSumForFreeDelivery = $minSumForFreeDelivery;
-         $this->minOrderSum = $minOrderSum;
-         $this->codeCost = $codeCost;
-         $this->visitCount = $visitCount;
-         $this->allowedCodesToBuy = $allowedCodesToBuy;
-         $this->allowedCodesToBuyBatchCodes = $allowedCodesToBuyBatchCodes;
-         $this->showDelivery = $showDelivery;
-         $this->pickupEnabled = $pickupEnabled;
-         $this->deliveryEnabled = $deliveryEnabled;
-         $this->isCertificate = $isCertificate;
-     }
-     public function jsonSerialize(): array
-     {
-         return [
-             'offer' => $this->offer,
-             'director' => $this->director,
-             'filterAction' => $this->filterAction,
-             'logoMedia' => $this->logoMedia,
-             'dishes' => $this->dishes,
-             'options' => $this->options,
-             'sortList' => $this->sortList,
-             'topDishIDList' => $this->topDishIDList,
-             'categoryName' => $this->categoryName,
-             'categoryURL' => $this->categoryURL,
-             'formAction' => $this->formAction,
-             'minSumForFreeDelivery' => $this->minSumForFreeDelivery,
-             'minOrderSum' => $this->minOrderSum,
-             'codeCost' => $this->codeCost,
-             'visitCount' => $this->visitCount,
-             'allowedCodesToBuy' => $this->allowedCodesToBuy,
-             'allowedCodesToBuyBatchCodes' => $this->allowedCodesToBuyBatchCodes,
-             'showDelivery' => $this->showDelivery,
-             'pickupEnabled' => $this->pickupEnabled,
-             'deliveryEnabled' => $this->deliveryEnabled,
-             'isCertificate' => $this->isCertificate,
-             'isBuyOnlyCodeResponse' => $this->isBuyOnlyCodeResponse,
-         ];
-     }
- }
-