Class CustomerLabelBuilder
java.lang.Object
com.commercetools.history.models.label.CustomerLabelBuilder
- All Implemented Interfaces:
Builder<CustomerLabel>
CustomerLabelBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
CustomerLabel customerLabel = CustomerLabel.builder()
.firstName("{firstName}")
.lastName("{lastName}")
.customerNumber("{customerNumber}")
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds CustomerLabel with checking for non-null required valuesbuilds CustomerLabel without checking for non-null required valuescustomerNumber
(String customerNumber) User-defined unique identifier of the Customer.Given name (first name) of the Customer.User-defined unique identifier of the Customer.Given name (first name) of the Customer.Family name (last name) of the Customer.Family name (last name) of the Customer.static CustomerLabelBuilder
of()
factory method for an instance of CustomerLabelBuilderstatic CustomerLabelBuilder
of
(CustomerLabel template) create builder for CustomerLabel instance
-
Constructor Details
-
CustomerLabelBuilder
public CustomerLabelBuilder()
-
-
Method Details
-
firstName
Given name (first name) of the Customer.
- Parameters:
firstName
- value to be set- Returns:
- Builder
-
lastName
Family name (last name) of the Customer.
- Parameters:
lastName
- value to be set- Returns:
- Builder
-
customerNumber
User-defined unique identifier of the Customer.
- Parameters:
customerNumber
- value to be set- Returns:
- Builder
-
getFirstName
Given name (first name) of the Customer.
- Returns:
- firstName
-
getLastName
Family name (last name) of the Customer.
- Returns:
- lastName
-
getCustomerNumber
User-defined unique identifier of the Customer.
- Returns:
- customerNumber
-
build
builds CustomerLabel with checking for non-null required values- Specified by:
build
in interfaceBuilder<CustomerLabel>
- Returns:
- CustomerLabel
-
buildUnchecked
builds CustomerLabel without checking for non-null required values- Returns:
- CustomerLabel
-
of
factory method for an instance of CustomerLabelBuilder- Returns:
- builder
-
of
create builder for CustomerLabel instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-