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
Constructors -
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.idof the LineItem to update.keyof the LineItem to update.keyof the ShippingMethod used for this Line Item.lineItemId(String lineItemId) idof the LineItem to update.lineItemKey(String lineItemKey) keyof the LineItem to update.of()factory method for an instance of CartSetLineItemTaxRateActionBuilderof(CartSetLineItemTaxRateAction template) create builder for CartSetLineItemTaxRateAction instanceshippingKey(String shippingKey) keyof the ShippingMethod used for this Line Item.Value to set.
-
Constructor Details
-
CartSetLineItemTaxRateActionBuilder
public CartSetLineItemTaxRateActionBuilder()
-
-
Method Details
-
lineItemId
idof the LineItem to update. EitherlineItemIdorlineItemKeyis required.- Parameters:
lineItemId- value to be set- Returns:
- Builder
-
lineItemKey
keyof the LineItem to update. EitherlineItemIdorlineItemKeyis 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
keyof the ShippingMethod used for this Line Item. This is required for Carts withMultipleShippingMode.- Parameters:
shippingKey- value to be set- Returns:
- Builder
-
getLineItemId
idof the LineItem to update. EitherlineItemIdorlineItemKeyis required.- Returns:
- lineItemId
-
getLineItemKey
keyof the LineItem to update. EitherlineItemIdorlineItemKeyis required.- Returns:
- lineItemKey
-
getExternalTaxRate
Value to set. If empty, any existing value is removed.
- Returns:
- externalTaxRate
-
getShippingKey
keyof the ShippingMethod used for this Line Item. This is required for Carts withMultipleShippingMode.- Returns:
- shippingKey
-
build
builds CartSetLineItemTaxRateAction with checking for non-null required values- Specified by:
buildin 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
-