Class SubscriptionItemAdjustmentPriceDetail
- All Implemented Interfaces:
Serializable
- Author:
- Sunny Yu
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAttribute(String name, Object value) Takes in any additional attributes passed in the request not matching any defined properties.protected booleanbooleanMiscellaneous attributes that can be set to this request in order to inform business logicThe quantity of the item impacted by the adjustment after the subscription modification.Return any additional attributes passed in the request not matching any defined properties.Map holding any additional attributes passed in the request not matching any defined properties.javax.money.MonetaryAmountThe subscription item discount per unit to be deducted from theSubscriptionItemPriceDetail.getCreditedUnitAmount().com.broadleafcommerce.order.common.domain.CurrencyConversionDetailRepresents the details of the exchange rate used to convert aMonetaryAmountfrom one currency to another.javax.money.MonetaryAmountThe existing, un-prorated unit discount amount prior to the subscription modification.The quantity of the item impacted by the adjustment prior to the subscription modification.javax.money.MonetaryAmountSimilar toSubscriptionItemPriceDetail.getProratedUnitAmountBetweenActionAndNextBillDate(), this is theexistingFullSubscriptionPeriodUnitDiscountAmountprorated for the period between the action date and the next bill date and the regardless of the subscription action being taken or the payment strategy.javax.money.MonetaryAmountSimilar toSubscriptionItemPriceDetail.getProratedUnitAmountBetweenPeriodStartAndActionDate(), this is theexistingFullSubscriptionPeriodUnitDiscountAmountprorated for the period between the period start date and the action date and the regardless of the subscription action being taken or the payment strategy.javax.money.MonetaryAmountThe unit adjustment amount for this event item for the length of a full subscription period.javax.money.MonetaryAmountThe subscription item discount per unit to be deducted from theSubscriptionItemPriceDetail.getPriorUnbilledUnitAmount().javax.money.MonetaryAmountSimilar toSubscriptionItemPriceDetail.getProratedUnitAmountBetweenActionAndNextBillDate(), this is thefullSubscriptionPeriodUnitDiscountAmountprorated for the period between the action date and the next bill date after subscription action, regardless of the subscription action being taken or the payment strategy.javax.money.MonetaryAmountSimilar toSubscriptionItemPriceDetail.getProratedUnitAmountBetweenPeriodStartAndActionDate(), this is thefullSubscriptionPeriodUnitDiscountAmountprorated for the period between the period start date and the action date after subscription action, regardless of the subscription action being taken or the payment strategy.javax.money.MonetaryAmountSimilar toSubscriptionItemPriceDetail.getProratedUnitAmount(), this is the original discount amount prorated relative to the next invoice date.Reference to theSubscriptionItemAdjustmentjavax.money.MonetaryAmountThe unit discount amount to charge for previously discounted periods.javax.money.MonetaryAmountThe unit discount amount that is to be applied for the remainder of terms ifthe remainder of terms is being charged.inthashCode()booleanWhether this adjustment is applicable for the period that this detail is built for.voidsetAdditionalAttributes(Map<String, Object> additionalAttributes) Miscellaneous attributes that can be set to this request in order to inform business logicvoidsetAdjustmentQuantity(Integer adjustmentQuantity) The quantity of the item impacted by the adjustment after the subscription modification.voidsetAdjustmentRef(String adjustmentRef) voidsetApplicableForThisPeriod(boolean applicableForThisPeriod) Whether this adjustment is applicable for the period that this detail is built for.voidsetAttributes(Map<String, Object> attributes) Map holding any additional attributes passed in the request not matching any defined properties.voidsetCreditedUnitDiscountAmount(javax.money.MonetaryAmount creditedUnitDiscountAmount) The subscription item discount per unit to be deducted from theSubscriptionItemPriceDetail.getCreditedUnitAmount().voidsetCurrencyConversionDetail(com.broadleafcommerce.order.common.domain.CurrencyConversionDetail currencyConversionDetail) Represents the details of the exchange rate used to convert aMonetaryAmountfrom one currency to another.voidsetExistingFullSubscriptionPeriodUnitDiscountAmount(javax.money.MonetaryAmount existingFullSubscriptionPeriodUnitDiscountAmount) The existing, un-prorated unit discount amount prior to the subscription modification.voidsetExistingItemAdjustmentQuantity(Integer existingItemAdjustmentQuantity) The quantity of the item impacted by the adjustment prior to the subscription modification.voidsetExistingProratedUnitAmountBetweenActionAndNextBillDate(javax.money.MonetaryAmount existingProratedUnitAmountBetweenActionAndNextBillDate) Similar toSubscriptionItemPriceDetail.getProratedUnitAmountBetweenActionAndNextBillDate(), this is theexistingFullSubscriptionPeriodUnitDiscountAmountprorated for the period between the action date and the next bill date and the regardless of the subscription action being taken or the payment strategy.voidsetExistingProratedUnitAmountBetweenPeriodStartAndActionDate(javax.money.MonetaryAmount existingProratedUnitAmountBetweenPeriodStartAndActionDate) Similar toSubscriptionItemPriceDetail.getProratedUnitAmountBetweenPeriodStartAndActionDate(), this is theexistingFullSubscriptionPeriodUnitDiscountAmountprorated for the period between the period start date and the action date and the regardless of the subscription action being taken or the payment strategy.voidsetFullSubscriptionPeriodUnitDiscountAmount(javax.money.MonetaryAmount fullSubscriptionPeriodUnitDiscountAmount) The unit adjustment amount for this event item for the length of a full subscription period.voidsetPriorUnbilledUnitDiscountAmount(javax.money.MonetaryAmount priorUnbilledUnitDiscountAmount) The subscription item discount per unit to be deducted from theSubscriptionItemPriceDetail.getPriorUnbilledUnitAmount().voidsetProratedUnitAmountBetweenActionAndNextBillDate(javax.money.MonetaryAmount proratedUnitAmountBetweenActionAndNextBillDate) Similar toSubscriptionItemPriceDetail.getProratedUnitAmountBetweenActionAndNextBillDate(), this is thefullSubscriptionPeriodUnitDiscountAmountprorated for the period between the action date and the next bill date after subscription action, regardless of the subscription action being taken or the payment strategy.voidsetProratedUnitAmountBetweenPeriodStartAndActionDate(javax.money.MonetaryAmount proratedUnitAmountBetweenPeriodStartAndActionDate) Similar toSubscriptionItemPriceDetail.getProratedUnitAmountBetweenPeriodStartAndActionDate(), this is thefullSubscriptionPeriodUnitDiscountAmountprorated for the period between the period start date and the action date after subscription action, regardless of the subscription action being taken or the payment strategy.voidsetProratedUnitDiscountAmount(javax.money.MonetaryAmount proratedUnitDiscountAmount) Similar toSubscriptionItemPriceDetail.getProratedUnitAmount(), this is the original discount amount prorated relative to the next invoice date.voidsetSubscriptionItemAdjustmentRef(String subscriptionItemAdjustmentRef) Reference to theSubscriptionItemAdjustmentvoidsetUnitChargeForPreviouslyDiscountedPeriods(javax.money.MonetaryAmount unitChargeForPreviouslyDiscountedPeriods) The unit discount amount to charge for previously discounted periods.voidsetUnitDiscountAmountForRemainderOfTerms(javax.money.MonetaryAmount unitDiscountAmountForRemainderOfTerms) The unit discount amount that is to be applied for the remainder of terms ifthe remainder of terms is being charged.toString()
-
Constructor Details
-
SubscriptionItemAdjustmentPriceDetail
public SubscriptionItemAdjustmentPriceDetail()
-
-
Method Details
-
addAttribute
Takes in any additional attributes passed in the request not matching any defined properties.- Parameters:
name- Name of the additional attributevalue- Value of the additional attribute
-
getAttribute
Return any additional attributes passed in the request not matching any defined properties.- Returns:
- any additional attributes passed in the request not matching any defined properties.
-
getAdjustmentRef
- See Also:
-
getSubscriptionItemAdjustmentRef
Reference to theSubscriptionItemAdjustment -
getExistingItemAdjustmentQuantity
The quantity of the item impacted by the adjustment prior to the subscription modification.It is important to keep track because the impacted quantity may change after the modification, and this is used to calculate the credited and prior unbilled amounts. For example, if the quantity is reduced from 10 to 5 from the modification, the discount amount to deduct from the credited amount should be calculated based on the original quantity of 10, whereas the discount amount to deduct from the prorated amount should be calculated based on the new quantity of 5.
This is only relevant for
subscription modification flows. -
getAdjustmentQuantity
The quantity of the item impacted by the adjustment after the subscription modification.For
DefaultSubscriptionActionFlow.CREATE, this is just the item adjustment's quantity. -
getExistingFullSubscriptionPeriodUnitDiscountAmount
public javax.money.MonetaryAmount getExistingFullSubscriptionPeriodUnitDiscountAmount()The existing, un-prorated unit discount amount prior to the subscription modification. This is only relevant for adjustments that were applied prior to the modification, and can be helpful to determine whether the discount has changed due to the modification.This serves an informational purpose for downstream services.
-
getFullSubscriptionPeriodUnitDiscountAmount
public javax.money.MonetaryAmount getFullSubscriptionPeriodUnitDiscountAmount()The unit adjustment amount for this event item for the length of a full subscription period. This serves an informational purpose for downstream services.For
DefaultSubscriptionActionFlow.CREATE, this is just the non-prorated unit discount amount for the applied adjustment. -
getExistingProratedUnitAmountBetweenPeriodStartAndActionDate
public javax.money.MonetaryAmount getExistingProratedUnitAmountBetweenPeriodStartAndActionDate()Similar toSubscriptionItemPriceDetail.getProratedUnitAmountBetweenPeriodStartAndActionDate(), this is theexistingFullSubscriptionPeriodUnitDiscountAmountprorated for the period between the period start date and the action date and the regardless of the subscription action being taken or the payment strategy. This serves as informational purposes for downstream services. -
getExistingProratedUnitAmountBetweenActionAndNextBillDate
public javax.money.MonetaryAmount getExistingProratedUnitAmountBetweenActionAndNextBillDate()Similar toSubscriptionItemPriceDetail.getProratedUnitAmountBetweenActionAndNextBillDate(), this is theexistingFullSubscriptionPeriodUnitDiscountAmountprorated for the period between the action date and the next bill date and the regardless of the subscription action being taken or the payment strategy. This serves as informational purposes for downstream services. -
getProratedUnitAmountBetweenPeriodStartAndActionDate
public javax.money.MonetaryAmount getProratedUnitAmountBetweenPeriodStartAndActionDate()Similar toSubscriptionItemPriceDetail.getProratedUnitAmountBetweenPeriodStartAndActionDate(), this is thefullSubscriptionPeriodUnitDiscountAmountprorated for the period between the period start date and the action date after subscription action, regardless of the subscription action being taken or the payment strategy. This serves as informational purposes for downstream services. -
getProratedUnitAmountBetweenActionAndNextBillDate
public javax.money.MonetaryAmount getProratedUnitAmountBetweenActionAndNextBillDate()Similar toSubscriptionItemPriceDetail.getProratedUnitAmountBetweenActionAndNextBillDate(), this is thefullSubscriptionPeriodUnitDiscountAmountprorated for the period between the action date and the next bill date after subscription action, regardless of the subscription action being taken or the payment strategy. This serves as informational purposes for downstream services. -
isApplicableForThisPeriod
public boolean isApplicableForThisPeriod()Whether this adjustment is applicable for the period that this detail is built for. This is useful for downstream services to determine whether the adjustment detail need to be considered for a certain period. -
getProratedUnitDiscountAmount
public javax.money.MonetaryAmount getProratedUnitDiscountAmount()Similar toSubscriptionItemPriceDetail.getProratedUnitAmount(), this is the original discount amount prorated relative to the next invoice date. For a new purchase, this reflects the full date range. For edits, upgrades, & downgrades, this reflects the prorated price between the action & the end of the billing period. -
getCreditedUnitDiscountAmount
public javax.money.MonetaryAmount getCreditedUnitDiscountAmount()The subscription item discount per unit to be deducted from theSubscriptionItemPriceDetail.getCreditedUnitAmount().Similar to
SubscriptionItemPriceDetail.getCreditedUnitAmount(), the customer had the full discount applied in their previous payment, so when it needs to be credited due to an edit, upgrade, or downgrade, the discount amount needs to be prorated and deducted from the credited amount. -
getPriorUnbilledUnitDiscountAmount
public javax.money.MonetaryAmount getPriorUnbilledUnitDiscountAmount()The subscription item discount per unit to be deducted from theSubscriptionItemPriceDetail.getPriorUnbilledUnitAmount(). Note: This typically only impacts the first period in the estimatedFuturePayments list. Similar toSubscriptionItemPriceDetail.getPriorUnbilledUnitAmount(), the discount amount also needs to be prorated and deducted from the prior unbilled amount, since the discount was applied prior to the edit, upgrade, or downgrade. -
getUnitDiscountAmountForRemainderOfTerms
public javax.money.MonetaryAmount getUnitDiscountAmountForRemainderOfTerms()The unit discount amount that is to be applied for the remainder of terms ifthe remainder of terms is being charged. -
getUnitChargeForPreviouslyDiscountedPeriods
public javax.money.MonetaryAmount getUnitChargeForPreviouslyDiscountedPeriods()The unit discount amount to charge for previously discounted periods. Note that this does not include the amount to charge for the current period. Rather, the amount to charge for the current period is included ingetPriorUnbilledUnitDiscountAmount()and is negative to represent a charge. -
getCurrencyConversionDetail
public com.broadleafcommerce.order.common.domain.CurrencyConversionDetail getCurrencyConversionDetail()Represents the details of the exchange rate used to convert aMonetaryAmountfrom one currency to another. This is used to describe the amount of the adjustment if it was converted from a base currency. This is done when the target item was in a different currency from the offer and was also converted, that is, the item's original currency was the same as that which the offer targets but its price was converted to another currency. -
getAttributes
Map holding any additional attributes passed in the request not matching any defined properties. -
getAdditionalAttributes
Miscellaneous attributes that can be set to this request in order to inform business logic -
setAdjustmentRef
- See Also:
-
setSubscriptionItemAdjustmentRef
Reference to theSubscriptionItemAdjustment -
setExistingItemAdjustmentQuantity
The quantity of the item impacted by the adjustment prior to the subscription modification.It is important to keep track because the impacted quantity may change after the modification, and this is used to calculate the credited and prior unbilled amounts. For example, if the quantity is reduced from 10 to 5 from the modification, the discount amount to deduct from the credited amount should be calculated based on the original quantity of 10, whereas the discount amount to deduct from the prorated amount should be calculated based on the new quantity of 5.
This is only relevant for
subscription modification flows. -
setAdjustmentQuantity
The quantity of the item impacted by the adjustment after the subscription modification.For
DefaultSubscriptionActionFlow.CREATE, this is just the item adjustment's quantity. -
setExistingFullSubscriptionPeriodUnitDiscountAmount
public void setExistingFullSubscriptionPeriodUnitDiscountAmount(javax.money.MonetaryAmount existingFullSubscriptionPeriodUnitDiscountAmount) The existing, un-prorated unit discount amount prior to the subscription modification. This is only relevant for adjustments that were applied prior to the modification, and can be helpful to determine whether the discount has changed due to the modification.This serves an informational purpose for downstream services.
-
setFullSubscriptionPeriodUnitDiscountAmount
public void setFullSubscriptionPeriodUnitDiscountAmount(javax.money.MonetaryAmount fullSubscriptionPeriodUnitDiscountAmount) The unit adjustment amount for this event item for the length of a full subscription period. This serves an informational purpose for downstream services.For
DefaultSubscriptionActionFlow.CREATE, this is just the non-prorated unit discount amount for the applied adjustment. -
setExistingProratedUnitAmountBetweenPeriodStartAndActionDate
public void setExistingProratedUnitAmountBetweenPeriodStartAndActionDate(javax.money.MonetaryAmount existingProratedUnitAmountBetweenPeriodStartAndActionDate) Similar toSubscriptionItemPriceDetail.getProratedUnitAmountBetweenPeriodStartAndActionDate(), this is theexistingFullSubscriptionPeriodUnitDiscountAmountprorated for the period between the period start date and the action date and the regardless of the subscription action being taken or the payment strategy. This serves as informational purposes for downstream services. -
setExistingProratedUnitAmountBetweenActionAndNextBillDate
public void setExistingProratedUnitAmountBetweenActionAndNextBillDate(javax.money.MonetaryAmount existingProratedUnitAmountBetweenActionAndNextBillDate) Similar toSubscriptionItemPriceDetail.getProratedUnitAmountBetweenActionAndNextBillDate(), this is theexistingFullSubscriptionPeriodUnitDiscountAmountprorated for the period between the action date and the next bill date and the regardless of the subscription action being taken or the payment strategy. This serves as informational purposes for downstream services. -
setProratedUnitAmountBetweenPeriodStartAndActionDate
public void setProratedUnitAmountBetweenPeriodStartAndActionDate(javax.money.MonetaryAmount proratedUnitAmountBetweenPeriodStartAndActionDate) Similar toSubscriptionItemPriceDetail.getProratedUnitAmountBetweenPeriodStartAndActionDate(), this is thefullSubscriptionPeriodUnitDiscountAmountprorated for the period between the period start date and the action date after subscription action, regardless of the subscription action being taken or the payment strategy. This serves as informational purposes for downstream services. -
setProratedUnitAmountBetweenActionAndNextBillDate
public void setProratedUnitAmountBetweenActionAndNextBillDate(javax.money.MonetaryAmount proratedUnitAmountBetweenActionAndNextBillDate) Similar toSubscriptionItemPriceDetail.getProratedUnitAmountBetweenActionAndNextBillDate(), this is thefullSubscriptionPeriodUnitDiscountAmountprorated for the period between the action date and the next bill date after subscription action, regardless of the subscription action being taken or the payment strategy. This serves as informational purposes for downstream services. -
setApplicableForThisPeriod
public void setApplicableForThisPeriod(boolean applicableForThisPeriod) Whether this adjustment is applicable for the period that this detail is built for. This is useful for downstream services to determine whether the adjustment detail need to be considered for a certain period. -
setProratedUnitDiscountAmount
public void setProratedUnitDiscountAmount(javax.money.MonetaryAmount proratedUnitDiscountAmount) Similar toSubscriptionItemPriceDetail.getProratedUnitAmount(), this is the original discount amount prorated relative to the next invoice date. For a new purchase, this reflects the full date range. For edits, upgrades, & downgrades, this reflects the prorated price between the action & the end of the billing period. -
setCreditedUnitDiscountAmount
public void setCreditedUnitDiscountAmount(javax.money.MonetaryAmount creditedUnitDiscountAmount) The subscription item discount per unit to be deducted from theSubscriptionItemPriceDetail.getCreditedUnitAmount().Similar to
SubscriptionItemPriceDetail.getCreditedUnitAmount(), the customer had the full discount applied in their previous payment, so when it needs to be credited due to an edit, upgrade, or downgrade, the discount amount needs to be prorated and deducted from the credited amount. -
setPriorUnbilledUnitDiscountAmount
public void setPriorUnbilledUnitDiscountAmount(javax.money.MonetaryAmount priorUnbilledUnitDiscountAmount) The subscription item discount per unit to be deducted from theSubscriptionItemPriceDetail.getPriorUnbilledUnitAmount(). Note: This typically only impacts the first period in the estimatedFuturePayments list. Similar toSubscriptionItemPriceDetail.getPriorUnbilledUnitAmount(), the discount amount also needs to be prorated and deducted from the prior unbilled amount, since the discount was applied prior to the edit, upgrade, or downgrade. -
setUnitDiscountAmountForRemainderOfTerms
public void setUnitDiscountAmountForRemainderOfTerms(javax.money.MonetaryAmount unitDiscountAmountForRemainderOfTerms) The unit discount amount that is to be applied for the remainder of terms ifthe remainder of terms is being charged. -
setUnitChargeForPreviouslyDiscountedPeriods
public void setUnitChargeForPreviouslyDiscountedPeriods(javax.money.MonetaryAmount unitChargeForPreviouslyDiscountedPeriods) The unit discount amount to charge for previously discounted periods. Note that this does not include the amount to charge for the current period. Rather, the amount to charge for the current period is included ingetPriorUnbilledUnitDiscountAmount()and is negative to represent a charge. -
setCurrencyConversionDetail
public void setCurrencyConversionDetail(com.broadleafcommerce.order.common.domain.CurrencyConversionDetail currencyConversionDetail) Represents the details of the exchange rate used to convert aMonetaryAmountfrom one currency to another. This is used to describe the amount of the adjustment if it was converted from a base currency. This is done when the target item was in a different currency from the offer and was also converted, that is, the item's original currency was the same as that which the offer targets but its price was converted to another currency. -
setAttributes
Map holding any additional attributes passed in the request not matching any defined properties. -
setAdditionalAttributes
Miscellaneous attributes that can be set to this request in order to inform business logic -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-