Interface DiscountedPriceDraft
- All Superinterfaces:
Draft<DiscountedPriceDraft>
DiscountedPriceDraft
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
DiscountedPriceDraft discountedPriceDraft = DiscountedPriceDraft.builder()
.value(valueBuilder -> valueBuilder)
.discount(discountBuilder -> discountBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic DiscountedPriceDraftBuilder
builder()
builder factory method for DiscountedPriceDraftstatic DiscountedPriceDraftBuilder
builder
(DiscountedPriceDraft template) create builder for DiscountedPriceDraft instancestatic DiscountedPriceDraft
deepCopy
(DiscountedPriceDraft template) factory method to create a deep copy of DiscountedPriceDraft@NotNull @Valid ProductDiscountReference
Relates the referenced ProductDiscount to the discounted price.@NotNull @Valid Money
getValue()
Sets the money value for the discounted price.static DiscountedPriceDraft
of()
factory methodstatic DiscountedPriceDraft
of
(DiscountedPriceDraft template) factory method to create a shallow copy DiscountedPriceDraftvoid
setDiscount
(ProductDiscountReference discount) Relates the referenced ProductDiscount to the discounted price.void
Sets the money value for the discounted price.static com.fasterxml.jackson.core.type.TypeReference<DiscountedPriceDraft>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withDiscountedPriceDraft
(Function<DiscountedPriceDraft, T> helper) accessor map function
-
Method Details
-
getValue
Sets the money value for the discounted price.
To set the money value in high precision, use HighPrecisionMoneyDraft.
- Returns:
- value
-
getDiscount
Relates the referenced ProductDiscount to the discounted price.
- Returns:
- discount
-
setValue
Sets the money value for the discounted price.
To set the money value in high precision, use HighPrecisionMoneyDraft.
- Parameters:
value
- value to be set
-
setDiscount
Relates the referenced ProductDiscount to the discounted price.
- Parameters:
discount
- value to be set
-
of
factory method- Returns:
- instance of DiscountedPriceDraft
-
of
factory method to create a shallow copy DiscountedPriceDraft- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of DiscountedPriceDraft- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for DiscountedPriceDraft- Returns:
- builder
-
builder
create builder for DiscountedPriceDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withDiscountedPriceDraft
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
-