CreditmemoManagementInterface.php 1.6 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 add comment 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.
  13. * @api
  14. * @since 100.0.2
  15. */
  16. interface CreditmemoManagementInterface
  17. {
  18. /**
  19. * Cancels a specified credit memo.
  20. *
  21. * @param int $id The credit memo ID.
  22. * @return bool
  23. * @throws \Magento\Framework\Exception\LocalizedException
  24. */
  25. public function cancel($id);
  26. /**
  27. * Lists comments for a specified credit memo.
  28. *
  29. * @param int $id The credit memo ID.
  30. * @return \Magento\Sales\Api\Data\CreditmemoCommentSearchResultInterface Credit memo comment search
  31. * results interface.
  32. */
  33. public function getCommentsList($id);
  34. /**
  35. * Emails a user a specified credit memo.
  36. *
  37. * @param int $id The credit memo ID.
  38. * @return bool
  39. */
  40. public function notify($id);
  41. /**
  42. * Prepare creditmemo to refund and save it.
  43. *
  44. * @param \Magento\Sales\Api\Data\CreditmemoInterface $creditmemo
  45. * @param bool $offlineRequested
  46. * @return \Magento\Sales\Api\Data\CreditmemoInterface
  47. */
  48. public function refund(
  49. \Magento\Sales\Api\Data\CreditmemoInterface $creditmemo,
  50. $offlineRequested = false
  51. );
  52. }