Model
Result
Magento\Shipping\Model\Rate\Result
What it does
This class acts as a container for shipping rate results returned by shipping carriers in Magento 2.
Developers use it when implementing custom shipping methods or working with shipping calculations to collect, filter, and manipulate multiple shipping rate options.
It provides methods to retrieve the cheapest rate, filter rates by carrier, sort by price, and handle shipping calculation errors.
Public Methods
- reset()
- setError()
- getError()
- append()
- getAllRates()
- getRateById()
- getRatesByCarrier()
- asArray()
- getCheapestRate()
- sortRatesByPrice()
- updateRatePrice()