Interface ProductAddAssetAction

All Superinterfaces:
ProductUpdateAction, ResourceUpdateAction<ProductUpdateAction>

public interface ProductAddAssetAction extends ProductUpdateAction

Either variantId or sku is required.


Example to create an instance using the builder pattern

     ProductAddAssetAction productAddAssetAction = ProductAddAssetAction.builder()
             .asset(assetBuilder -> assetBuilder)
             .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
    • getStaged

      Boolean getStaged()

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

      Returns:
      staged
    • getAsset

      @NotNull @Valid @NotNull @Valid AssetDraft getAsset()

      Value to append.

      Returns:
      asset
    • getPosition

      Integer getPosition()

      Position in assets where the Asset should be put. When specified, the value must be between 0 and the total number of Assets minus 1.

      Returns:
      position
    • 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
    • setStaged

      void setStaged(Boolean staged)

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

      Parameters:
      staged - value to be set
    • setAsset

      void setAsset(AssetDraft asset)

      Value to append.

      Parameters:
      asset - value to be set
    • setPosition

      void setPosition(Integer position)

      Position in assets where the Asset should be put. When specified, the value must be between 0 and the total number of Assets minus 1.

      Parameters:
      position - value to be set
    • of

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

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

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

      static ProductAddAssetActionBuilder builder()
      builder factory method for ProductAddAssetAction
      Returns:
      builder
    • builder

      create builder for ProductAddAssetAction instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withProductAddAssetAction

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