1<?php 2/** 3 * Copyright since 2007 PrestaShop SA and Contributors 4 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA 5 * 6 * NOTICE OF LICENSE 7 * 8 * This source file is subject to the Open Software License (OSL 3.0) 9 * that is bundled with this package in the file LICENSE.md. 10 * It is also available through the world-wide-web at this URL: 11 * https://opensource.org/licenses/OSL-3.0 12 * If you did not receive a copy of the license and are unable to 13 * obtain it through the world-wide-web, please send an email 14 * to license@prestashop.com so we can send you a copy immediately. 15 * 16 * DISCLAIMER 17 * 18 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer 19 * versions in the future. If you wish to customize PrestaShop for your 20 * needs please refer to https://devdocs.prestashop.com/ for more information. 21 * 22 * @author PrestaShop SA and Contributors <contact@prestashop.com> 23 * @copyright Since 2007 PrestaShop SA and Contributors 24 * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) 25 */ 26declare(strict_types=1); 27 28namespace PrestaShop\PrestaShop\Adapter\Product\Combination\Update; 29 30use DateTimeInterface; 31 32class CombinationStockProperties 33{ 34 /** 35 * @var int|null 36 */ 37 private $quantity; 38 39 /** 40 * @var int|null 41 */ 42 private $minimalQuantity; 43 44 /** 45 * @var string|null 46 */ 47 private $location; 48 49 /** 50 * @var int|null 51 */ 52 private $lowStockThreshold; 53 54 /** 55 * @var bool|null 56 */ 57 private $lowStockAlertEnabled; 58 59 /** 60 * @var DateTimeInterface|null 61 */ 62 private $availableDate; 63 64 /** 65 * @param int|null $quantity 66 * @param int|null $minimalQuantity 67 * @param string|null $location 68 * @param int|null $lowStockThreshold 69 * @param bool|null $lowStockAlertEnabled 70 * @param DateTimeInterface|null $availableDate 71 */ 72 public function __construct( 73 ?int $quantity = null, 74 ?int $minimalQuantity = null, 75 ?string $location = null, 76 ?int $lowStockThreshold = null, 77 ?bool $lowStockAlertEnabled = null, 78 ?DateTimeInterface $availableDate = null 79 ) { 80 $this->quantity = $quantity; 81 $this->minimalQuantity = $minimalQuantity; 82 $this->location = $location; 83 $this->lowStockThreshold = $lowStockThreshold; 84 $this->lowStockAlertEnabled = $lowStockAlertEnabled; 85 $this->availableDate = $availableDate; 86 } 87 88 /** 89 * @return int|null 90 */ 91 public function getQuantity(): ?int 92 { 93 return $this->quantity; 94 } 95 96 /** 97 * @return int|null 98 */ 99 public function getMinimalQuantity(): ?int 100 { 101 return $this->minimalQuantity; 102 } 103 104 /** 105 * @return string|null 106 */ 107 public function getLocation(): ?string 108 { 109 return $this->location; 110 } 111 112 /** 113 * @return int|null 114 */ 115 public function getLowStockThreshold(): ?int 116 { 117 return $this->lowStockThreshold; 118 } 119 120 /** 121 * @return bool|null 122 */ 123 public function isLowStockAlertEnabled(): ?bool 124 { 125 return $this->lowStockAlertEnabled; 126 } 127 128 /** 129 * @return DateTimeInterface|null 130 */ 131 public function getAvailableDate(): ?DateTimeInterface 132 { 133 return $this->availableDate; 134 } 135} 136