ShippingMethodManagementInterface.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Quote\Api;
  7. /**
  8. * Interface ShippingMethodManagementInterface
  9. * @api
  10. * @since 100.0.2
  11. */
  12. interface ShippingMethodManagementInterface
  13. {
  14. /**
  15. * Estimate shipping
  16. *
  17. * @param int $cartId The shopping cart ID.
  18. * @param \Magento\Quote\Api\Data\EstimateAddressInterface $address The estimate address
  19. * @return \Magento\Quote\Api\Data\ShippingMethodInterface[] An array of shipping methods.
  20. * @deprecated 100.0.7
  21. */
  22. public function estimateByAddress($cartId, \Magento\Quote\Api\Data\EstimateAddressInterface $address);
  23. /**
  24. * Estimate shipping
  25. *
  26. * @param int $cartId The shopping cart ID.
  27. * @param int $addressId The estimate address id
  28. * @return \Magento\Quote\Api\Data\ShippingMethodInterface[] An array of shipping methods.
  29. */
  30. public function estimateByAddressId($cartId, $addressId);
  31. /**
  32. * Lists applicable shipping methods for a specified quote.
  33. *
  34. * @param int $cartId The shopping cart ID.
  35. * @return \Magento\Quote\Api\Data\ShippingMethodInterface[] An array of shipping methods.
  36. * @throws \Magento\Framework\Exception\NoSuchEntityException The specified quote does not exist.
  37. * @throws \Magento\Framework\Exception\StateException The shipping address is missing.
  38. */
  39. public function getList($cartId);
  40. }