Interface OrderExcerpt
public interface OrderExcerpt
Excerpt of the Order extracting the total and the taxed price.
Example to create an instance using the builder pattern
OrderExcerpt orderExcerpt = OrderExcerpt.builder()
.totalPrice(totalPriceBuilder -> totalPriceBuilder)
.version(0.3)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic OrderExcerptBuilderbuilder()builder factory method for OrderExcerptstatic OrderExcerptBuilderbuilder(OrderExcerpt template) create builder for OrderExcerpt instancecopyDeep()static OrderExcerptdeepCopy(OrderExcerpt template) factory method to create a deep copy of OrderExcerpt@Valid TaxedPriceTaxed price of the Order.@NotNull @Valid TypedMoneyTotal price of the Order.@NotNull LongCurrent version of the Order.static OrderExcerptof()factory methodstatic OrderExcerptof(OrderExcerpt template) factory method to create a shallow copy OrderExcerptvoidsetTaxedPrice(TaxedPrice taxedPrice) Taxed price of the Order.voidsetTotalPrice(TypedMoney totalPrice) Total price of the Order.voidsetVersion(Long version) Current version of the Order.static com.fasterxml.jackson.core.type.TypeReference<OrderExcerpt>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithOrderExcerpt(Function<OrderExcerpt, T> helper) accessor map function
-
Method Details
-
getTotalPrice
Total price of the Order.
- Returns:
- totalPrice
-
getTaxedPrice
Taxed price of the Order.
- Returns:
- taxedPrice
-
getVersion
Current version of the Order.
- Returns:
- version
-
setTotalPrice
Total price of the Order.
- Parameters:
totalPrice- value to be set
-
setTaxedPrice
Taxed price of the Order.
- Parameters:
taxedPrice- value to be set
-
setVersion
Current version of the Order.
- Parameters:
version- value to be set
-
of
factory method- Returns:
- instance of OrderExcerpt
-
of
factory method to create a shallow copy OrderExcerpt- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
OrderExcerpt copyDeep() -
deepCopy
factory method to create a deep copy of OrderExcerpt- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for OrderExcerpt- Returns:
- builder
-
builder
create builder for OrderExcerpt instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withOrderExcerpt
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
-