Class CustomerAddressBuilder
java.lang.Object
com.commercetools.importapi.models.customers.CustomerAddressBuilder
- All Implemented Interfaces:
Builder<CustomerAddress>
CustomerAddressBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
CustomerAddress customerAddress = CustomerAddress.builder()
.key("{key}")
.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 CustomerAddress with checking for non-null required valuesset the value to the buildingbuilds CustomerAddress 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 for the address.custom
(Function<CustomBuilder, CustomBuilder> builder) Custom Fields 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 for the address.value of department}getEmail()
value of email}value of externalId}getFax()
value of fax}value of firstName}getKey()
User-defined identifier for the address.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}User-defined identifier for the address.set the value to the lastNameset the value to the mobilestatic CustomerAddressBuilder
of()
factory method for an instance of CustomerAddressBuilderstatic CustomerAddressBuilder
of
(CustomerAddress template) create builder for CustomerAddress 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 for the address.
-
Constructor Details
-
CustomerAddressBuilder
public CustomerAddressBuilder()
-
-
Method Details
-
key
User-defined identifier for the address. Must follow the pattern
[a-zA-Z0-9_\-]{2,256}
and must be unique per customer.- 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 for the address.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
withCustom
Custom Fields for the address.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
custom
Custom Fields for the address.
- Parameters:
custom
- value to be set- Returns:
- Builder
-
getKey
User-defined identifier for the address. Must follow the pattern
[a-zA-Z0-9_\-]{2,256}
and must be unique per customer.- 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 for the address.
- Returns:
- custom
-
build
builds CustomerAddress with checking for non-null required values- Specified by:
build
in interfaceBuilder<CustomerAddress>
- Returns:
- CustomerAddress
-
buildUnchecked
builds CustomerAddress without checking for non-null required values- Returns:
- CustomerAddress
-
of
factory method for an instance of CustomerAddressBuilder- Returns:
- builder
-
of
create builder for CustomerAddress instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-