Class QueryPriceBuilder
- All Implemented Interfaces:
Builder<QueryPrice>
Example to create an instance using the builder pattern
QueryPrice queryPrice = QueryPrice.builder()
.value(valueBuilder -> valueBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddTiers
(Function<PriceTierDraftBuilder, PriceTierDraft> builder) Price tier applied when the minimum quantity for the LineItem of a ProductVariant with the related Price is reached in a Cart.build()
builds QueryPrice with checking for non-null required valuesbuilds QueryPrice without checking for non-null required valueschannel
(ChannelReference channel) ProductDistribution
Channel for which the given Price is valid.ProductDistribution
Channel for which the given Price is valid.Country for which the given Price is valid.custom
(CustomFields custom) Custom Fields for the Price.custom
(Function<CustomFieldsBuilder, CustomFieldsBuilder> builder) Custom Fields for the Price.customerGroup
(CustomerGroupReference customerGroup) CustomerGroup for which the given Price is valid.CustomerGroup for which the given Price is valid.discounted
(DiscountedPriceDraft discounted) DiscountedPrice you specify for the given Price.DiscountedPrice you specify for the given Price.ProductDistribution
Channel for which the given Price is valid.Country for which the given Price is valid.Custom Fields for the Price.CustomerGroup for which the given Price is valid.DiscountedPrice you specify for the given Price.getId()
Unique identifier of the given Price.getTiers()
Price tier applied when the minimum quantity for the LineItem of a ProductVariant with the related Price is reached in a Cart.Date from which the given Price is valid.Date until which the given Price is valid.getValue()
Money value of the given Price.Unique identifier of the given Price.static QueryPriceBuilder
of()
factory method for an instance of QueryPriceBuilderstatic QueryPriceBuilder
of
(QueryPrice template) create builder for QueryPrice instanceplusTiers
(PriceTierDraft... tiers) Price tier applied when the minimum quantity for the LineItem of a ProductVariant with the related Price is reached in a Cart.Price tier applied when the minimum quantity for the LineItem of a ProductVariant with the related Price is reached in a Cart.setTiers
(Function<PriceTierDraftBuilder, PriceTierDraft> builder) Price tier applied when the minimum quantity for the LineItem of a ProductVariant with the related Price is reached in a Cart.tiers
(PriceTierDraft... tiers) Price tier applied when the minimum quantity for the LineItem of a ProductVariant with the related Price is reached in a Cart.tiers
(List<PriceTierDraft> tiers) Price tier applied when the minimum quantity for the LineItem of a ProductVariant with the related Price is reached in a Cart.validFrom
(ZonedDateTime validFrom) Date from which the given Price is valid.validUntil
(ZonedDateTime validUntil) Date until which the given Price is valid.Money value of the given Price.value
(Function<MoneyBuilder, MoneyBuilder> builder) Money value of the given Price.ProductDistribution
Channel for which the given Price is valid.withCustom
(Function<CustomFieldsBuilder, CustomFields> builder) Custom Fields for the Price.CustomerGroup for which the given Price is valid.DiscountedPrice you specify for the given Price.Price tier applied when the minimum quantity for the LineItem of a ProductVariant with the related Price is reached in a Cart.withValue
(Function<MoneyBuilder, Money> builder) Money value of the given Price.
-
Constructor Details
-
QueryPriceBuilder
public QueryPriceBuilder()
-
-
Method Details
-
id
Unique identifier of the given Price.
- Parameters:
id
- value to be set- Returns:
- Builder
-
value
Money value of the given Price.
- Parameters:
builder
- function to build the value value- Returns:
- Builder
-
withValue
Money value of the given Price.
- Parameters:
builder
- function to build the value value- Returns:
- Builder
-
value
Money value of the given Price.
- Parameters:
value
- value to be set- Returns:
- Builder
-
country
Country for which the given Price is valid.
- Parameters:
country
- value to be set- Returns:
- Builder
-
customerGroup
public QueryPriceBuilder customerGroup(Function<CustomerGroupReferenceBuilder, CustomerGroupReferenceBuilder> builder) CustomerGroup for which the given Price is valid.
- Parameters:
builder
- function to build the customerGroup value- Returns:
- Builder
-
withCustomerGroup
public QueryPriceBuilder withCustomerGroup(Function<CustomerGroupReferenceBuilder, CustomerGroupReference> builder) CustomerGroup for which the given Price is valid.
- Parameters:
builder
- function to build the customerGroup value- Returns:
- Builder
-
customerGroup
CustomerGroup for which the given Price is valid.
- Parameters:
customerGroup
- value to be set- Returns:
- Builder
-
channel
ProductDistribution
Channel for which the given Price is valid.- Parameters:
builder
- function to build the channel value- Returns:
- Builder
-
withChannel
ProductDistribution
Channel for which the given Price is valid.- Parameters:
builder
- function to build the channel value- Returns:
- Builder
-
channel
ProductDistribution
Channel for which the given Price is valid.- Parameters:
channel
- value to be set- Returns:
- Builder
-
validFrom
Date from which the given Price is valid.
- Parameters:
validFrom
- value to be set- Returns:
- Builder
-
validUntil
Date until which the given Price is valid.
- Parameters:
validUntil
- value to be set- Returns:
- Builder
-
discounted
public QueryPriceBuilder discounted(Function<DiscountedPriceDraftBuilder, DiscountedPriceDraftBuilder> builder) DiscountedPrice you specify for the given Price.
- Parameters:
builder
- function to build the discounted value- Returns:
- Builder
-
withDiscounted
public QueryPriceBuilder withDiscounted(Function<DiscountedPriceDraftBuilder, DiscountedPriceDraft> builder) DiscountedPrice you specify for the given Price.
- Parameters:
builder
- function to build the discounted value- Returns:
- Builder
-
discounted
DiscountedPrice you specify for the given Price.
- Parameters:
discounted
- value to be set- Returns:
- Builder
-
custom
Custom Fields for the Price.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
withCustom
Custom Fields for the Price.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
custom
Custom Fields for the Price.
- Parameters:
custom
- value to be set- Returns:
- Builder
-
tiers
Price tier applied when the minimum quantity for the LineItem of a ProductVariant with the related Price is reached in a Cart.
If
discounted
is specified, the tiered Price is ignored for a Product Variant.- Parameters:
tiers
- value to be set- Returns:
- Builder
-
tiers
Price tier applied when the minimum quantity for the LineItem of a ProductVariant with the related Price is reached in a Cart.
If
discounted
is specified, the tiered Price is ignored for a Product Variant.- Parameters:
tiers
- value to be set- Returns:
- Builder
-
plusTiers
Price tier applied when the minimum quantity for the LineItem of a ProductVariant with the related Price is reached in a Cart.
If
discounted
is specified, the tiered Price is ignored for a Product Variant.- Parameters:
tiers
- value to be set- Returns:
- Builder
-
plusTiers
Price tier applied when the minimum quantity for the LineItem of a ProductVariant with the related Price is reached in a Cart.
If
discounted
is specified, the tiered Price is ignored for a Product Variant.- Parameters:
builder
- function to build the tiers value- Returns:
- Builder
-
withTiers
Price tier applied when the minimum quantity for the LineItem of a ProductVariant with the related Price is reached in a Cart.
If
discounted
is specified, the tiered Price is ignored for a Product Variant.- Parameters:
builder
- function to build the tiers value- Returns:
- Builder
-
addTiers
Price tier applied when the minimum quantity for the LineItem of a ProductVariant with the related Price is reached in a Cart.
If
discounted
is specified, the tiered Price is ignored for a Product Variant.- Parameters:
builder
- function to build the tiers value- Returns:
- Builder
-
setTiers
Price tier applied when the minimum quantity for the LineItem of a ProductVariant with the related Price is reached in a Cart.
If
discounted
is specified, the tiered Price is ignored for a Product Variant.- Parameters:
builder
- function to build the tiers value- Returns:
- Builder
-
getId
Unique identifier of the given Price.
- Returns:
- id
-
getValue
Money value of the given Price.
- Returns:
- value
-
getCountry
Country for which the given Price is valid.
- Returns:
- country
-
getCustomerGroup
CustomerGroup for which the given Price is valid.
- Returns:
- customerGroup
-
getChannel
ProductDistribution
Channel for which the given Price is valid.- Returns:
- channel
-
getValidFrom
Date from which the given Price is valid.
- Returns:
- validFrom
-
getValidUntil
Date until which the given Price is valid.
- Returns:
- validUntil
-
getDiscounted
DiscountedPrice you specify for the given Price.
- Returns:
- discounted
-
getCustom
Custom Fields for the Price.
- Returns:
- custom
-
getTiers
Price tier applied when the minimum quantity for the LineItem of a ProductVariant with the related Price is reached in a Cart.
If
discounted
is specified, the tiered Price is ignored for a Product Variant.- Returns:
- tiers
-
build
builds QueryPrice with checking for non-null required values- Specified by:
build
in interfaceBuilder<QueryPrice>
- Returns:
- QueryPrice
-
buildUnchecked
builds QueryPrice without checking for non-null required values- Returns:
- QueryPrice
-
of
factory method for an instance of QueryPriceBuilder- Returns:
- builder
-
of
create builder for QueryPrice instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-