quote = $quote; $this->addressAdapterFactory = $addressAdapterFactory; } /** * Returns currency code * * @return string */ public function getCurrencyCode() { return $this->quote->getCurrency()->getBaseCurrencyCode(); } /** * Returns order increment id * * @return string */ public function getOrderIncrementId() { return $this->quote->getReservedOrderId(); } /** * Returns customer ID * * @return int|null */ public function getCustomerId() { return $this->quote->getCustomer()->getId(); } /** * Returns billing address * * @return AddressAdapterInterface|null */ public function getBillingAddress() { if ($this->quote->getBillingAddress()) { return $this->addressAdapterFactory->create( ['address' => $this->quote->getBillingAddress()] ); } return null; } /** * Returns shipping address * * @return AddressAdapterInterface|null */ public function getShippingAddress() { if ($this->quote->getShippingAddress()) { return $this->addressAdapterFactory->create( ['address' => $this->quote->getShippingAddress()] ); } return null; } /** * Returns order store id * * @return int */ public function getStoreId() { return $this->quote->getStoreId(); } /** * Returns order id * * @return int */ public function getId() { return $this->quote->getId(); } /** * Returns order grand total amount * * @return null */ public function getGrandTotalAmount() { return null; } /** * Returns list of line items in the cart * * @return \Magento\Quote\Api\Data\CartItemInterface[]|null */ public function getItems() { return $this->quote->getItems(); } /** * Gets the remote IP address for the order. * * @return string|null Remote IP address. */ public function getRemoteIp() { return null; } }