Package com.commercetools.api.models.me
Interface MyCartAddItemShippingAddressAction
- All Superinterfaces:
MyCartUpdateAction,ResourceUpdateAction<MyCartUpdateAction>
Adds an address to the itemShippingAddresses of a Cart. Use this action when shipping is defined per item. For example, when shipping items to multiple addresses or when using different Shipping Methods, even if all items share the same address.
Example to create an instance using the builder pattern
MyCartAddItemShippingAddressAction myCartAddItemShippingAddressAction = MyCartAddItemShippingAddressAction.builder()
.address(addressBuilder -> addressBuilder)
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for MyCartAddItemShippingAddressAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for MyCartAddItemShippingAddressActionbuilder(MyCartAddItemShippingAddressAction template) create builder for MyCartAddItemShippingAddressAction instancecopyDeep()deepCopy(MyCartAddItemShippingAddressAction template) factory method to create a deep copy of MyCartAddItemShippingAddressAction@NotNull @Valid BaseAddressAddress to append toitemShippingAddresses.of()factory methodof(MyCartAddItemShippingAddressAction template) factory method to create a shallow copy MyCartAddItemShippingAddressActionvoidsetAddress(BaseAddress address) Address to append toitemShippingAddresses.static com.fasterxml.jackson.core.type.TypeReference<MyCartAddItemShippingAddressAction>gives a TypeReference for usage with Jackson DataBinddefault <T> Taccessor map functionMethods inherited from interface com.commercetools.api.models.me.MyCartUpdateAction
getAction, withMyCartUpdateActionMethods inherited from interface com.commercetools.api.models.ResourceUpdateAction
get
-
Field Details
-
ADD_ITEM_SHIPPING_ADDRESS
discriminator value for MyCartAddItemShippingAddressAction- See Also:
-
-
Method Details
-
getAddress
Address to append to
itemShippingAddresses.The new address must have a key that is unique across this Cart.
- Returns:
- address
-
setAddress
Address to append to
itemShippingAddresses.The new address must have a key that is unique across this Cart.
- Parameters:
address- value to be set
-
of
factory method- Returns:
- instance of MyCartAddItemShippingAddressAction
-
of
factory method to create a shallow copy MyCartAddItemShippingAddressAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
MyCartAddItemShippingAddressAction copyDeep()- Specified by:
copyDeepin interfaceMyCartUpdateAction
-
deepCopy
@Nullable static MyCartAddItemShippingAddressAction deepCopy(@Nullable MyCartAddItemShippingAddressAction template) factory method to create a deep copy of MyCartAddItemShippingAddressAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for MyCartAddItemShippingAddressAction- Returns:
- builder
-
builder
static MyCartAddItemShippingAddressActionBuilder builder(MyCartAddItemShippingAddressAction template) create builder for MyCartAddItemShippingAddressAction instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withMyCartAddItemShippingAddressAction
default <T> T withMyCartAddItemShippingAddressAction(Function<MyCartAddItemShippingAddressAction, T> helper) accessor map function- Type Parameters:
T- mapped type- Parameters:
helper- function to map the object- Returns:
- mapped value
-
typeReference
static com.fasterxml.jackson.core.type.TypeReference<MyCartAddItemShippingAddressAction> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-