Model
Cost
Magento\Catalog\Model\Product\Price\Cost
What it does
This class serves as a Data Transfer Object (DTO) for managing product cost information in Magento 2.
Developers use it to get and set cost values along with associated store ID and SKU data when working with product pricing through the Catalog API.
It's particularly useful for bulk operations or API integrations that need to handle product cost data across different store views.
Public Methods
- setCost()
- getCost()
- setStoreId()
- getStoreId()
- setSku()
- getSku()
- getExtensionAttributes()
- setExtensionAttributes()