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