Class CustomerSearchResultBuilder
java.lang.Object
com.commercetools.api.models.customer_search.CustomerSearchResultBuilder
- All Implemented Interfaces:
Builder<CustomerSearchResult>
CustomerSearchResultBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
CustomerSearchResult customerSearchResult = CustomerSearchResult.builder()
.id("{id}")
.relevance(0.3)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds CustomerSearchResult with checking for non-null required valuesbuilds CustomerSearchResult without checking for non-null required valuesgetId()
id
of the Customer matching the search query.How closely this customer matches the search query.id
of the Customer matching the search query.static CustomerSearchResultBuilder
of()
factory method for an instance of CustomerSearchResultBuilderstatic CustomerSearchResultBuilder
of
(CustomerSearchResult template) create builder for CustomerSearchResult instanceHow closely this customer matches the search query.
-
Constructor Details
-
CustomerSearchResultBuilder
public CustomerSearchResultBuilder()
-
-
Method Details
-
id
id
of the Customer matching the search query.- Parameters:
id
- value to be set- Returns:
- Builder
-
relevance
How closely this customer matches the search query.
- Parameters:
relevance
- value to be set- Returns:
- Builder
-
getId
id
of the Customer matching the search query.- Returns:
- id
-
getRelevance
How closely this customer matches the search query.
- Returns:
- relevance
-
build
builds CustomerSearchResult with checking for non-null required values- Specified by:
build
in interfaceBuilder<CustomerSearchResult>
- Returns:
- CustomerSearchResult
-
buildUnchecked
builds CustomerSearchResult without checking for non-null required values- Returns:
- CustomerSearchResult
-
of
factory method for an instance of CustomerSearchResultBuilder- Returns:
- builder
-
of
create builder for CustomerSearchResult instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-