Class PriceInfoContext

java.lang.Object
com.broadleafcommerce.pricing.client.domain.context.PriceInfoContext
All Implemented Interfaces:
Serializable

public class PriceInfoContext extends Object implements Serializable
DTO data needed when requesting PriceInfos for PriceableTargets.
Author:
Chad Harchar (charchar)
See Also:
  • Field Details

    • PRICE_INFO_CONTEXT_HEADER

      public static final String PRICE_INFO_CONTEXT_HEADER
      See Also:
    • priceableTargets

      protected Set<PriceableTarget> priceableTargets
      PriceableTargets to be priced.
    • priceLists

      protected Set<PriceListRef> priceLists
      PriceListRefs to query for prices for the targets.
    • skipDetails

      protected boolean skipDetails
      Whether to exclude PriceInfo.getPriceTypeDetails() from the response.
    • getAllAvailableFrequencies

      protected boolean getAllAvailableFrequencies
      Only relevant for recurring PriceData. If true, the response will include all frequencies that have a corresponding PriceData for the given target.

      For example, if there are 2 PriceData records for the same target for the 2-year term, one with a frequency of 1 MONTHLY and one with a frequency of 1 ANNUALLY, the response will include both PriceData records.

      Since:
      2.0.4
    • requestedCurrency

      protected javax.money.CurrencyUnit requestedCurrency
      This will be populated in the pricing service from the PriceContext.getCurrency(). Any setting from outside the service will by default be ignored.
      Since:
      Pricing Client 2.0.4
  • Constructor Details

    • PriceInfoContext

      public PriceInfoContext()
  • Method Details

    • getPriceableTargets

      public Set<PriceableTarget> getPriceableTargets()
      PriceableTargets to be priced.
    • getPriceLists

      public Set<PriceListRef> getPriceLists()
      PriceListRefs to query for prices for the targets.
    • isSkipDetails

      public boolean isSkipDetails()
      Whether to exclude PriceInfo.getPriceTypeDetails() from the response.
    • isGetAllAvailableFrequencies

      public boolean isGetAllAvailableFrequencies()
      Only relevant for recurring PriceData. If true, the response will include all frequencies that have a corresponding PriceData for the given target.

      For example, if there are 2 PriceData records for the same target for the 2-year term, one with a frequency of 1 MONTHLY and one with a frequency of 1 ANNUALLY, the response will include both PriceData records.

      Since:
      2.0.4
    • isFilterByPaymentStrategy

      public boolean isFilterByPaymentStrategy()
      Only relevant for recurring PriceData. Whether to filter the PriceData matching the priceableTargets by their payment strategy.
      Since:
      2.0.4
    • getRequestedCurrency

      public javax.money.CurrencyUnit getRequestedCurrency()
      This will be populated in the pricing service from the PriceContext.getCurrency(). Any setting from outside the service will by default be ignored.
      Since:
      Pricing Client 2.0.4
    • setPriceableTargets

      public void setPriceableTargets(Set<PriceableTarget> priceableTargets)
      PriceableTargets to be priced.
    • setPriceLists

      public void setPriceLists(Set<PriceListRef> priceLists)
      PriceListRefs to query for prices for the targets.
    • setSkipDetails

      public void setSkipDetails(boolean skipDetails)
      Whether to exclude PriceInfo.getPriceTypeDetails() from the response.
    • setGetAllAvailableFrequencies

      public void setGetAllAvailableFrequencies(boolean getAllAvailableFrequencies)
      Only relevant for recurring PriceData. If true, the response will include all frequencies that have a corresponding PriceData for the given target.

      For example, if there are 2 PriceData records for the same target for the 2-year term, one with a frequency of 1 MONTHLY and one with a frequency of 1 ANNUALLY, the response will include both PriceData records.

      Since:
      2.0.4
    • setFilterByPaymentStrategy

      public void setFilterByPaymentStrategy(boolean filterByPaymentStrategy)
      Only relevant for recurring PriceData. Whether to filter the PriceData matching the priceableTargets by their payment strategy.
      Since:
      2.0.4
    • setRequestedCurrency

      public void setRequestedCurrency(javax.money.CurrencyUnit requestedCurrency)
      This will be populated in the pricing service from the PriceContext.getCurrency(). Any setting from outside the service will by default be ignored.
      Since:
      Pricing Client 2.0.4
    • 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