Log in
Model

Key

Magento\Tax\Model\TaxClass\Key

What it does

This class represents a tax class identifier key used to look up or reference tax classes in Magento 2.

Developers use it when they need to identify a tax class by either its ID or name, setting the type (e.g., 'id' or 'name') and corresponding value.

It's commonly used in tax calculation operations and when working with product or customer tax classes through the API.

Public Methods

  • getType()
  • getValue()
  • setType()
  • setValue()
  • getExtensionAttributes()
  • setExtensionAttributes()