Interface LineItemPrice
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 instancecopyDeep()
static LineItemPrice
deepCopy
(LineItemPrice template) factory method to create a deep copy of LineItemPrice@Valid ChannelKeyReference
Maps toPrice.channel
.Maps toPrice.county
.@Valid Custom
Maps toPrice.custom
.@Valid CustomerGroupKeyReference
Maps toPrice.customerGroup
.@Valid DiscountedPrice
Sets a discounted price from an external service.getTiers()
Maps toPrice.tiers
.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) Maps toPrice.channel
.void
setCountry
(String country) Maps toPrice.county
.void
Maps toPrice.custom
.void
setCustomerGroup
(CustomerGroupKeyReference customerGroup) Maps toPrice.customerGroup
.void
setDiscounted
(DiscountedPrice discounted) Sets a discounted price from an external service.void
Maps toPrice.tiers
.void
Maps toPrice.tiers
.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
Maps to
Price.customerGroup
. References a customer group by key. If the referenced CustomerGroup does not exist, thestate
of the ImportOperation will be set tounresolved
until the referenced CustomerGroup is created.- Returns:
- customerGroup
-
getChannel
Maps to
Price.channel
. References a channel by key. If the referenced Channel does not exist, thestate
of the ImportOperation will be set tounresolved
until the referenced Channel is created.- Returns:
- channel
-
getDiscounted
Sets a discounted price from an external service.
- Returns:
- discounted
-
getTiers
Maps to
Price.tiers
.- 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
Maps to
Price.customerGroup
. References a customer group by key. If the referenced CustomerGroup does not exist, thestate
of the ImportOperation will be set tounresolved
until the referenced CustomerGroup is created.- Parameters:
customerGroup
- value to be set
-
setChannel
Maps to
Price.channel
. References a channel by key. If the referenced Channel does not exist, thestate
of the ImportOperation will be set tounresolved
until the referenced Channel is created.- Parameters:
channel
- value to be set
-
setDiscounted
Sets a discounted price from an external service.
- Parameters:
discounted
- value to be set
-
setTiers
Maps to
Price.tiers
.- Parameters:
tiers
- values to be set
-
setTiers
Maps to
Price.tiers
.- 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
-
copyDeep
LineItemPrice copyDeep() -
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
-