Class IncludedProduct

    • Constructor Detail

      • IncludedProduct

        public IncludedProduct()
    • 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.
      • getValidationKey

        public String getValidationKey()
        Returns:
        The ID of the included item. By default, either the product or variant ID.
      • getLabel

        public String getLabel()
        The user-facing label that describes this included product.
        Returns:
        the user-facing label that describes this included product
      • getDisplayOrder

        public Long getDisplayOrder()
        Defines the display position of this included product in relation to other included products.
        Returns:
        the order in which this included product should be displayed relative to other included products
      • getVariantParentProductId

        public String getVariantParentProductId()
        This field contains the id of the parent product of the specified variant if the type is IncludedProductType.VARIANT.

        This field is necessary because variants are a sub-resource of product and thus API callers cannot fetch them purely by variant id alone.

        Returns:
        the id of the parent product of the variant
        See Also:
        variant
      • getAdditionalItemPricing

        public com.broadleafcommerce.cart.client.domain.AdditionalItemPricing getAdditionalItemPricing()
      • isDiscountAllowed

        public boolean isDiscountAllowed()
        Dictates whether or not discounts are allowed to be applied to this included product.
        Returns:
        true if discounts are allowed to be applied to this included product, false otherwise
      • getQuantity

        public int getQuantity()
        The value of the fixed quantity.
        Returns:
        the fixed quantity of the included product's target product(s) that can be added
      • 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)
        The user-facing label that describes this included product.
        Parameters:
        label - the user-facing label that describes this included product
      • setDisplayOrder

        public void setDisplayOrder​(Long displayOrder)
        Defines the display position of this included product in relation to other included products.
        Parameters:
        displayOrder - the order in which this included product should be displayed relative to other included products
      • setVariantParentProductId

        public void setVariantParentProductId​(String variantParentProductId)
        This field contains the id of the parent product of the specified variant if the type is IncludedProductType.VARIANT.

        This field is necessary because variants are a sub-resource of product and thus API callers cannot fetch them purely by variant id alone.

        Parameters:
        variantParentProductId - the id of the parent product of the variant
        See Also:
        variant
      • setAdditionalItemPricing

        public void setAdditionalItemPricing​(com.broadleafcommerce.cart.client.domain.AdditionalItemPricing additionalItemPricing)
      • setDiscountAllowed

        public void setDiscountAllowed​(boolean discountAllowed)
        Dictates whether or not discounts are allowed to be applied to this included product.
        Parameters:
        discountAllowed - true if discounts are allowed to be applied to this included product, false otherwise
      • setQuantity

        public void setQuantity​(int quantity)
        The value of the fixed quantity.
        Parameters:
        fixedQuantity - the fixed quantity of the included product's target product(s) that can be added
      • 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
      • getOverridePrice

        public javax.money.MonetaryAmount getOverridePrice()
      • getPricingKey

        public String getPricingKey()
      • getPricingTargetType

        public String getPricingTargetType()
      • setOverridePrice

        public void setOverridePrice​(javax.money.MonetaryAmount overridePrice)
      • setPricingKey

        public void setPricingKey​(String pricingKey)
      • setPricingTargetType

        public void setPricingTargetType​(String pricingTargetType)