123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224 |
- <?php
- /**
- * Copyright © Magento, Inc. All rights reserved.
- * See COPYING.txt for license details.
- */
- namespace Magento\Downloadable\Api\Data;
- /**
- * @codeCoverageIgnore
- * @api
- * @since 100.0.2
- */
- interface LinkInterface extends \Magento\Framework\Api\ExtensibleDataInterface
- {
- /**
- * @return int|null Sample(or link) id
- */
- public function getId();
- /**
- * @param int $id
- * @return $this
- */
- public function setId($id);
- /**
- * @return string|null
- */
- public function getTitle();
- /**
- * @param string $title
- * @return $this
- */
- public function setTitle($title);
- /**
- * @return int
- */
- public function getSortOrder();
- /**
- * @param int $sortOrder
- * @return $this
- */
- public function setSortOrder($sortOrder);
- /**
- * Link shareable status
- * 0 -- No
- * 1 -- Yes
- * 2 -- Use config default value
- *
- * @return int
- */
- public function getIsShareable();
- /**
- * @param int $isShareable
- * @return $this
- */
- public function setIsShareable($isShareable);
- /**
- * Link price
- *
- * @return float
- */
- public function getPrice();
- /**
- * Set link price
- *
- * @param float $price
- * @return $this
- */
- public function setPrice($price);
- /**
- * Number of downloads per user
- * Null for unlimited downloads
- *
- * @return int|null
- */
- public function getNumberOfDownloads();
- /**
- * Set number of downloads per user
- * Null for unlimited downloads
- *
- * @param int $numberOfDownloads
- * @return $this
- */
- public function setNumberOfDownloads($numberOfDownloads);
- /**
- * @return string
- */
- public function getLinkType();
- /**
- * @param string $linkType
- * @return $this
- */
- public function setLinkType($linkType);
- /**
- * Return file path or null when type is 'url'
- *
- * @return string|null relative file path
- */
- public function getLinkFile();
- /**
- * Set file path or null when type is 'url'
- *
- * @param string $linkFile
- * @return $this
- */
- public function setLinkFile($linkFile);
- /**
- * Return file content
- *
- * @return \Magento\Downloadable\Api\Data\File\ContentInterface|null
- */
- public function getLinkFileContent();
- /**
- * Set file content
- *
- * @param \Magento\Downloadable\Api\Data\File\ContentInterface $linkFileContent
- * @return $this
- */
- public function setLinkFileContent(\Magento\Downloadable\Api\Data\File\ContentInterface $linkFileContent = null);
- /**
- * Return link url or null when type is 'file'
- *
- * @return string|null
- */
- public function getLinkUrl();
- /**
- * Set URL
- *
- * @param string $linkUrl
- * @return $this
- */
- public function setLinkUrl($linkUrl);
- /**
- * @return string
- */
- public function getSampleType();
- /**
- * @param string $sampleType
- * @return $this
- */
- public function setSampleType($sampleType);
- /**
- * Return file path or null when type is 'url'
- *
- * @return string|null relative file path
- */
- public function getSampleFile();
- /**
- * Set file path
- *
- * @param string $sampleFile
- * @return $this
- */
- public function setSampleFile($sampleFile);
- /**
- * Return sample file content when type is 'file'
- *
- * @return \Magento\Downloadable\Api\Data\File\ContentInterface|null relative file path
- */
- public function getSampleFileContent();
- /**
- * Set sample file content
- *
- * @param \Magento\Downloadable\Api\Data\File\ContentInterface $sampleFileContent
- * @return $this
- */
- public function setSampleFileContent(
- \Magento\Downloadable\Api\Data\File\ContentInterface $sampleFileContent = null
- );
- /**
- * Return URL or NULL when type is 'file'
- *
- * @return string|null file URL
- */
- public function getSampleUrl();
- /**
- * Set URL
- *
- * @param string $sampleUrl
- * @return $this
- */
- public function setSampleUrl($sampleUrl);
- /**
- * Retrieve existing extension attributes object or create a new one.
- *
- * @return \Magento\Downloadable\Api\Data\LinkExtensionInterface|null
- */
- public function getExtensionAttributes();
- /**
- * Set an extension attributes object.
- *
- * @param \Magento\Downloadable\Api\Data\LinkExtensionInterface $extensionAttributes
- * @return $this
- */
- public function setExtensionAttributes(\Magento\Downloadable\Api\Data\LinkExtensionInterface $extensionAttributes);
- }
|