Class ProductVariantExclusionBuilder

java.lang.Object
com.commercetools.api.models.product_selection.ProductVariantExclusionBuilder
All Implemented Interfaces:
Builder<ProductVariantExclusion>

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

     ProductVariantExclusion productVariantExclusion = ProductVariantExclusion.builder()
             .plusSkus(skusBuilder -> skusBuilder)
             .build()
 
  • Constructor Details

    • ProductVariantExclusionBuilder

      public ProductVariantExclusionBuilder()
  • Method Details

    • skus

      public ProductVariantExclusionBuilder skus(String... skus)

      Non-empty array of SKUs representing Product Variants to be included in the Product Selection with IndividualExclusion ProductSelectionMode.

      Parameters:
      skus - value to be set
      Returns:
      Builder
    • skus

      Non-empty array of SKUs representing Product Variants to be included in the Product Selection with IndividualExclusion ProductSelectionMode.

      Parameters:
      skus - value to be set
      Returns:
      Builder
    • plusSkus

      public ProductVariantExclusionBuilder plusSkus(String... skus)

      Non-empty array of SKUs representing Product Variants to be included in the Product Selection with IndividualExclusion ProductSelectionMode.

      Parameters:
      skus - value to be set
      Returns:
      Builder
    • getSkus

      public List<String> getSkus()

      Non-empty array of SKUs representing Product Variants to be included in the Product Selection with IndividualExclusion ProductSelectionMode.

      Returns:
      skus
    • build

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

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

      public static ProductVariantExclusionBuilder of()
      factory method for an instance of ProductVariantExclusionBuilder
      Returns:
      builder
    • of

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