Class CartAddItemShippingAddressActionBuilder
java.lang.Object
com.commercetools.api.models.cart.CartAddItemShippingAddressActionBuilder
- All Implemented Interfaces:
Builder<CartAddItemShippingAddressAction>
public class CartAddItemShippingAddressActionBuilder
extends Object
implements Builder<CartAddItemShippingAddressAction>
CartAddItemShippingAddressActionBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
CartAddItemShippingAddressAction cartAddItemShippingAddressAction = CartAddItemShippingAddressAction.builder()
.address(addressBuilder -> addressBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddress
(BaseAddress address) Address to append toitemShippingAddresses
.address
(Function<BaseAddressBuilder, BaseAddressBuilder> builder) Address to append toitemShippingAddresses
.build()
builds CartAddItemShippingAddressAction with checking for non-null required valuesbuilds CartAddItemShippingAddressAction without checking for non-null required valuesAddress to append toitemShippingAddresses
.of()
factory method for an instance of CartAddItemShippingAddressActionBuilderof
(CartAddItemShippingAddressAction template) create builder for CartAddItemShippingAddressAction instancewithAddress
(Function<BaseAddressBuilder, BaseAddress> builder) Address to append toitemShippingAddresses
.
-
Constructor Details
-
CartAddItemShippingAddressActionBuilder
public CartAddItemShippingAddressActionBuilder()
-
-
Method Details
-
address
public CartAddItemShippingAddressActionBuilder address(Function<BaseAddressBuilder, BaseAddressBuilder> builder) Address to append to
itemShippingAddresses
.The new Address must have a
key
that is unique across this Cart.- Parameters:
builder
- function to build the address value- Returns:
- Builder
-
withAddress
public CartAddItemShippingAddressActionBuilder withAddress(Function<BaseAddressBuilder, BaseAddress> builder) Address to append to
itemShippingAddresses
.The new Address must have a
key
that is unique across this Cart.- Parameters:
builder
- function to build the address value- Returns:
- Builder
-
address
Address to append to
itemShippingAddresses
.The new Address must have a
key
that is unique across this Cart.- Parameters:
address
- value to be set- Returns:
- Builder
-
getAddress
Address to append to
itemShippingAddresses
.The new Address must have a
key
that is unique across this Cart.- Returns:
- address
-
build
builds CartAddItemShippingAddressAction with checking for non-null required values- Specified by:
build
in interfaceBuilder<CartAddItemShippingAddressAction>
- Returns:
- CartAddItemShippingAddressAction
-
buildUnchecked
builds CartAddItemShippingAddressAction without checking for non-null required values- Returns:
- CartAddItemShippingAddressAction
-
of
factory method for an instance of CartAddItemShippingAddressActionBuilder- Returns:
- builder
-
of
create builder for CartAddItemShippingAddressAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-