OrderItemRepositoryInterface.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  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 OrderItemRepositoryInterface
  9. * @api
  10. * @since 100.0.2
  11. */
  12. interface OrderItemRepositoryInterface
  13. {
  14. /**
  15. * Return the gift message for a specified item in a specified order.
  16. *
  17. * @param int $orderId The order ID.
  18. * @param int $orderItemId The item ID.
  19. * @return \Magento\GiftMessage\Api\Data\MessageInterface Gift message.
  20. * @throws \Magento\Framework\Exception\NoSuchEntityException
  21. */
  22. public function get($orderId, $orderItemId);
  23. /**
  24. * Set the gift message for a specified item in a specified order.
  25. *
  26. * @param int $orderId The order ID.
  27. * @param int $orderItemId The item ID.
  28. * @param \Magento\GiftMessage\Api\Data\MessageInterface $giftMessage The gift message.
  29. * @return bool
  30. * @throws \Magento\Framework\Exception\NoSuchEntityException
  31. * @throws \Magento\Framework\Exception\State\InvalidTransitionException
  32. * @throws \Magento\Framework\Exception\CouldNotSaveException
  33. */
  34. public function save($orderId, $orderItemId, \Magento\GiftMessage\Api\Data\MessageInterface $giftMessage);
  35. }