Class SetCustomLineItemDiscountedPriceChangeBuilder
java.lang.Object
com.commercetools.history.models.change.SetCustomLineItemDiscountedPriceChangeBuilder
- All Implemented Interfaces:
Builder<SetCustomLineItemDiscountedPriceChange>
public class SetCustomLineItemDiscountedPriceChangeBuilder
extends Object
implements Builder<SetCustomLineItemDiscountedPriceChange>
SetCustomLineItemDiscountedPriceChangeBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
SetCustomLineItemDiscountedPriceChange setCustomLineItemDiscountedPriceChange = SetCustomLineItemDiscountedPriceChange.builder()
.change("{change}")
.customLineItem(customLineItemBuilder -> customLineItemBuilder)
.customLineItemId("{customLineItemId}")
.previousValue(previousValueBuilder -> previousValueBuilder)
.nextValue(nextValueBuilder -> nextValueBuilder)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds SetCustomLineItemDiscountedPriceChange with checking for non-null required valuesbuilds SetCustomLineItemDiscountedPriceChange without checking for non-null required valuesset the value to the changecustomLineItem(LocalizedString customLineItem) Name of the updated CustomLineItem.Name of the updated CustomLineItem.customLineItemId(String customLineItemId) idof the updated CustomLineItem.value of change}Name of the updated CustomLineItem.idof the updated CustomLineItem.Value after the change.Value before the change.nextValue(DiscountedLineItemPrice nextValue) Value after the change.Value after the change.of()factory method for an instance of SetCustomLineItemDiscountedPriceChangeBuilderof(SetCustomLineItemDiscountedPriceChange template) create builder for SetCustomLineItemDiscountedPriceChange instancepreviousValue(DiscountedLineItemPrice previousValue) Value before the change.Value before the change.Name of the updated CustomLineItem.Value after the change.Value before the change.
-
Constructor Details
-
SetCustomLineItemDiscountedPriceChangeBuilder
public SetCustomLineItemDiscountedPriceChangeBuilder()
-
-
Method Details
-
change
set the value to the change- Parameters:
change- value to be set- Returns:
- Builder
-
customLineItem
public SetCustomLineItemDiscountedPriceChangeBuilder customLineItem(Function<LocalizedStringBuilder, LocalizedStringBuilder> builder) Name of the updated CustomLineItem.
- Parameters:
builder- function to build the customLineItem value- Returns:
- Builder
-
withCustomLineItem
public SetCustomLineItemDiscountedPriceChangeBuilder withCustomLineItem(Function<LocalizedStringBuilder, LocalizedString> builder) Name of the updated CustomLineItem.
- Parameters:
builder- function to build the customLineItem value- Returns:
- Builder
-
customLineItem
Name of the updated CustomLineItem.
- Parameters:
customLineItem- value to be set- Returns:
- Builder
-
customLineItemId
idof the updated CustomLineItem.- Parameters:
customLineItemId- value to be set- Returns:
- Builder
-
previousValue
public SetCustomLineItemDiscountedPriceChangeBuilder previousValue(Function<DiscountedLineItemPriceBuilder, DiscountedLineItemPriceBuilder> builder) Value before the change.
- Parameters:
builder- function to build the previousValue value- Returns:
- Builder
-
withPreviousValue
public SetCustomLineItemDiscountedPriceChangeBuilder withPreviousValue(Function<DiscountedLineItemPriceBuilder, DiscountedLineItemPrice> builder) Value before the change.
- Parameters:
builder- function to build the previousValue value- Returns:
- Builder
-
previousValue
public SetCustomLineItemDiscountedPriceChangeBuilder previousValue(DiscountedLineItemPrice previousValue) Value before the change.
- Parameters:
previousValue- value to be set- Returns:
- Builder
-
nextValue
public SetCustomLineItemDiscountedPriceChangeBuilder nextValue(Function<DiscountedLineItemPriceBuilder, DiscountedLineItemPriceBuilder> builder) Value after the change.
- Parameters:
builder- function to build the nextValue value- Returns:
- Builder
-
withNextValue
public SetCustomLineItemDiscountedPriceChangeBuilder withNextValue(Function<DiscountedLineItemPriceBuilder, DiscountedLineItemPrice> 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
-
getCustomLineItem
Name of the updated CustomLineItem.
- Returns:
- customLineItem
-
getCustomLineItemId
idof the updated CustomLineItem.- Returns:
- customLineItemId
-
getPreviousValue
Value before the change.
- Returns:
- previousValue
-
getNextValue
Value after the change.
- Returns:
- nextValue
-
build
builds SetCustomLineItemDiscountedPriceChange with checking for non-null required values- Specified by:
buildin interfaceBuilder<SetCustomLineItemDiscountedPriceChange>- Returns:
- SetCustomLineItemDiscountedPriceChange
-
buildUnchecked
builds SetCustomLineItemDiscountedPriceChange without checking for non-null required values- Returns:
- SetCustomLineItemDiscountedPriceChange
-
of
factory method for an instance of SetCustomLineItemDiscountedPriceChangeBuilder- Returns:
- builder
-
of
public static SetCustomLineItemDiscountedPriceChangeBuilder of(SetCustomLineItemDiscountedPriceChange template) create builder for SetCustomLineItemDiscountedPriceChange instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-