Interface ProductRemoveImageAction

All Superinterfaces:
ProductUpdateAction, ResourceUpdateAction<ProductUpdateAction>

public interface ProductRemoveImageAction extends ProductUpdateAction

Removes a Product image and deletes it from the Content Delivery Network (external images are not deleted). Deletion from the CDN is not instant, which means the image file itself will stay available for some time after the deletion. Either variantId or sku is required.


Example to create an instance using the builder pattern

     ProductRemoveImageAction productRemoveImageAction = ProductRemoveImageAction.builder()
             .imageUrl("{imageUrl}")
             .build()
 
  • Field Details

  • Method Details

    • getVariantId

      Long getVariantId()

      The id of the ProductVariant to update.

      Returns:
      variantId
    • getSku

      String getSku()

      The sku of the ProductVariant to update.

      Returns:
      sku
    • getImageUrl

      @NotNull @NotNull String getImageUrl()

      The URL of the image to remove.

      Returns:
      imageUrl
    • getStaged

      Boolean getStaged()

      If true, only the staged image is removed. If false, both the current and staged image is removed.

      Returns:
      staged
    • setVariantId

      void setVariantId(Long variantId)

      The id of the ProductVariant to update.

      Parameters:
      variantId - value to be set
    • setSku

      void setSku(String sku)

      The sku of the ProductVariant to update.

      Parameters:
      sku - value to be set
    • setImageUrl

      void setImageUrl(String imageUrl)

      The URL of the image to remove.

      Parameters:
      imageUrl - value to be set
    • setStaged

      void setStaged(Boolean staged)

      If true, only the staged image is removed. If false, both the current and staged image is removed.

      Parameters:
      staged - value to be set
    • of

      factory method
      Returns:
      instance of ProductRemoveImageAction
    • of

      factory method to create a shallow copy ProductRemoveImageAction
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      factory method to create a deep copy of ProductRemoveImageAction
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      builder factory method for ProductRemoveImageAction
      Returns:
      builder
    • builder

      create builder for ProductRemoveImageAction instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withProductRemoveImageAction

      default <T> T withProductRemoveImageAction(Function<ProductRemoveImageAction,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<ProductRemoveImageAction> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference