BasePriceStorageInterface.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Catalog\Api;
  7. /**
  8. * Base prices storage.
  9. * @api
  10. * @since 102.0.0
  11. */
  12. interface BasePriceStorageInterface
  13. {
  14. /**
  15. * Return product prices. In case of at least one of skus is not found exception will be thrown.
  16. *
  17. * @param string[] $skus
  18. * @return \Magento\Catalog\Api\Data\BasePriceInterface[]
  19. * @since 102.0.0
  20. */
  21. public function get(array $skus);
  22. /**
  23. * Add or update product prices.
  24. * Input item should correspond \Magento\Catalog\Api\Data\CostInterface.
  25. * If any items will have invalid price, store id or sku, they will be marked as failed and excluded from
  26. * update list and \Magento\Catalog\Api\Data\PriceUpdateResultInterface[] with problem description will be returned.
  27. * If there were no failed items during update empty array will be returned.
  28. * If error occurred during the update exception will be thrown.
  29. *
  30. * @param \Magento\Catalog\Api\Data\BasePriceInterface[] $prices
  31. * @return \Magento\Catalog\Api\Data\PriceUpdateResultInterface[]
  32. * @throws \Magento\Framework\Exception\CouldNotSaveException
  33. * @since 102.0.0
  34. */
  35. public function update(array $prices);
  36. }