42 return array_keys($this->metadata);
64 if (!isset($this->metadata[$priceCode])) {
65 throw new \InvalidArgumentException($priceCode .
' is not registered in prices list');
67 $className = $this->metadata[$priceCode][
'class'];
68 return $this->priceFactory->create($salableItem,
$className, $quantity);
__construct(PriceFactory $priceFactory, array $metadata=[])
createPriceObject(SaleableInterface $salableItem, $priceCode, $quantity)