Interface ProductVariantTailoringDraft

All Superinterfaces:
Draft<ProductVariantTailoringDraft>

public interface ProductVariantTailoringDraft extends Draft<ProductVariantTailoringDraft>

Either id or sku is required to reference a ProductVariant that exists.


Example to create an instance using the builder pattern

     ProductVariantTailoringDraft productVariantTailoringDraft = ProductVariantTailoringDraft.builder()
             .build()
 
  • Method Details

    • getId

      Long getId()

      The id of the ProductVariant to be tailored.

      Returns:
      id
    • getSku

      String getSku()

      The sku of the ProductVariant to be tailored.

      Returns:
      sku
    • getImages

      @Valid @Valid List<Image> getImages()

      Images of the tailored Product Variant.

      Returns:
      images
    • getAssets

      @Valid @Valid List<Asset> getAssets()

      Media assets of the tailored Product Variant.

      Returns:
      assets
    • getAttributes

      @Valid @Valid List<ProductTailoringAttribute> getAttributes()

      Attributes of the tailored Product Variant according to the respective AttributeDefinition. If provided, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

      • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
      • otherwise the Attribute and its value are added to the ProductVariant.
      Returns:
      attributes
    • setId

      void setId(Long id)

      The id of the ProductVariant to be tailored.

      Parameters:
      id - value to be set
    • setSku

      void setSku(String sku)

      The sku of the ProductVariant to be tailored.

      Parameters:
      sku - value to be set
    • setImages

      void setImages(Image... images)

      Images of the tailored Product Variant.

      Parameters:
      images - values to be set
    • setImages

      void setImages(List<Image> images)

      Images of the tailored Product Variant.

      Parameters:
      images - values to be set
    • setAssets

      void setAssets(Asset... assets)

      Media assets of the tailored Product Variant.

      Parameters:
      assets - values to be set
    • setAssets

      void setAssets(List<Asset> assets)

      Media assets of the tailored Product Variant.

      Parameters:
      assets - values to be set
    • setAttributes

      void setAttributes(ProductTailoringAttribute... attributes)

      Attributes of the tailored Product Variant according to the respective AttributeDefinition. If provided, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

      • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
      • otherwise the Attribute and its value are added to the ProductVariant.
      Parameters:
      attributes - values to be set
    • setAttributes

      void setAttributes(List<ProductTailoringAttribute> attributes)

      Attributes of the tailored Product Variant according to the respective AttributeDefinition. If provided, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

      • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
      • otherwise the Attribute and its value are added to the ProductVariant.
      Parameters:
      attributes - values to be set
    • of

      factory method
      Returns:
      instance of ProductVariantTailoringDraft
    • of

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

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

      builder factory method for ProductVariantTailoringDraft
      Returns:
      builder
    • builder

      create builder for ProductVariantTailoringDraft instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withProductVariantTailoringDraft

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