Class CartRemoveDiscountCodeActionBuilder
java.lang.Object
com.commercetools.api.models.cart.CartRemoveDiscountCodeActionBuilder
- All Implemented Interfaces:
Builder<CartRemoveDiscountCodeAction>
public class CartRemoveDiscountCodeActionBuilder
extends Object
implements Builder<CartRemoveDiscountCodeAction>
CartRemoveDiscountCodeActionBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
CartRemoveDiscountCodeAction cartRemoveDiscountCodeAction = CartRemoveDiscountCodeAction.builder()
.discountCode(discountCodeBuilder -> discountCodeBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds CartRemoveDiscountCodeAction with checking for non-null required valuesbuilds CartRemoveDiscountCodeAction without checking for non-null required valuesdiscountCode
(DiscountCodeReference discountCode) Discount Code to remove from the Cart.Discount Code to remove from the Cart.Discount Code to remove from the Cart.of()
factory method for an instance of CartRemoveDiscountCodeActionBuilderof
(CartRemoveDiscountCodeAction template) create builder for CartRemoveDiscountCodeAction instanceDiscount Code to remove from the Cart.
-
Constructor Details
-
CartRemoveDiscountCodeActionBuilder
public CartRemoveDiscountCodeActionBuilder()
-
-
Method Details
-
discountCode
public CartRemoveDiscountCodeActionBuilder discountCode(Function<DiscountCodeReferenceBuilder, DiscountCodeReferenceBuilder> builder) Discount Code to remove from the Cart.
- Parameters:
builder
- function to build the discountCode value- Returns:
- Builder
-
withDiscountCode
public CartRemoveDiscountCodeActionBuilder withDiscountCode(Function<DiscountCodeReferenceBuilder, DiscountCodeReference> builder) Discount Code to remove from the Cart.
- Parameters:
builder
- function to build the discountCode value- Returns:
- Builder
-
discountCode
Discount Code to remove from the Cart.
- Parameters:
discountCode
- value to be set- Returns:
- Builder
-
getDiscountCode
Discount Code to remove from the Cart.
- Returns:
- discountCode
-
build
builds CartRemoveDiscountCodeAction with checking for non-null required values- Specified by:
build
in interfaceBuilder<CartRemoveDiscountCodeAction>
- Returns:
- CartRemoveDiscountCodeAction
-
buildUnchecked
builds CartRemoveDiscountCodeAction without checking for non-null required values- Returns:
- CartRemoveDiscountCodeAction
-
of
factory method for an instance of CartRemoveDiscountCodeActionBuilder- Returns:
- builder
-
of
create builder for CartRemoveDiscountCodeAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-