AppendReservationsInterface.php 896 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. declare(strict_types=1);
  7. namespace Magento\InventoryReservationsApi\Model;
  8. use Magento\InventoryReservationsApi\Model\ReservationInterface;
  9. /**
  10. * Domain service used to append Reservations to keep track of quantity deductions before the related SourceItems
  11. * are updated.
  12. *
  13. * Some use cases are:
  14. *
  15. * - an Order is placed, completed or canceled
  16. * - an Order is split or partially refunded
  17. * - an RMA is placed or canceled
  18. *
  19. * @api
  20. */
  21. interface AppendReservationsInterface
  22. {
  23. /**
  24. * Append reservations
  25. *
  26. * @param ReservationInterface[] $reservations
  27. * @return void
  28. * @throws \Magento\Framework\Exception\InputException
  29. * @throws \Magento\Framework\Exception\CouldNotSaveException
  30. */
  31. public function execute(array $reservations): void;
  32. }