Class AdditionalItemPricing

java.lang.Object
com.broadleafcommerce.cart.client.domain.AdditionalItemPricing
All Implemented Interfaces:
Serializable

public class AdditionalItemPricing extends Object implements Serializable
Dictates how included items or item choices should be priced.
See Also:
  • Constructor Details

    • AdditionalItemPricing

      public AdditionalItemPricing(String cartPricingTargetType)
    • AdditionalItemPricing

      public AdditionalItemPricing()
  • Method Details

    • getOverridePrice

      public javax.money.MonetaryAmount getOverridePrice()

      The price of this choice, only relevant when the pricing model of this choice is ADD_TO_PARENT. If no pricing is specified here, the price of the target product, variant, or selected product from the target category will be used.

      If this is a SPECIFIC_PRODUCTS or SPECIFIC_VARIANTS typed item choice, then any price set here will override any item pricing set in the specific choice.

      Returns:
      the price of this add-on
    • getPricingKey

      public String getPricingKey()
      System-wide unique identifier to configure specific pricing for the choice. Relevant if pricing data is managed in a separate system or data store, like the Broadleaf pricing services. Only relevant if the pricing model is ADD_TO_PARENT.
      Returns:
      a unique key to identify this add-on
    • getPricingTargetType

      public String getPricingTargetType()
      The type of the item to which this pricing belongs, for example SKU or PRICING_KEY.
      Returns:
      The type of the item to which this pricing belongs.
    • setOverridePrice

      public void setOverridePrice(javax.money.MonetaryAmount overridePrice)

      The price of this choice, only relevant when the pricing model of this choice is ADD_TO_PARENT. If no pricing is specified here, the price of the target product, variant, or selected product from the target category will be used.

      If this is a SPECIFIC_PRODUCTS or SPECIFIC_VARIANTS typed item choice, then any price set here will override any item pricing set in the specific choice.

      Parameters:
      overridePrice - the price of this add-on
    • setPricingKey

      public void setPricingKey(String pricingKey)
      System-wide unique identifier to configure specific pricing for the choice. Relevant if pricing data is managed in a separate system or data store, like the Broadleaf pricing services. Only relevant if the pricing model is ADD_TO_PARENT.
      Parameters:
      pricingKey - a unique key to identify this add-on (usually a UUID)
    • setPricingTargetType

      public void setPricingTargetType(String pricingTargetType)
      The type of the item to which this pricing belongs, for example SKU or PRICING_KEY.
      Parameters:
      targetType - The type of the item to which this pricing belongs.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object