vendor/shopware/core/Content/Product/DataAbstractionLayer/CheapestPrice/CheapestPrice.php line 9

  1. <?php declare(strict_types=1);
  2. namespace Shopware\Core\Content\Product\DataAbstractionLayer\CheapestPrice;
  3. use Shopware\Core\Framework\DataAbstractionLayer\Pricing\Price;
  4. use Shopware\Core\Framework\DataAbstractionLayer\Pricing\PriceCollection;
  5. use Shopware\Core\Framework\Log\Package;
  6. use Shopware\Core\Framework\Struct\Struct;
  7. #[Package('core')]
  8. class CheapestPrice extends Struct
  9. {
  10.     /**
  11.      * @var bool
  12.      */
  13.     protected $hasRange;
  14.     /**
  15.      * @var string
  16.      */
  17.     protected $variantId;
  18.     /**
  19.      * @var string
  20.      */
  21.     protected $parentId;
  22.     /**
  23.      * @var string|null
  24.      */
  25.     protected $ruleId;
  26.     /**
  27.      * @var float|null
  28.      */
  29.     protected $purchase;
  30.     /**
  31.      * @var float|null
  32.      */
  33.     protected $reference;
  34.     /**
  35.      * @var string|null
  36.      */
  37.     protected $unitId;
  38.     /**
  39.      * @var PriceCollection
  40.      */
  41.     protected $price;
  42.     public function getCurrencyPrice(string $currencyId): ?Price
  43.     {
  44.         return $this->price->getCurrencyPrice($currencyId);
  45.     }
  46.     public function getVariantId(): string
  47.     {
  48.         return $this->variantId;
  49.     }
  50.     public function setVariantId(string $variantId): void
  51.     {
  52.         $this->variantId $variantId;
  53.     }
  54.     public function getRuleId(): ?string
  55.     {
  56.         return $this->ruleId;
  57.     }
  58.     public function setRuleId(?string $ruleId): void
  59.     {
  60.         $this->ruleId $ruleId;
  61.     }
  62.     public function getPrice(): PriceCollection
  63.     {
  64.         return $this->price;
  65.     }
  66.     public function setPrice(PriceCollection $price): void
  67.     {
  68.         $this->price $price;
  69.     }
  70.     public function hasRange(): bool
  71.     {
  72.         return $this->hasRange;
  73.     }
  74.     public function setHasRange(bool $hasRange): void
  75.     {
  76.         $this->hasRange $hasRange;
  77.     }
  78.     public function getParentId(): string
  79.     {
  80.         return $this->parentId;
  81.     }
  82.     public function setParentId(string $parentId): void
  83.     {
  84.         $this->parentId $parentId;
  85.     }
  86.     public function getPurchase(): ?float
  87.     {
  88.         return $this->purchase;
  89.     }
  90.     public function setPurchase(?float $purchase): void
  91.     {
  92.         $this->purchase $purchase;
  93.     }
  94.     public function getReference(): ?float
  95.     {
  96.         return $this->reference;
  97.     }
  98.     public function setReference(?float $reference): void
  99.     {
  100.         $this->reference $reference;
  101.     }
  102.     public function getUnitId(): ?string
  103.     {
  104.         return $this->unitId;
  105.     }
  106.     public function setUnitId(?string $unitId): void
  107.     {
  108.         $this->unitId $unitId;
  109.     }
  110. }