Class ProductSearchProjectionParamsBuilder

java.lang.Object
com.commercetools.api.models.product_search.ProductSearchProjectionParamsBuilder
All Implemented Interfaces:
Builder<ProductSearchProjectionParams>

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

     ProductSearchProjectionParams productSearchProjectionParams = ProductSearchProjectionParams.builder()
             .build()
 
  • Constructor Details

    • ProductSearchProjectionParamsBuilder

      public ProductSearchProjectionParamsBuilder()
  • Method Details

    • expand

      Expands a value of type Reference in a ProductProjection. In case the referenced object does not exist, the API returns the non-expanded reference.

      Parameters:
      expand - value to be set
      Returns:
      Builder
    • expand

      Expands a value of type Reference in a ProductProjection. In case the referenced object does not exist, the API returns the non-expanded reference.

      Parameters:
      expand - value to be set
      Returns:
      Builder
    • plusExpand

      public ProductSearchProjectionParamsBuilder plusExpand(@Nullable String... expand)

      Expands a value of type Reference in a ProductProjection. In case the referenced object does not exist, the API returns the non-expanded reference.

      Parameters:
      expand - value to be set
      Returns:
      Builder
    • staged

      Set to true to retrieve the staged Product Projection

      Parameters:
      staged - value to be set
      Returns:
      Builder
    • priceCurrency

      public ProductSearchProjectionParamsBuilder priceCurrency(@Nullable String priceCurrency)

      The currency used for Product price selection.

      Parameters:
      priceCurrency - value to be set
      Returns:
      Builder
    • priceCountry

      public ProductSearchProjectionParamsBuilder priceCountry(@Nullable String priceCountry)

      The country used for Product price selection. Can only be used in conjunction with the priceCurrency parameter.

      Parameters:
      priceCountry - value to be set
      Returns:
      Builder
    • priceCustomerGroup

      public ProductSearchProjectionParamsBuilder priceCustomerGroup(@Nullable String priceCustomerGroup)

      id of an existing CustomerGroup used for Product price selection. Can only be used in conjunction with the priceCurrency parameter.

      Parameters:
      priceCustomerGroup - value to be set
      Returns:
      Builder
    • priceChannel

      public ProductSearchProjectionParamsBuilder priceChannel(@Nullable String priceChannel)

      id of an existing Channel used for Product price selection. Can only be used in conjunction with the priceCurrency parameter.

      Parameters:
      priceChannel - value to be set
      Returns:
      Builder
    • localeProjection

      public ProductSearchProjectionParamsBuilder localeProjection(@Nullable String... localeProjection)

      Used for locale-based projection.

      Parameters:
      localeProjection - value to be set
      Returns:
      Builder
    • localeProjection

      public ProductSearchProjectionParamsBuilder localeProjection(@Nullable List<String> localeProjection)

      Used for locale-based projection.

      Parameters:
      localeProjection - value to be set
      Returns:
      Builder
    • plusLocaleProjection

      public ProductSearchProjectionParamsBuilder plusLocaleProjection(@Nullable String... localeProjection)

      Used for locale-based projection.

      Parameters:
      localeProjection - value to be set
      Returns:
      Builder
    • storeProjection

      public ProductSearchProjectionParamsBuilder storeProjection(@Nullable String storeProjection)

      key of an existing Store. If the Store has defined some languages, countries, distribution or supply Channels, they are used for projections based on locale, price, and inventory. If the Store has defined Product Selections or Product Tailoring, they have no effect on the results of this query.

      Parameters:
      storeProjection - value to be set
      Returns:
      Builder
    • getExpand

      @Nullable public List<String> getExpand()

      Expands a value of type Reference in a ProductProjection. In case the referenced object does not exist, the API returns the non-expanded reference.

      Returns:
      expand
    • getStaged

      @Nullable public Boolean getStaged()

      Set to true to retrieve the staged Product Projection

      Returns:
      staged
    • getPriceCurrency

      @Nullable public String getPriceCurrency()

      The currency used for Product price selection.

      Returns:
      priceCurrency
    • getPriceCountry

      @Nullable public String getPriceCountry()

      The country used for Product price selection. Can only be used in conjunction with the priceCurrency parameter.

      Returns:
      priceCountry
    • getPriceCustomerGroup

      @Nullable public String getPriceCustomerGroup()

      id of an existing CustomerGroup used for Product price selection. Can only be used in conjunction with the priceCurrency parameter.

      Returns:
      priceCustomerGroup
    • getPriceChannel

      @Nullable public String getPriceChannel()

      id of an existing Channel used for Product price selection. Can only be used in conjunction with the priceCurrency parameter.

      Returns:
      priceChannel
    • getLocaleProjection

      @Nullable public List<String> getLocaleProjection()

      Used for locale-based projection.

      Returns:
      localeProjection
    • getStoreProjection

      @Nullable public String getStoreProjection()

      key of an existing Store. If the Store has defined some languages, countries, distribution or supply Channels, they are used for projections based on locale, price, and inventory. If the Store has defined Product Selections or Product Tailoring, they have no effect on the results of this query.

      Returns:
      storeProjection
    • build

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

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

      factory method for an instance of ProductSearchProjectionParamsBuilder
      Returns:
      builder
    • of

      create builder for ProductSearchProjectionParams instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder