Skip to content

Instantly share code, notes, and snippets.

@vrann
Last active March 27, 2018 03:22
Show Gist options
  • Save vrann/a64e663311525cf111027ee00cb34255 to your computer and use it in GitHub Desktop.
Save vrann/a64e663311525cf111027ee00cb34255 to your computer and use it in GitHub Desktop.
Bulk API Status Interfaces
<?php
namespace Magento\AsynchronousOperations\Api;
/**
* @api
*/
interface BulkStatusInterface
{
/**
* @param string $bulkUuid
* @return \Magento\AsynchronousOperations\Api\Data\BulkStatus\DetailedInterface
* @throws \Magento\Framework\Exception\NoSuchEntityException
*/
public function getBulkDetailedStatus($bulkUuid);
/**
* @param string $bulkUuid
* @return \Magento\AsynchronousOperations\Api\Data\BulkStatus\ShortInterface
* @throws \Magento\Framework\Exception\NoSuchEntityException
*/
public function getBulkStatus($bulkUuid);
}
namespace Magento\AsynchronousOperations\Api\Data; //only one level should be under the Api\Data namespace
use Magento\AsynchronousOperations\Api\Data\OperationDetailsInterface;
use Magento\AsynchronousOperations\Api\Data\BulkSummaryInterface;
/**
* Interface BulkStatusInterface
*
* @api
*/
interface DetailedInterface extends BulkSummaryInterface
{
const OPERATIONS_LIST = 'operations_list';
const OPERATIONS_COUNTER = 'operations_counter';
/**
* Retrieve operations list.
*
* @return \Magento\AsynchronousOperations\Api\Data\OperationStatus\DetailedInterface[]
*/
public function getOperationsList();
/**
* Set operations list.
*
* @param \Magento\AsynchronousOperations\Api\Data\OperationStatus\DetailedInterface[] $operationStatusList
* @return $this
* @since 100.3.0
*/
public function setOperationsList($operationStatusList);
/**
* Retrieve operations counter object.
*
* @return \Magento\AsynchronousOperations\Api\Data\OperationDetailsInterface|null
*/
public function getOperationsCounter();
/**
* Set operations counter object.
*
* @param \Magento\AsynchronousOperations\Api\Data\OperationDetailsInterface $operationDetails
* @return $this
*/
public function setOperationsCounter(OperationDetailsInterface $operationDetails);
}
namespace Magento\AsynchronousOperations\Api\Data\BulkStatus;
use Magento\AsynchronousOperations\Api\Data\OperationDetailsInterface;
use Magento\AsynchronousOperations\Api\Data\BulkSummaryInterface;
/**
* Interface BulkStatusInterface
*
* @api
*/
interface StatusInterface extends BulkSummaryInterface
{
const OPERATIONS_LIST = 'operations_list';
const OPERATIONS_COUNTER = 'operations_counter';
/**
* Retrieve operations list.
*
* @return \Magento\AsynchronousOperations\Api\Data\OperationStatus\ShortInterface[]
*/
public function getOperationsList();
/**
* Set operations list.
*
* @param \Magento\AsynchronousOperations\Api\Data\OperationStatus\ShortInterface[] $operationStatusList
* @return $this
*/
public function setOperationsList($operationStatusList);
/**
* Retrieve operations counter object.
*
* @return \Magento\AsynchronousOperations\Api\Data\OperationDetailsInterface|null
*/
public function getOperationsCounter();
/**
* Set operations counter object.
*
* @param \Magento\AsynchronousOperations\Api\Data\OperationDetailsInterface $operationDetails
* @return $this
* @since 100.3.0
*/
public function setOperationsCounter(OperationDetailsInterface $operationDetails);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment