Interface LineItemPrice
public interface LineItemPrice
LineItemPrice
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
LineItemPrice lineItemPrice = LineItemPrice.builder()
.value(valueBuilder -> valueBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic LineItemPriceBuilder
builder()
builder factory method for LineItemPricestatic LineItemPriceBuilder
builder
(LineItemPrice template) create builder for LineItemPrice instancestatic LineItemPrice
deepCopy
(LineItemPrice template) factory method to create a deep copy of LineItemPrice@Valid ChannelKeyReference
References a channel by key.Maps toPrice.county
.@Valid Custom
Maps toPrice.custom
.@Valid CustomerGroupKeyReference
References a customer group by key.@Valid DiscountedPrice
Sets a discounted price from an external service.getTiers()
The tiered prices for this price.Maps toPrice.validFrom
.Maps toPrice.validUntil
.@NotNull @Valid TypedMoney
getValue()
Maps toPrice.value
.static LineItemPrice
of()
factory methodstatic LineItemPrice
of
(LineItemPrice template) factory method to create a shallow copy LineItemPricevoid
setChannel
(ChannelKeyReference channel) References a channel by key.void
setCountry
(String country) Maps toPrice.county
.void
Maps toPrice.custom
.void
setCustomerGroup
(CustomerGroupKeyReference customerGroup) References a customer group by key.void
setDiscounted
(DiscountedPrice discounted) Sets a discounted price from an external service.void
The tiered prices for this price.void
The tiered prices for this price.void
setValidFrom
(ZonedDateTime validFrom) Maps toPrice.validFrom
.void
setValidUntil
(ZonedDateTime validUntil) Maps toPrice.validUntil
.void
setValue
(TypedMoney value) Maps toPrice.value
.static com.fasterxml.jackson.core.type.TypeReference<LineItemPrice>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withLineItemPrice
(Function<LineItemPrice, T> helper) accessor map function
-
Method Details
-
getValue
Maps to
Price.value
.- Returns:
- value
-
getCountry
String getCountry()Maps to
Price.county
.- Returns:
- country
-
getValidFrom
ZonedDateTime getValidFrom()Maps to
Price.validFrom
.- Returns:
- validFrom
-
getValidUntil
ZonedDateTime getValidUntil()Maps to
Price.validUntil
.- Returns:
- validUntil
-
getCustomerGroup
References a customer group by key.
- Returns:
- customerGroup
-
getChannel
References a channel by key.
- Returns:
- channel
-
getDiscounted
Sets a discounted price from an external service.
- Returns:
- discounted
-
getTiers
The tiered prices for this price.
- Returns:
- tiers
-
getCustom
Maps to
Price.custom
.- Returns:
- custom
-
setValue
Maps to
Price.value
.- Parameters:
value
- value to be set
-
setCountry
Maps to
Price.county
.- Parameters:
country
- value to be set
-
setValidFrom
Maps to
Price.validFrom
.- Parameters:
validFrom
- value to be set
-
setValidUntil
Maps to
Price.validUntil
.- Parameters:
validUntil
- value to be set
-
setCustomerGroup
References a customer group by key.
- Parameters:
customerGroup
- value to be set
-
setChannel
References a channel by key.
- Parameters:
channel
- value to be set
-
setDiscounted
Sets a discounted price from an external service.
- Parameters:
discounted
- value to be set
-
setTiers
The tiered prices for this price.
- Parameters:
tiers
- values to be set
-
setTiers
The tiered prices for this price.
- Parameters:
tiers
- values to be set
-
setCustom
Maps to
Price.custom
.- Parameters:
custom
- value to be set
-
of
factory method- Returns:
- instance of LineItemPrice
-
of
factory method to create a shallow copy LineItemPrice- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of LineItemPrice- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for LineItemPrice- Returns:
- builder
-
builder
create builder for LineItemPrice instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withLineItemPrice
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
-