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 OrderExcerptBuilder
builder()
builder factory method for OrderExcerptstatic OrderExcerptBuilder
builder
(OrderExcerpt template) create builder for OrderExcerpt instancestatic OrderExcerpt
deepCopy
(OrderExcerpt template) factory method to create a deep copy of OrderExcerpt@Valid TaxedPrice
Taxed price of the Order.@NotNull @Valid TypedMoney
Total price of the Order.@NotNull Long
Current version of the Order.static OrderExcerpt
of()
factory methodstatic OrderExcerpt
of
(OrderExcerpt template) factory method to create a shallow copy OrderExcerptvoid
setTaxedPrice
(TaxedPrice taxedPrice) Taxed price of the Order.void
setTotalPrice
(TypedMoney totalPrice) Total price of the Order.void
setVersion
(Long version) Current version of the Order.static com.fasterxml.jackson.core.type.TypeReference<OrderExcerpt>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withOrderExcerpt
(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
-
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
-