/** * Add inventory to catalog in CRM. * @param String $catalogReference * @param String $productReference * @param AbstractProduct $abstractProduct */ private function addInventory($catalogReference, $inventoryReference, $abstractProduct) { $price = $abstractProduct->getPrice(); $currencyReference = $this->getCurrencyReference($abstractProduct->getCurrency()); $currency = $this->trimReference($currencyReference); $catalogId = $this->trimReference($catalogReference); $inventoryId = $this->trimReference($inventoryReference); $this->insertInventoryToCatalog($catalogId, $inventoryId, $price, $currency); }