Enum ProductOptionType

    • Enum Constant Detail

      • VARIANT_DISTINGUISHING

        public static final ProductOptionType VARIANT_DISTINGUISHING
        Values selected by the customer will help distinguish a specific variant directly on this Product that should be added to the cart. Example would be to set up t-shirts with colors and sizes. This is similar to CART_ITEM_ATTRIBUTE in that the values the user selected are stored in the item attributes.
      • ITEM_CHOICE

        public static final ProductOptionType ITEM_CHOICE
        Allows the user to select an additional item that is added to their cart
      • CART_ITEM_ATTRIBUTE

        public static final ProductOptionType CART_ITEM_ATTRIBUTE
        The user value is intended to flow into an item attribute once this item is added to the cart.
      • CART_ATTRIBUTE

        public static final ProductOptionType CART_ATTRIBUTE
        The user input flow into a global cart-level attribute when added to cart. If there was already an entry for this attribute, it is overridden with the latest value
    • Method Detail

      • values

        public static ProductOptionType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (ProductOptionType c : ProductOptionType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ProductOptionType valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • isItemChoice

        public static boolean isItemChoice​(String optionType)
      • isCartItemAttributeChoice

        public static boolean isCartItemAttributeChoice​(String optionType)
      • isCartAttributeChoice

        public static boolean isCartAttributeChoice​(String optionType)
      • isVariantDistinguishing

        public static boolean isVariantDistinguishing​(String optionType)
      • isAttributeChoice

        public static boolean isAttributeChoice​(String optionType)