OperationStatus.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. declare(strict_types=1);
  7. namespace Magento\AsynchronousOperations\Model;
  8. use Magento\AsynchronousOperations\Api\Data\OperationInterface;
  9. use Magento\AsynchronousOperations\Api\Data\SummaryOperationStatusInterface;
  10. use Magento\Framework\DataObject;
  11. use Magento\Framework\Api\ExtensibleDataInterface;
  12. /**
  13. * Class OperationShortDetails
  14. */
  15. class OperationStatus extends DataObject implements SummaryOperationStatusInterface, ExtensibleDataInterface
  16. {
  17. /**
  18. * @inheritDoc
  19. */
  20. public function getId()
  21. {
  22. return $this->getData(OperationInterface::ID);
  23. }
  24. /**
  25. * @inheritDoc
  26. */
  27. public function getStatus()
  28. {
  29. return $this->getData(OperationInterface::STATUS);
  30. }
  31. /**
  32. * @inheritDoc
  33. */
  34. public function getResultMessage()
  35. {
  36. return $this->getData(OperationInterface::RESULT_MESSAGE);
  37. }
  38. /**
  39. * @inheritDoc
  40. */
  41. public function getErrorCode()
  42. {
  43. return $this->getData(OperationInterface::ERROR_CODE);
  44. }
  45. }