Class ProductDiscountMatchQueryBuilder

java.lang.Object
com.commercetools.api.models.product_discount.ProductDiscountMatchQueryBuilder
All Implemented Interfaces:
Builder<ProductDiscountMatchQuery>

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

     ProductDiscountMatchQuery productDiscountMatchQuery = ProductDiscountMatchQuery.builder()
             .productId("{productId}")
             .variantId(0.3)
             .staged(true)
             .price(priceBuilder -> priceBuilder)
             .build()
 
  • Constructor Details

    • ProductDiscountMatchQueryBuilder

      public ProductDiscountMatchQueryBuilder()
  • Method Details

    • productId

      public ProductDiscountMatchQueryBuilder productId(String productId)

      ID of the specified Product.

      Parameters:
      productId - value to be set
      Returns:
      Builder
    • variantId

      public ProductDiscountMatchQueryBuilder variantId(Integer variantId)

      ID of the specified Product Variant.

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

      public ProductDiscountMatchQueryBuilder staged(Boolean staged)

      Controls which projected representation is applied for the query. Set to true for the staged Product Projection of the specified Product Variant, set to false for the current one.

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

      Specified Price of the specified Product Variant.

      Parameters:
      builder - function to build the price value
      Returns:
      Builder
    • withPrice

      Specified Price of the specified Product Variant.

      Parameters:
      builder - function to build the price value
      Returns:
      Builder
    • price

      Specified Price of the specified Product Variant.

      Parameters:
      price - value to be set
      Returns:
      Builder
    • getProductId

      public String getProductId()

      ID of the specified Product.

      Returns:
      productId
    • getVariantId

      public Integer getVariantId()

      ID of the specified Product Variant.

      Returns:
      variantId
    • getStaged

      public Boolean getStaged()

      Controls which projected representation is applied for the query. Set to true for the staged Product Projection of the specified Product Variant, set to false for the current one.

      Returns:
      staged
    • getPrice

      public QueryPrice getPrice()

      Specified Price of the specified Product Variant.

      Returns:
      price
    • build

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

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

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

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