ShippingMethodManagement.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. /**
  3. * Refer to LICENSE.txt distributed with the Temando Shipping module for notice of license
  4. */
  5. namespace Temando\Shipping\Model\Quote;
  6. use Magento\Quote\Api\Data\AddressExtensionInterface;
  7. use Temando\Shipping\Api\Quote\ShippingMethodManagementInterface;
  8. /**
  9. * @deprecated since 1.2.0
  10. * ShippingMethodManagement
  11. *
  12. * @package Temando\Shipping\Model
  13. * @author Sebastian Ertner <sebastian.ertner@netresearch.de>
  14. * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
  15. * @link http://www.temando.com/
  16. */
  17. class ShippingMethodManagement implements ShippingMethodManagementInterface
  18. {
  19. /**
  20. * @var \Magento\Quote\Api\ShippingMethodManagementInterface
  21. */
  22. private $shippingMethodManagement;
  23. /**
  24. * ShippingMethodManagement
  25. *
  26. * @param \Magento\Quote\Api\ShippingMethodManagementInterface $shippingMethodManagement
  27. */
  28. public function __construct(\Magento\Quote\Api\ShippingMethodManagementInterface $shippingMethodManagement)
  29. {
  30. $this->shippingMethodManagement = $shippingMethodManagement;
  31. }
  32. /**
  33. * Estimate shipping with extension attributes
  34. *
  35. * @see \Magento\Quote\Api\ShippingMethodManagementInterface::estimateByAddressId
  36. *
  37. * @param int $cartId The shopping cart ID.
  38. * @param int $addressId The estimate address id
  39. * @param \Magento\Quote\Api\Data\AddressExtensionInterface|null $extensionAttributes
  40. * @return \Magento\Quote\Api\Data\ShippingMethodInterface[] An array of shipping methods.
  41. */
  42. public function estimateByAddressId($cartId, $addressId, AddressExtensionInterface $extensionAttributes = null)
  43. {
  44. return $this->shippingMethodManagement->estimateByAddressId($cartId, $addressId);
  45. }
  46. }