Interface CartSetAnonymousIdAction
- All Superinterfaces:
CartUpdateAction
,ResourceUpdateAction<CartUpdateAction>
If the Cart is already associated with a Customer, an InvalidOperation error is returned.
Example to create an instance using the builder pattern
CartSetAnonymousIdAction cartSetAnonymousIdAction = CartSetAnonymousIdAction.builder()
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for CartSetAnonymousIdAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for CartSetAnonymousIdActionbuilder
(CartSetAnonymousIdAction template) create builder for CartSetAnonymousIdAction instancestatic CartSetAnonymousIdAction
deepCopy
(CartSetAnonymousIdAction template) factory method to create a deep copy of CartSetAnonymousIdActionValue to set.static CartSetAnonymousIdAction
of()
factory methodstatic CartSetAnonymousIdAction
of
(CartSetAnonymousIdAction template) factory method to create a shallow copy CartSetAnonymousIdActionvoid
setAnonymousId
(String anonymousId) Value to set.static com.fasterxml.jackson.core.type.TypeReference<CartSetAnonymousIdAction>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map functionMethods inherited from interface com.commercetools.api.models.cart.CartUpdateAction
getAction, withCartUpdateAction
Methods inherited from interface com.commercetools.api.models.ResourceUpdateAction
get
-
Field Details
-
SET_ANONYMOUS_ID
discriminator value for CartSetAnonymousIdAction- See Also:
-
-
Method Details
-
getAnonymousId
String getAnonymousId()Value to set. If empty, any existing value is removed.
- Returns:
- anonymousId
-
setAnonymousId
Value to set. If empty, any existing value is removed.
- Parameters:
anonymousId
- value to be set
-
of
factory method- Returns:
- instance of CartSetAnonymousIdAction
-
of
factory method to create a shallow copy CartSetAnonymousIdAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of CartSetAnonymousIdAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for CartSetAnonymousIdAction- Returns:
- builder
-
builder
create builder for CartSetAnonymousIdAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withCartSetAnonymousIdAction
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-