Interface ProductSelectionAssignment


public interface ProductSelectionAssignment

Given the mode of Product Selection, this assignment refers to, it may contain:

  • variantSelection field for a Product Selection with Individual ProductSelectionMode.
  • variantExclusion field for a Product Selection with IndividualExclusion ProductSelectionMode.

Example to create an instance using the builder pattern

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

    • getProduct

      @NotNull @Valid @NotNull @Valid ProductReference getProduct()

      Reference to a Product that is assigned to the ProductSelection.

      Returns:
      product
    • getProductSelection

      @NotNull @Valid @NotNull @Valid ProductSelectionReference getProductSelection()

      Reference to the Product Selection that this assignment is part of.

      Returns:
      productSelection
    • getVariantSelection

      @Valid @Valid ProductVariantSelection getVariantSelection()

      Defines which particular Variants of the Product are included in the Product Selection. If undefined all Variants of the referenced Product are included.

      This field is only available for assignments to a Product Selection with Individual ProductSelectionMode. The list of SKUs will be updated automatically on any change of those performed on the respective Product itself.

      Returns:
      variantSelection
    • getVariantExclusion

      @Valid @Valid ProductVariantExclusion getVariantExclusion()

      Defines which particular Variants of the Product are excluded from the Product Selection. If undefined all Variants of the referenced Product are excluded.

      This field is only available for assignments to a Product Selection with IndividualExclusion ProductSelectionMode. The list of SKUs will be updated automatically on any change of those performed on the respective Product itself.

      Returns:
      variantExclusion
    • setProduct

      void setProduct(ProductReference product)

      Reference to a Product that is assigned to the ProductSelection.

      Parameters:
      product - value to be set
    • setProductSelection

      void setProductSelection(ProductSelectionReference productSelection)

      Reference to the Product Selection that this assignment is part of.

      Parameters:
      productSelection - value to be set
    • setVariantSelection

      void setVariantSelection(ProductVariantSelection variantSelection)

      Defines which particular Variants of the Product are included in the Product Selection. If undefined all Variants of the referenced Product are included.

      This field is only available for assignments to a Product Selection with Individual ProductSelectionMode. The list of SKUs will be updated automatically on any change of those performed on the respective Product itself.

      Parameters:
      variantSelection - value to be set
    • setVariantExclusion

      void setVariantExclusion(ProductVariantExclusion variantExclusion)

      Defines which particular Variants of the Product are excluded from the Product Selection. If undefined all Variants of the referenced Product are excluded.

      This field is only available for assignments to a Product Selection with IndividualExclusion ProductSelectionMode. The list of SKUs will be updated automatically on any change of those performed on the respective Product itself.

      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
    • deepCopy

      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