Interface CartSetCustomerGroupAction
- All Superinterfaces:
CartUpdateAction
,ResourceUpdateAction<CartUpdateAction>
This update action can only be used if a Customer is not assigned to the Cart. If a Customer is already assigned, the Cart uses the Customer Group of the assigned Customer.
To reflect the new Customer Group, this update action can result in updates to the Cart. When this occurs, the following errors can be returned: MatchingPriceNotFound and MissingTaxRateForCountry.
Example to create an instance using the builder pattern
CartSetCustomerGroupAction cartSetCustomerGroupAction = CartSetCustomerGroupAction.builder()
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for CartSetCustomerGroupAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for CartSetCustomerGroupActionbuilder
(CartSetCustomerGroupAction template) create builder for CartSetCustomerGroupAction instancestatic CartSetCustomerGroupAction
deepCopy
(CartSetCustomerGroupAction template) factory method to create a deep copy of CartSetCustomerGroupActionValue to set.static CartSetCustomerGroupAction
of()
factory methodstatic CartSetCustomerGroupAction
of
(CartSetCustomerGroupAction template) factory method to create a shallow copy CartSetCustomerGroupActionvoid
setCustomerGroup
(CustomerGroupResourceIdentifier customerGroup) Value to set.static com.fasterxml.jackson.core.type.TypeReference<CartSetCustomerGroupAction>
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_GROUP
discriminator value for CartSetCustomerGroupAction- See Also:
-
-
Method Details
-
getCustomerGroup
Value to set. If empty, any existing value is removed.
- Returns:
- customerGroup
-
setCustomerGroup
Value to set. If empty, any existing value is removed.
- Parameters:
customerGroup
- value to be set
-
of
factory method- Returns:
- instance of CartSetCustomerGroupAction
-
of
factory method to create a shallow copy CartSetCustomerGroupAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of CartSetCustomerGroupAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for CartSetCustomerGroupAction- Returns:
- builder
-
builder
create builder for CartSetCustomerGroupAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withCartSetCustomerGroupAction
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
-