Class CustomerAddressBuilder
- All Implemented Interfaces:
Builder<CustomerAddress>
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) Further information on the Address.additionalStreetInfo
(String additionalStreetInfo) Further information on the street address.Number or name of the apartment.build()
builds CustomerAddress with checking for non-null required valuesNumber or name of the building.builds CustomerAddress without checking for non-null required valuesName of the city.Name of the company.Name of the country.Custom Fields for the address.custom
(Function<CustomBuilder, CustomBuilder> builder) Custom Fields for the address.department
(String department) Name of the department.Email address of the contact.externalId
(String externalId) ID for the contact used in an external system.Fax number of the contact.Given name (first name) of the contact.Further information on the Address.Further information on the street address.Number or name of the apartment.Number or name of the building.getCity()
Name of the city.Name of the company.Name of the country.Custom Fields for the address.Name of the department.getEmail()
Email address of the contact.ID for the contact used in an external system.getFax()
Fax number of the contact.Given name (first name) of the contact.getKey()
User-defined identifier for the address.Family name (last name) of the contact.Mobile phone number of the contact.getPhone()
Phone number of the contact.getPOBox()
Post office box number.Postal code.Name of the region.Salutation of the contact, for example 'Mr.' or 'Ms.'getState()
Name of the state, for example, Colorado.Name of the street.Street number.getTitle()
Title of the contact, for example 'Dr.'User-defined identifier for the address.Family name (last name) of the contact.Mobile phone number of the contact.static CustomerAddressBuilder
of()
factory method for an instance of CustomerAddressBuilderstatic CustomerAddressBuilder
of
(CustomerAddress template) create builder for CustomerAddress instancePhone number of the contact.Post office box number.postalCode
(String postalCode) Postal code.Name of the region.salutation
(String salutation) Salutation of the contact, for example 'Mr.' or 'Ms.'Name of the state, for example, Colorado.streetName
(String streetName) Name of the street.streetNumber
(String streetNumber) Street number.Title of the contact, for example 'Dr.'withCustom
(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
-
country
Name of the country.
- Parameters:
country
- value to be set- Returns:
- Builder
-
title
Title of the contact, for example 'Dr.'
- Parameters:
title
- value to be set- Returns:
- Builder
-
salutation
Salutation of the contact, for example 'Mr.' or 'Ms.'
- Parameters:
salutation
- value to be set- Returns:
- Builder
-
firstName
Given name (first name) of the contact.
- Parameters:
firstName
- value to be set- Returns:
- Builder
-
lastName
Family name (last name) of the contact.
- Parameters:
lastName
- value to be set- Returns:
- Builder
-
streetName
Name of the street.
- Parameters:
streetName
- value to be set- Returns:
- Builder
-
streetNumber
Street number.
- Parameters:
streetNumber
- value to be set- Returns:
- Builder
-
additionalStreetInfo
Further information on the street address.
- Parameters:
additionalStreetInfo
- value to be set- Returns:
- Builder
-
postalCode
Postal code.
- Parameters:
postalCode
- value to be set- Returns:
- Builder
-
city
Name of the city.
- Parameters:
city
- value to be set- Returns:
- Builder
-
region
Name of the region.
- Parameters:
region
- value to be set- Returns:
- Builder
-
state
Name of the state, for example, Colorado.
- Parameters:
state
- value to be set- Returns:
- Builder
-
company
Name of the company.
- Parameters:
company
- value to be set- Returns:
- Builder
-
department
Name of the department.
- Parameters:
department
- value to be set- Returns:
- Builder
-
building
Number or name of the building.
- Parameters:
building
- value to be set- Returns:
- Builder
-
apartment
Number or name of the apartment.
- Parameters:
apartment
- value to be set- Returns:
- Builder
-
pOBox
Post office box number.
- Parameters:
pOBox
- value to be set- Returns:
- Builder
-
phone
Phone number of the contact.
- Parameters:
phone
- value to be set- Returns:
- Builder
-
mobile
Mobile phone number of the contact.
- Parameters:
mobile
- value to be set- Returns:
- Builder
-
email
Email address of the contact.
- Parameters:
email
- value to be set- Returns:
- Builder
-
fax
Fax number of the contact.
- Parameters:
fax
- value to be set- Returns:
- Builder
-
additionalAddressInfo
Further information on the Address.
- Parameters:
additionalAddressInfo
- value to be set- Returns:
- Builder
-
externalId
ID for the contact used in an external system.
- 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
-
getCountry
Name of the country.
- Returns:
- country
-
getTitle
Title of the contact, for example 'Dr.'
- Returns:
- title
-
getSalutation
Salutation of the contact, for example 'Mr.' or 'Ms.'
- Returns:
- salutation
-
getFirstName
Given name (first name) of the contact.
- Returns:
- firstName
-
getLastName
Family name (last name) of the contact.
- Returns:
- lastName
-
getStreetName
Name of the street.
- Returns:
- streetName
-
getStreetNumber
Street number.
- Returns:
- streetNumber
-
getAdditionalStreetInfo
Further information on the street address.
- Returns:
- additionalStreetInfo
-
getPostalCode
Postal code.
- Returns:
- postalCode
-
getCity
Name of the city.
- Returns:
- city
-
getRegion
Name of the region.
- Returns:
- region
-
getState
Name of the state, for example, Colorado.
- Returns:
- state
-
getCompany
Name of the company.
- Returns:
- company
-
getDepartment
Name of the department.
- Returns:
- department
-
getBuilding
Number or name of the building.
- Returns:
- building
-
getApartment
Number or name of the apartment.
- Returns:
- apartment
-
getPOBox
Post office box number.
- Returns:
- pOBox
-
getPhone
Phone number of the contact.
- Returns:
- phone
-
getMobile
Mobile phone number of the contact.
- Returns:
- mobile
-
getEmail
Email address of the contact.
- Returns:
-
getFax
Fax number of the contact.
- Returns:
- fax
-
getAdditionalAddressInfo
Further information on the Address.
- Returns:
- additionalAddressInfo
-
getExternalId
ID for the contact used in an external system.
- 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
-