Class PriceableTarget

java.lang.Object
com.broadleafcommerce.pricing.client.domain.PriceableTarget
All Implemented Interfaces:
BasePriceableTarget, Serializable

public class PriceableTarget extends Object implements Serializable, BasePriceableTarget
An abstraction of an entity that can have a price.
Author:
Chad Harchar (charchar)
See Also:
  • Constructor Details

    • PriceableTarget

      public PriceableTarget()
  • Method Details

    • getTargetId

      public String getTargetId()
      Description copied from interface: BasePriceableTarget
      Gets the identifier of the target.
      Specified by:
      getTargetId in interface BasePriceableTarget
      Returns:
      the identifier of the target.
      See Also:
    • getTargetType

      public String getTargetType()
      Description copied from interface: BasePriceableTarget
      Gets the type of the target, e.g., SKU or PRICING_KEY.
      Specified by:
      getTargetType in interface BasePriceableTarget
      Returns:
      the identifier of the target.
      See Also:
    • getTargetQuantity

      public Integer getTargetQuantity()
      The quantity of the entity to be priced. This is used to determine when a price data tier should apply as the best overall price.
      Since:
      Pricing Client 2.0.3
    • getPriceableFields

      public Map<String,javax.money.MonetaryAmount> getPriceableFields()
      List of priceable fields for the target. This can include such fields as basePrice and baseCost.
    • getVendorRef

      public String getVendorRef()
      Description copied from interface: BasePriceableTarget
      Key to external system indicating that this PriceableTarget is specific to a vendor. This can be populated to support security controls based on a vendor based claim.
      Specified by:
      getVendorRef in interface BasePriceableTarget
      Returns:
      a reference to a vendor (e.g. vendorId or vendorCode)
      See Also:
    • getTermDurationLength

      public Integer getTermDurationLength()
      Description copied from interface: BasePriceableTarget
      Gets the term duration length of the target, e.g., 12, 24, 36. This indicates that the caller wants a specific price for the given term length and prices should be filtered accordingly.
      Specified by:
      getTermDurationLength in interface BasePriceableTarget
      Returns:
      the term duration length of the price desired for the target.
      Since:
      Pricing Client 2.0.3
      See Also:
    • getTermDurationType

      public String getTermDurationType()
      Description copied from interface: BasePriceableTarget
      Gets the term duration type of the target, e.g., DAYS, MONTHS, YEARS. This indicates that the caller wants a specific price for the given term type and prices should be filtered accordingly.
      Specified by:
      getTermDurationType in interface BasePriceableTarget
      Returns:
      the term duration type of the price desired for the target
      Since:
      Pricing Client 2.0.3
      See Also:
    • getCharacteristics

      public Map<String,String> getCharacteristics()
      Description copied from interface: BasePriceableTarget
      Gets the characteristics of the target, e.g., capacity:128GB. This indicates that the caller wants a specific price targeting these characteristics not just a base or default price for the target item. This is useful when the target is a flattened Product with no variations but still has configurable options that could drive pricing.
      Specified by:
      getCharacteristics in interface BasePriceableTarget
      Returns:
      the characteristics of the target
      Since:
      Pricing Client 2.0.3
      See Also:
    • getAttributes

      public Map<String,Object> getAttributes()
      Additional attributes. These are primarily useful for targeting by price list rules and will be excluded from the response from the PriceInfosEndpoint to reduce payload size.
    • setTargetId

      public void setTargetId(String targetId)
      Description copied from interface: BasePriceableTarget
      Sets the identifier of the target.
      Specified by:
      setTargetId in interface BasePriceableTarget
      Parameters:
      targetId - the identifier of the target.
      See Also:
    • setTargetType

      public void setTargetType(String targetType)
      Description copied from interface: BasePriceableTarget
      Sets the type of the target, e.g., SKU or PRICING_KEY.
      Specified by:
      setTargetType in interface BasePriceableTarget
      Parameters:
      targetType - the type of the target.
      See Also:
    • setTargetQuantity

      public void setTargetQuantity(Integer targetQuantity)
      The quantity of the entity to be priced. This is used to determine when a price data tier should apply as the best overall price.
      Since:
      Pricing Client 2.0.3
    • setPriceableFields

      public void setPriceableFields(Map<String,javax.money.MonetaryAmount> priceableFields)
      List of priceable fields for the target. This can include such fields as basePrice and baseCost.
    • setVendorRef

      public void setVendorRef(String vendorRef)
      Description copied from interface: BasePriceableTarget
      Key to external system indicating that this PriceableTarget is specific to a vendor.
      Specified by:
      setVendorRef in interface BasePriceableTarget
      Parameters:
      vendorRef - a reference to a vendor (e.g. vendorId or vendorCode)
      See Also:
    • setTermDurationLength

      public void setTermDurationLength(Integer termDurationLength)
      Description copied from interface: BasePriceableTarget
      Sets the term duration length of the target, e.g., 12, 24, 36.
      Specified by:
      setTermDurationLength in interface BasePriceableTarget
      Parameters:
      termDurationLength - the term duration length of the price desired for the target.
      Since:
      Pricing Client 2.0.3
      See Also:
    • setTermDurationType

      public void setTermDurationType(String termDurationType)
      Description copied from interface: BasePriceableTarget
      Sets the term duration type of the target, e.g., DAYS, MONTHS, YEARS.
      Specified by:
      setTermDurationType in interface BasePriceableTarget
      Parameters:
      termDurationType - the term duration type of the price desired for the target
      Since:
      Pricing Client 2.0.3
      See Also:
    • setCharacteristics

      public void setCharacteristics(Map<String,String> characteristics)
      Description copied from interface: BasePriceableTarget
      Sets the characteristics of the target, e.g., size: red, capacity: 128GB.
      Specified by:
      setCharacteristics in interface BasePriceableTarget
      Parameters:
      characteristics - the characteristics of the target
      Since:
      Pricing Client 2.0.3
      See Also:
    • setAttributes

      public void setAttributes(Map<String,Object> attributes)
      Additional attributes. These are primarily useful for targeting by price list rules and will be excluded from the response from the PriceInfosEndpoint to reduce payload size.
    • 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