getStockBySalesChannel = $getStockBySalesChannel; $this->salesChannelInterfaceFactory = $salesChannelInterfaceFactory; } /** * @inheritdoc */ public function execute(string $type, string $code): StockInterface { $salesChannel = $this->salesChannelInterfaceFactory->create([ 'data' => [ SalesChannelInterface::TYPE => $type, SalesChannelInterface::CODE => $code ] ]); return $this->getStockBySalesChannel->execute($salesChannel); } }