Skip to content

Commit 3726867

Browse files
author
Yu Tang
committed
Merge branch 'FearlessKiwis-MAGETWO-28253-Downloadable-Integration-Api' into develop
2 parents 0cc286b + f803d9d commit 3726867

30 files changed

+2482
-1249
lines changed

app/code/Magento/Downloadable/Api/Data/LinkContentInterface.php

Lines changed: 0 additions & 194 deletions
This file was deleted.

app/code/Magento/Downloadable/Api/Data/LinkInterface.php

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,24 @@ public function getLinkFile();
119119
public function setLinkFile($linkFile);
120120

121121
/**
122-
* Return URL or NULL when type is 'file'
122+
* Return file content
123123
*
124-
* @return string|null file URL
124+
* @return \Magento\Downloadable\Api\Data\File\ContentInterface|null
125+
*/
126+
public function getLinkFileContent();
127+
128+
/**
129+
* Set file content
130+
*
131+
* @param \Magento\Downloadable\Api\Data\File\ContentInterface $linkFileContent
132+
* @return $this
133+
*/
134+
public function setLinkFileContent(\Magento\Downloadable\Api\Data\File\ContentInterface $linkFileContent = null);
135+
136+
/**
137+
* Return link url or null when type is 'file'
138+
*
139+
* @return string|null
125140
*/
126141
public function getLinkUrl();
127142

@@ -159,6 +174,23 @@ public function getSampleFile();
159174
*/
160175
public function setSampleFile($sampleFile);
161176

177+
/**
178+
* Return sample file content when type is 'file'
179+
*
180+
* @return \Magento\Downloadable\Api\Data\File\ContentInterface|null relative file path
181+
*/
182+
public function getSampleFileContent();
183+
184+
/**
185+
* Set sample file content
186+
*
187+
* @param \Magento\Downloadable\Api\Data\File\ContentInterface $sampleFileContent
188+
* @return $this
189+
*/
190+
public function setSampleFileContent(
191+
\Magento\Downloadable\Api\Data\File\ContentInterface $sampleFileContent = null
192+
);
193+
162194
/**
163195
* Return URL or NULL when type is 'file'
164196
*

app/code/Magento/Downloadable/Api/Data/SampleContentInterface.php

Lines changed: 0 additions & 104 deletions
This file was deleted.

app/code/Magento/Downloadable/Api/Data/SampleInterface.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
*/
66
namespace Magento\Downloadable\Api\Data;
77

8+
use \Magento\Downloadable\Api\Data\File\ContentInterface;
9+
810
/**
911
* @codeCoverageIgnore
1012
*/
@@ -82,6 +84,21 @@ public function getSampleFile();
8284
*/
8385
public function setSampleFile($sampleFile);
8486

87+
/**
88+
* Retrieve sample file content
89+
*
90+
* @return \Magento\Downloadable\Api\Data\File\ContentInterface|null
91+
*/
92+
public function getSampleFileContent();
93+
94+
/**
95+
* Set sample file content
96+
*
97+
* @param \Magento\Downloadable\Api\Data\File\ContentInterface $sampleFileContent
98+
* @return $this
99+
*/
100+
public function setSampleFileContent(ContentInterface $sampleFileContent = null);
101+
85102
/**
86103
* Return URL or NULL when type is 'file'
87104
*

0 commit comments

Comments
 (0)