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
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds ProductDiscountMatchQuery with checking for non-null required valuesbuilds ProductDiscountMatchQuery without checking for non-null required valuesgetPrice()
Specified Price of the specified Product Variant.ID of the specified Product.Controls which projected representation is applied for the query.ID of the specified Product Variant.of()
factory method for an instance of ProductDiscountMatchQueryBuilderof
(ProductDiscountMatchQuery template) create builder for ProductDiscountMatchQuery instanceprice
(QueryPrice price) Specified Price of the specified Product Variant.price
(Function<QueryPriceBuilder, QueryPriceBuilder> builder) Specified Price of the specified Product Variant.ID of the specified Product.Controls which projected representation is applied for the query.ID of the specified Product Variant.withPrice
(Function<QueryPriceBuilder, QueryPrice> builder) Specified Price of the specified Product Variant.
-
Constructor Details
-
ProductDiscountMatchQueryBuilder
public ProductDiscountMatchQueryBuilder()
-
-
Method Details
-
productId
ID of the specified Product.
- Parameters:
productId
- value to be set- Returns:
- Builder
-
variantId
ID of the specified Product Variant.
- Parameters:
variantId
- value to be set- Returns:
- Builder
-
staged
Controls which projected representation is applied for the query. Set to
true
for thestaged
Product Projection of the specified Product Variant, set tofalse
for thecurrent
one.- Parameters:
staged
- value to be set- Returns:
- Builder
-
price
public ProductDiscountMatchQueryBuilder price(Function<QueryPriceBuilder, QueryPriceBuilder> builder) 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
ID of the specified Product.
- Returns:
- productId
-
getVariantId
ID of the specified Product Variant.
- Returns:
- variantId
-
getStaged
Controls which projected representation is applied for the query. Set to
true
for thestaged
Product Projection of the specified Product Variant, set tofalse
for thecurrent
one.- Returns:
- staged
-
getPrice
Specified Price of the specified Product Variant.
- Returns:
- price
-
build
builds ProductDiscountMatchQuery with checking for non-null required values- Specified by:
build
in interfaceBuilder<ProductDiscountMatchQuery>
- Returns:
- 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
-