OrderItemRepositoryInterface.php 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. * Order item repository interface.
  9. *
  10. * An order is a document that a web store issues to a customer. Magento generates a sales order that lists the product
  11. * items, billing and shipping addresses, and shipping and payment methods. A corresponding external document, known as
  12. * a purchase order, is emailed to the customer.
  13. * @api
  14. * @since 100.0.2
  15. */
  16. interface OrderItemRepositoryInterface
  17. {
  18. /**
  19. * Lists order items 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#OrderItemRepositoryInterface 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\OrderItemSearchResultInterface Order item search result interface.
  27. */
  28. public function getList(\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria);
  29. /**
  30. * Loads a specified order item.
  31. *
  32. * @param int $id The order item ID.
  33. * @return \Magento\Sales\Api\Data\OrderItemInterface Order item interface.
  34. */
  35. public function get($id);
  36. /**
  37. * Deletes a specified order item.
  38. *
  39. * @param \Magento\Sales\Api\Data\OrderItemInterface $entity The order item.
  40. * @return bool
  41. */
  42. public function delete(\Magento\Sales\Api\Data\OrderItemInterface $entity);
  43. /**
  44. * Performs persist operations for a specified order item.
  45. *
  46. * @param \Magento\Sales\Api\Data\OrderItemInterface $entity The order item.
  47. * @return \Magento\Sales\Api\Data\OrderItemInterface Order item interface.
  48. */
  49. public function save(\Magento\Sales\Api\Data\OrderItemInterface $entity);
  50. }