Class PriceListPriceDetail
java.lang.Object
com.broadleafcommerce.pricing.domain.PriceListPriceDetail
- All Implemented Interfaces:
com.broadleafcommerce.pricing.client.domain.PriceDetailComparable,Serializable
public class PriceListPriceDetail
extends Object
implements Serializable, com.broadleafcommerce.pricing.client.domain.PriceDetailComparable
DTO containing the details of a price from a price list.
- Since:
- 1.7.14, 2.0.1
- Author:
- Sunny Yu
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanDefines the ending time for which this price is activeDefines the beginning time for which this price is active.Defines the actual quantity available of a product as the sale progresses.Transfers the backupPriceSummary from the Summary to this price detail.A reference (typically the Id) of the CancellationPolicy for this priceData that governs how this priceData's subscription would be cancelled.A PriceInfo can be the result of a formula based pricing algorithm.Only relevant for price that came from a specificPriceData.javax.money.MonetaryAmountgetPrice()Price determined from aPriceList.getPriceModifier()orPriceData.getPrice()for a particular list.Store the priceData on this intermediary object to allow for consistent sorting of PriceListPriceDetail objects.Id of the specific PriceData that this price came from.List<com.broadleafcommerce.pricing.client.domain.PriceDataTierRef>When a price list modifies an underlying price data that uses tiered pricing, also modify each tiered price and store it on this price detail.The source of this price within the price list, e.g.com.broadleafcommerce.pricing.client.domain.RecurringPriceDetailDefines the initial quantity available for this price data before a pricing event such as a flash sale.com.broadleafcommerce.pricing.client.domain.UsagePriceDetailinthashCode()booleanvoidsetActiveEndDate(Instant activeEndDate) Defines the ending time for which this price is activevoidsetActiveStartDate(Instant activeStartDate) Defines the beginning time for which this price is active.voidsetAvailableQuantity(Integer availableQuantity) Defines the actual quantity available of a product as the sale progresses.voidsetBackupPriceDetail(Optional<PriceListPriceDetail> backupPriceDetail) Transfers the backupPriceSummary from the Summary to this price detail.voidsetCancellationPolicyRef(String cancellationPolicyRef) A reference (typically the Id) of the CancellationPolicy for this priceData that governs how this priceData's subscription would be cancelled.voidsetDerivedFromFieldType(String derivedFromFieldType) A PriceInfo can be the result of a formula based pricing algorithm.voidsetPaymentStrategy(String paymentStrategy) Only relevant for price that came from a specificPriceData.voidsetPrice(javax.money.MonetaryAmount price) Price determined from aPriceList.getPriceModifier()orPriceData.getPrice()for a particular list.voidsetPriceData(PriceData priceData) Store the priceData on this intermediary object to allow for consistent sorting of PriceListPriceDetail objects.voidsetPriceDataId(String priceDataId) Id of the specific PriceData that this price came from.voidsetPriceDataTierList(List<com.broadleafcommerce.pricing.client.domain.PriceDataTierRef> priceDataTierList) When a price list modifies an underlying price data that uses tiered pricing, also modify each tiered price and store it on this price detail.voidsetPriceListPriority(Integer priceListPriority) voidsetPriceSource(String priceSource) The source of this price within the price list, e.g.voidsetPriority(Integer priority) voidsetRecurringPriceDetail(com.broadleafcommerce.pricing.client.domain.RecurringPriceDetail recurringPriceDetail) voidsetStartingQuantity(Integer startingQuantity) Defines the initial quantity available for this price data before a pricing event such as a flash sale.voidsetUsagePriceDetail(com.broadleafcommerce.pricing.client.domain.UsagePriceDetail usagePriceDetail) toString()
-
Constructor Details
-
PriceListPriceDetail
public PriceListPriceDetail()
-
-
Method Details
-
hasLimitedQuantity
public boolean hasLimitedQuantity() -
getPrice
public javax.money.MonetaryAmount getPrice()Price determined from aPriceList.getPriceModifier()orPriceData.getPrice()for a particular list.- Specified by:
getPricein interfacecom.broadleafcommerce.pricing.client.domain.PriceDetailComparable- See Also:
-
PriceDetailComparable.getPrice()
-
getPaymentStrategy
Only relevant for price that came from a specificPriceData.Represents the payment strategy, specifically when payment is billed for a recurring price.
- Specified by:
getPaymentStrategyin interfacecom.broadleafcommerce.pricing.client.domain.PriceDetailComparable- See Also:
-
DefaultPaymentStrategy
-
getRecurringPriceDetail
public com.broadleafcommerce.pricing.client.domain.RecurringPriceDetail getRecurringPriceDetail()- Specified by:
getRecurringPriceDetailin interfacecom.broadleafcommerce.pricing.client.domain.PriceDetailComparable- Since:
- Pricing Service 2.1.0, Release Train 2.2.0
- See Also:
-
PriceDetailComparable.getRecurringPriceDetail()
-
getUsagePriceDetail
public com.broadleafcommerce.pricing.client.domain.UsagePriceDetail getUsagePriceDetail()- Specified by:
getUsagePriceDetailin interfacecom.broadleafcommerce.pricing.client.domain.PriceDetailComparable- Since:
- Pricing Service 2.1.0, Release Train 2.2.0
- See Also:
-
PriceDetailComparable.getUsagePriceDetail()
-
getPriceSource
The source of this price within the price list, e.g. price list formula, price list price data, etc.- See Also:
-
DefaultPriceListPriceSources
-
getPriceDataId
Id of the specific PriceData that this price came from.Only applicable if the
priceSourceisDefaultPriceListPriceSources.BLC_PRICE_LIST_PRICE_DATA. -
getPriority
- Specified by:
getPriorityin interfacecom.broadleafcommerce.pricing.client.domain.PriceDetailComparable- Since:
- Pricing Service 2.1.0, Release Train 2.2.0
- See Also:
-
PriceDetailComparable.getPriority()
-
getPriceListPriority
- Specified by:
getPriceListPriorityin interfacecom.broadleafcommerce.pricing.client.domain.PriceDetailComparable- Since:
- Pricing Service 2.1.0, Release Train 2.2.0
- See Also:
-
PriceDetailComparable.getPriceListPriority()
-
getActiveStartDate
Defines the beginning time for which this price is active. -
getActiveEndDate
Defines the ending time for which this price is active -
getStartingQuantity
Defines the initial quantity available for this price data before a pricing event such as a flash sale. It only serves an informational purpose. -
getAvailableQuantity
Defines the actual quantity available of a product as the sale progresses. Initially it is set equal to thestartingQuantityand is deducted as and when it gets used. -
getCancellationPolicyRef
A reference (typically the Id) of the CancellationPolicy for this priceData that governs how this priceData's subscription would be cancelled.- Since:
- Pricing Services 2.2.0, Release Train 2.3.0
-
getBackupPriceDetail
Transfers the backupPriceSummary from the Summary to this price detail. -
getPriceData
Store the priceData on this intermediary object to allow for consistent sorting of PriceListPriceDetail objects. -
getDerivedFromFieldType
A PriceInfo can be the result of a formula based pricing algorithm. For example, a sale price might be 10% off of the retail price. For proper sorting by the caller, it can be important to know the way that the price was derived. By default, for price infos and details returned from a formula, the derivedFromField will be either VARIANT_BASE_FIELD, or BASE_FIELD.- Returns:
- Returns one of {"PRICE_DATA_FIELD", "VARIANT_BASE_FIELD", "BASE_FIELD"}
-
getPriceDataTierList
When a price list modifies an underlying price data that uses tiered pricing, also modify each tiered price and store it on this price detail.- Since:
- Pricing Service 2.2.0, Release Train 2.3.0
- See Also:
-
PriceDataTierRef
-
setPrice
public void setPrice(javax.money.MonetaryAmount price) Price determined from aPriceList.getPriceModifier()orPriceData.getPrice()for a particular list.- See Also:
-
PriceDetailComparable.getPrice()
-
setPaymentStrategy
Only relevant for price that came from a specificPriceData.Represents the payment strategy, specifically when payment is billed for a recurring price.
- See Also:
-
DefaultPaymentStrategy
-
setRecurringPriceDetail
public void setRecurringPriceDetail(com.broadleafcommerce.pricing.client.domain.RecurringPriceDetail recurringPriceDetail) - Since:
- Pricing Service 2.1.0, Release Train 2.2.0
- See Also:
-
PriceDetailComparable.getRecurringPriceDetail()
-
setUsagePriceDetail
public void setUsagePriceDetail(com.broadleafcommerce.pricing.client.domain.UsagePriceDetail usagePriceDetail) - Since:
- Pricing Service 2.1.0, Release Train 2.2.0
- See Also:
-
PriceDetailComparable.getUsagePriceDetail()
-
setPriceSource
The source of this price within the price list, e.g. price list formula, price list price data, etc.- See Also:
-
DefaultPriceListPriceSources
-
setPriceDataId
Id of the specific PriceData that this price came from.Only applicable if the
priceSourceisDefaultPriceListPriceSources.BLC_PRICE_LIST_PRICE_DATA. -
setPriority
- Since:
- Pricing Service 2.1.0, Release Train 2.2.0
- See Also:
-
PriceDetailComparable.getPriority()
-
setPriceListPriority
- Since:
- Pricing Service 2.1.0, Release Train 2.2.0
- See Also:
-
PriceDetailComparable.getPriceListPriority()
-
setActiveStartDate
Defines the beginning time for which this price is active. -
setActiveEndDate
Defines the ending time for which this price is active -
setStartingQuantity
Defines the initial quantity available for this price data before a pricing event such as a flash sale. It only serves an informational purpose. -
setAvailableQuantity
Defines the actual quantity available of a product as the sale progresses. Initially it is set equal to thestartingQuantityand is deducted as and when it gets used. -
setCancellationPolicyRef
A reference (typically the Id) of the CancellationPolicy for this priceData that governs how this priceData's subscription would be cancelled.- Since:
- Pricing Services 2.2.0, Release Train 2.3.0
-
setBackupPriceDetail
Transfers the backupPriceSummary from the Summary to this price detail. -
setPriceData
Store the priceData on this intermediary object to allow for consistent sorting of PriceListPriceDetail objects. -
setDerivedFromFieldType
A PriceInfo can be the result of a formula based pricing algorithm. For example, a sale price might be 10% off of the retail price. For proper sorting by the caller, it can be important to know the way that the price was derived. By default, for price infos and details returned from a formula, the derivedFromField will be either VARIANT_BASE_FIELD, or BASE_FIELD.- Parameters:
derivedFromField- The type of field used in formula based pricing
-
setPriceDataTierList
public void setPriceDataTierList(List<com.broadleafcommerce.pricing.client.domain.PriceDataTierRef> priceDataTierList) When a price list modifies an underlying price data that uses tiered pricing, also modify each tiered price and store it on this price detail.- Since:
- Pricing Service 2.2.0, Release Train 2.3.0
- See Also:
-
PriceDataTierRef
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-