Class CartSetLineItemShippingDetailsActionBuilder
java.lang.Object
com.commercetools.api.models.cart.CartSetLineItemShippingDetailsActionBuilder
- All Implemented Interfaces:
Builder<CartSetLineItemShippingDetailsAction>
public class CartSetLineItemShippingDetailsActionBuilder
extends Object
implements Builder<CartSetLineItemShippingDetailsAction>
CartSetLineItemShippingDetailsActionBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
CartSetLineItemShippingDetailsAction cartSetLineItemShippingDetailsAction = CartSetLineItemShippingDetailsAction.builder()
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds CartSetLineItemShippingDetailsAction with checking for non-null required valuesbuilds CartSetLineItemShippingDetailsAction without checking for non-null required valuesid
of the LineItem to update.key
of the LineItem to update.Value to set.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 CartSetLineItemShippingDetailsActionBuilderof
(CartSetLineItemShippingDetailsAction template) create builder for CartSetLineItemShippingDetailsAction instanceshippingDetails
(ItemShippingDetailsDraft shippingDetails) Value to set.Value to set.Value to set.
-
Constructor Details
-
CartSetLineItemShippingDetailsActionBuilder
public CartSetLineItemShippingDetailsActionBuilder()
-
-
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
-
shippingDetails
public CartSetLineItemShippingDetailsActionBuilder shippingDetails(Function<ItemShippingDetailsDraftBuilder, ItemShippingDetailsDraftBuilder> builder) Value to set. If empty, the existing value is removed.
- Parameters:
builder
- function to build the shippingDetails value- Returns:
- Builder
-
withShippingDetails
public CartSetLineItemShippingDetailsActionBuilder withShippingDetails(Function<ItemShippingDetailsDraftBuilder, ItemShippingDetailsDraft> builder) Value to set. If empty, the existing value is removed.
- Parameters:
builder
- function to build the shippingDetails value- Returns:
- Builder
-
shippingDetails
public CartSetLineItemShippingDetailsActionBuilder shippingDetails(@Nullable ItemShippingDetailsDraft shippingDetails) Value to set. If empty, the existing value is removed.
- Parameters:
shippingDetails
- 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
-
getShippingDetails
Value to set. If empty, the existing value is removed.
- Returns:
- shippingDetails
-
build
builds CartSetLineItemShippingDetailsAction with checking for non-null required values- Specified by:
build
in interfaceBuilder<CartSetLineItemShippingDetailsAction>
- Returns:
- CartSetLineItemShippingDetailsAction
-
buildUnchecked
builds CartSetLineItemShippingDetailsAction without checking for non-null required values- Returns:
- CartSetLineItemShippingDetailsAction
-
of
factory method for an instance of CartSetLineItemShippingDetailsActionBuilder- Returns:
- builder
-
of
public static CartSetLineItemShippingDetailsActionBuilder of(CartSetLineItemShippingDetailsAction template) create builder for CartSetLineItemShippingDetailsAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-