Skip to content

Commit f8ce155

Browse files
author
Mohan Ahuja
committed
ACP2E-726: Unable to query bulk operations by search criteria using REST Api
- Reverting existing interface changes. - Created new interface and extended same in Operation model
1 parent a818449 commit f8ce155

File tree

3 files changed

+35
-19
lines changed

3 files changed

+35
-19
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
namespace Magento\AsynchronousOperations\Api\Data;
8+
9+
/**
10+
* Class BulkOperationInterface
11+
* @api
12+
* @since 103.0.0
13+
*/
14+
interface BulkOperationInterface
15+
{
16+
public const OPERATION_ID = 'id';
17+
18+
/**
19+
* Get operation key
20+
*
21+
* @return int|null
22+
* @since 103.0.1
23+
*/
24+
public function getOperationKey();
25+
26+
/**
27+
* Set operation key
28+
*
29+
* @param int|null $operationKey
30+
* @since 103.0.1
31+
*/
32+
public function setOperationKey(?int $operationKey);
33+
}

app/code/Magento/AsynchronousOperations/Api/Data/OperationInterface.php

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
*/
1414
interface OperationInterface extends \Magento\Framework\Bulk\OperationInterface
1515
{
16-
public const OPERATION_ID = 'id';
17-
1816
/**
1917
* Retrieve existing extension attributes object.
2018
*
@@ -33,20 +31,4 @@ public function getExtensionAttributes();
3331
public function setExtensionAttributes(
3432
\Magento\AsynchronousOperations\Api\Data\OperationExtensionInterface $extensionAttributes
3533
);
36-
37-
/**
38-
* Get operation key
39-
*
40-
* @return int|null
41-
* @since 103.0.1
42-
*/
43-
public function getOperationKey();
44-
45-
/**
46-
* Set operation key
47-
*
48-
* @param int|null $operationKey
49-
* @since 103.0.1
50-
*/
51-
public function setOperationKey(?int $operationKey);
5234
}

app/code/Magento/AsynchronousOperations/Model/Operation.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@
66
namespace Magento\AsynchronousOperations\Model;
77

88
use Magento\AsynchronousOperations\Api\Data\OperationInterface;
9+
use Magento\AsynchronousOperations\Api\Data\BulkOperationInterface;
910
use Magento\AsynchronousOperations\Model\OperationStatusValidator;
1011
use Magento\Framework\DataObject;
1112

1213
/**
1314
* Class Operation encapsulates methods for Operation Model Object
1415
*/
15-
class Operation extends DataObject implements OperationInterface
16+
class Operation extends DataObject implements OperationInterface, BulkOperationInterface
1617
{
1718
/**
1819
* @var OperationStatusValidator

0 commit comments

Comments
 (0)