6 declare(strict_types=1);
24 private $sourceItemsSave;
29 private $getSourceItemBySourceCodeAndSku;
34 private $getStockItemConfiguration;
39 private $getStockBySalesChannel;
54 $this->getSourceItemBySourceCodeAndSku = $getSourceItemBySourceCodeAndSku;
55 $this->getStockItemConfiguration = $getStockItemConfiguration;
56 $this->getStockBySalesChannel = $getStockBySalesChannel;
68 $stockId = $this->getStockBySalesChannel->execute($salesChannel)->getStockId();
70 $itemSku =
$item->getSku();
71 $qty =
$item->getQty();
72 $stockItemConfiguration = $this->getStockItemConfiguration->execute(
77 if (!$stockItemConfiguration->isManageStock()) {
88 __(
'Not all of your products are available in the requested quantity.')
execute(SourceDeductionRequestInterface $sourceDeductionRequest)
__construct(SourceItemsSaveInterface $sourceItemsSave, GetSourceItemBySourceCodeAndSku $getSourceItemBySourceCodeAndSku, GetStockItemConfigurationInterface $getStockItemConfiguration, GetStockBySalesChannelInterface $getStockBySalesChannel)