Class CartDiscountChangeValueActionBuilder
java.lang.Object
com.commercetools.api.models.cart_discount.CartDiscountChangeValueActionBuilder
- All Implemented Interfaces:
Builder<CartDiscountChangeValueAction>
public class CartDiscountChangeValueActionBuilder
extends Object
implements Builder<CartDiscountChangeValueAction>
CartDiscountChangeValueActionBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
CartDiscountChangeValueAction cartDiscountChangeValueAction = CartDiscountChangeValueAction.builder()
.value(valueBuilder -> valueBuilder)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds CartDiscountChangeValueAction with checking for non-null required valuesbuilds CartDiscountChangeValueAction without checking for non-null required valuesgetValue()New value to set.of()factory method for an instance of CartDiscountChangeValueActionBuilderof(CartDiscountChangeValueAction template) create builder for CartDiscountChangeValueAction instancevalue(CartDiscountValueDraft value) New value to set.value(Function<CartDiscountValueDraftBuilder, Builder<? extends CartDiscountValueDraft>> builder) New value to set.
-
Constructor Details
-
CartDiscountChangeValueActionBuilder
public CartDiscountChangeValueActionBuilder()
-
-
Method Details
-
value
New value to set. When trying to set a CartDiscountValueGiftLineItemDraft an InvalidInput error is returned.
- Parameters:
value- value to be set- Returns:
- Builder
-
value
public CartDiscountChangeValueActionBuilder value(Function<CartDiscountValueDraftBuilder, Builder<? extends CartDiscountValueDraft>> builder) New value to set. When trying to set a CartDiscountValueGiftLineItemDraft an InvalidInput error is returned.
- Parameters:
builder- function to build the value value- Returns:
- Builder
-
getValue
New value to set. When trying to set a CartDiscountValueGiftLineItemDraft an InvalidInput error is returned.
- Returns:
- value
-
build
builds CartDiscountChangeValueAction with checking for non-null required values- Specified by:
buildin interfaceBuilder<CartDiscountChangeValueAction>- Returns:
- CartDiscountChangeValueAction
-
buildUnchecked
builds CartDiscountChangeValueAction without checking for non-null required values- Returns:
- CartDiscountChangeValueAction
-
of
factory method for an instance of CartDiscountChangeValueActionBuilder- Returns:
- builder
-
of
create builder for CartDiscountChangeValueAction instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-