Interface ProductSelectionAssignment


public interface ProductSelectionAssignment

An assignment of a product and either variantSelection or variantExclusion (not both).


Example to create an instance using the builder pattern

     ProductSelectionAssignment productSelectionAssignment = ProductSelectionAssignment.builder()
             .product(productBuilder -> productBuilder)
             .build()
 
  • Method Details

    • getProduct

      @NotNull @Valid @NotNull @Valid ProductKeyReference getProduct()

      Reference to the Product by key.

      Returns:
      product
    • getVariantSelection

      @Valid @Valid VariantSelection getVariantSelection()

      Variant selection specifying included SKUs.

      Returns:
      variantSelection
    • getVariantExclusion

      @Valid @Valid VariantExclusion getVariantExclusion()

      Variant exclusion specifying excluded SKUs.

      Returns:
      variantExclusion
    • setProduct

      void setProduct(ProductKeyReference product)

      Reference to the Product by key.

      Parameters:
      product - value to be set
    • setVariantSelection

      void setVariantSelection(VariantSelection variantSelection)

      Variant selection specifying included SKUs.

      Parameters:
      variantSelection - value to be set
    • setVariantExclusion

      void setVariantExclusion(VariantExclusion variantExclusion)

      Variant exclusion specifying excluded SKUs.

      Parameters:
      variantExclusion - value to be set
    • of

      factory method
      Returns:
      instance of ProductSelectionAssignment
    • of

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

    • deepCopy

      @Nullable static ProductSelectionAssignment deepCopy(@Nullable ProductSelectionAssignment template)
      factory method to create a deep copy of ProductSelectionAssignment
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      builder factory method for ProductSelectionAssignment
      Returns:
      builder
    • builder

      create builder for ProductSelectionAssignment instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withProductSelectionAssignment

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