shippingMethodManagement = $shippingMethodManagement; $this->quoteIdMaskFactory = $quoteIdMaskFactory; } /** * {@inheritDoc} */ public function get($cartId) { /** @var $quoteIdMask QuoteIdMask */ $quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id'); return $this->shippingMethodManagement->get($quoteIdMask->getQuoteId()); } /** * {@inheritDoc} */ public function getList($cartId) { /** @var $quoteIdMask QuoteIdMask */ $quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id'); return $this->shippingMethodManagement->getList($quoteIdMask->getQuoteId()); } /** * {@inheritDoc} */ public function set($cartId, $carrierCode, $methodCode) { /** @var $quoteIdMask QuoteIdMask */ $quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id'); return $this->shippingMethodManagement->set($quoteIdMask->getQuoteId(), $carrierCode, $methodCode); } /** * {@inheritDoc} */ public function estimateByAddress($cartId, \Magento\Quote\Api\Data\EstimateAddressInterface $address) { /** @var $quoteIdMask QuoteIdMask */ $quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id'); return $this->shippingMethodManagement->estimateByAddress($quoteIdMask->getQuoteId(), $address); } /** * @inheritdoc */ public function estimateByExtendedAddress($cartId, AddressInterface $address) { /** @var $quoteIdMask QuoteIdMask */ $quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id'); return $this->getShipmentEstimationManagement() ->estimateByExtendedAddress((int) $quoteIdMask->getQuoteId(), $address); } /** * Get shipment estimation management service * @return ShipmentEstimationInterface * @deprecated 100.0.7 */ private function getShipmentEstimationManagement() { if ($this->shipmentEstimationManagement === null) { $this->shipmentEstimationManagement = ObjectManager::getInstance() ->get(ShipmentEstimationInterface::class); } return $this->shipmentEstimationManagement; } }