Class AddressBuilder
java.lang.Object
com.commercetools.importapi.models.common.AddressBuilder
AddressBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
Address address = Address.builder()
.country("{country}")
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionadditionalAddressInfo
(String additionalAddressInfo) set the value to the additionalAddressInfoadditionalStreetInfo
(String additionalStreetInfo) set the value to the additionalStreetInfoset the value to the apartmentbuild()
builds Address with checking for non-null required valuesset the value to the buildingbuilds Address without checking for non-null required valuesset the value to the cityset the value to the companyA two-digit country code as per ISO 3166-1 alpha-2.Custom Fields defined for the Address.custom
(Function<CustomBuilder, CustomBuilder> builder) Custom Fields defined for the Address.department
(String department) set the value to the departmentset the value to the emailexternalId
(String externalId) set the value to the externalIdset the value to the faxset the value to the firstNamevalue of additionalAddressInfo}value of additionalStreetInfo}value of apartment}value of building}getCity()
value of city}value of company}A two-digit country code as per ISO 3166-1 alpha-2.Custom Fields defined for the Address.value of department}getEmail()
value of email}value of externalId}getFax()
value of fax}value of firstName}getId()
value of id}getKey()
value of key}value of lastName}value of mobile}getPhone()
value of phone}getPOBox()
value of pOBox}value of postalCode}value of region}value of salutation}getState()
value of state}value of streetName}value of streetNumber}getTitle()
value of title}set the value to the idset the value to the keyset the value to the lastNameset the value to the mobilestatic AddressBuilder
of()
factory method for an instance of AddressBuilderstatic AddressBuilder
create builder for Address instanceset the value to the phoneset the value to the pOBoxpostalCode
(String postalCode) set the value to the postalCodeset the value to the regionsalutation
(String salutation) set the value to the salutationset the value to the statestreetName
(String streetName) set the value to the streetNamestreetNumber
(String streetNumber) set the value to the streetNumberset the value to the titlewithCustom
(Function<CustomBuilder, Custom> builder) Custom Fields defined for the Address.
-
Constructor Details
-
AddressBuilder
public AddressBuilder()
-
-
Method Details
-
id
set the value to the id- Parameters:
id
- value to be set- Returns:
- Builder
-
key
set the value to the key- Parameters:
key
- value to be set- Returns:
- Builder
-
title
set the value to the title- Parameters:
title
- value to be set- Returns:
- Builder
-
salutation
set the value to the salutation- Parameters:
salutation
- value to be set- Returns:
- Builder
-
firstName
set the value to the firstName- Parameters:
firstName
- value to be set- Returns:
- Builder
-
lastName
set the value to the lastName- Parameters:
lastName
- value to be set- Returns:
- Builder
-
streetName
set the value to the streetName- Parameters:
streetName
- value to be set- Returns:
- Builder
-
streetNumber
set the value to the streetNumber- Parameters:
streetNumber
- value to be set- Returns:
- Builder
-
additionalStreetInfo
set the value to the additionalStreetInfo- Parameters:
additionalStreetInfo
- value to be set- Returns:
- Builder
-
postalCode
set the value to the postalCode- Parameters:
postalCode
- value to be set- Returns:
- Builder
-
city
set the value to the city- Parameters:
city
- value to be set- Returns:
- Builder
-
region
set the value to the region- Parameters:
region
- value to be set- Returns:
- Builder
-
state
set the value to the state- Parameters:
state
- value to be set- Returns:
- Builder
-
country
A two-digit country code as per ISO 3166-1 alpha-2.
- Parameters:
country
- value to be set- Returns:
- Builder
-
company
set the value to the company- Parameters:
company
- value to be set- Returns:
- Builder
-
department
set the value to the department- Parameters:
department
- value to be set- Returns:
- Builder
-
building
set the value to the building- Parameters:
building
- value to be set- Returns:
- Builder
-
apartment
set the value to the apartment- Parameters:
apartment
- value to be set- Returns:
- Builder
-
pOBox
set the value to the pOBox- Parameters:
pOBox
- value to be set- Returns:
- Builder
-
phone
set the value to the phone- Parameters:
phone
- value to be set- Returns:
- Builder
-
mobile
set the value to the mobile- Parameters:
mobile
- value to be set- Returns:
- Builder
-
email
set the value to the email- Parameters:
email
- value to be set- Returns:
- Builder
-
fax
set the value to the fax- Parameters:
fax
- value to be set- Returns:
- Builder
-
additionalAddressInfo
set the value to the additionalAddressInfo- Parameters:
additionalAddressInfo
- value to be set- Returns:
- Builder
-
externalId
set the value to the externalId- Parameters:
externalId
- value to be set- Returns:
- Builder
-
custom
Custom Fields defined for the Address. Custom Fields can only be applied to
shippingAddress
.- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
withCustom
Custom Fields defined for the Address. Custom Fields can only be applied to
shippingAddress
.- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
custom
Custom Fields defined for the Address. Custom Fields can only be applied to
shippingAddress
.- Parameters:
custom
- value to be set- Returns:
- Builder
-
getId
value of id}- Returns:
- id
-
getKey
value of key}- Returns:
- key
-
getTitle
value of title}- Returns:
- title
-
getSalutation
value of salutation}- Returns:
- salutation
-
getFirstName
value of firstName}- Returns:
- firstName
-
getLastName
value of lastName}- Returns:
- lastName
-
getStreetName
value of streetName}- Returns:
- streetName
-
getStreetNumber
value of streetNumber}- Returns:
- streetNumber
-
getAdditionalStreetInfo
value of additionalStreetInfo}- Returns:
- additionalStreetInfo
-
getPostalCode
value of postalCode}- Returns:
- postalCode
-
getCity
value of city}- Returns:
- city
-
getRegion
value of region}- Returns:
- region
-
getState
value of state}- Returns:
- state
-
getCountry
A two-digit country code as per ISO 3166-1 alpha-2.
- Returns:
- country
-
getCompany
value of company}- Returns:
- company
-
getDepartment
value of department}- Returns:
- department
-
getBuilding
value of building}- Returns:
- building
-
getApartment
value of apartment}- Returns:
- apartment
-
getPOBox
value of pOBox}- Returns:
- pOBox
-
getPhone
value of phone}- Returns:
- phone
-
getMobile
value of mobile}- Returns:
- mobile
-
getEmail
value of email}- Returns:
-
getFax
value of fax}- Returns:
- fax
-
getAdditionalAddressInfo
value of additionalAddressInfo}- Returns:
- additionalAddressInfo
-
getExternalId
value of externalId}- Returns:
- externalId
-
getCustom
Custom Fields defined for the Address. Custom Fields can only be applied to
shippingAddress
.- Returns:
- custom
-
build
builds Address with checking for non-null required values -
buildUnchecked
builds Address without checking for non-null required values- Returns:
- Address
-
of
factory method for an instance of AddressBuilder- Returns:
- builder
-
of
create builder for Address instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-