Class ChangeLineItemQuantityChangeBuilder
java.lang.Object
com.commercetools.history.models.change.ChangeLineItemQuantityChangeBuilder
- All Implemented Interfaces:
Builder<ChangeLineItemQuantityChange>
public class ChangeLineItemQuantityChangeBuilder
extends Object
implements Builder<ChangeLineItemQuantityChange>
ChangeLineItemQuantityChangeBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ChangeLineItemQuantityChange changeLineItemQuantityChange = ChangeLineItemQuantityChange.builder()
.change("{change}")
.previousValue(1)
.nextValue(1)
.lineItem(lineItemBuilder -> lineItemBuilder)
.lineItemId("{lineItemId}")
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds ChangeLineItemQuantityChange with checking for non-null required valuesbuilds ChangeLineItemQuantityChange without checking for non-null required valuesset the value to the changevalue of change}Name of the Product the updated Line Item is based on.id
of the updated LineItem.Value after the changeValue before the change.lineItem
(LocalizedString lineItem) Name of the Product the updated Line Item is based on.Name of the Product the updated Line Item is based on.lineItemId
(String lineItemId) id
of the updated LineItem.Value after the changeof()
factory method for an instance of ChangeLineItemQuantityChangeBuilderof
(ChangeLineItemQuantityChange template) create builder for ChangeLineItemQuantityChange instancepreviousValue
(Integer previousValue) Value before the change.Name of the Product the updated Line Item is based on.
-
Constructor Details
-
ChangeLineItemQuantityChangeBuilder
public ChangeLineItemQuantityChangeBuilder()
-
-
Method Details
-
change
set the value to the change- Parameters:
change
- 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
-
lineItem
public ChangeLineItemQuantityChangeBuilder lineItem(Function<LocalizedStringBuilder, LocalizedStringBuilder> builder) Name of the Product the updated Line Item is based on.
- Parameters:
builder
- function to build the lineItem value- Returns:
- Builder
-
withLineItem
public ChangeLineItemQuantityChangeBuilder withLineItem(Function<LocalizedStringBuilder, LocalizedString> builder) Name of the Product the updated Line Item is based on.
- Parameters:
builder
- function to build the lineItem value- Returns:
- Builder
-
lineItem
Name of the Product the updated Line Item is based on.
- Parameters:
lineItem
- value to be set- Returns:
- Builder
-
lineItemId
id
of the updated LineItem.- Parameters:
lineItemId
- value to be set- Returns:
- Builder
-
getChange
value of change}- Returns:
- change
-
getPreviousValue
Value before the change.
- Returns:
- previousValue
-
getNextValue
Value after the change
- Returns:
- nextValue
-
getLineItem
Name of the Product the updated Line Item is based on.
- Returns:
- lineItem
-
getLineItemId
id
of the updated LineItem.- Returns:
- lineItemId
-
build
builds ChangeLineItemQuantityChange with checking for non-null required values- Specified by:
build
in interfaceBuilder<ChangeLineItemQuantityChange>
- Returns:
- ChangeLineItemQuantityChange
-
buildUnchecked
builds ChangeLineItemQuantityChange without checking for non-null required values- Returns:
- ChangeLineItemQuantityChange
-
of
factory method for an instance of ChangeLineItemQuantityChangeBuilder- Returns:
- builder
-
of
create builder for ChangeLineItemQuantityChange instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-