Class AttributeChoiceValue

    • Constructor Detail

      • AttributeChoiceValue

        public AttributeChoiceValue()
    • Method Detail

      • addAttribute

        public void addAttribute​(String name,
                                 Object value)
        Takes in any additional attributes passed in the request not matching any defined properties.
        Parameters:
        name - Name of the additional attribute
        value - Value of the additional attribute
      • getAttribute

        public Map<String,​Object> getAttribute()
        Return any additional attributes passed in the request not matching any defined properties.
        Returns:
        any additional attributes passed in the request not matching any defined properties.
      • getLabel

        public String getLabel()
        What the customer sees for display. For example, text in the case of sizes or a hex value in the case of colors. Can diverge from value which is what is added to the cart
        Returns:
        the customer-facing display. If null, the getValue() should be used for display
      • getValue

        public String getValue()
        The value stored as an item attribute or cart attribute based on what the user selects.
        Returns:
        the value that should be stored as an item/cart attribute when the user selects this choice
      • getAttributes

        public Map<String,​Object> getAttributes()
        Map holding any additional attributes passed in the request not matching any defined properties.
      • setLabel

        public void setLabel​(String label)
        What the customer sees for display. For example, text in the case of sizes or a hex value in the case of colors. Can diverge from value which is what is added to the cart
        Parameters:
        label - customer-facing display of this value
      • setValue

        public void setValue​(String value)
        The value stored as an item attribute or cart attribute based on what the user selects.
        Parameters:
        value - what will be stored as an item/cart attribute
      • setAttributes

        public void setAttributes​(Map<String,​Object> attributes)
        Map holding any additional attributes passed in the request not matching any defined properties.
      • canEqual

        protected boolean canEqual​(Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object