TotalSegmentInterface
Magento\Quote\Api\Data\TotalSegmentInterface
What it does
This interface defines the structure for individual segments of a shopping cart's total calculation in Magento 2.
Each segment represents a line item in the cart totals breakdown (like subtotal, shipping, tax, discounts) with properties for code, title, value, and display area.
Developers use this when working with cart totals API responses or when creating custom total segments that need to be displayed in checkout or cart pages.
Public Methods
- getCode()
- setCode()
- getTitle()
- setTitle()
- getValue()
- setValue()
- getArea()
- setArea()
- getExtensionAttributes()
- setExtensionAttributes()