Interface QueryPrice
- All Superinterfaces:
Customizable<QueryPrice>
Example to create an instance using the builder pattern
QueryPrice queryPrice = QueryPrice.builder()
.value(valueBuilder -> valueBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic QueryPriceBuilder
builder()
builder factory method for QueryPricestatic QueryPriceBuilder
builder
(QueryPrice template) create builder for QueryPrice instancestatic QueryPrice
deepCopy
(QueryPrice template) factory method to create a deep copy of QueryPrice@Valid ChannelReference
ProductDistribution
Channel for which the given Price is valid.Country for which the given Price is valid.@Valid CustomFields
Custom Fields for the Price.@Valid CustomerGroupReference
CustomerGroup for which the given Price is valid.@Valid DiscountedPriceDraft
DiscountedPrice you specify for the given Price.getId()
Unique identifier of the given Price.@Valid List<PriceTierDraft>
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.@NotNull @Valid Money
getValue()
Money value of the given Price.static QueryPrice
of()
factory methodstatic QueryPrice
of
(QueryPrice template) factory method to create a shallow copy QueryPricevoid
setChannel
(ChannelReference channel) ProductDistribution
Channel for which the given Price is valid.void
setCountry
(String country) Country for which the given Price is valid.void
setCustom
(CustomFields custom) Custom Fields for the Price.void
setCustomerGroup
(CustomerGroupReference customerGroup) CustomerGroup for which the given Price is valid.void
setDiscounted
(DiscountedPriceDraft discounted) DiscountedPrice you specify for the given Price.void
Unique identifier of the given Price.void
setTiers
(PriceTierDraft... tiers) Price tier applied when the minimum quantity for the LineItem of a ProductVariant with the related Price is reached in a Cart.void
setTiers
(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.void
setValidFrom
(ZonedDateTime validFrom) Date from which the given Price is valid.void
setValidUntil
(ZonedDateTime validUntil) Date until which the given Price is valid.void
Money value of the given Price.static com.fasterxml.jackson.core.type.TypeReference<QueryPrice>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withQueryPrice
(Function<QueryPrice, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.Customizable
unwrapCustomizable
-
Method Details
-
getId
String getId()Unique identifier of the given Price.
- Returns:
- id
-
getValue
Money value of the given Price.
- Returns:
- value
-
getCountry
String 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
ZonedDateTime getValidFrom()Date from which the given Price is valid.
- Returns:
- validFrom
-
getValidUntil
ZonedDateTime 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.
- Specified by:
getCustom
in interfaceCustomizable<QueryPrice>
- 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
-
setId
Unique identifier of the given Price.
- Parameters:
id
- value to be set
-
setValue
Money value of the given Price.
- Parameters:
value
- value to be set
-
setCountry
Country for which the given Price is valid.
- Parameters:
country
- value to be set
-
setCustomerGroup
CustomerGroup for which the given Price is valid.
- Parameters:
customerGroup
- value to be set
-
setChannel
ProductDistribution
Channel for which the given Price is valid.- Parameters:
channel
- value to be set
-
setValidFrom
Date from which the given Price is valid.
- Parameters:
validFrom
- value to be set
-
setValidUntil
Date until which the given Price is valid.
- Parameters:
validUntil
- value to be set
-
setDiscounted
DiscountedPrice you specify for the given Price.
- Parameters:
discounted
- value to be set
-
setCustom
Custom Fields for the Price.
- Specified by:
setCustom
in interfaceCustomizable<QueryPrice>
- Parameters:
custom
- value to be set
-
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:
tiers
- values to be set
-
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:
tiers
- values to be set
-
of
factory method- Returns:
- instance of QueryPrice
-
of
factory method to create a shallow copy QueryPrice- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of QueryPrice- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for QueryPrice- Returns:
- builder
-
builder
create builder for QueryPrice instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withQueryPrice
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-