59 $shippingCarrierCode =
null,
60 $shippingMethodCode =
null,
63 if ($shippingCarrierCode && $shippingMethodCode) {
64 $this->shippingMethodManagement->set(
$cartId, $shippingCarrierCode, $shippingMethodCode);
66 $this->paymentMethodManagement->set(
$cartId, $paymentMethod);
67 if ($additionalData !==
null) {
68 $this->dataProcessor->process($additionalData,
$cartId);
70 return $this->cartTotalsRepository->get(
$cartId);
collectTotals( $cartId, \Magento\Quote\Api\Data\PaymentInterface $paymentMethod, $shippingCarrierCode=null, $shippingMethodCode=null, \Magento\Quote\Api\Data\TotalsAdditionalDataInterface $additionalData=null)
$shippingMethodManagement
__construct(\Magento\Quote\Api\ShippingMethodManagementInterface $shippingMethodManagement, \Magento\Quote\Api\PaymentMethodManagementInterface $paymentMethodManagement, \Magento\Quote\Api\CartTotalRepositoryInterface $cartTotalsRepository, \Magento\Quote\Model\Cart\TotalsAdditionalDataProcessor $dataProcessor)