vendor/shopware/core/System/Tax/TaxEntity.php line 12

  1. <?php declare(strict_types=1);
  2. namespace Shopware\Core\System\Tax;
  3. use Shopware\Core\Checkout\Shipping\ShippingMethodCollection;
  4. use Shopware\Core\Content\Product\ProductCollection;
  5. use Shopware\Core\Framework\DataAbstractionLayer\Entity;
  6. use Shopware\Core\Framework\DataAbstractionLayer\EntityCustomFieldsTrait;
  7. use Shopware\Core\Framework\DataAbstractionLayer\EntityIdTrait;
  8. use Shopware\Core\Framework\Log\Package;
  9. use Shopware\Core\System\Tax\Aggregate\TaxRule\TaxRuleCollection;
  10. #[Package('checkout')]
  11. class TaxEntity extends Entity
  12. {
  13.     use EntityCustomFieldsTrait;
  14.     use EntityIdTrait;
  15.     /**
  16.      * @var float
  17.      */
  18.     protected $taxRate;
  19.     /**
  20.      * @var string
  21.      */
  22.     protected $name;
  23.     /**
  24.      * @var int
  25.      */
  26.     protected $position;
  27.     /**
  28.      * @var ProductCollection|null
  29.      */
  30.     protected $products;
  31.     /**
  32.      * @var TaxRuleCollection|null
  33.      */
  34.     protected $rules;
  35.     /**
  36.      * @var ShippingMethodCollection|null
  37.      */
  38.     protected $shippingMethods;
  39.     public function getTaxRate(): float
  40.     {
  41.         return $this->taxRate;
  42.     }
  43.     public function setTaxRate(float $taxRate): void
  44.     {
  45.         $this->taxRate $taxRate;
  46.     }
  47.     public function getName(): string
  48.     {
  49.         return $this->name;
  50.     }
  51.     public function setName(string $name): void
  52.     {
  53.         $this->name $name;
  54.     }
  55.     public function getPosition(): int
  56.     {
  57.         return $this->position;
  58.     }
  59.     public function setPosition(int $position): void
  60.     {
  61.         $this->position $position;
  62.     }
  63.     public function getProducts(): ?ProductCollection
  64.     {
  65.         return $this->products;
  66.     }
  67.     public function setProducts(ProductCollection $products): void
  68.     {
  69.         $this->products $products;
  70.     }
  71.     public function getRules(): ?TaxRuleCollection
  72.     {
  73.         return $this->rules;
  74.     }
  75.     public function setRules(TaxRuleCollection $rules): void
  76.     {
  77.         $this->rules $rules;
  78.     }
  79.     public function getShippingMethods(): ?ShippingMethodCollection
  80.     {
  81.         return $this->shippingMethods;
  82.     }
  83.     public function setShippingMethods(ShippingMethodCollection $shippingMethods): void
  84.     {
  85.         $this->shippingMethods $shippingMethods;
  86.     }
  87. }