Class CartSetLineItemTaxRateActionBuilder
java.lang.Object
com.commercetools.api.models.cart.CartSetLineItemTaxRateActionBuilder
- All Implemented Interfaces:
Builder<CartSetLineItemTaxRateAction>
public class CartSetLineItemTaxRateActionBuilder
extends Object
implements Builder<CartSetLineItemTaxRateAction>
CartSetLineItemTaxRateActionBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
CartSetLineItemTaxRateAction cartSetLineItemTaxRateAction = CartSetLineItemTaxRateAction.builder()
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds CartSetLineItemTaxRateAction with checking for non-null required valuesbuilds CartSetLineItemTaxRateAction without checking for non-null required valuesexternalTaxRate
(ExternalTaxRateDraft externalTaxRate) 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 CartSetLineItemTaxRateActionBuilderof
(CartSetLineItemTaxRateAction template) create builder for CartSetLineItemTaxRateAction instanceshippingKey
(String shippingKey) key
of the ShippingMethod used for this Line Item.Value to set.
-
Constructor Details
-
CartSetLineItemTaxRateActionBuilder
public CartSetLineItemTaxRateActionBuilder()
-
-
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
-
externalTaxRate
public CartSetLineItemTaxRateActionBuilder externalTaxRate(Function<ExternalTaxRateDraftBuilder, ExternalTaxRateDraftBuilder> builder) Value to set. If empty, any existing value is removed.
- Parameters:
builder
- function to build the externalTaxRate value- Returns:
- Builder
-
withExternalTaxRate
public CartSetLineItemTaxRateActionBuilder withExternalTaxRate(Function<ExternalTaxRateDraftBuilder, ExternalTaxRateDraft> builder) Value to set. If empty, any existing value is removed.
- Parameters:
builder
- function to build the externalTaxRate value- Returns:
- Builder
-
externalTaxRate
public CartSetLineItemTaxRateActionBuilder externalTaxRate(@Nullable ExternalTaxRateDraft externalTaxRate) Value to set. If empty, any existing value is removed.
- Parameters:
externalTaxRate
- 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
-
getExternalTaxRate
Value to set. If empty, any existing value is removed.
- Returns:
- externalTaxRate
-
getShippingKey
key
of the ShippingMethod used for this Line Item. This is required for Carts withMultiple
ShippingMode.- Returns:
- shippingKey
-
build
builds CartSetLineItemTaxRateAction with checking for non-null required values- Specified by:
build
in interfaceBuilder<CartSetLineItemTaxRateAction>
- Returns:
- CartSetLineItemTaxRateAction
-
buildUnchecked
builds CartSetLineItemTaxRateAction without checking for non-null required values- Returns:
- CartSetLineItemTaxRateAction
-
of
factory method for an instance of CartSetLineItemTaxRateActionBuilder- Returns:
- builder
-
of
create builder for CartSetLineItemTaxRateAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-