Class ProductVariantImportDraftBuilder

java.lang.Object
com.commercetools.api.models.order.ProductVariantImportDraftBuilder
All Implemented Interfaces:
Builder<ProductVariantImportDraft>

public class ProductVariantImportDraftBuilder extends Object implements Builder<ProductVariantImportDraft>
ProductVariantImportDraftBuilder
Example to create an instance using the builder pattern

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

    • ProductVariantImportDraftBuilder

      public ProductVariantImportDraftBuilder()
  • Method Details

    • 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
      Returns:
      Builder
    • sku

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

      Parameters:
      sku - value to be set
      Returns:
      Builder
    • 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 - value to be set
      Returns:
      Builder
    • 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 - value to be set
      Returns:
      Builder
    • plusPrices

      public ProductVariantImportDraftBuilder plusPrices(@Nullable 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 - value to be set
      Returns:
      Builder
    • plusPrices

      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:
      builder - function to build the prices value
      Returns:
      Builder
    • withPrices

      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:
      builder - function to build the prices value
      Returns:
      Builder
    • addPrices

      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:
      builder - function to build the prices value
      Returns:
      Builder
    • setPrices

      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:
      builder - function to build the prices value
      Returns:
      Builder
    • attributes

      public ProductVariantImportDraftBuilder attributes(@Nullable 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 - value to be set
      Returns:
      Builder
    • attributes

      public ProductVariantImportDraftBuilder attributes(@Nullable 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 - value to be set
      Returns:
      Builder
    • plusAttributes

      public ProductVariantImportDraftBuilder plusAttributes(@Nullable 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 - value to be set
      Returns:
      Builder
    • plusAttributes

      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:
      builder - function to build the attributes value
      Returns:
      Builder
    • withAttributes

      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:
      builder - function to build the attributes value
      Returns:
      Builder
    • addAttributes

      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:
      builder - function to build the attributes value
      Returns:
      Builder
    • setAttributes

      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:
      builder - function to build the attributes value
      Returns:
      Builder
    • 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 - value to be set
      Returns:
      Builder
    • 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 - value to be set
      Returns:
      Builder
    • plusImages

      public ProductVariantImportDraftBuilder plusImages(@Nullable 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 - value to be set
      Returns:
      Builder
    • plusImages

      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:
      builder - function to build the images value
      Returns:
      Builder
    • withImages

      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:
      builder - function to build the images value
      Returns:
      Builder
    • addImages

      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:
      builder - function to build the images value
      Returns:
      Builder
    • setImages

      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:
      builder - function to build the images value
      Returns:
      Builder
    • getId

      @Nullable public 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

      @Nullable public String getSku()

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

      Returns:
      sku
    • getPrices

      @Nullable public 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

      @Nullable public 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

      @Nullable public 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
    • build

      public ProductVariantImportDraft build()
      builds ProductVariantImportDraft with checking for non-null required values
      Specified by:
      build in interface Builder<ProductVariantImportDraft>
      Returns:
      ProductVariantImportDraft
    • buildUnchecked

      public ProductVariantImportDraft buildUnchecked()
      builds ProductVariantImportDraft without checking for non-null required values
      Returns:
      ProductVariantImportDraft
    • of

      factory method for an instance of ProductVariantImportDraftBuilder
      Returns:
      builder
    • of

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