CreditmemoItemRepositoryInterface.php 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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 item 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 item is an invoiced item for which
  13. * a merchant creates a credit memo.
  14. * @api
  15. * @since 100.0.2
  16. */
  17. interface CreditmemoItemRepositoryInterface
  18. {
  19. /**
  20. * Loads a specified credit memo item.
  21. *
  22. * @param int $id The credit memo item ID.
  23. * @return \Magento\Sales\Api\Data\CreditmemoItemInterface Credit memo item interface.
  24. */
  25. public function get($id);
  26. /**
  27. * Lists credit memo items that match specified search criteria.
  28. *
  29. * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria The search criteria.
  30. * @return \Magento\Sales\Api\Data\CreditmemoItemSearchResultInterface Credit memo item search results interface.
  31. */
  32. public function getList(\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria);
  33. /**
  34. * Deletes a specified credit memo item.
  35. *
  36. * @param \Magento\Sales\Api\Data\CreditmemoItemInterface $entity The credit memo item.
  37. * @return bool
  38. * @throws \Magento\Framework\Exception\CouldNotDeleteException
  39. */
  40. public function delete(\Magento\Sales\Api\Data\CreditmemoItemInterface $entity);
  41. /**
  42. * Performs persist operations for a specified credit memo item.
  43. *
  44. * @param \Magento\Sales\Api\Data\CreditmemoItemInterface $entity The credit memo item.
  45. * @return \Magento\Sales\Api\Data\CreditmemoItemInterface Credit memo interface.
  46. * @throws \Magento\Framework\Exception\CouldNotSaveException
  47. */
  48. public function save(\Magento\Sales\Api\Data\CreditmemoItemInterface $entity);
  49. }