Log in
Interface

AddressInterface

Magento\Customer\Api\Data\AddressInterface

What it does

This interface defines the contract for customer address data objects in Magento 2.

Developers use it to work with customer addresses programmatically, whether creating new addresses, updating existing ones, or retrieving address information through the API.

It provides standardized getters and setters for all address fields like street, city, postal code, region, and flags for default billing/shipping addresses.

Public Methods

  • getId()
  • setId()
  • getCustomerId()
  • setCustomerId()
  • getRegion()
  • setRegion()
  • getRegionId()
  • setRegionId()
  • 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()
  • isDefaultShipping()
  • setIsDefaultShipping()
  • isDefaultBilling()
  • setIsDefaultBilling()
  • getExtensionAttributes()
  • setExtensionAttributes()