/** * @param ProductVariantInterface $productVariant * @param ChannelInterface $channel */ private function createChannelPricings(ProductVariantInterface $productVariant, ChannelInterface $channel) { /** @var ChannelPricingInterface $channelPricing */ $channelPricing = $this->channelPricingFactory->createNew(); $channelPricing->setChannel($channel); $channelPricing->setPrice($this->faker->randomNumber(3)); $productVariant->addChannelPricing($channelPricing); }