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 DiscountedPriceDraftBuilderbuilder()builder factory method for DiscountedPriceDraftstatic DiscountedPriceDraftBuilderbuilder(DiscountedPriceDraft template) create builder for DiscountedPriceDraft instancecopyDeep()static DiscountedPriceDraftdeepCopy(DiscountedPriceDraft template) factory method to create a deep copy of DiscountedPriceDraft@NotNull @Valid ProductDiscountReferenceRelates the referenced ProductDiscount to the discounted price.@NotNull @Valid MoneygetValue()Sets the money value for the discounted price.static DiscountedPriceDraftof()factory methodstatic DiscountedPriceDraftof(DiscountedPriceDraft template) factory method to create a shallow copy DiscountedPriceDraftvoidsetDiscount(ProductDiscountReference discount) Relates the referenced ProductDiscount to the discounted price.voidSets the money value for the discounted price.static com.fasterxml.jackson.core.type.TypeReference<DiscountedPriceDraft>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithDiscountedPriceDraft(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
-
copyDeep
DiscountedPriceDraft copyDeep() -
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
-