GuestShippingAddressManagementInterface.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Quote\Model\GuestCart;
  7. /**
  8. * Shipping address management interface for guest carts.
  9. * @api
  10. * @since 100.0.2
  11. */
  12. interface GuestShippingAddressManagementInterface
  13. {
  14. /**
  15. * Assign a specified shipping address to a specified cart.
  16. *
  17. * @param string $cartId The cart ID.
  18. * @param \Magento\Quote\Api\Data\AddressInterface $address The shipping address data.
  19. * @return int Address ID.
  20. * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist.
  21. * @throws \Magento\Framework\Exception\InputException The specified cart ID or address data is not valid.
  22. */
  23. public function assign($cartId, \Magento\Quote\Api\Data\AddressInterface $address);
  24. /**
  25. * Return the shipping address for a specified quote.
  26. *
  27. * @param string $cartId The cart ID.
  28. * @return \Magento\Quote\Api\Data\AddressInterface Shipping address object.
  29. * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist.
  30. */
  31. public function get($cartId);
  32. }