Log in
Model

Address

Magento\Customer\Model\Data\Address

What it does

This is a data model class that represents a customer address in Magento 2.

Developers use this class to programmatically create, read, and manipulate customer address data including street, city, region, postal code, contact information, and flags for default billing/shipping addresses.

It implements the AddressInterface and provides getter/setter methods for all address properties along with support for custom attributes and extension attributes.

Public Methods

  • getId()
  • getRegion()
  • getRegionId()
  • getCountryId()
  • getStreet()
  • getCompany()
  • getTelephone()
  • getFax()
  • getPostcode()
  • getCity()
  • getFirstname()
  • getLastname()
  • getMiddlename()
  • getPrefix()
  • getSuffix()
  • getVatId()
  • getCustomerId()
  • isDefaultShipping()
  • isDefaultBilling()
  • setId()
  • setCustomerId()
  • setRegion()
  • setRegionId()
  • setCountryId()
  • setStreet()
  • setCompany()
  • setTelephone()
  • setFax()
  • setPostcode()
  • setCity()
  • setFirstname()
  • setLastname()
  • setMiddlename()
  • setPrefix()
  • setSuffix()
  • setVatId()
  • setIsDefaultShipping()
  • setIsDefaultBilling()
  • getExtensionAttributes()
  • setExtensionAttributes()