Address
Magento\Quote\Model\Quote\Address
What it does
The Quote Address class manages address information and calculations for both billing and shipping addresses in a shopping cart (quote).
Developers use this class to handle address data, calculate shipping rates, manage totals (subtotal, tax, discount, grand total), validate minimum order amounts, and perform address-related operations during the checkout process.
It's essential for any customization involving address handling, shipping calculations, or order total computations in Magento 2.
Public Methods
- beforeSave()
- setQuote()
- getQuote()
- importCustomerAddressData()
- exportCustomerAddress()
- toArray()
- getItemsCollection()
- getAllItems()
- getAllVisibleItems()
- getItemQty()
- hasItems()
- getItemById()
- getValidItemById()
- getItemByQuoteItemId()
- removeItem()
- addItem()
- getShippingRatesCollection()
- getAllShippingRates()
- getGroupedAllShippingRates()
- getShippingRateById()
- getShippingRateByCode()
- removeAllShippingRates()
- addShippingRate()
- collectShippingRates()
- requestShippingRates()
- getTotals()
- addTotal()
- itemsCollectionWasSet()
- shippingRatesCollectionWasSet()
- validateMinimumAmount()
- getAppliedTaxes()
- setAppliedTaxes()
- setShippingAmount()
- setBaseShippingAmount()
- setTotalAmount()
- setBaseTotalAmount()
- addTotalAmount()
- addBaseTotalAmount()
- getTotalAmount()
- getBaseTotalAmount()
- getBaseSubtotalWithDiscount()
- getSubtotalWithDiscount()
- getAllTotalAmounts()
- getAllBaseTotalAmounts()
- getCountryId()
- setCountryId()
- getStreet()
- setStreet()
- getCompany()
- setCompany()
- getTelephone()
- setTelephone()
- getFax()
- setFax()
- getPostcode()
- setPostcode()
- getCity()
- setCity()
- getFirstname()
- setFirstname()
- getLastname()
- setLastname()
- getMiddlename()
- setMiddlename()
- getPrefix()
- setPrefix()
- getSuffix()
- setSuffix()
- getVatId()
- setVatId()
- getCustomerId()
- setCustomerId()
- getEmail()
- setEmail()
- setRegion()
- setRegionId()
- setRegionCode()
- getSameAsBilling()
- setSameAsBilling()
- getCustomerAddressId()
- setCustomerAddressId()
- getSaveInAddressBook()
- setSaveInAddressBook()
- getExtensionAttributes()
- setExtensionAttributes()
- getShippingMethod()
- setBaseDiscountAmount()