Interface DiscountCodeInfo
public interface DiscountCodeInfo
DiscountCodeInfo
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
DiscountCodeInfo discountCodeInfo = DiscountCodeInfo.builder()
.discountCode(discountCodeBuilder -> discountCodeBuilder)
.state(DiscountCodeState.NOT_ACTIVE)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic DiscountCodeInfoBuilder
builder()
builder factory method for DiscountCodeInfostatic DiscountCodeInfoBuilder
builder
(DiscountCodeInfo template) create builder for DiscountCodeInfo instancestatic DiscountCodeInfo
deepCopy
(DiscountCodeInfo template) factory method to create a deep copy of DiscountCodeInfo@NotNull @Valid Reference
@NotNull DiscountCodeState
getState()
static DiscountCodeInfo
of()
factory methodstatic DiscountCodeInfo
of
(DiscountCodeInfo template) factory method to create a shallow copy DiscountCodeInfovoid
setDiscountCode
(Reference discountCode) set discountCodevoid
setState
(DiscountCodeState state) set statestatic com.fasterxml.jackson.core.type.TypeReference<DiscountCodeInfo>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withDiscountCodeInfo
(Function<DiscountCodeInfo, T> helper) accessor map function
-
Method Details
-
getDiscountCode
- Returns:
- discountCode
-
getState
- Returns:
- state
-
setDiscountCode
set discountCode- Parameters:
discountCode
- value to be set
-
setState
set state- Parameters:
state
- value to be set
-
of
factory method- Returns:
- instance of DiscountCodeInfo
-
of
factory method to create a shallow copy DiscountCodeInfo- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of DiscountCodeInfo- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for DiscountCodeInfo- Returns:
- builder
-
builder
create builder for DiscountCodeInfo instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withDiscountCodeInfo
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
-