Class DiscountCodeChangeCartDiscountsActionBuilder
java.lang.Object
com.commercetools.api.models.discount_code.DiscountCodeChangeCartDiscountsActionBuilder
- All Implemented Interfaces:
Builder<DiscountCodeChangeCartDiscountsAction>
public class DiscountCodeChangeCartDiscountsActionBuilder
extends Object
implements Builder<DiscountCodeChangeCartDiscountsAction>
DiscountCodeChangeCartDiscountsActionBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
DiscountCodeChangeCartDiscountsAction discountCodeChangeCartDiscountsAction = DiscountCodeChangeCartDiscountsAction.builder()
.plusCartDiscounts(cartDiscountsBuilder -> cartDiscountsBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddCartDiscounts
(Function<CartDiscountResourceIdentifierBuilder, CartDiscountResourceIdentifier> builder) New value to set.build()
builds DiscountCodeChangeCartDiscountsAction with checking for non-null required valuesbuilds DiscountCodeChangeCartDiscountsAction without checking for non-null required valuescartDiscounts
(CartDiscountResourceIdentifier... cartDiscounts) New value to set.cartDiscounts
(List<CartDiscountResourceIdentifier> cartDiscounts) New value to set.New value to set.of()
factory method for an instance of DiscountCodeChangeCartDiscountsActionBuilderof
(DiscountCodeChangeCartDiscountsAction template) create builder for DiscountCodeChangeCartDiscountsAction instanceplusCartDiscounts
(CartDiscountResourceIdentifier... cartDiscounts) New value to set.plusCartDiscounts
(Function<CartDiscountResourceIdentifierBuilder, CartDiscountResourceIdentifierBuilder> builder) New value to set.setCartDiscounts
(Function<CartDiscountResourceIdentifierBuilder, CartDiscountResourceIdentifier> builder) New value to set.withCartDiscounts
(Function<CartDiscountResourceIdentifierBuilder, CartDiscountResourceIdentifierBuilder> builder) New value to set.
-
Constructor Details
-
DiscountCodeChangeCartDiscountsActionBuilder
public DiscountCodeChangeCartDiscountsActionBuilder()
-
-
Method Details
-
cartDiscounts
public DiscountCodeChangeCartDiscountsActionBuilder cartDiscounts(CartDiscountResourceIdentifier... cartDiscounts) New value to set.
- Parameters:
cartDiscounts
- value to be set- Returns:
- Builder
-
cartDiscounts
public DiscountCodeChangeCartDiscountsActionBuilder cartDiscounts(List<CartDiscountResourceIdentifier> cartDiscounts) New value to set.
- Parameters:
cartDiscounts
- value to be set- Returns:
- Builder
-
plusCartDiscounts
public DiscountCodeChangeCartDiscountsActionBuilder plusCartDiscounts(CartDiscountResourceIdentifier... cartDiscounts) New value to set.
- Parameters:
cartDiscounts
- value to be set- Returns:
- Builder
-
plusCartDiscounts
public DiscountCodeChangeCartDiscountsActionBuilder plusCartDiscounts(Function<CartDiscountResourceIdentifierBuilder, CartDiscountResourceIdentifierBuilder> builder) New value to set.
- Parameters:
builder
- function to build the cartDiscounts value- Returns:
- Builder
-
withCartDiscounts
public DiscountCodeChangeCartDiscountsActionBuilder withCartDiscounts(Function<CartDiscountResourceIdentifierBuilder, CartDiscountResourceIdentifierBuilder> builder) New value to set.
- Parameters:
builder
- function to build the cartDiscounts value- Returns:
- Builder
-
addCartDiscounts
public DiscountCodeChangeCartDiscountsActionBuilder addCartDiscounts(Function<CartDiscountResourceIdentifierBuilder, CartDiscountResourceIdentifier> builder) New value to set.
- Parameters:
builder
- function to build the cartDiscounts value- Returns:
- Builder
-
setCartDiscounts
public DiscountCodeChangeCartDiscountsActionBuilder setCartDiscounts(Function<CartDiscountResourceIdentifierBuilder, CartDiscountResourceIdentifier> builder) New value to set.
- Parameters:
builder
- function to build the cartDiscounts value- Returns:
- Builder
-
getCartDiscounts
New value to set.
- Returns:
- cartDiscounts
-
build
builds DiscountCodeChangeCartDiscountsAction with checking for non-null required values- Specified by:
build
in interfaceBuilder<DiscountCodeChangeCartDiscountsAction>
- Returns:
- DiscountCodeChangeCartDiscountsAction
-
buildUnchecked
builds DiscountCodeChangeCartDiscountsAction without checking for non-null required values- Returns:
- DiscountCodeChangeCartDiscountsAction
-
of
factory method for an instance of DiscountCodeChangeCartDiscountsActionBuilder- Returns:
- builder
-
of
public static DiscountCodeChangeCartDiscountsActionBuilder of(DiscountCodeChangeCartDiscountsAction template) create builder for DiscountCodeChangeCartDiscountsAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-