Interface ProductUnpublishAction

All Superinterfaces:
ProductUpdateAction, ResourceUpdateAction<ProductUpdateAction>
All Known Implementing Classes:
ProductUnpublishActionImpl

public interface ProductUnpublishAction extends ProductUpdateAction

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 Details

  • 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

      default <T> T withProductUnpublishAction(Function<ProductUnpublishAction,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<ProductUnpublishAction> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference