Class SetReturnItemLineItemCustomTypeChangeBuilder
java.lang.Object
com.commercetools.history.models.change.SetReturnItemLineItemCustomTypeChangeBuilder
- All Implemented Interfaces:
Builder<SetReturnItemLineItemCustomTypeChange>
public class SetReturnItemLineItemCustomTypeChangeBuilder
extends Object
implements Builder<SetReturnItemLineItemCustomTypeChange>
SetReturnItemLineItemCustomTypeChangeBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
SetReturnItemLineItemCustomTypeChange setReturnItemLineItemCustomTypeChange = SetReturnItemLineItemCustomTypeChange.builder()
.change("{change}")
.variant("{variant}")
.lineItem(lineItemBuilder -> lineItemBuilder)
.lineItemId("{lineItemId}")
.previousValue(previousValueBuilder -> previousValueBuilder)
.nextValue(nextValueBuilder -> nextValueBuilder)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds SetReturnItemLineItemCustomTypeChange with checking for non-null required valuesbuilds SetReturnItemLineItemCustomTypeChange 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.idof the updated LineItem.Value after the change.Value before the change.Identifier of the updated Product Variant.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) idof the updated LineItem.nextValue(CustomFields nextValue) Value after the change.Value after the change.of()factory method for an instance of SetReturnItemLineItemCustomTypeChangeBuilderof(SetReturnItemLineItemCustomTypeChange template) create builder for SetReturnItemLineItemCustomTypeChange instancepreviousValue(CustomFields previousValue) Value before the change.Value before the change.Identifier of the updated Product Variant.Name of the Product the updated Line Item is based on.withNextValue(Function<CustomFieldsBuilder, CustomFields> builder) Value after the change.Value before the change.
-
Constructor Details
-
SetReturnItemLineItemCustomTypeChangeBuilder
public SetReturnItemLineItemCustomTypeChangeBuilder()
-
-
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 SetReturnItemLineItemCustomTypeChangeBuilder 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 SetReturnItemLineItemCustomTypeChangeBuilder 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
idof the updated LineItem.- Parameters:
lineItemId- value to be set- Returns:
- Builder
-
previousValue
public SetReturnItemLineItemCustomTypeChangeBuilder previousValue(Function<CustomFieldsBuilder, CustomFieldsBuilder> builder) Value before the change.
- Parameters:
builder- function to build the previousValue value- Returns:
- Builder
-
withPreviousValue
public SetReturnItemLineItemCustomTypeChangeBuilder withPreviousValue(Function<CustomFieldsBuilder, CustomFields> 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
-
nextValue
public SetReturnItemLineItemCustomTypeChangeBuilder nextValue(Function<CustomFieldsBuilder, CustomFieldsBuilder> builder) Value after the change.
- Parameters:
builder- function to build the nextValue value- Returns:
- Builder
-
withNextValue
public SetReturnItemLineItemCustomTypeChangeBuilder withNextValue(Function<CustomFieldsBuilder, CustomFields> 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
-
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 Product the updated Line Item is based on.
- 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 SetReturnItemLineItemCustomTypeChange with checking for non-null required values- Specified by:
buildin interfaceBuilder<SetReturnItemLineItemCustomTypeChange>- Returns:
- SetReturnItemLineItemCustomTypeChange
-
buildUnchecked
builds SetReturnItemLineItemCustomTypeChange without checking for non-null required values- Returns:
- SetReturnItemLineItemCustomTypeChange
-
of
factory method for an instance of SetReturnItemLineItemCustomTypeChangeBuilder- Returns:
- builder
-
of
public static SetReturnItemLineItemCustomTypeChangeBuilder of(SetReturnItemLineItemCustomTypeChange template) create builder for SetReturnItemLineItemCustomTypeChange instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-