Log in
Model

Tax

Magento\Tax\Model\Sales\Order\Tax

What it does

This model represents tax information applied to an order in Magento 2.

Developers use this class to retrieve and store tax details including tax code, title, percentage, amounts (in both base and order currency), and the collection of tax rates applied.

It's commonly used when displaying order tax breakdowns in admin panels, invoices, or when processing tax-related order data through the Tax API.

Public Methods

  • getCode()
  • getTitle()
  • getPercent()
  • getAmount()
  • getBaseAmount()
  • setCode()
  • setTitle()
  • setPercent()
  • setAmount()
  • setBaseAmount()
  • getRates()
  • setRates()
  • getExtensionAttributes()
  • setExtensionAttributes()