TotalSegment
Magento\Quote\Model\Cart\TotalSegment
What it does
This class represents a single segment (line item) of a shopping cart's totals, such as subtotal, shipping, tax, or discount.
Developers use this class when working with the Magento 2 Quote API to retrieve or display individual total components with their code, value, title, and display area.
It's commonly used in checkout processes, cart displays, and when building custom total calculations or integrations.
Public Methods
- getCode()
- setCode()
- getValue()
- setValue()
- getTitle()
- setTitle()
- getArea()
- setArea()
- getExtensionAttributes()
- setExtensionAttributes()