vendor/shopware/core/Framework/DataAbstractionLayer/Pricing/ListingPrice.php line 7

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace Shopware\Core\Framework\DataAbstractionLayer\Pricing;
  3. use Shopware\Core\Framework\Struct\Struct;
  4. class ListingPrice extends Struct
  5. {
  6.     /**
  7.      * @var string
  8.      */
  9.     protected $currencyId;
  10.     /**
  11.      * @var string|null
  12.      */
  13.     protected $ruleId;
  14.     /**
  15.      * @var Price
  16.      */
  17.     protected $from;
  18.     /**
  19.      * @var Price
  20.      */
  21.     protected $to;
  22.     public function getCurrencyId(): string
  23.     {
  24.         return $this->currencyId;
  25.     }
  26.     public function setCurrencyId(string $currencyId): void
  27.     {
  28.         $this->currencyId $currencyId;
  29.     }
  30.     public function getRuleId(): ?string
  31.     {
  32.         return $this->ruleId;
  33.     }
  34.     public function setRuleId(?string $ruleId): void
  35.     {
  36.         $this->ruleId $ruleId;
  37.     }
  38.     public function getFrom(): Price
  39.     {
  40.         return $this->from;
  41.     }
  42.     public function setFrom(Price $from): void
  43.     {
  44.         $this->from $from;
  45.     }
  46.     public function getTo(): Price
  47.     {
  48.         return $this->to;
  49.     }
  50.     public function setTo(Price $to): void
  51.     {
  52.         $this->to $to;
  53.     }
  54.     public function isDifferent(): bool
  55.     {
  56.         return $this->getTo()->getGross() !== $this->getFrom()->getGross();
  57.     }
  58.     public function getApiAlias(): string
  59.     {
  60.         return 'listing_price';
  61.     }
  62. }