Interface DiscountCodeCreatedMessagePayload
- All Superinterfaces:
MessagePayload
,MessagePayloadMixin
Generated after a successful Create DiscountCode request.
Example to create an instance using the builder pattern
DiscountCodeCreatedMessagePayload discountCodeCreatedMessagePayload = DiscountCodeCreatedMessagePayload.builder()
.discountCode(discountCodeBuilder -> discountCodeBuilder)
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for DiscountCodeCreatedMessagePayload -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for DiscountCodeCreatedMessagePayloadbuilder
(DiscountCodeCreatedMessagePayload template) create builder for DiscountCodeCreatedMessagePayload instancedeepCopy
(DiscountCodeCreatedMessagePayload template) factory method to create a deep copy of DiscountCodeCreatedMessagePayload@NotNull @Valid DiscountCode
The Discount Code that was created.of()
factory methodof
(DiscountCodeCreatedMessagePayload template) factory method to create a shallow copy DiscountCodeCreatedMessagePayloadvoid
setDiscountCode
(DiscountCode discountCode) The Discount Code that was created.static com.fasterxml.jackson.core.type.TypeReference<DiscountCodeCreatedMessagePayload>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map functionMethods inherited from interface com.commercetools.api.models.message.MessagePayload
getType, withMessagePayload
Methods inherited from interface com.commercetools.api.models.message.MessagePayloadMixin
as
-
Field Details
-
DISCOUNT_CODE_CREATED
discriminator value for DiscountCodeCreatedMessagePayload- See Also:
-
-
Method Details
-
getDiscountCode
The Discount Code that was created.
- Returns:
- discountCode
-
setDiscountCode
The Discount Code that was created.
- Parameters:
discountCode
- value to be set
-
of
factory method- Returns:
- instance of DiscountCodeCreatedMessagePayload
-
of
factory method to create a shallow copy DiscountCodeCreatedMessagePayload- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static DiscountCodeCreatedMessagePayload deepCopy(@Nullable DiscountCodeCreatedMessagePayload template) factory method to create a deep copy of DiscountCodeCreatedMessagePayload- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for DiscountCodeCreatedMessagePayload- Returns:
- builder
-
builder
create builder for DiscountCodeCreatedMessagePayload instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withDiscountCodeCreatedMessagePayload
default <T> T withDiscountCodeCreatedMessagePayload(Function<DiscountCodeCreatedMessagePayload, T> helper) accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
static com.fasterxml.jackson.core.type.TypeReference<DiscountCodeCreatedMessagePayload> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-