Interface ProductVariantImportDraft

All Superinterfaces:
Draft<ProductVariantImportDraft>

public interface ProductVariantImportDraft extends Draft<ProductVariantImportDraft>

Contains the Product Variant to be used in the LineItemImportDraft.


Example to create an instance using the builder pattern

     ProductVariantImportDraft productVariantImportDraft = ProductVariantImportDraft.builder()
             .build()
 
  • Method Details

    • getId

      Long getId()

      The id of the ProductVariant. Required if you do not set a value for sku. If set, you must specify a productId in the LineItemImportDraft also.

      Returns:
      id
    • getSku

      String getSku()

      The sku of the ProductVariant. Required if you do not set a value for id.

      Returns:
      sku
    • getPrices

      @Valid @Valid List<PriceDraft> getPrices()

      The Prices of the Product Variant if you want to override the prices property in the referenced ProductVariant. If not set, the prices from the referenced ProductVariant are used in the resulting Order. If set, each Price must have its unique price scope (same value.currencyCode, country, customerGroup, channel, validFrom and validUntil).

      Returns:
      prices
    • getAttributes

      @Valid @Valid List<Attribute> getAttributes()

      The Attributes of the Product Variant if you want to override the attributes property in the referenced ProductVariant. If not set, the attributes from the referenced ProductVariant are copied to the resulting Order.

      Returns:
      attributes
    • getImages

      @Valid @Valid List<Image> getImages()

      The Images of the Product Variant if you want to override the images property in the referenced ProductVariant. If not set, the images from the referenced ProductVariant are copied to the resulting Order.

      Returns:
      images
    • setId

      void setId(Long id)

      The id of the ProductVariant. Required if you do not set a value for sku. If set, you must specify a productId in the LineItemImportDraft also.

      Parameters:
      id - value to be set
    • setSku

      void setSku(String sku)

      The sku of the ProductVariant. Required if you do not set a value for id.

      Parameters:
      sku - value to be set
    • setPrices

      void setPrices(PriceDraft... prices)

      The Prices of the Product Variant if you want to override the prices property in the referenced ProductVariant. If not set, the prices from the referenced ProductVariant are used in the resulting Order. If set, each Price must have its unique price scope (same value.currencyCode, country, customerGroup, channel, validFrom and validUntil).

      Parameters:
      prices - values to be set
    • setPrices

      void setPrices(List<PriceDraft> prices)

      The Prices of the Product Variant if you want to override the prices property in the referenced ProductVariant. If not set, the prices from the referenced ProductVariant are used in the resulting Order. If set, each Price must have its unique price scope (same value.currencyCode, country, customerGroup, channel, validFrom and validUntil).

      Parameters:
      prices - values to be set
    • setAttributes

      void setAttributes(Attribute... attributes)

      The Attributes of the Product Variant if you want to override the attributes property in the referenced ProductVariant. If not set, the attributes from the referenced ProductVariant are copied to the resulting Order.

      Parameters:
      attributes - values to be set
    • setAttributes

      void setAttributes(List<Attribute> attributes)

      The Attributes of the Product Variant if you want to override the attributes property in the referenced ProductVariant. If not set, the attributes from the referenced ProductVariant are copied to the resulting Order.

      Parameters:
      attributes - values to be set
    • setImages

      void setImages(Image... images)

      The Images of the Product Variant if you want to override the images property in the referenced ProductVariant. If not set, the images from the referenced ProductVariant are copied to the resulting Order.

      Parameters:
      images - values to be set
    • setImages

      void setImages(List<Image> images)

      The Images of the Product Variant if you want to override the images property in the referenced ProductVariant. If not set, the images from the referenced ProductVariant are copied to the resulting Order.

      Parameters:
      images - values to be set
    • of

      factory method
      Returns:
      instance of ProductVariantImportDraft
    • of

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

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

      builder factory method for ProductVariantImportDraft
      Returns:
      builder
    • builder

      create builder for ProductVariantImportDraft instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withProductVariantImportDraft

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