Interface ProductUnpublishAction
- All Superinterfaces:
ProductUpdateAction
,ResourceUpdateAction<ProductUpdateAction>
- All Known Implementing Classes:
ProductUnpublishActionImpl
Removes the current projection of the Product. The staged projection is unaffected. To retrieve unpublished Products, the staged
parameter must be set to false
when querying/searching Product Projections. Produces the ProductUnpublished Message.
Unpublished Products cannot be added to a Cart. However, if a Cart contains Line Items for Products that were added before the Product was unpublished, the Cart is unaffected and can still be used to create an Order. To prevent this, in addition to unpublishing the Product you should remove the Prices from the Product using Remove Price for Embedded Prices or Delete StandalonePrice for Standalone Prices.
Example to create an instance using the builder pattern
ProductUnpublishAction productUnpublishAction = ProductUnpublishAction.builder()
.build()
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for ProductUnpublishActionbuilder
(ProductUnpublishAction template) create builder for ProductUnpublishAction instancestatic ProductUnpublishAction
deepCopy
(ProductUnpublishAction template) factory method to create a deep copy of ProductUnpublishActionstatic ProductUnpublishAction
of()
factory methodstatic ProductUnpublishAction
of
(ProductUnpublishAction template) factory method to create a shallow copy ProductUnpublishActionstatic com.fasterxml.jackson.core.type.TypeReference<ProductUnpublishAction>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map functionMethods inherited from interface com.commercetools.api.models.product.ProductUpdateAction
getAction, withProductUpdateAction
Methods inherited from interface com.commercetools.api.models.ResourceUpdateAction
get
-
Field Details
-
UNPUBLISH
discriminator value for ProductUnpublishAction- See Also:
-
-
Method Details
-
of
factory method- Returns:
- instance of ProductUnpublishAction
-
of
factory method to create a shallow copy ProductUnpublishAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of ProductUnpublishAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ProductUnpublishAction- Returns:
- builder
-
builder
create builder for ProductUnpublishAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withProductUnpublishAction
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
-