Class PriceSummary
java.lang.Object
com.broadleafcommerce.pricing.domain.PriceSummary
- All Implemented Interfaces:
Serializable
Summarizes price information from a
PriceData for a PriceableTarget. This is a
DTO used in the PriceInfoService and is not intended to be returned or supplied via APIs.- Since:
- Pricing Service 2.1.0, Release Train 2.2.0
- Author:
- Nathan Moore (nathandmoore)
- 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.The available quantity that can use this price data.This field is used for summaries based on a limited quantity PriceData.A reference (typically the Id) of the CancellationPolicy for this priceData that governs how this priceData's subscription would be cancelled.Only relevant for price that came from a specificPriceData.javax.money.MonetaryAmountgetPrice()The one-time price.Used to store the price data object used to create this summary if applicable.Id of the specific PriceData that this price came from.Used to store the priceDataTiers relevant for the related targetThe relative priority of this price detail vs others that might apply to the same target.com.broadleafcommerce.pricing.client.domain.RecurringPriceDetailRepresents the details related to a recurring (or subscription) price include the terms.Defines the initial quantity available for this price data before a pricing event such as a flash sale.com.broadleafcommerce.pricing.client.domain.UsagePriceDetailRepresents the details related to a usage price including the units.inthashCode()voidsetActiveEndDate(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) The available quantity that can use this price data.voidsetBackupPriceSummary(Optional<PriceSummary> backupPriceSummary) This field is used for summaries based on a limited quantity PriceData.voidsetCancellationPolicyRef(String cancellationPolicyRef) A reference (typically the Id) of the CancellationPolicy for this priceData that governs how this priceData's subscription would be cancelled.voidsetPaymentStrategy(String paymentStrategy) Only relevant for price that came from a specificPriceData.voidsetPrice(javax.money.MonetaryAmount price) The one-time price.voidsetPriceData(PriceData priceData) Used to store the price data object used to create this summary if applicable.voidsetPriceDataId(String priceDataId) Id of the specific PriceData that this price came from.voidsetPriceDataTiers(List<PriceDataTier> priceDataTiers) Used to store the priceDataTiers relevant for the related targetvoidsetPriority(Integer priority) The relative priority of this price detail vs others that might apply to the same target.voidsetRecurringPriceDetail(com.broadleafcommerce.pricing.client.domain.RecurringPriceDetail recurringPriceDetail) Represents the details related to a recurring (or subscription) price include the terms.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) Represents the details related to a usage price including the units.toString()
-
Constructor Details
-
PriceSummary
public PriceSummary()
-
-
Method Details
-
getPrice
public javax.money.MonetaryAmount getPrice()The one-time price. This is typically used during checkout. -
getPaymentStrategy
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
-
getPriceDataId
Id of the specific PriceData that this price came from.Only applicable if the price was from a PriceData.
-
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
The available quantity that can use this price data. This is used for events such as a flash sale where the sale price is limited to a certain amount of quantity. -
getRecurringPriceDetail
public com.broadleafcommerce.pricing.client.domain.RecurringPriceDetail getRecurringPriceDetail()Represents the details related to a recurring (or subscription) price include the terms. -
getUsagePriceDetail
public com.broadleafcommerce.pricing.client.domain.UsagePriceDetail getUsagePriceDetail()Represents the details related to a usage price including the units. -
getPriority
The relative priority of this price detail vs others that might apply to the same target. -
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
-
getBackupPriceSummary
This field is used for summaries based on a limited quantity PriceData. It allows the system to provide a backup to the front-end to show pricing if the user desires to purchase more quantity than is available at the limited quantity price. For summary objects that do not have a limited quantity, the summary will be stored here for convenience in determining if this PriceSummary might be used as a backup to another limited quantity summary. -
getPriceData
Used to store the price data object used to create this summary if applicable. -
getPriceDataTiers
Used to store the priceDataTiers relevant for the related target- Since:
- Pricing Service 2.2.0, Release Train 2.3.0
-
setPrice
public void setPrice(javax.money.MonetaryAmount price) The one-time price. This is typically used during checkout. -
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
-
setPriceDataId
Id of the specific PriceData that this price came from.Only applicable if the price was from a PriceData.
-
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
The available quantity that can use this price data. This is used for events such as a flash sale where the sale price is limited to a certain amount of quantity. -
setRecurringPriceDetail
public void setRecurringPriceDetail(com.broadleafcommerce.pricing.client.domain.RecurringPriceDetail recurringPriceDetail) Represents the details related to a recurring (or subscription) price include the terms. -
setUsagePriceDetail
public void setUsagePriceDetail(com.broadleafcommerce.pricing.client.domain.UsagePriceDetail usagePriceDetail) Represents the details related to a usage price including the units. -
setPriority
The relative priority of this price detail vs others that might apply to the same target. -
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
-
setBackupPriceSummary
This field is used for summaries based on a limited quantity PriceData. It allows the system to provide a backup to the front-end to show pricing if the user desires to purchase more quantity than is available at the limited quantity price. For summary objects that do not have a limited quantity, the summary will be stored here for convenience in determining if this PriceSummary might be used as a backup to another limited quantity summary. -
setPriceData
Used to store the price data object used to create this summary if applicable. -
setPriceDataTiers
Used to store the priceDataTiers relevant for the related target- Since:
- Pricing Service 2.2.0, Release Train 2.3.0
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-