Log in
Model

ClassModel

Magento\Tax\Model\ClassModel

What it does

This model represents tax classes in Magento 2, which categorize customers and products for tax calculation purposes.

Developers use this class to create, retrieve, update, or delete tax classes, and to validate that a tax class isn't in use before deletion.

It implements the TaxClassInterface and provides methods to manage tax class properties like ID, name, and type (CUSTOMER or PRODUCT).

Public Methods

  • _construct()
  • beforeDelete()
  • getClassId()
  • getClassName()
  • getClassType()
  • setClassId()
  • setClassName()
  • setClassType()
  • getExtensionAttributes()
  • setExtensionAttributes()