Class AddDiscountCodeChangeBuilder
java.lang.Object
com.commercetools.history.models.change.AddDiscountCodeChangeBuilder
- All Implemented Interfaces:
Builder<AddDiscountCodeChange>
AddDiscountCodeChangeBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
AddDiscountCodeChange addDiscountCodeChange = AddDiscountCodeChange.builder()
.change("{change}")
.nextValue(nextValueBuilder -> nextValueBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds AddDiscountCodeChange with checking for non-null required valuesbuilds AddDiscountCodeChange without checking for non-null required valuesset the value to the changevalue of change}Value after the change.nextValue
(DiscountCodeInfo nextValue) Value after the change.Value after the change.static AddDiscountCodeChangeBuilder
of()
factory method for an instance of AddDiscountCodeChangeBuilderstatic AddDiscountCodeChangeBuilder
of
(AddDiscountCodeChange template) create builder for AddDiscountCodeChange instanceValue after the change.
-
Constructor Details
-
AddDiscountCodeChangeBuilder
public AddDiscountCodeChangeBuilder()
-
-
Method Details
-
change
set the value to the change- Parameters:
change
- value to be set- Returns:
- Builder
-
nextValue
public AddDiscountCodeChangeBuilder nextValue(Function<DiscountCodeInfoBuilder, DiscountCodeInfoBuilder> builder) Value after the change.
- Parameters:
builder
- function to build the nextValue value- Returns:
- Builder
-
withNextValue
public AddDiscountCodeChangeBuilder withNextValue(Function<DiscountCodeInfoBuilder, DiscountCodeInfo> builder) Value after the change.
- Parameters:
builder
- function to build the nextValue value- Returns:
- Builder
-
nextValue
Value after the change.
- Parameters:
nextValue
- value to be set- Returns:
- Builder
-
getChange
value of change}- Returns:
- change
-
getNextValue
Value after the change.
- Returns:
- nextValue
-
build
builds AddDiscountCodeChange with checking for non-null required values- Specified by:
build
in interfaceBuilder<AddDiscountCodeChange>
- Returns:
- AddDiscountCodeChange
-
buildUnchecked
builds AddDiscountCodeChange without checking for non-null required values- Returns:
- AddDiscountCodeChange
-
of
factory method for an instance of AddDiscountCodeChangeBuilder- Returns:
- builder
-
of
create builder for AddDiscountCodeChange instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-