diff --git a/src/Api/AssetManager/AssetMediaFileApi.php b/src/Api/AssetManager/AssetMediaFileApi.php index 8b63ba0e..4ac97f0b 100644 --- a/src/Api/AssetManager/AssetMediaFileApi.php +++ b/src/Api/AssetManager/AssetMediaFileApi.php @@ -28,7 +28,7 @@ public function __construct(ResourceClientInterface $resourceClient, FileSystemI /** * {@inheritdoc} */ - public function download($code): ResponseInterface + public function download(string $code): ResponseInterface { return $this->resourceClient->getStreamedResource(static::MEDIA_FILE_DOWNLOAD_URI, [$code]); } diff --git a/src/Api/AssetManager/AssetMediaFileApiInterface.php b/src/Api/AssetManager/AssetMediaFileApiInterface.php index b62b4998..ced2357c 100644 --- a/src/Api/AssetManager/AssetMediaFileApiInterface.php +++ b/src/Api/AssetManager/AssetMediaFileApiInterface.php @@ -3,22 +3,12 @@ namespace Akeneo\Pim\ApiClient\Api\AssetManager; +use Akeneo\Pim\ApiClient\Api\Operation\DownloadableResourceInterface; use Akeneo\Pim\ApiClient\Exception\HttpException; use Akeneo\Pim\ApiClient\Exception\RuntimeException; -use Psr\Http\Message\ResponseInterface; -interface AssetMediaFileApiInterface +interface AssetMediaFileApiInterface extends DownloadableResourceInterface { - /** - * Downloads an asset media file by its code - * - * @param string $code Code of the media file - * - * @throws HttpException If the request failed. - * - * @return ResponseInterface - */ - public function download($code): ResponseInterface; /** * Creates a new asset media file.