SampleRepositoryInterface
Magento\Downloadable\Api\SampleRepositoryInterface
What it does
This interface defines the contract for managing downloadable product samples in Magento 2.
Developers use this repository to retrieve, create, update, or delete sample files associated with downloadable products, enabling customers to preview content before purchase.
It provides methods to fetch samples by product SKU or product object, save new samples, and delete existing ones.
Public Methods
- getList()
- getSamplesByProduct()
- save()
- delete()