Interface ProductSetSkuAction

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

public interface ProductSetSkuAction extends ProductUpdateAction

SKU cannot be changed or removed if it is associated with an InventoryEntry. If the SKU to set or unset is part of a ProductSelectionAssignment it will be automatically added or removed from the respective ProductVariantSelection.


Example to create an instance using the builder pattern

     ProductSetSkuAction productSetSkuAction = ProductSetSkuAction.builder()
             .variantId(0.3)
             .build()
 
  • Field Details

  • Method Details

    • getVariantId

      @NotNull @NotNull Long getVariantId()

      The id of the ProductVariant to update.

      Returns:
      variantId
    • getSku

      String getSku()

      Value to set. Must be unique. If empty, any existing value will be removed.

      Returns:
      sku
    • getStaged

      Boolean getStaged()

      If true, only the staged sku is updated. If false, both the current and staged sku are updated.

      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)

      Value to set. Must be unique. If empty, any existing value will be removed.

      Parameters:
      sku - value to be set
    • setStaged

      void setStaged(Boolean staged)

      If true, only the staged sku is updated. If false, both the current and staged sku are updated.

      Parameters:
      staged - value to be set
    • of

      static ProductSetSkuAction of()
      factory method
      Returns:
      instance of ProductSetSkuAction
    • of

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

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

      static ProductSetSkuActionBuilder builder()
      builder factory method for ProductSetSkuAction
      Returns:
      builder
    • builder

      create builder for ProductSetSkuAction instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withProductSetSkuAction

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