Class SubscriptionItemAdjustmentPriceDetail
- All Implemented Interfaces:
Serializable
- Since:
- Cart Operation Service 2.3.0, Release Train 2.3.0
- 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.Reference to the promotion or offer that drives this adjustment.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().The quantity of the item impacted by the adjustment prior to the subscription modification.javax.money.MonetaryAmountThe subscription item discount per unit to be deducted from theSubscriptionItemPriceDetail.getPriorUnbilledUnitAmount().javax.money.MonetaryAmountSimilar toSubscriptionItemPriceDetail.getProratedUnitAmount(), this is the original discount amount prorated relative to the next invoice date.inthashCode()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) Reference to the promotion or offer that drives this adjustment.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().voidsetExistingItemAdjustmentQuantity(Integer existingItemAdjustmentQuantity) The quantity of the item impacted by the adjustment prior to the subscription modification.voidsetPriorUnbilledUnitDiscountAmount(javax.money.MonetaryAmount priorUnbilledUnitDiscountAmount) The subscription item discount per unit to be deducted from theSubscriptionItemPriceDetail.getPriorUnbilledUnitAmount().voidsetProratedUnitDiscountAmount(javax.money.MonetaryAmount proratedUnitDiscountAmount) Similar toSubscriptionItemPriceDetail.getProratedUnitAmount(), this is the original discount amount prorated relative to the next invoice date.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
Reference to the promotion or offer that drives this adjustment. -
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.
- See Also:
-
getAdjustmentQuantity
The quantity of the item impacted by the adjustment after the subscription modification.For
DefaultSubscriptionActionFlow.CREATE, this is just the item's quantity. -
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().Similar to
SubscriptionItemPriceDetail.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. -
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
Reference to the promotion or offer that drives this adjustment. -
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.
- See Also:
-
setAdjustmentQuantity
The quantity of the item impacted by the adjustment after the subscription modification.For
DefaultSubscriptionActionFlow.CREATE, this is just the item's quantity. -
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().Similar to
SubscriptionItemPriceDetail.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. -
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
-