src/Entity/OzonClient.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use ApiPlatform\Core\Annotation\ApiSubresource;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Symfony\Component\Serializer\Annotation\Groups;
  8. /**
  9.  * @ORM\Entity(repositoryClass="App\Repository\OzonClientRepository")
  10.  */
  11. class OzonClient implements \JsonSerializable
  12. {
  13.     const CURRENCY_RUB 1;
  14.     const CURRENCY_KZT 2;
  15.     const CURRENCY_KZT_TEXT 'KZT';
  16.     /**
  17.      * @Groups({"ozonClient"})
  18.      *
  19.      * @ORM\Id
  20.      * @ORM\GeneratedValue
  21.      * @ORM\Column(type="integer")
  22.      *
  23.      * @var int
  24.      */
  25.     private $id;
  26.     /**
  27.      * @Groups({"ozonClient"})
  28.      *
  29.      * @ORM\Column(type="string", length=255)
  30.      *
  31.      * @var string
  32.      */
  33.     private $name;
  34.     /**
  35.      * @Groups({"ozonClient"})
  36.      *
  37.      * @ORM\Column(type="string", length=255)
  38.      *
  39.      * @var string
  40.      */
  41.     private $url;
  42.     /**
  43.      * @Groups({"ozonClient"})
  44.      *
  45.      * @ORM\Column(type="string", length=255, nullable=true)
  46.      *
  47.      * @var string
  48.      */
  49.     private $storeUrl;
  50.     /**
  51.      * @Groups({"ozonClient"})
  52.      *
  53.      * @ORM\Column(type="string", length=64)
  54.      *
  55.      * @var string
  56.      */
  57.     private $apiClientId;
  58.     /**
  59.      * @Groups({"ozonClient"})
  60.      *
  61.      * @ORM\Column(type="string", length=255)
  62.      *
  63.      * @var string
  64.      */
  65.     private $apiKey;
  66.     /**
  67.      * @Groups({"ozonClient"})
  68.      *
  69.      * @ORM\Column(type="string", length=100)
  70.      *
  71.      * @var string
  72.      */
  73.     private $storeFbs;
  74.     /**
  75.      * @Groups({"ozonClient"})
  76.      *
  77.      * @ORM\Column(type="string", length=100)
  78.      *
  79.      * @var string
  80.      */
  81.     private $storeFbo;
  82.     /**
  83.      * @Groups({"ozonClient"})
  84.      *
  85.      * @ORM\Column(type="string", length=128)
  86.      *
  87.      * @var string
  88.      */
  89.     private $orderType;
  90.     /**
  91.      * @Groups({"ozonClient"})
  92.      *
  93.      * @ORM\Column(type="boolean")
  94.      *
  95.      * @var bool
  96.      */
  97.     private $isEnabled;
  98.     /**
  99.      * @Groups({"ozonClient"})
  100.      *
  101.      * @ORM\Column(type="boolean")
  102.      *
  103.      * @var bool
  104.      */
  105.     private $isEnabledOrders;
  106.     /**
  107.      * @Groups({"ozonClient"})
  108.      *
  109.      * @ORM\Column(type="boolean")
  110.      *
  111.      * @var bool
  112.      */
  113.     private $isEnabledStatuses;
  114.     /**
  115.      * @Groups({"ozonClient"})
  116.      *
  117.      * @ORM\Column(type="datetime", nullable=true)
  118.      *
  119.      * @var \DateTimeInterface|null
  120.      */
  121.     private $startOrdersTm;
  122.     /**
  123.      * @Groups({"ozonClient"})
  124.      *
  125.      * @ORM\Column(type="integer", nullable=true)
  126.      *
  127.      * @var int|null
  128.      */
  129.     private $orderPriceDeflection;
  130.     /**
  131.      * @Groups({"ozonClient"})
  132.      *
  133.      * @ORM\Column(type="integer", nullable=true)
  134.      *
  135.      * @var int|null
  136.      */
  137.     private $minStock;
  138.     /**
  139.      * @Groups({"ozonClient"})
  140.      *
  141.      * @ORM\Column(type="boolean")
  142.      *
  143.      * @var bool
  144.      */
  145.     private $stockFree;
  146.     /**
  147.      * @Groups({"ozonClient"})
  148.      *
  149.      * @ORM\Column(type="boolean")
  150.      *
  151.      * @var bool
  152.      */
  153.     private $stockReserv;
  154.     /**
  155.      * @Groups({"ozonClient"})
  156.      *
  157.      * @ORM\Column(type="boolean")
  158.      *
  159.      * @var bool
  160.      */
  161.     private $stockSher;
  162.     /**
  163.      * @Groups({"ozonClient"})
  164.      *
  165.      * @ORM\Column(type="boolean")
  166.      *
  167.      * @var bool
  168.      */
  169.     private $stockFim;
  170.     /**
  171.      * @Groups({"ozonClient"})
  172.      *
  173.      * @ORM\Column(type="boolean")
  174.      *
  175.      * @var bool
  176.      */
  177.     private $stockFimspb;
  178.     /**
  179.      * @Groups({"ozonClient"})
  180.      *
  181.      * @ORM\Column(type="boolean")
  182.      *
  183.      * @var bool
  184.      */
  185.     private $stockFimInter;
  186.     /**
  187.      * @Groups({"ozonClient"})
  188.      *
  189.      * @ORM\Column(type="boolean")
  190.      *
  191.      * @var bool
  192.      */
  193.     private $stockMp;
  194.     /**
  195.      * @Groups({"ozonClient"})
  196.      *
  197.      * @ORM\Column(type="boolean")
  198.      *
  199.      * @var bool
  200.      */
  201.     private $isEnabledPrice;
  202.     /**
  203.      * @Groups({"ozonClient"})
  204.      *
  205.      * @ORM\Column(type="boolean", nullable=true, options={"default" : true})
  206.      *
  207.      * @var bool
  208.      */
  209.     private $isEnabledStocks;
  210.     /**
  211.      * @Groups({"ozonClient"})
  212.      *
  213.      * @ORM\Column(type="boolean")
  214.      *
  215.      * @var bool
  216.      */
  217.     private $useNightPrice;
  218.     /**
  219.      * @Groups({"ozonClient"})
  220.      *
  221.      * @ORM\OneToMany(targetEntity="App\Entity\OzonClientTarget", mappedBy="client", cascade={"persist"}, fetch="EAGER")
  222.      *
  223.      * @ApiSubresource
  224.      *
  225.      * @var OzonClientTarget[]
  226.      */
  227.     private $targets;
  228.     /**
  229.      * @Groups({"ozonClient"})
  230.      *
  231.      * @ORM\OneToMany(targetEntity="App\Entity\OzonWarehouse", mappedBy="client", cascade={"persist"}, fetch="EAGER")
  232.      *
  233.      * @ApiSubresource
  234.      *
  235.      * @var OzonClientTarget[]
  236.      */
  237.     private $warehouses;
  238.     /**
  239.      * @ORM\Column(type="string", nullable=true)
  240.      *
  241.      * @var string
  242.      */
  243.     private $orderComment;
  244.     /**
  245.      * @Groups({"ozonClient"})
  246.      * @ORM\Column(type="smallint", length=3, options={"default": 1})
  247.      */
  248.     private $currencyCode;
  249.     /**
  250.      * @ORM\Column(type="string", length=255, nullable=true)
  251.      */
  252.     private $legalName;
  253.     /**
  254.      * @ORM\Column(type="text", nullable=true)
  255.      */
  256.     private $thankyouMessage;
  257.     /**
  258.      * Отправлять ли сообщение после доставки
  259.      * @ORM\Column(type="boolean")
  260.      */
  261.     private $isThankyouMsgSend;
  262.     /**
  263.      * @ORM\Column(type="string", length=255, nullable=true)
  264.      */
  265.     private $retailCrmId;
  266.     /**
  267.      * @ORM\Column(type="string", length=255, nullable=true)
  268.      */
  269.     private $retailCrmSite;
  270.     /**
  271.      * @ORM\Column(type="string", length=255, nullable=true)
  272.      */
  273.     private $omsStoreId;
  274.     /**
  275.      * @ORM\Column(type="string", length=255, nullable=true)
  276.      */
  277.     private $omsApiKey;
  278.     /**
  279.      * @ORM\Column(type="string", length=50, nullable=true)
  280.      */
  281.     private $omsPassword;
  282.     /**
  283.      * @ORM\Column(type="datetime", nullable=true)
  284.      */
  285.     private $omsApiKeyCreatedAt;
  286.     /**
  287.      * OzonClient constructor.
  288.      */
  289.     public function __construct()
  290.     {
  291.         $this->isEnabled false;
  292.         $this->isEnabledOrders false;
  293.         $this->isEnabledStatuses false;
  294.         $this->isEnabledPrice false;
  295.         $this->isEnabledStocks false;
  296.         $this->useNightPrice false;
  297.         $this->targets = new ArrayCollection();
  298.         $this->warehouses = new ArrayCollection();
  299.         $this->stockFree true;
  300.         $this->stockReserv false;
  301.         $this->stockSher false;
  302.         $this->stockFim false;
  303.         $this->stockFimInter false;
  304.         $this->stockFimspb false;
  305.         $this->currencyCode self::CURRENCY_RUB;
  306.         $this->legalName 'ООО “Гипер”';
  307.         $this->isThankyouMsgSend false;
  308.     }
  309.     /**
  310.      * @return int|null
  311.      */
  312.     public function getId(): ?int
  313.     {
  314.         return $this->id;
  315.     }
  316.     /**
  317.      * @return string|null
  318.      */
  319.     public function getName(): ?string
  320.     {
  321.         return $this->name;
  322.     }
  323.     /**
  324.      * @param string $name
  325.      *
  326.      * @return self
  327.      */
  328.     public function setName(string $name): self
  329.     {
  330.         $this->name $name;
  331.         return $this;
  332.     }
  333.     /**
  334.      * @return string|null
  335.      */
  336.     public function getUrl(): ?string
  337.     {
  338.         return $this->url;
  339.     }
  340.     /**
  341.      * @param string $url
  342.      *
  343.      * @return self
  344.      */
  345.     public function setUrl(string $url): self
  346.     {
  347.         $this->url $url;
  348.         return $this;
  349.     }
  350.     /**
  351.      * @return string|null
  352.      */
  353.     public function getStoreUrl(): ?string
  354.     {
  355.         return $this->storeUrl;
  356.     }
  357.     /**
  358.      * @param string $storeUrl
  359.      *
  360.      * @return self
  361.      */
  362.     public function setStoreUrl(string $storeUrl): self
  363.     {
  364.         $this->storeUrl $storeUrl;
  365.         return $this;
  366.     }
  367.     /**
  368.      * @return string|null
  369.      */
  370.     public function getApiClientId(): ?string
  371.     {
  372.         return $this->apiClientId;
  373.     }
  374.     /**
  375.      * @param string $apiClientId
  376.      *
  377.      * @return self
  378.      */
  379.     public function setApiClientId(string $apiClientId): self
  380.     {
  381.         $this->apiClientId $apiClientId;
  382.         return $this;
  383.     }
  384.     /**
  385.      * @return string|null
  386.      */
  387.     public function getApiKey(): ?string
  388.     {
  389.         return $this->apiKey;
  390.     }
  391.     /**
  392.      * @param string $apiKey
  393.      *
  394.      * @return self
  395.      */
  396.     public function setApiKey(string $apiKey): self
  397.     {
  398.         $this->apiKey $apiKey;
  399.         return $this;
  400.     }
  401.     /**
  402.      * @return string|null
  403.      */
  404.     public function getStoreFbs(): ?string
  405.     {
  406.         return $this->storeFbs;
  407.     }
  408.     /**
  409.      * @param string $storeFbs
  410.      *
  411.      * @return self
  412.      */
  413.     public function setStoreFbs(string $storeFbs): self
  414.     {
  415.         $this->storeFbs $storeFbs;
  416.         return $this;
  417.     }
  418.     /**
  419.      * @return array|null
  420.      */
  421.     public function getStoreFbsObject(): ?array
  422.     {
  423.         return ['store' => $this->storeFbs];
  424.     }
  425.     /**
  426.      * @param array $storeFbs
  427.      *
  428.      * @return self
  429.      */
  430.     public function setStoreFbsObject(array $storeFbs): self
  431.     {
  432.         $this->storeFbs $storeFbs['store'];
  433.         return $this;
  434.     }
  435.     /**
  436.      * @return string|null
  437.      */
  438.     public function getStoreFbo(): ?string
  439.     {
  440.         return $this->storeFbo;
  441.     }
  442.     /**
  443.      * @param string $storeFbo
  444.      *
  445.      * @return self
  446.      */
  447.     public function setStoreFbo(string $storeFbo): self
  448.     {
  449.         $this->storeFbo $storeFbo;
  450.         return $this;
  451.     }
  452.     /**
  453.      * @return array|null
  454.      */
  455.     public function getStoreFboObject(): ?array
  456.     {
  457.         return ['store' => $this->storeFbo];
  458.     }
  459.     /**
  460.      * @param array $storeFbo
  461.      *
  462.      * @return self
  463.      */
  464.     public function setStoreFboObject(array $storeFbo): self
  465.     {
  466.         $this->storeFbo $storeFbo['store'];
  467.         return $this;
  468.     }
  469.     /**
  470.      * @return string|null
  471.      */
  472.     public function getOrderType(): ?string
  473.     {
  474.         return $this->orderType;
  475.     }
  476.     /**
  477.      * @param string $orderType
  478.      *
  479.      * @return self
  480.      */
  481.     public function setOrderType(string $orderType): self
  482.     {
  483.         $this->orderType $orderType;
  484.         return $this;
  485.     }
  486.     /**
  487.      * @return array|null
  488.      */
  489.     public function getOrderTypeObject(): ?array
  490.     {
  491.         return ['orderType' => $this->orderType];
  492.     }
  493.     /**
  494.      * @param array $orderType
  495.      *
  496.      * @return self
  497.      */
  498.     public function setOrderTypeObject(array $orderType): self
  499.     {
  500.         $this->orderType $orderType['orderType'];
  501.         return $this;
  502.     }
  503.     /**
  504.      * @return bool
  505.      */
  506.     public function isEnabled(): bool
  507.     {
  508.         return $this->isEnabled ?? false;
  509.     }
  510.     /**
  511.      * @param bool $isEnabled
  512.      *
  513.      * @return self
  514.      */
  515.     public function setIsEnabled(bool $isEnabled): self
  516.     {
  517.         $this->isEnabled $isEnabled;
  518.         return $this;
  519.     }
  520.     /**
  521.      * @return bool
  522.      */
  523.     public function isEnabledOrders(): bool
  524.     {
  525.         return $this->isEnabledOrders ?? false;
  526.     }
  527.     /**
  528.      * @param bool $isEnabledOrders
  529.      *
  530.      * @return self
  531.      */
  532.     public function setIsEnabledOrders(bool $isEnabledOrders): self
  533.     {
  534.         $this->isEnabledOrders $isEnabledOrders;
  535.         return $this;
  536.     }
  537.     /**
  538.      * @return bool
  539.      */
  540.     public function isEnabledStatuses(): bool
  541.     {
  542.         return $this->isEnabledStatuses ?? false;
  543.     }
  544.     /**
  545.      * @param bool $isEnabledStatuses
  546.      *
  547.      * @return self
  548.      */
  549.     public function setIsEnabledStatuses(bool $isEnabledStatuses): self
  550.     {
  551.         $this->isEnabledStatuses $isEnabledStatuses;
  552.         return $this;
  553.     }
  554.     /**
  555.      * @return \DateTimeInterface|null
  556.      */
  557.     public function getStartOrdersTm(): ?\DateTimeInterface
  558.     {
  559.         return $this->startOrdersTm;
  560.     }
  561.     /**
  562.      * @param \DateTimeInterface|null $startOrdersTm
  563.      *
  564.      * @return self
  565.      */
  566.     public function setStartOrdersTm(?\DateTimeInterface $startOrdersTm): self
  567.     {
  568.         $this->startOrdersTm $startOrdersTm;
  569.         return $this;
  570.     }
  571.     /**
  572.      * @return int|null
  573.      */
  574.     public function getOrderPriceDeflection(): ?int
  575.     {
  576.         return $this->orderPriceDeflection;
  577.     }
  578.     /**
  579.      * @param int|null $orderPriceDeflection
  580.      */
  581.     public function setOrderPriceDeflection(?int $orderPriceDeflection): void
  582.     {
  583.         $this->orderPriceDeflection $orderPriceDeflection;
  584.     }
  585.     /**
  586.      * @return int|null
  587.      */
  588.     public function getMinStock(): ?int
  589.     {
  590.         return $this->minStock;
  591.     }
  592.     /**
  593.      * @param int|null $minStock
  594.      *
  595.      * @return self
  596.      */
  597.     public function setMinStock(?int $minStock): self
  598.     {
  599.         $this->minStock $minStock;
  600.         return $this;
  601.     }
  602.     /**
  603.      * @return bool|null
  604.      */
  605.     public function isStockFree(): ?bool
  606.     {
  607.         return $this->stockFree;
  608.     }
  609.     /**
  610.      * @param bool $stockFree
  611.      *
  612.      * @return self
  613.      */
  614.     public function setStockFree(bool $stockFree): self
  615.     {
  616.         $this->stockFree $stockFree;
  617.         return $this;
  618.     }
  619.     /**
  620.      * @return bool|null
  621.      */
  622.     public function isStockReserv(): ?bool
  623.     {
  624.         return $this->stockReserv;
  625.     }
  626.     /**
  627.      * @param bool $stockReserv
  628.      *
  629.      * @return self
  630.      */
  631.     public function setStockReserv(bool $stockReserv): self
  632.     {
  633.         $this->stockReserv $stockReserv;
  634.         return $this;
  635.     }
  636.     /**
  637.      * @return bool|null
  638.      */
  639.     public function isStockSher(): ?bool
  640.     {
  641.         return $this->stockSher;
  642.     }
  643.     /**
  644.      * @param bool $stockSher
  645.      *
  646.      * @return self
  647.      */
  648.     public function setStockSher(bool $stockSher): self
  649.     {
  650.         $this->stockSher $stockSher;
  651.         return $this;
  652.     }
  653.     /**
  654.      * @return bool|null
  655.      */
  656.     public function isStockFim(): ?bool
  657.     {
  658.         return $this->stockFim;
  659.     }
  660.     /**
  661.      * @param bool $stockFim
  662.      *
  663.      * @return self
  664.      */
  665.     public function setStockFim(bool $stockFim): self
  666.     {
  667.         $this->stockFim $stockFim;
  668.         return $this;
  669.     }
  670.     /**
  671.      * @return bool|null
  672.      */
  673.     public function isStockFimspb(): ?bool
  674.     {
  675.         return $this->stockFimspb;
  676.     }
  677.     /**
  678.      * @param bool $stockFimspb
  679.      *
  680.      * @return self
  681.      */
  682.     public function setStockFimspb(bool $stockFimspb): self
  683.     {
  684.         $this->stockFimspb $stockFimspb;
  685.         return $this;
  686.     }
  687.     /**
  688.      * @return bool|null
  689.      */
  690.     public function isStockFimInter(): ?bool
  691.     {
  692.         return $this->stockFimInter;
  693.     }
  694.     /**
  695.      * @param bool $stockFimInter
  696.      *
  697.      * @return self
  698.      */
  699.     public function setStockFimInter(bool $stockFimInter): self
  700.     {
  701.         $this->stockFimInter $stockFimInter;
  702.         return $this;
  703.     }
  704.     /**
  705.      * @return bool|null
  706.      */
  707.     public function isStockMp(): ?bool
  708.     {
  709.         return $this->stockMp;
  710.     }
  711.     /**
  712.      * @param bool $stockMp
  713.      */
  714.     public function setStockMp(bool $stockMp): void
  715.     {
  716.         $this->stockMp $stockMp;
  717.     }
  718.     /**
  719.      * @return bool
  720.      */
  721.     public function isEnabledPrice(): bool
  722.     {
  723.         return $this->isEnabledPrice;
  724.     }
  725.     /**
  726.      * @param bool $isEnabledPrice
  727.      *
  728.      * @return self
  729.      */
  730.     public function setIsEnabledPrice(bool $isEnabledPrice): self
  731.     {
  732.         $this->isEnabledPrice $isEnabledPrice;
  733.         return $this;
  734.     }
  735.     /**
  736.      * @return bool|null
  737.      */
  738.     public function isEnabledStocks(): ?bool
  739.     {
  740.         return $this->isEnabledStocks;
  741.     }
  742.     /**
  743.      * @param bool|null $isEnabledStocks
  744.      *
  745.      * @return self
  746.      */
  747.     public function setIsEnabledStocks(?bool $isEnabledStocks): self
  748.     {
  749.         $this->isEnabledStocks $isEnabledStocks;
  750.         return $this;
  751.     }
  752.     /**
  753.      * @return bool
  754.      */
  755.     public function getUseNightPrice(): bool
  756.     {
  757.         return $this->useNightPrice;
  758.     }
  759.     /**
  760.      * @param bool $useNightPrice
  761.      *
  762.      * @return self
  763.      */
  764.     public function setUseNightPrice(bool $useNightPrice): self
  765.     {
  766.         $this->useNightPrice $useNightPrice;
  767.         return $this;
  768.     }
  769.     /**
  770.      * @return Collection|OzonClientTarget[]
  771.      */
  772.     public function getTargets(): Collection
  773.     {
  774.         return $this->targets;
  775.     }
  776.     /**
  777.      * @param OzonClientTarget $target
  778.      *
  779.      * @return self
  780.      */
  781.     public function addTarget(OzonClientTarget $target): self
  782.     {
  783.         if (!$this->targets->contains($target)) {
  784.             $this->targets->add($target);
  785.             $target->setClient($this);
  786.         }
  787.         return $this;
  788.     }
  789.     /**
  790.      * @param OzonClientTarget $target
  791.      *
  792.      * @return self
  793.      */
  794.     public function removeTarget(OzonClientTarget $target): self
  795.     {
  796.         if ($this->targets->contains($target)) {
  797.             $this->targets->removeElement($target);
  798.         }
  799.         return $this;
  800.     }
  801.     /**
  802.      * @return Collection|OzonWarehouse[]
  803.      */
  804.     public function getWarehouses(): Collection
  805.     {
  806.         return $this->warehouses;
  807.     }
  808.     /**
  809.      * @param OzonWarehouse $warehouse
  810.      *
  811.      * @return self
  812.      */
  813.     public function addWarehouse(OzonWarehouse $warehouse): self
  814.     {
  815.         if (!$this->warehouses->contains($warehouse)) {
  816.             $this->warehouses->add($warehouse);
  817.             $warehouse->setClient($this);
  818.         }
  819.         return $this;
  820.     }
  821.     /**
  822.      * @param OzonWarehouse $warehouse
  823.      *
  824.      * @return self
  825.      */
  826.     public function removeWarehouse(OzonWarehouse $warehouse): self
  827.     {
  828.         if ($this->warehouses->contains($warehouse)) {
  829.             $this->warehouses->removeElement($warehouse);
  830.         }
  831.         return $this;
  832.     }
  833.     /**
  834.      * @return string|null
  835.      */
  836.     public function getOrderComment(): ?string
  837.     {
  838.         return $this->orderComment;
  839.     }
  840.     /**
  841.      * @param string|null $orderComment
  842.      * @return OzonClient
  843.      */
  844.     public function setOrderComment(?string $orderComment): OzonClient
  845.     {
  846.         $this->orderComment $orderComment;
  847.         return $this;
  848.     }
  849.     /**
  850.      * @return string
  851.      */
  852.     public function __toString(): string
  853.     {
  854.         return ($this->getName() ?? '').' ('.$this->getApiClientId().')';
  855.     }
  856.     /**
  857.      * @return array
  858.      */
  859.     public function jsonSerialize(): array
  860.     {
  861.         $data = [
  862.             'id' => $this->getId(),
  863.             'name' => $this->getName(),
  864.             'url' => $this->getUrl(),
  865.             'storeUrl' => $this->getStoreUrl(),
  866.             'apiClientId' => $this->getApiClientId(),
  867.             'apiKey' => $this->getApiKey(),
  868.             'storeFbs' => $this->getStoreFbs(),
  869.             'storeFbo' => $this->getStoreFbo(),
  870.             'orderType' => $this->getOrderType(),
  871.             'isEnabled' => $this->isEnabled(),
  872.             'isEnabledOrders' => $this->isEnabledOrders(),
  873.             'isEnabledStatuses' => $this->isEnabledStatuses(),
  874.             'isEnabledPrice' => $this->isEnabledPrice(),
  875.             'useNightPrice' => $this->getUseNightPrice(),
  876.             'startOrdersTm' => $this->getStartOrdersTm(),
  877.             'minStock' => $this->getMinStock(),
  878.             'isStockFree' => $this->isStockFree(),
  879.             'isStockReserv' => $this->isStockReserv(),
  880.             'isStockSher' => $this->isStockSher(),
  881.             'isStockFim' => $this->isStockFim(),
  882.             'isStockFimspb' => $this->isStockFimspb(),
  883.             'isStockFimInter' => $this->isStockFimInter(),
  884.         ];
  885.         return $data;
  886.     }
  887.     public function getCurrencyCode(): ?int
  888.     {
  889.         return $this->currencyCode;
  890.     }
  891.     public function setCurrencyCode(int $currencyCode): self
  892.     {
  893.         $this->currencyCode $currencyCode;
  894.         return $this;
  895.     }
  896.     public function getCurrency(): string
  897.     {
  898.         $currencies = [
  899.             self::CURRENCY_RUB => 'RUB',
  900.             self::CURRENCY_KZT => 'KZT'
  901.         ];
  902.         return $currencies[$this->currencyCode];
  903.     }
  904.     public function getLegalName(): ?string
  905.     {
  906.         return $this->legalName;
  907.     }
  908.     public function setLegalName(?string $legalName): self
  909.     {
  910.         $this->legalName $legalName;
  911.         return $this;
  912.     }
  913.     public function getThankyouMessage(): ?string
  914.     {
  915.         return $this->thankyouMessage;
  916.     }
  917.     public function setThankyouMessage(?string $thankyouMessage): self
  918.     {
  919.         $this->thankyouMessage $thankyouMessage;
  920.         return $this;
  921.     }
  922.     public function getIsThankyouMsgSend(): ?bool
  923.     {
  924.         return $this->isThankyouMsgSend;
  925.     }
  926.     public function setIsThankyouMsgSend(bool $isThankyouMsgSend): self
  927.     {
  928.         $this->isThankyouMsgSend $isThankyouMsgSend;
  929.         return $this;
  930.     }
  931.     public function getRetailCrmId(): ?string
  932.     {
  933.         return $this->retailCrmId;
  934.     }
  935.     public function setRetailCrmId(?string $retailCrmId): self
  936.     {
  937.         $this->retailCrmId $retailCrmId;
  938.         return $this;
  939.     }
  940.     public function getRetailCrmSite(): ?string
  941.     {
  942.         return $this->retailCrmSite;
  943.     }
  944.     public function setRetailCrmSite(?string $retailCrmSite): self
  945.     {
  946.         $this->retailCrmSite $retailCrmSite;
  947.         return $this;
  948.     }
  949.     public function getOmsStoreId(): ?string
  950.     {
  951.         return $this->omsStoreId;
  952.     }
  953.     public function setOmsStoreId(?string $omsStoreId): self
  954.     {
  955.         $this->omsStoreId $omsStoreId;
  956.         return $this;
  957.     }
  958.     public function getOmsApiKey(): ?string
  959.     {
  960.         return $this->omsApiKey;
  961.     }
  962.     public function setOmsApiKey(?string $omsApiKey): self
  963.     {
  964.         $this->omsApiKey $omsApiKey;
  965.         return $this;
  966.     }
  967.     public function getOmsPassword(): ?string
  968.     {
  969.         return $this->omsPassword;
  970.     }
  971.     public function setOmsPassword(?string $omsPassword): self
  972.     {
  973.         $this->omsPassword $omsPassword;
  974.         return $this;
  975.     }
  976.     public function getOmsApiKeyCreatedAt(): ?\DateTimeInterface
  977.     {
  978.         return $this->omsApiKeyCreatedAt;
  979.     }
  980.     public function setOmsApiKeyCreatedAt(?\DateTimeInterface $omsApiKeyCreatedAt): self
  981.     {
  982.         $this->omsApiKeyCreatedAt $omsApiKeyCreatedAt;
  983.         return $this;
  984.     }
  985. }