46 $taxClassType = $taxClass->getClassType();
47 if (!array_key_exists($taxClassType, $this->_types)) {
48 throw new \Magento\Framework\Exception\LocalizedException(
49 __(
'Invalid type of tax class "%1"', $taxClassType)
52 return $this->_objectManager->create(
53 $this->_types[$taxClassType],
54 [
'data' => [
'id' => $taxClass->getId()]]
const TAX_CLASS_TYPE_CUSTOMER
create(\Magento\Tax\Model\ClassModel $taxClass)
__construct(\Magento\Framework\ObjectManagerInterface $objectManager)
const TAX_CLASS_TYPE_PRODUCT