Log in
Interface

TaxRuleInterface

Magento\Tax\Api\Data\TaxRuleInterface

What it does

This interface defines the contract for tax rule data objects in Magento 2.

Developers use it when working with tax rules that determine which tax rates apply based on customer tax class, product tax class, priority, and position.

It's essential for managing tax calculations across different customer groups and product types.

Public Methods

  • getId()
  • setId()
  • getCode()
  • setCode()
  • getPriority()
  • setPriority()
  • getPosition()
  • setPosition()
  • getCustomerTaxClassIds()
  • setCustomerTaxClassIds()
  • getProductTaxClassIds()
  • setProductTaxClassIds()
  • getTaxRateIds()
  • setTaxRateIds()
  • getCalculateSubtotal()
  • setCalculateSubtotal()
  • getExtensionAttributes()
  • setExtensionAttributes()