Class CartSetLineItemTaxAmountActionBuilder
java.lang.Object
com.commercetools.api.models.cart.CartSetLineItemTaxAmountActionBuilder
- All Implemented Interfaces:
Builder<CartSetLineItemTaxAmountAction>
public class CartSetLineItemTaxAmountActionBuilder
extends Object
implements Builder<CartSetLineItemTaxAmountAction>
CartSetLineItemTaxAmountActionBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
CartSetLineItemTaxAmountAction cartSetLineItemTaxAmountAction = CartSetLineItemTaxAmountAction.builder()
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds CartSetLineItemTaxAmountAction with checking for non-null required valuesbuilds CartSetLineItemTaxAmountAction without checking for non-null required valuesexternalTaxAmount
(ExternalTaxAmountDraft externalTaxAmount) Value to set.Value to set.Value to set.id
of the LineItem to update.key
of the LineItem to update.key
of the ShippingMethod used for this Line Item.lineItemId
(String lineItemId) id
of the LineItem to update.lineItemKey
(String lineItemKey) key
of the LineItem to update.of()
factory method for an instance of CartSetLineItemTaxAmountActionBuilderof
(CartSetLineItemTaxAmountAction template) create builder for CartSetLineItemTaxAmountAction instanceshippingKey
(String shippingKey) key
of the ShippingMethod used for this Line Item.Value to set.
-
Constructor Details
-
CartSetLineItemTaxAmountActionBuilder
public CartSetLineItemTaxAmountActionBuilder()
-
-
Method Details
-
lineItemId
id
of the LineItem to update. EitherlineItemId
orlineItemKey
is required.- Parameters:
lineItemId
- value to be set- Returns:
- Builder
-
lineItemKey
key
of the LineItem to update. EitherlineItemId
orlineItemKey
is required.- Parameters:
lineItemKey
- value to be set- Returns:
- Builder
-
externalTaxAmount
public CartSetLineItemTaxAmountActionBuilder externalTaxAmount(Function<ExternalTaxAmountDraftBuilder, ExternalTaxAmountDraftBuilder> builder) Value to set. If empty, any existing value is removed.
- Parameters:
builder
- function to build the externalTaxAmount value- Returns:
- Builder
-
withExternalTaxAmount
public CartSetLineItemTaxAmountActionBuilder withExternalTaxAmount(Function<ExternalTaxAmountDraftBuilder, ExternalTaxAmountDraft> builder) Value to set. If empty, any existing value is removed.
- Parameters:
builder
- function to build the externalTaxAmount value- Returns:
- Builder
-
externalTaxAmount
public CartSetLineItemTaxAmountActionBuilder externalTaxAmount(@Nullable ExternalTaxAmountDraft externalTaxAmount) Value to set. If empty, any existing value is removed.
- Parameters:
externalTaxAmount
- value to be set- Returns:
- Builder
-
shippingKey
key
of the ShippingMethod used for this Line Item. This is required for Carts withMultiple
ShippingMode.- Parameters:
shippingKey
- value to be set- Returns:
- Builder
-
getLineItemId
id
of the LineItem to update. EitherlineItemId
orlineItemKey
is required.- Returns:
- lineItemId
-
getLineItemKey
key
of the LineItem to update. EitherlineItemId
orlineItemKey
is required.- Returns:
- lineItemKey
-
getExternalTaxAmount
Value to set. If empty, any existing value is removed.
- Returns:
- externalTaxAmount
-
getShippingKey
key
of the ShippingMethod used for this Line Item. This is required for Carts withMultiple
ShippingMode.- Returns:
- shippingKey
-
build
builds CartSetLineItemTaxAmountAction with checking for non-null required values- Specified by:
build
in interfaceBuilder<CartSetLineItemTaxAmountAction>
- Returns:
- CartSetLineItemTaxAmountAction
-
buildUnchecked
builds CartSetLineItemTaxAmountAction without checking for non-null required values- Returns:
- CartSetLineItemTaxAmountAction
-
of
factory method for an instance of CartSetLineItemTaxAmountActionBuilder- Returns:
- builder
-
of
create builder for CartSetLineItemTaxAmountAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-