Class CartSetEstimatedDeliveryActionBuilder
java.lang.Object
com.commercetools.api.models.cart.CartSetEstimatedDeliveryActionBuilder
- All Implemented Interfaces:
Builder<CartSetEstimatedDeliveryAction>
public class CartSetEstimatedDeliveryActionBuilder
extends Object
implements Builder<CartSetEstimatedDeliveryAction>
CartSetEstimatedDeliveryActionBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
CartSetEstimatedDeliveryAction cartSetEstimatedDeliveryAction = CartSetEstimatedDeliveryAction.builder()
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds CartSetEstimatedDeliveryAction with checking for non-null required valuesbuilds CartSetEstimatedDeliveryAction without checking for non-null required valuesestimatedDelivery(EstimatedDelivery estimatedDelivery) Value to set.Value to set.Value to set.keyof the Shipping to update.of()factory method for an instance of CartSetEstimatedDeliveryActionBuilderof(CartSetEstimatedDeliveryAction template) create builder for CartSetEstimatedDeliveryAction instanceshippingKey(String shippingKey) keyof the Shipping to update.Value to set.
-
Constructor Details
-
CartSetEstimatedDeliveryActionBuilder
public CartSetEstimatedDeliveryActionBuilder()
-
-
Method Details
-
shippingKey
keyof the Shipping to update. This is required and valid only for Carts withMultipleShippingMode. An InvalidOperation error is returned ifshippingKeyis provided for Carts withSingleShippingMode, or omitted for Carts withMultipleShippingMode.- Parameters:
shippingKey- value to be set- Returns:
- Builder
-
estimatedDelivery
public CartSetEstimatedDeliveryActionBuilder estimatedDelivery(Function<EstimatedDeliveryBuilder, EstimatedDeliveryBuilder> builder) Value to set. If empty, any existing value is removed.
- Parameters:
builder- function to build the estimatedDelivery value- Returns:
- Builder
-
withEstimatedDelivery
public CartSetEstimatedDeliveryActionBuilder withEstimatedDelivery(Function<EstimatedDeliveryBuilder, EstimatedDelivery> builder) Value to set. If empty, any existing value is removed.
- Parameters:
builder- function to build the estimatedDelivery value- Returns:
- Builder
-
estimatedDelivery
public CartSetEstimatedDeliveryActionBuilder estimatedDelivery(@Nullable EstimatedDelivery estimatedDelivery) Value to set. If empty, any existing value is removed.
- Parameters:
estimatedDelivery- value to be set- Returns:
- Builder
-
getShippingKey
keyof the Shipping to update. This is required and valid only for Carts withMultipleShippingMode. An InvalidOperation error is returned ifshippingKeyis provided for Carts withSingleShippingMode, or omitted for Carts withMultipleShippingMode.- Returns:
- shippingKey
-
getEstimatedDelivery
Value to set. If empty, any existing value is removed.
- Returns:
- estimatedDelivery
-
build
builds CartSetEstimatedDeliveryAction with checking for non-null required values- Specified by:
buildin interfaceBuilder<CartSetEstimatedDeliveryAction>- Returns:
- CartSetEstimatedDeliveryAction
-
buildUnchecked
builds CartSetEstimatedDeliveryAction without checking for non-null required values- Returns:
- CartSetEstimatedDeliveryAction
-
of
factory method for an instance of CartSetEstimatedDeliveryActionBuilder- Returns:
- builder
-
of
create builder for CartSetEstimatedDeliveryAction instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-