InvoiceItemRepositoryInterface.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. * Invoice item repository interface.
  9. *
  10. * An invoice is a record of the receipt of payment for an order. An invoice item is a purchased item in an invoice.
  11. * @api
  12. * @since 100.0.2
  13. */
  14. interface InvoiceItemRepositoryInterface
  15. {
  16. /**
  17. * Lists the invoice items that match specified search criteria.
  18. *
  19. * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria
  20. * @return \Magento\Sales\Api\Data\InvoiceItemSearchResultInterface
  21. */
  22. public function getList(\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria);
  23. /**
  24. * Loads a specified invoice item.
  25. *
  26. * @param int $id The invoice item ID.
  27. * @return \Magento\Sales\Api\Data\InvoiceItemInterface Invoice item interface.
  28. */
  29. public function get($id);
  30. /**
  31. * Deletes a specified invoice item.
  32. *
  33. * @param \Magento\Sales\Api\Data\InvoiceItemInterface $entity The invoice item.
  34. * @return bool
  35. * @throws \Magento\Framework\Exception\CouldNotDeleteException
  36. */
  37. public function delete(\Magento\Sales\Api\Data\InvoiceItemInterface $entity);
  38. /**
  39. * Performs persist operations for a specified invoice item.
  40. *
  41. * @param \Magento\Sales\Api\Data\InvoiceItemInterface $entity The invoice item.
  42. * @return \Magento\Sales\Api\Data\InvoiceItemInterface Invoice item interface.
  43. * @throws \Magento\Framework\Exception\CouldNotSaveException
  44. */
  45. public function save(\Magento\Sales\Api\Data\InvoiceItemInterface $entity);
  46. }