src/Response/OnlineOrder/GiftCertificate/SelectGiftCertificatesForBuyOnlyCodesResponse.php line 13

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace Slivki\Response\OnlineOrder\GiftCertificate;
  4. use JsonSerializable;
  5. use Slivki\Entity\Director;
  6. use Slivki\Entity\FoodFilterCounter;
  7. use Slivki\Entity\Media\DirectorOnlinePaymentLogoMedia;
  8. use Slivki\Entity\Offer;
  9. final class SelectGiftCertificatesForBuyOnlyCodesResponse implements JsonSerializable
  10. {
  11.     private Offer $offer;
  12.     private Director $director;
  13.     private ?FoodFilterCounter $filterAction;
  14.     private ?DirectorOnlinePaymentLogoMedia $logoMedia;
  15.     private array $dishes;
  16.     private array $options;
  17.     private array $sortList;
  18.     private array $topDishIDList;
  19.     private string $categoryName;
  20.     private string $categoryURL;
  21.     private string $formAction;
  22.     private float $minSumForFreeDelivery;
  23.     private float $minOrderSum;
  24.     private float $codeCost;
  25.     private int $visitCount;
  26.     private ?int $allowedCodesToBuy;
  27.     private ?int $allowedCodesToBuyBatchCodes;
  28.     private bool $showDelivery;
  29.     private bool $pickupEnabled;
  30.     private bool $deliveryEnabled;
  31.     private bool $isCertificate;
  32.     private bool $isBuyOnlyCodeResponse true;
  33.     public function __construct(
  34.         Offer $offer,
  35.         Director $director,
  36.         ?FoodFilterCounter $filterAction,
  37.         ?DirectorOnlinePaymentLogoMedia $logoMedia,
  38.         array $dishes,
  39.         array $options,
  40.         array $sortList,
  41.         array $topDishIDList,
  42.         string $categoryName,
  43.         string $categoryURL,
  44.         string $formAction,
  45.         float $minSumForFreeDelivery,
  46.         float $minOrderSum,
  47.         float $codeCost,
  48.         int $visitCount,
  49.         ?int $allowedCodesToBuy,
  50.         ?int $allowedCodesToBuyBatchCodes,
  51.         bool $showDelivery,
  52.         bool $pickupEnabled,
  53.         bool $deliveryEnabled,
  54.         bool $isCertificate
  55.     ) {
  56.         $this->offer $offer;
  57.         $this->director $director;
  58.         $this->filterAction $filterAction;
  59.         $this->logoMedia $logoMedia;
  60.         $this->dishes $dishes;
  61.         $this->options $options;
  62.         $this->sortList $sortList;
  63.         $this->topDishIDList $topDishIDList;
  64.         $this->categoryName $categoryName;
  65.         $this->categoryURL $categoryURL;
  66.         $this->formAction $formAction;
  67.         $this->minSumForFreeDelivery $minSumForFreeDelivery;
  68.         $this->minOrderSum $minOrderSum;
  69.         $this->codeCost $codeCost;
  70.         $this->visitCount $visitCount;
  71.         $this->allowedCodesToBuy $allowedCodesToBuy;
  72.         $this->allowedCodesToBuyBatchCodes $allowedCodesToBuyBatchCodes;
  73.         $this->showDelivery $showDelivery;
  74.         $this->pickupEnabled $pickupEnabled;
  75.         $this->deliveryEnabled $deliveryEnabled;
  76.         $this->isCertificate $isCertificate;
  77.     }
  78.     public function jsonSerialize(): array
  79.     {
  80.         return [
  81.             'offer' => $this->offer,
  82.             'director' => $this->director,
  83.             'filterAction' => $this->filterAction,
  84.             'logoMedia' => $this->logoMedia,
  85.             'dishes' => $this->dishes,
  86.             'options' => $this->options,
  87.             'sortList' => $this->sortList,
  88.             'topDishIDList' => $this->topDishIDList,
  89.             'categoryName' => $this->categoryName,
  90.             'categoryURL' => $this->categoryURL,
  91.             'formAction' => $this->formAction,
  92.             'minSumForFreeDelivery' => $this->minSumForFreeDelivery,
  93.             'minOrderSum' => $this->minOrderSum,
  94.             'codeCost' => $this->codeCost,
  95.             'visitCount' => $this->visitCount,
  96.             'allowedCodesToBuy' => $this->allowedCodesToBuy,
  97.             'allowedCodesToBuyBatchCodes' => $this->allowedCodesToBuyBatchCodes,
  98.             'showDelivery' => $this->showDelivery,
  99.             'pickupEnabled' => $this->pickupEnabled,
  100.             'deliveryEnabled' => $this->deliveryEnabled,
  101.             'isCertificate' => $this->isCertificate,
  102.             'isBuyOnlyCodeResponse' => $this->isBuyOnlyCodeResponse,
  103.         ];
  104.     }
  105. }