Interface ProductTailoringSetAttributeAction

All Superinterfaces:
ProductTailoringUpdateAction

public interface ProductTailoringSetAttributeAction extends ProductTailoringUpdateAction

Either variantId or sku is required.


Example to create an instance using the builder pattern

     ProductTailoringSetAttributeAction productTailoringSetAttributeAction = ProductTailoringSetAttributeAction.builder()
             .name("{name}")
             .build()
 
  • Field Details

    • SET_ATTRIBUTE

      static final String SET_ATTRIBUTE
      discriminator value for ProductTailoringSetAttributeAction
      See Also:
  • Method Details

    • getVariantId

      Long getVariantId()

      The id of the ProductVariant to update. Required if sku is absent.

      Returns:
      variantId
    • getSku

      String getSku()

      The sku of the ProductVariant to update. Required if variantId is absent.

      Returns:
      sku
    • getName

      @NotNull @NotNull String getName()

      The name of the Attribute to set.

      Returns:
      name
    • getValue

      Object getValue()

      Value to set for the Attribute. If empty, any existing value will be removed.

      The AttributeType determines the format of the Attribute value to be provided:

      • For Enum Type and Localized Enum Type, use the key of the Plain Enum Value or Localized Enum Value objects, or the complete objects as value.
      • For Localizable Text Type, use the LocalizedString object as value.
      • For Money Type Attributes, use the Money object as value.
      • For Set Type Attributes, use the entire set object as value.
      • For Reference Type Attributes, use the Reference object as value.

      Tailoring of Nested Type Attributes is not supported.

      Returns:
      value
    • getStaged

      Boolean getStaged()

      If true, only the staged Attribute is set. If false, both current and staged Attribute is set.

      Returns:
      staged
    • setVariantId

      void setVariantId(Long variantId)

      The id of the ProductVariant to update. Required if sku is absent.

      Parameters:
      variantId - value to be set
    • setSku

      void setSku(String sku)

      The sku of the ProductVariant to update. Required if variantId is absent.

      Parameters:
      sku - value to be set
    • setName

      void setName(String name)

      The name of the Attribute to set.

      Parameters:
      name - value to be set
    • setValue

      void setValue(Object value)

      Value to set for the Attribute. If empty, any existing value will be removed.

      The AttributeType determines the format of the Attribute value to be provided:

      • For Enum Type and Localized Enum Type, use the key of the Plain Enum Value or Localized Enum Value objects, or the complete objects as value.
      • For Localizable Text Type, use the LocalizedString object as value.
      • For Money Type Attributes, use the Money object as value.
      • For Set Type Attributes, use the entire set object as value.
      • For Reference Type Attributes, use the Reference object as value.

      Tailoring of Nested Type Attributes is not supported.

      Parameters:
      value - value to be set
    • setStaged

      void setStaged(Boolean staged)

      If true, only the staged Attribute is set. If false, both current and staged Attribute is set.

      Parameters:
      staged - value to be set
    • of

      factory method
      Returns:
      instance of ProductTailoringSetAttributeAction
    • of

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

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

      builder factory method for ProductTailoringSetAttributeAction
      Returns:
      builder
    • builder

      create builder for ProductTailoringSetAttributeAction instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withProductTailoringSetAttributeAction

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