Class ChangeLineItemPriceRoundingModeChangeBuilder
java.lang.Object
com.commercetools.history.models.change.ChangeLineItemPriceRoundingModeChangeBuilder
- All Implemented Interfaces:
Builder<ChangeLineItemPriceRoundingModeChange>
public class ChangeLineItemPriceRoundingModeChangeBuilder
extends Object
implements Builder<ChangeLineItemPriceRoundingModeChange>
ChangeLineItemPriceRoundingModeChangeBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ChangeLineItemPriceRoundingModeChange changeLineItemPriceRoundingModeChange = ChangeLineItemPriceRoundingModeChange.builder()
.change("{change}")
.variant("{variant}")
.lineItem(lineItemBuilder -> lineItemBuilder)
.lineItemId("{lineItemId}")
.previousValue(RoundingMode.HALF_EVEN)
.nextValue(RoundingMode.HALF_EVEN)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds ChangeLineItemPriceRoundingModeChange with checking for non-null required valuesbuilds ChangeLineItemPriceRoundingModeChange without checking for non-null required valuesset the value to the changevalue of change}Name of the updated LineItem.idof the updated LineItem.Value after the change.Value before the change.Identifier of the updated Product Variant.lineItem(LocalizedString lineItem) Name of the updated LineItem.Name of the updated LineItem.lineItemId(String lineItemId) idof the updated LineItem.nextValue(RoundingMode nextValue) Value after the change.of()factory method for an instance of ChangeLineItemPriceRoundingModeChangeBuilderof(ChangeLineItemPriceRoundingModeChange template) create builder for ChangeLineItemPriceRoundingModeChange instancepreviousValue(RoundingMode previousValue) Value before the change.Identifier of the updated Product Variant.Name of the updated LineItem.
-
Constructor Details
-
ChangeLineItemPriceRoundingModeChangeBuilder
public ChangeLineItemPriceRoundingModeChangeBuilder()
-
-
Method Details
-
change
set the value to the change- Parameters:
change- value to be set- Returns:
- Builder
-
variant
Identifier of the updated Product Variant.
This field holds the SKU, if defined; otherwise the key; otherwise the ID.
- Parameters:
variant- value to be set- Returns:
- Builder
-
lineItem
public ChangeLineItemPriceRoundingModeChangeBuilder lineItem(Function<LocalizedStringBuilder, LocalizedStringBuilder> builder) Name of the updated LineItem.
- Parameters:
builder- function to build the lineItem value- Returns:
- Builder
-
withLineItem
public ChangeLineItemPriceRoundingModeChangeBuilder withLineItem(Function<LocalizedStringBuilder, LocalizedString> builder) Name of the updated LineItem.
- Parameters:
builder- function to build the lineItem value- Returns:
- Builder
-
lineItem
Name of the updated LineItem.
- Parameters:
lineItem- value to be set- Returns:
- Builder
-
lineItemId
idof the updated LineItem.- Parameters:
lineItemId- value to be set- Returns:
- Builder
-
previousValue
Value before the change.
- Parameters:
previousValue- value to be set- Returns:
- Builder
-
nextValue
Value after the change.
- Parameters:
nextValue- value to be set- Returns:
- Builder
-
getChange
value of change}- Returns:
- change
-
getVariant
Identifier of the updated Product Variant.
This field holds the SKU, if defined; otherwise the key; otherwise the ID.
- Returns:
- variant
-
getLineItem
Name of the updated LineItem.
- Returns:
- lineItem
-
getLineItemId
idof the updated LineItem.- Returns:
- lineItemId
-
getPreviousValue
Value before the change.
- Returns:
- previousValue
-
getNextValue
Value after the change.
- Returns:
- nextValue
-
build
builds ChangeLineItemPriceRoundingModeChange with checking for non-null required values- Specified by:
buildin interfaceBuilder<ChangeLineItemPriceRoundingModeChange>- Returns:
- ChangeLineItemPriceRoundingModeChange
-
buildUnchecked
builds ChangeLineItemPriceRoundingModeChange without checking for non-null required values- Returns:
- ChangeLineItemPriceRoundingModeChange
-
of
factory method for an instance of ChangeLineItemPriceRoundingModeChangeBuilder- Returns:
- builder
-
of
public static ChangeLineItemPriceRoundingModeChangeBuilder of(ChangeLineItemPriceRoundingModeChange template) create builder for ChangeLineItemPriceRoundingModeChange instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-