Class RemoveDiscountCodeChangeBuilder
java.lang.Object
com.commercetools.history.models.change.RemoveDiscountCodeChangeBuilder
- All Implemented Interfaces:
Builder<RemoveDiscountCodeChange>
public class RemoveDiscountCodeChangeBuilder
extends Object
implements Builder<RemoveDiscountCodeChange>
RemoveDiscountCodeChangeBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
RemoveDiscountCodeChange removeDiscountCodeChange = RemoveDiscountCodeChange.builder()
.change("{change}")
.previousValue(previousValueBuilder -> previousValueBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds RemoveDiscountCodeChange with checking for non-null required valuesbuilds RemoveDiscountCodeChange without checking for non-null required valuesset the value to the changevalue of change}Value before the change.of()
factory method for an instance of RemoveDiscountCodeChangeBuilderof
(RemoveDiscountCodeChange template) create builder for RemoveDiscountCodeChange instancepreviousValue
(DiscountCodeInfo previousValue) Value before the change.Value before the change.Value before the change.
-
Constructor Details
-
RemoveDiscountCodeChangeBuilder
public RemoveDiscountCodeChangeBuilder()
-
-
Method Details
-
change
set the value to the change- Parameters:
change
- value to be set- Returns:
- Builder
-
previousValue
public RemoveDiscountCodeChangeBuilder previousValue(Function<DiscountCodeInfoBuilder, DiscountCodeInfoBuilder> builder) Value before the change.
- Parameters:
builder
- function to build the previousValue value- Returns:
- Builder
-
withPreviousValue
public RemoveDiscountCodeChangeBuilder withPreviousValue(Function<DiscountCodeInfoBuilder, DiscountCodeInfo> builder) Value before the change.
- Parameters:
builder
- function to build the previousValue value- Returns:
- Builder
-
previousValue
Value before the change.
- Parameters:
previousValue
- value to be set- Returns:
- Builder
-
getChange
value of change}- Returns:
- change
-
getPreviousValue
Value before the change.
- Returns:
- previousValue
-
build
builds RemoveDiscountCodeChange with checking for non-null required values- Specified by:
build
in interfaceBuilder<RemoveDiscountCodeChange>
- Returns:
- RemoveDiscountCodeChange
-
buildUnchecked
builds RemoveDiscountCodeChange without checking for non-null required values- Returns:
- RemoveDiscountCodeChange
-
of
factory method for an instance of RemoveDiscountCodeChangeBuilder- Returns:
- builder
-
of
create builder for RemoveDiscountCodeChange instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-