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
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for CartSetCustomerIdAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for CartSetCustomerIdActionbuilder(CartSetCustomerIdAction template) create builder for CartSetCustomerIdAction instancecopyDeep()static CartSetCustomerIdActiondeepCopy(CartSetCustomerIdAction template) factory method to create a deep copy of CartSetCustomerIdActionidof an existing Customer.static CartSetCustomerIdActionof()factory methodstatic CartSetCustomerIdActionof(CartSetCustomerIdAction template) factory method to create a shallow copy CartSetCustomerIdActionvoidsetCustomerId(String customerId) idof an existing Customer.static com.fasterxml.jackson.core.type.TypeReference<CartSetCustomerIdAction>gives a TypeReference for usage with Jackson DataBinddefault <T> Taccessor map functionMethods inherited from interface com.commercetools.api.models.cart.CartUpdateAction
getAction, withCartUpdateActionMethods 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()idof an existing Customer. If the Customer is assigned to a CustomerGroup, this update action also sets the value for thecustomerGroupfield. If empty, the update action removes the value for bothcustomerIdandcustomerGroup.- Returns:
- customerId
-
setCustomerId
idof an existing Customer. If the Customer is assigned to a CustomerGroup, this update action also sets the value for thecustomerGroupfield. If empty, the update action removes the value for bothcustomerIdandcustomerGroup.- 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
-
copyDeep
CartSetCustomerIdAction copyDeep()- Specified by:
copyDeepin interfaceCartUpdateAction
-
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
-