Class AddressDraftBuilder
- All Implemented Interfaces:
Builder<AddressDraft>
Example to create an instance using the builder pattern
AddressDraft addressDraft = AddressDraft.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 AddressDraft with checking for non-null required valuesNumber or name of the building.builds AddressDraft without checking for non-null required valuesName of the city.Name of the company.Name of the country.custom
(CustomFieldsDraft custom) Custom Fields defined for the Address.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()
Unique identifier of the Address.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.'Unique identifier of the Address.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.static AddressDraftBuilder
of()
factory method for an instance of AddressDraftBuilderstatic AddressDraftBuilder
of
(AddressDraft template) create builder for AddressDraft 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.'Custom Fields defined for the Address.
-
Constructor Details
-
AddressDraftBuilder
public AddressDraftBuilder()
-
-
Method Details
-
id
Unique identifier of the Address.
It is not recommended to set it manually since the API overwrites this ID when creating an Address for a Customer. Use
key
instead and omit this field from the request to let the API generate the ID for the Address.- 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
public AddressDraftBuilder custom(Function<CustomFieldsDraftBuilder, CustomFieldsDraftBuilder> builder) 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
Unique identifier of the Address.
It is not recommended to set it manually since the API overwrites this ID when creating an Address for a Customer. Use
key
instead and omit this field from the request to let the API generate the ID for the Address.- 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 AddressDraft with checking for non-null required values- Specified by:
build
in interfaceBuilder<AddressDraft>
- Returns:
- AddressDraft
-
buildUnchecked
builds AddressDraft without checking for non-null required values- Returns:
- AddressDraft
-
of
factory method for an instance of AddressDraftBuilder- Returns:
- builder
-
of
create builder for AddressDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-