quoteIdMaskFactory = $quoteIdMaskFactory; $this->totalsInformationManagement = $totalsInformationManagement; } /** * {@inheritDoc} */ public function calculate( $cartId, \Magento\Checkout\Api\Data\TotalsInformationInterface $addressInformation ) { /** @var $quoteIdMask \Magento\Quote\Model\QuoteIdMask */ $quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id'); return $this->totalsInformationManagement->calculate( $quoteIdMask->getQuoteId(), $addressInformation ); } }