Model
Cost
Magento\Catalog\Model\Product\Price\Cost
What it does
This class serves as a Data Transfer Object (DTO) for product cost information in Magento 2.
Developers use it when working with product cost data across different store views, particularly when retrieving or updating cost prices through the API or service contracts.
It encapsulates cost value, store ID, and SKU for a product in a structured way.
Public Methods
- setCost()
- getCost()
- setStoreId()
- getStoreId()
- setSku()
- getSku()
- getExtensionAttributes()
- setExtensionAttributes()