Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
GuestShippingInformationManagement.php
Go to the documentation of this file.
1 <?php
6 namespace Magento\Checkout\Model;
7 
9 {
14 
19 
25  public function __construct(
26  \Magento\Quote\Model\QuoteIdMaskFactory $quoteIdMaskFactory,
27  \Magento\Checkout\Api\ShippingInformationManagementInterface $shippingInformationManagement
28  ) {
29  $this->quoteIdMaskFactory = $quoteIdMaskFactory;
30  $this->shippingInformationManagement = $shippingInformationManagement;
31  }
32 
36  public function saveAddressInformation(
37  $cartId,
38  \Magento\Checkout\Api\Data\ShippingInformationInterface $addressInformation
39  ) {
41  $quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id');
42  return $this->shippingInformationManagement->saveAddressInformation(
43  $quoteIdMask->getQuoteId(),
44  $addressInformation
45  );
46  }
47 }
$cartId
Definition: quote.php:22
saveAddressInformation( $cartId, \Magento\Checkout\Api\Data\ShippingInformationInterface $addressInformation)
__construct(\Magento\Quote\Model\QuoteIdMaskFactory $quoteIdMaskFactory, \Magento\Checkout\Api\ShippingInformationManagementInterface $shippingInformationManagement)