Interface CartSetCustomerIdAction
- All Superinterfaces:
CartUpdateAction
,ResourceUpdateAction<CartUpdateAction>
Setting the Cart's customerId
can lead to updates on all its LineItem prices
.
If the Customer with the specified id
cannot be found, this update action returns a ReferencedResourceNotFound error.
Example to create an instance using the builder pattern
CartSetCustomerIdAction cartSetCustomerIdAction = CartSetCustomerIdAction.builder()
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for CartSetCustomerIdAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for CartSetCustomerIdActionbuilder
(CartSetCustomerIdAction template) create builder for CartSetCustomerIdAction instancestatic CartSetCustomerIdAction
deepCopy
(CartSetCustomerIdAction template) factory method to create a deep copy of CartSetCustomerIdActionid
of an existing Customer.static CartSetCustomerIdAction
of()
factory methodstatic CartSetCustomerIdAction
of
(CartSetCustomerIdAction template) factory method to create a shallow copy CartSetCustomerIdActionvoid
setCustomerId
(String customerId) id
of an existing Customer.static com.fasterxml.jackson.core.type.TypeReference<CartSetCustomerIdAction>
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_CUSTOMER_ID
discriminator value for CartSetCustomerIdAction- See Also:
-
-
Method Details
-
getCustomerId
String getCustomerId()id
of an existing Customer. If the Customer is assigned to a CustomerGroup, this update action also sets the value for thecustomerGroup
field. If empty, the update action removes the value for bothcustomerId
andcustomerGroup
.- Returns:
- customerId
-
setCustomerId
id
of an existing Customer. If the Customer is assigned to a CustomerGroup, this update action also sets the value for thecustomerGroup
field. If empty, the update action removes the value for bothcustomerId
andcustomerGroup
.- Parameters:
customerId
- value to be set
-
of
factory method- Returns:
- instance of CartSetCustomerIdAction
-
of
factory method to create a shallow copy CartSetCustomerIdAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of CartSetCustomerIdAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for CartSetCustomerIdAction- Returns:
- builder
-
builder
create builder for CartSetCustomerIdAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withCartSetCustomerIdAction
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
-