Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Data Fields
AddressInterface Interface Reference
Inheritance diagram for AddressInterface:
CustomAttributesDataInterface ExtensibleDataInterface Address

Public Member Functions

 getId ()
 
 setId ($id)
 
 getCustomerId ()
 
 setCustomerId ($customerId)
 
 getRegion ()
 
 setRegion (RegionInterface $region=null)
 
 getRegionId ()
 
 setRegionId ($regionId)
 
 getCountryId ()
 
 setCountryId ($countryId)
 
 getStreet ()
 
 setStreet (array $street)
 
 getCompany ()
 
 setCompany ($company)
 
 getTelephone ()
 
 setTelephone ($telephone)
 
 getFax ()
 
 setFax ($fax)
 
 getPostcode ()
 
 setPostcode ($postcode)
 
 getCity ()
 
 setCity ($city)
 
 getFirstname ()
 
 setFirstname ($firstName)
 
 getLastname ()
 
 setLastname ($lastName)
 
 getMiddlename ()
 
 setMiddlename ($middleName)
 
 getPrefix ()
 
 setPrefix ($prefix)
 
 getSuffix ()
 
 setSuffix ($suffix)
 
 getVatId ()
 
 setVatId ($vatId)
 
 isDefaultShipping ()
 
 setIsDefaultShipping ($isDefaultShipping)
 
 isDefaultBilling ()
 
 setIsDefaultBilling ($isDefaultBilling)
 
 getExtensionAttributes ()
 
 setExtensionAttributes (\Magento\Customer\Api\Data\AddressExtensionInterface $extensionAttributes)
 
- Public Member Functions inherited from CustomAttributesDataInterface
 getCustomAttribute ($attributeCode)
 
 setCustomAttribute ($attributeCode, $attributeValue)
 
 getCustomAttributes ()
 
 setCustomAttributes (array $attributes)
 

Data Fields

const ID = 'id'
 
const CUSTOMER_ID = 'customer_id'
 
const REGION = 'region'
 
const REGION_ID = 'region_id'
 
const COUNTRY_ID = 'country_id'
 
const STREET = 'street'
 
const COMPANY = 'company'
 
const TELEPHONE = 'telephone'
 
const FAX = 'fax'
 
const POSTCODE = 'postcode'
 
const CITY = 'city'
 
const FIRSTNAME = 'firstname'
 
const LASTNAME = 'lastname'
 
const MIDDLENAME = 'middlename'
 
const PREFIX = 'prefix'
 
const SUFFIX = 'suffix'
 
const VAT_ID = 'vat_id'
 
const DEFAULT_BILLING = 'default_billing'
 
const DEFAULT_SHIPPING = 'default_shipping'
 
- Data Fields inherited from CustomAttributesDataInterface
const CUSTOM_ATTRIBUTES = 'custom_attributes'
 
- Data Fields inherited from ExtensibleDataInterface
const EXTENSION_ATTRIBUTES_KEY = 'extension_attributes'
 

Detailed Description

Customer address interface. @api

Since
100.0.2

Definition at line 15 of file AddressInterface.php.

Member Function Documentation

◆ getCity()

getCity ( )

Get city name

Returns
string|null

Implemented in Address.

◆ getCompany()

getCompany ( )

Get company

Returns
string|null

Implemented in Address.

◆ getCountryId()

getCountryId ( )

Two-letter country code in ISO_3166-2 format

Returns
string|null

Implemented in Address.

◆ getCustomerId()

getCustomerId ( )

Get customer ID

Returns
int|null

Implemented in Address.

◆ getExtensionAttributes()

getExtensionAttributes ( )

Retrieve existing extension attributes object or create a new one.

Returns
\Magento\Customer\Api\Data\AddressExtensionInterface|null

Implemented in Address.

◆ getFax()

getFax ( )

Get fax number

Returns
string|null

Implemented in Address.

◆ getFirstname()

getFirstname ( )

Get first name

Returns
string|null

Implemented in Address.

◆ getId()

getId ( )

#- Get ID

Returns
int|null

Implemented in Address.

◆ getLastname()

getLastname ( )

Get last name

Returns
string|null

Implemented in Address.

◆ getMiddlename()

getMiddlename ( )

Get middle name

Returns
string|null

Implemented in Address.

◆ getPostcode()

getPostcode ( )

Get postcode

Returns
string|null

Implemented in Address.

◆ getPrefix()

getPrefix ( )

Get prefix

Returns
string|null

Implemented in Address.

◆ getRegion()

getRegion ( )

Get region

Returns
\Magento\Customer\Api\Data\RegionInterface|null

Implemented in Address.

◆ getRegionId()

getRegionId ( )

Get region ID

Returns
int|null

Implemented in Address.

◆ getStreet()

getStreet ( )

Get street

Returns
string[]|null

Implemented in Address.

◆ getSuffix()

getSuffix ( )

Get suffix

Returns
string|null

Implemented in Address.

◆ getTelephone()

getTelephone ( )

Get telephone number

Returns
string|null

Implemented in Address.

◆ getVatId()

getVatId ( )

Get Vat id

Returns
string|null

Implemented in Address.

◆ isDefaultBilling()

isDefaultBilling ( )

Get if this address is default billing address

Returns
bool|null

Implemented in Address.

◆ isDefaultShipping()

isDefaultShipping ( )

Get if this address is default shipping address.

Returns
bool|null

Implemented in Address.

◆ setCity()

setCity (   $city)

Set city name

Parameters
string$city
Returns
$this

Implemented in Address.

◆ setCompany()

setCompany (   $company)

Set company

Parameters
string$company
Returns
$this

Implemented in Address.

◆ setCountryId()

setCountryId (   $countryId)

Set country id

Parameters
string$countryId
Returns
$this

Implemented in Address.

◆ setCustomerId()

setCustomerId (   $customerId)

Set customer ID

Parameters
int$customerId
Returns
$this

Implemented in Address.

◆ setExtensionAttributes()

setExtensionAttributes ( \Magento\Customer\Api\Data\AddressExtensionInterface  $extensionAttributes)

Set an extension attributes object.

Parameters
\Magento\Customer\Api\Data\AddressExtensionInterface$extensionAttributes
Returns
$this

◆ setFax()

setFax (   $fax)

Set fax number

Parameters
string$fax
Returns
$this

Implemented in Address.

◆ setFirstname()

setFirstname (   $firstName)

Set first name

Parameters
string$firstName
Returns
$this

Implemented in Address.

◆ setId()

setId (   $id)

Set ID

Parameters
int$id
Returns
$this

Implemented in Address.

◆ setIsDefaultBilling()

setIsDefaultBilling (   $isDefaultBilling)

Set if this address is default billing address

Parameters
bool$isDefaultBilling
Returns
$this

Implemented in Address.

◆ setIsDefaultShipping()

setIsDefaultShipping (   $isDefaultShipping)

Set if this address is default shipping address.

Parameters
bool$isDefaultShipping
Returns
$this

Implemented in Address.

◆ setLastname()

setLastname (   $lastName)

Set last name

Parameters
string$lastName
Returns
$this

Implemented in Address.

◆ setMiddlename()

setMiddlename (   $middleName)

Set middle name

Parameters
string$middleName
Returns
$this

Implemented in Address.

◆ setPostcode()

setPostcode (   $postcode)

Set postcode

Parameters
string$postcode
Returns
$this

Implemented in Address.

◆ setPrefix()

setPrefix (   $prefix)

Set prefix

Parameters
string$prefix
Returns
$this

Implemented in Address.

◆ setRegion()

setRegion ( RegionInterface  $region = null)

Set region

Parameters
\Magento\Customer\Api\Data\RegionInterface$region
Returns
$this

Implemented in Address.

◆ setRegionId()

setRegionId (   $regionId)

Set region ID

Parameters
int$regionId
Returns
$this

Implemented in Address.

◆ setStreet()

setStreet ( array  $street)

Set street

Parameters
string[]$street
Returns
$this

Implemented in Address.

◆ setSuffix()

setSuffix (   $suffix)

Set suffix

Parameters
string$suffix
Returns
$this

Implemented in Address.

◆ setTelephone()

setTelephone (   $telephone)

Set telephone number

Parameters
string$telephone
Returns
$this

Implemented in Address.

◆ setVatId()

setVatId (   $vatId)

Set Vat id

Parameters
string$vatId
Returns
$this

Implemented in Address.

Field Documentation

◆ CITY

const CITY = 'city'

Definition at line 30 of file AddressInterface.php.

◆ COMPANY

const COMPANY = 'company'

Definition at line 26 of file AddressInterface.php.

◆ COUNTRY_ID

const COUNTRY_ID = 'country_id'

Definition at line 24 of file AddressInterface.php.

◆ CUSTOMER_ID

const CUSTOMER_ID = 'customer_id'

Definition at line 21 of file AddressInterface.php.

◆ DEFAULT_BILLING

const DEFAULT_BILLING = 'default_billing'

Definition at line 37 of file AddressInterface.php.

◆ DEFAULT_SHIPPING

const DEFAULT_SHIPPING = 'default_shipping'

Definition at line 38 of file AddressInterface.php.

◆ FAX

const FAX = 'fax'

Definition at line 28 of file AddressInterface.php.

◆ FIRSTNAME

const FIRSTNAME = 'firstname'

Definition at line 31 of file AddressInterface.php.

◆ ID

const ID = 'id'

#+ Constants for keys of data array. Identical to the name of the getter in snake case

Definition at line 20 of file AddressInterface.php.

◆ LASTNAME

const LASTNAME = 'lastname'

Definition at line 32 of file AddressInterface.php.

◆ MIDDLENAME

const MIDDLENAME = 'middlename'

Definition at line 33 of file AddressInterface.php.

◆ POSTCODE

const POSTCODE = 'postcode'

Definition at line 29 of file AddressInterface.php.

◆ PREFIX

const PREFIX = 'prefix'

Definition at line 34 of file AddressInterface.php.

◆ REGION

const REGION = 'region'

Definition at line 22 of file AddressInterface.php.

◆ REGION_ID

const REGION_ID = 'region_id'

Definition at line 23 of file AddressInterface.php.

◆ STREET

const STREET = 'street'

Definition at line 25 of file AddressInterface.php.

◆ SUFFIX

const SUFFIX = 'suffix'

Definition at line 35 of file AddressInterface.php.

◆ TELEPHONE

const TELEPHONE = 'telephone'

Definition at line 27 of file AddressInterface.php.

◆ VAT_ID

const VAT_ID = 'vat_id'

Definition at line 36 of file AddressInterface.php.


The documentation for this interface was generated from the following file: