OrderRepositoryInterface.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\GiftMessage\Api;
  7. /**
  8. * Interface OrderRepositoryInterface
  9. * @api
  10. * @since 100.0.2
  11. */
  12. interface OrderRepositoryInterface
  13. {
  14. /**
  15. * Return the gift message for a specified order.
  16. *
  17. * @param int $orderId The order ID.
  18. * @return \Magento\GiftMessage\Api\Data\MessageInterface Gift message.
  19. * @throws \Magento\Framework\Exception\NoSuchEntityException
  20. */
  21. public function get($orderId);
  22. /**
  23. * Set the gift message for an entire order.
  24. *
  25. * @param int $orderId The order ID.
  26. * @param \Magento\GiftMessage\Api\Data\MessageInterface $giftMessage The gift message.
  27. * @return bool
  28. * @throws \Magento\Framework\Exception\NoSuchEntityException
  29. * @throws \Magento\Framework\Exception\InputException
  30. * @throws \Magento\Framework\Exception\CouldNotSaveException
  31. * @throws \Magento\Framework\Exception\State\InvalidTransitionException
  32. */
  33. public function save($orderId, \Magento\GiftMessage\Api\Data\MessageInterface $giftMessage);
  34. }