TransactionRepositoryInterface.php 2.0 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. * Transaction repository interface.
  9. *
  10. * A transaction is an interaction between a merchant and a customer such as a purchase, a credit, a refund, and so on.
  11. * @api
  12. * @since 100.0.2
  13. */
  14. interface TransactionRepositoryInterface
  15. {
  16. /**
  17. * Lists transactions 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#TransactionRepositoryInterface 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\TransactionSearchResultInterface Transaction search result interface.
  25. */
  26. public function getList(\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria);
  27. /**
  28. * Loads a specified transaction.
  29. *
  30. * @param int $id The transaction ID.
  31. * @return \Magento\Sales\Api\Data\TransactionInterface Transaction interface.
  32. */
  33. public function get($id);
  34. /**
  35. * Deletes a specified transaction.
  36. *
  37. * @param \Magento\Sales\Api\Data\TransactionInterface $entity The transaction.
  38. * @return bool
  39. */
  40. public function delete(\Magento\Sales\Api\Data\TransactionInterface $entity);
  41. /**
  42. * Performs persist operations for a specified transaction.
  43. *
  44. * @param \Magento\Sales\Api\Data\TransactionInterface $entity The transaction.
  45. * @return \Magento\Sales\Api\Data\TransactionInterface Transaction interface.
  46. */
  47. public function save(\Magento\Sales\Api\Data\TransactionInterface $entity);
  48. /**
  49. * Creates new Transaction instance.
  50. *
  51. * @return \Magento\Sales\Api\Data\TransactionInterface Transaction interface.
  52. */
  53. public function create();
  54. }