Class CustomerSearchResultBuilder

java.lang.Object
com.commercetools.api.models.customer_search.CustomerSearchResultBuilder
All Implemented Interfaces:
Builder<CustomerSearchResult>

public class CustomerSearchResultBuilder extends Object implements Builder<CustomerSearchResult>
CustomerSearchResultBuilder
Example to create an instance using the builder pattern

     CustomerSearchResult customerSearchResult = CustomerSearchResult.builder()
             .id("{id}")
             .relevance(0.3)
             .build()
 
  • 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

      public CustomerSearchResultBuilder relevance(Double relevance)

      How closely this customer matches the search query.

      Parameters:
      relevance - value to be set
      Returns:
      Builder
    • getId

      public String getId()

      id of the Customer matching the search query.

      Returns:
      id
    • getRelevance

      public Double getRelevance()

      How closely this customer matches the search query.

      Returns:
      relevance
    • build

      public CustomerSearchResult build()
      builds CustomerSearchResult with checking for non-null required values
      Specified by:
      build in interface Builder<CustomerSearchResult>
      Returns:
      CustomerSearchResult
    • buildUnchecked

      public CustomerSearchResult buildUnchecked()
      builds CustomerSearchResult without checking for non-null required values
      Returns:
      CustomerSearchResult
    • of

      public static CustomerSearchResultBuilder 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