Package com.commercetools.api.models.me
Interface MyCartSetBusinessUnitAction
- All Superinterfaces:
MyCartUpdateAction
,ResourceUpdateAction<MyCartUpdateAction>
Updates the Business Unit on the Cart. The Cart must have an existing Business Unit assigned already.
Example to create an instance using the builder pattern
MyCartSetBusinessUnitAction myCartSetBusinessUnitAction = MyCartSetBusinessUnitAction.builder()
.businessUnit(businessUnitBuilder -> businessUnitBuilder)
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for MyCartSetBusinessUnitAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for MyCartSetBusinessUnitActionbuilder
(MyCartSetBusinessUnitAction template) create builder for MyCartSetBusinessUnitAction instancestatic MyCartSetBusinessUnitAction
deepCopy
(MyCartSetBusinessUnitAction template) factory method to create a deep copy of MyCartSetBusinessUnitAction@NotNull @Valid BusinessUnitResourceIdentifier
New Business Unit to assign to the Cart, which must have access to the Store that is set on the Cart.static MyCartSetBusinessUnitAction
of()
factory methodstatic MyCartSetBusinessUnitAction
of
(MyCartSetBusinessUnitAction template) factory method to create a shallow copy MyCartSetBusinessUnitActionvoid
setBusinessUnit
(BusinessUnitResourceIdentifier businessUnit) New Business Unit to assign to the Cart, which must have access to the Store that is set on the Cart.static com.fasterxml.jackson.core.type.TypeReference<MyCartSetBusinessUnitAction>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map functionMethods inherited from interface com.commercetools.api.models.me.MyCartUpdateAction
getAction, withMyCartUpdateAction
Methods inherited from interface com.commercetools.api.models.ResourceUpdateAction
get
-
Field Details
-
SET_BUSINESS_UNIT
discriminator value for MyCartSetBusinessUnitAction- See Also:
-
-
Method Details
-
getBusinessUnit
New Business Unit to assign to the Cart, which must have access to the Store that is set on the Cart. Additionally, the authenticated user must be an Associate in the Business Unit.
- Returns:
- businessUnit
-
setBusinessUnit
New Business Unit to assign to the Cart, which must have access to the Store that is set on the Cart. Additionally, the authenticated user must be an Associate in the Business Unit.
- Parameters:
businessUnit
- value to be set
-
of
factory method- Returns:
- instance of MyCartSetBusinessUnitAction
-
of
factory method to create a shallow copy MyCartSetBusinessUnitAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static MyCartSetBusinessUnitAction deepCopy(@Nullable MyCartSetBusinessUnitAction template) factory method to create a deep copy of MyCartSetBusinessUnitAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for MyCartSetBusinessUnitAction- Returns:
- builder
-
builder
create builder for MyCartSetBusinessUnitAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withMyCartSetBusinessUnitAction
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
-