SetShippingAddressesOnCartInterface.php 972 B

1234567891011121314151617181920212223242526272829303132
  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\QuoteGraphQl\Model\Cart;
  8. use Magento\Framework\GraphQl\Exception\GraphQlInputException;
  9. use Magento\Framework\GraphQl\Query\Resolver\ContextInterface;
  10. use Magento\Quote\Api\Data\CartInterface;
  11. /**
  12. * Extension point for setting shipping addresses for a specified shopping cart
  13. *
  14. * All objects that are responsible for setting shipping addresses on a cart via GraphQl
  15. * should implement this interface.
  16. */
  17. interface SetShippingAddressesOnCartInterface
  18. {
  19. /**
  20. * Set shipping addresses for a specified shopping cart
  21. *
  22. * @param ContextInterface $context
  23. * @param CartInterface $cart
  24. * @param array $shippingAddresses
  25. * @return void
  26. * @throws GraphQlInputException
  27. */
  28. public function execute(ContextInterface $context, CartInterface $cart, array $shippingAddresses): void;
  29. }