Class CartDiscountCreatedMessagePayloadBuilder
java.lang.Object
com.commercetools.api.models.message.CartDiscountCreatedMessagePayloadBuilder
- All Implemented Interfaces:
Builder<CartDiscountCreatedMessagePayload>
public class CartDiscountCreatedMessagePayloadBuilder
extends Object
implements Builder<CartDiscountCreatedMessagePayload>
CartDiscountCreatedMessagePayloadBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
CartDiscountCreatedMessagePayload cartDiscountCreatedMessagePayload = CartDiscountCreatedMessagePayload.builder()
.cartDiscount(cartDiscountBuilder -> cartDiscountBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds CartDiscountCreatedMessagePayload with checking for non-null required valuesbuilds CartDiscountCreatedMessagePayload without checking for non-null required valuescartDiscount
(CartDiscount cartDiscount) The Cart Discount that was created.The Cart Discount that was created.The Cart Discount that was created.of()
factory method for an instance of CartDiscountCreatedMessagePayloadBuilderof
(CartDiscountCreatedMessagePayload template) create builder for CartDiscountCreatedMessagePayload instanceThe Cart Discount that was created.
-
Constructor Details
-
CartDiscountCreatedMessagePayloadBuilder
public CartDiscountCreatedMessagePayloadBuilder()
-
-
Method Details
-
cartDiscount
public CartDiscountCreatedMessagePayloadBuilder cartDiscount(Function<CartDiscountBuilder, CartDiscountBuilder> builder) The Cart Discount that was created.
- Parameters:
builder
- function to build the cartDiscount value- Returns:
- Builder
-
withCartDiscount
public CartDiscountCreatedMessagePayloadBuilder withCartDiscount(Function<CartDiscountBuilder, CartDiscount> builder) The Cart Discount that was created.
- Parameters:
builder
- function to build the cartDiscount value- Returns:
- Builder
-
cartDiscount
The Cart Discount that was created.
- Parameters:
cartDiscount
- value to be set- Returns:
- Builder
-
getCartDiscount
The Cart Discount that was created.
- Returns:
- cartDiscount
-
build
builds CartDiscountCreatedMessagePayload with checking for non-null required values- Specified by:
build
in interfaceBuilder<CartDiscountCreatedMessagePayload>
- Returns:
- CartDiscountCreatedMessagePayload
-
buildUnchecked
builds CartDiscountCreatedMessagePayload without checking for non-null required values- Returns:
- CartDiscountCreatedMessagePayload
-
of
factory method for an instance of CartDiscountCreatedMessagePayloadBuilder- Returns:
- builder
-
of
public static CartDiscountCreatedMessagePayloadBuilder of(CartDiscountCreatedMessagePayload template) create builder for CartDiscountCreatedMessagePayload instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-