CreditmemoRepositoryInterface.php 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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 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.
  13. * @api
  14. * @since 100.0.2
  15. */
  16. interface CreditmemoRepositoryInterface
  17. {
  18. /**
  19. * Lists credit memos that match specified search criteria.
  20. *
  21. * This call returns an array of objects, but detailed information about each object’s attributes might not be
  22. * included. See https://devdocs.magento.com/codelinks/attributes.html#CreditmemoRepositoryInterface to
  23. * determine which call to use to get detailed information about all attributes for an object.
  24. *
  25. * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria The search criteria.
  26. * @return \Magento\Sales\Api\Data\CreditmemoSearchResultInterface Credit memo search result interface.
  27. */
  28. public function getList(\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria);
  29. /**
  30. * Loads a specified credit memo.
  31. *
  32. * @param int $id The credit memo ID.
  33. * @return \Magento\Sales\Api\Data\CreditmemoInterface Credit memo interface.
  34. */
  35. public function get($id);
  36. /**
  37. * Create credit memo instance
  38. *
  39. * @return \Magento\Sales\Api\Data\CreditmemoInterface Credit memo interface.
  40. */
  41. public function create();
  42. /**
  43. * Deletes a specified credit memo.
  44. *
  45. * @param \Magento\Sales\Api\Data\CreditmemoInterface $entity The credit memo.
  46. * @return bool
  47. */
  48. public function delete(\Magento\Sales\Api\Data\CreditmemoInterface $entity);
  49. /**
  50. * Performs persist operations for a specified credit memo.
  51. *
  52. * @param \Magento\Sales\Api\Data\CreditmemoInterface $entity The credit memo.
  53. * @return \Magento\Sales\Api\Data\CreditmemoInterface Credit memo interface.
  54. */
  55. public function save(\Magento\Sales\Api\Data\CreditmemoInterface $entity);
  56. }