Class AddressBuilder
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) Further information on the Address.additionalStreetInfo
(String additionalStreetInfo) Further information on the street address.Number or name of the apartment.build()
builds Address with checking for non-null required valuesNumber or name of the building.builds Address without checking for non-null required valuesName of the city.Name of the company.Name of the country.custom
(CustomFields custom) Custom Fields defined for the Address.custom
(Function<CustomFieldsBuilder, CustomFieldsBuilder> builder) Custom Fields defined 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 defined 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.getId()
value of id}getKey()
User-defined identifier of the Address that must be unique when multiple addresses are referenced in BusinessUnits, Customers, anditemShippingAddresses
(LineItem-specific addresses) of a Cart, Order, QuoteRequest, or Quote.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.'set the value to the idUser-defined identifier of the Address that must be unique when multiple addresses are referenced in BusinessUnits, Customers, anditemShippingAddresses
(LineItem-specific addresses) of a Cart, Order, QuoteRequest, or Quote.Family name (last name) of the contact.Mobile phone number of the contact.static AddressBuilder
of()
factory method for an instance of AddressBuilderstatic AddressBuilder
create builder for Address 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<CustomFieldsBuilder, CustomFields> 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
User-defined identifier of the Address that must be unique when multiple addresses are referenced in BusinessUnits, Customers, and
itemShippingAddresses
(LineItem-specific addresses) of a Cart, Order, QuoteRequest, or Quote.- 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 defined for the Address.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
withCustom
Custom Fields defined for the Address.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
custom
Custom Fields defined for the Address.
- Parameters:
custom
- value to be set- Returns:
- Builder
-
getId
value of id}- Returns:
- id
-
getKey
User-defined identifier of the Address that must be unique when multiple addresses are referenced in BusinessUnits, Customers, and
itemShippingAddresses
(LineItem-specific addresses) of a Cart, Order, QuoteRequest, or Quote.- 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 defined for the Address.
- 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
-