CreditmemoCommentRepositoryInterface.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Sales\Api;
  7. /**
  8. * Credit memo comment repository interface.
  9. *
  10. * After a customer places and pays for an order and an invoice has been issued, the merchant can create a credit memo
  11. * to refund all or part of the amount paid for any returned or undelivered items. The memo restores funds to the
  12. * customer account so that the customer can make future purchases. A credit memo usually includes comments that detail
  13. * why the credit memo amount was credited to the customer.
  14. * @api
  15. * @since 100.0.2
  16. */
  17. interface CreditmemoCommentRepositoryInterface
  18. {
  19. /**
  20. * Loads a specified credit memo comment.
  21. *
  22. * @param int $id The credit memo comment ID.
  23. * @return \Magento\Sales\Api\Data\CreditmemoCommentInterface Credit memo comment interface.
  24. */
  25. public function get($id);
  26. /**
  27. * Lists credit memo comments that match specified search criteria.
  28. *
  29. * Returns a credit memo comment search results interface.
  30. *
  31. * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria The search criteria.
  32. * @return \Magento\Sales\Api\Data\CreditmemoCommentSearchResultInterface
  33. * Credit memo comment search results interface.
  34. */
  35. public function getList(\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria);
  36. /**
  37. * Deletes a specified credit memo comment.
  38. *
  39. * @param \Magento\Sales\Api\Data\CreditmemoCommentInterface $entity The credit memo comment.
  40. * @return bool
  41. * @throws \Magento\Framework\Exception\CouldNotDeleteException
  42. */
  43. public function delete(\Magento\Sales\Api\Data\CreditmemoCommentInterface $entity);
  44. /**
  45. * Performs persist operations for a specified entity.
  46. *
  47. * @param \Magento\Sales\Api\Data\CreditmemoCommentInterface $entity The credit memo comment.
  48. * @return \Magento\Sales\Api\Data\CreditmemoCommentInterface Credit memo comment interface.
  49. * @throws \Magento\Framework\Exception\CouldNotSaveException
  50. */
  51. public function save(\Magento\Sales\Api\Data\CreditmemoCommentInterface $entity);
  52. }