Class SetCustomLineItemTaxAmountChangeBuilder
java.lang.Object
com.commercetools.history.models.change.SetCustomLineItemTaxAmountChangeBuilder
- All Implemented Interfaces:
Builder<SetCustomLineItemTaxAmountChange>
public class SetCustomLineItemTaxAmountChangeBuilder
extends Object
implements Builder<SetCustomLineItemTaxAmountChange>
SetCustomLineItemTaxAmountChangeBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
SetCustomLineItemTaxAmountChange setCustomLineItemTaxAmountChange = SetCustomLineItemTaxAmountChange.builder()
.change("{change}")
.previousValue(previousValueBuilder -> previousValueBuilder)
.nextValue(nextValueBuilder -> nextValueBuilder)
.customLineItem(customLineItemBuilder -> customLineItemBuilder)
.customLineItemId("{customLineItemId}")
.taxMode(TaxMode.PLATFORM)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds SetCustomLineItemTaxAmountChange with checking for non-null required valuesbuilds SetCustomLineItemTaxAmountChange 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) id
of the updated CustomLineItem.value of change}Name of the updated CustomLineItem.id
of the updated CustomLineItem.Value after the change.Value before the change."ExternalAmount"
Value after the change.nextValue
(Function<TaxRateBuilder, TaxRateBuilder> builder) Value after the change.of()
factory method for an instance of SetCustomLineItemTaxAmountChangeBuilderof
(SetCustomLineItemTaxAmountChange template) create builder for SetCustomLineItemTaxAmountChange instancepreviousValue
(TaxRate previousValue) Value before the change.previousValue
(Function<TaxRateBuilder, TaxRateBuilder> builder) Value before the change."ExternalAmount"
Name of the updated CustomLineItem.withNextValue
(Function<TaxRateBuilder, TaxRate> builder) Value after the change.withPreviousValue
(Function<TaxRateBuilder, TaxRate> builder) Value before the change.
-
Constructor Details
-
SetCustomLineItemTaxAmountChangeBuilder
public SetCustomLineItemTaxAmountChangeBuilder()
-
-
Method Details
-
change
set the value to the change- Parameters:
change
- value to be set- Returns:
- Builder
-
previousValue
public SetCustomLineItemTaxAmountChangeBuilder previousValue(Function<TaxRateBuilder, TaxRateBuilder> builder) Value before the change.
- Parameters:
builder
- function to build the previousValue value- Returns:
- Builder
-
withPreviousValue
public SetCustomLineItemTaxAmountChangeBuilder withPreviousValue(Function<TaxRateBuilder, TaxRate> 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 SetCustomLineItemTaxAmountChangeBuilder nextValue(Function<TaxRateBuilder, TaxRateBuilder> builder) Value after the change.
- Parameters:
builder
- function to build the nextValue value- Returns:
- Builder
-
withNextValue
public SetCustomLineItemTaxAmountChangeBuilder withNextValue(Function<TaxRateBuilder, TaxRate> 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
-
customLineItem
public SetCustomLineItemTaxAmountChangeBuilder customLineItem(Function<LocalizedStringBuilder, LocalizedStringBuilder> builder) Name of the updated CustomLineItem.
- Parameters:
builder
- function to build the customLineItem value- Returns:
- Builder
-
withCustomLineItem
public SetCustomLineItemTaxAmountChangeBuilder 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
id
of the updated CustomLineItem.- Parameters:
customLineItemId
- value to be set- Returns:
- Builder
-
taxMode
"ExternalAmount"
- Parameters:
taxMode
- 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
-
getCustomLineItem
Name of the updated CustomLineItem.
- Returns:
- customLineItem
-
getCustomLineItemId
id
of the updated CustomLineItem.- Returns:
- customLineItemId
-
getTaxMode
"ExternalAmount"
- Returns:
- taxMode
-
build
builds SetCustomLineItemTaxAmountChange with checking for non-null required values- Specified by:
build
in interfaceBuilder<SetCustomLineItemTaxAmountChange>
- Returns:
- SetCustomLineItemTaxAmountChange
-
buildUnchecked
builds SetCustomLineItemTaxAmountChange without checking for non-null required values- Returns:
- SetCustomLineItemTaxAmountChange
-
of
factory method for an instance of SetCustomLineItemTaxAmountChangeBuilder- Returns:
- builder
-
of
create builder for SetCustomLineItemTaxAmountChange instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-