Skip to content

Commit a17a8b3

Browse files
committed
MET-23: add json array
1 parent ee2337a commit a17a8b3

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

src/Api/MeasurementFamilyApi.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ public function all(int $pageSize = 100, array $queryParameters = []): ResourceC
6666
/**
6767
* {@inheritdoc}
6868
*/
69-
public function upsertList($measurementFamilies): \Traversable
69+
public function upsertList($measurementFamilies): array
7070
{
71-
return $this->resourceClient->upsertStreamResourceList(static::MEASUREMENT_FAMILIES_URI, [], $measurementFamilies);
71+
return $this->resourceClient->upsertJsonResourceList(static::MEASUREMENT_FAMILIES_URI, [], $measurementFamilies);
7272
}
7373
}

src/Api/MeasurementFamilyApiInterface.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,16 @@
1212
* @copyright 2020 Akeneo SAS (http://www.akeneo.com)
1313
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
1414
*/
15-
interface MeasurementFamilyApiInterface extends ListableResourceInterface, UpsertableResourceListInterface
15+
interface MeasurementFamilyApiInterface extends ListableResourceInterface
1616
{
17+
/**
18+
* Updates or creates several resources.
19+
*
20+
* @param array|StreamInterface $resources array or StreamInterface object containing the resources to create or update
21+
*
22+
* @throws HttpException
23+
*
24+
* @return array returns an array, each entry corresponding to the response of the upserted resource
25+
*/
26+
public function upsertList($resources): array;
1727
}

0 commit comments

Comments
 (0)