InvoiceRepositoryInterface.php 1.9 KB

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