Rate
Magento\Tax\Model\Calculation\Rate
What it does
This model manages tax rate data in Magento 2, including country, region, postcode/ZIP code ranges, and percentage rates.
Developers use this class to create, update, and validate tax rates, handle rate titles for different store views, and ensure tax rates aren't deleted when actively used in tax rules.
It provides validation for rate data and manages the relationship between tax rates and geographic locations.
Public Methods
- beforeSave()
- afterSave()
- beforeDelete()
- afterDelete()
- saveTitles()
- getTitleModel()
- getTitles()
- deleteAllRates()
- loadByCode()
- getRegionName()
- getTaxCalculationRateId()
- getTaxCountryId()
- getTaxRegionId()
- getTaxPostcode()
- getZipFrom()
- getZipTo()
- getRate()
- getCode()
- getZipIsRange()
- setTaxCountryId()
- setTaxRegionId()
- setRegionName()
- setTaxPostcode()
- setZipIsRange()
- setZipFrom()
- setZipTo()
- setRate()
- setCode()
- setTitles()
- getExtensionAttributes()
- setExtensionAttributes()