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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds CustomerSearchResult with checking for non-null required valuesbuilds CustomerSearchResult without checking for non-null required valuesgetId()idof the Customer matching the search query.How closely this customer matches the search query.idof the Customer matching the search query.static CustomerSearchResultBuilderof()factory method for an instance of CustomerSearchResultBuilderstatic CustomerSearchResultBuilderof(CustomerSearchResult template) create builder for CustomerSearchResult instanceHow closely this customer matches the search query.
-
Constructor Details
-
CustomerSearchResultBuilder
public CustomerSearchResultBuilder()
-
-
Method Details
-
id
idof 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
idof 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:
buildin 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
-