Class SubscriptionItemPriceDetail
java.lang.Object
com.broadleafcommerce.cartoperation.service.provider.domain.SubscriptionItemPriceDetail
- All Implemented Interfaces:
Serializable
Describes the amount being charged for this item. This may be an amount due now, or a future
payment.
- Since:
- Cart Operation Service 2.3.0, Release Train 2.3.0
- 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 booleanbooleanThe map ofSubscriptionItemAdjustmentPriceDetailby adjustment reference, containing the details about how the discount affects the prorated unit amount, credited amount, and prior unbilled amount.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.Reference to the subscriptionCartItemjavax.money.MonetaryAmountStores the credited portion of the item subtotal, which is based on thegetCreditedUnitAmount().javax.money.MonetaryAmountFor edits, upgrades, and downgrades on a subscription that’s using a PREPAID payment strategy, the customer has already paid the full amount for this billing cycle at the previous rate.An item's quantity override value used for "due now" price calculations where the item's quantity decreased due to the subscription action.The existing subscription item's quantity prior the subscription action (e.g.Name of the item identified bygetItemRefType()&getItemRef().Reference to the id of the item represented by this object.Type of item that this object represents.javax.money.MonetaryAmountStores the item subtotal, which is equal togetProratedAmount()+getPriorUnbilledAmount()-getCreditedAmount().Reference of the parent subscription item's backing item if this is a child subscription itemType of the parent subscription item's backing item if this is a child subscription itemThe item's parent quantity following the subscription action (e.g.javax.money.MonetaryAmountStores the prior unbilled portion of the item subtotal, which is based on thegetPriorUnbilledUnitAmount().javax.money.MonetaryAmountPrior to an edit, upgrade, or downgrade on a subscription that’s using a Postpaid payment strategy, the system will have prior unbilled charges that will be part of the next invoice.javax.money.MonetaryAmountStores the prorated portion of the item subtotal, which is based on thegetProratedUnitAmount().javax.money.MonetaryAmountThe subscription item price per unit, prorated relative to the next invoice date.The item's quantity following the subscription action (e.g.inthashCode()voidsetAdjustmentPriceDetailsByAdjustmentRef(Map<String, SubscriptionItemAdjustmentPriceDetail> adjustmentPriceDetailsByAdjustmentRef) The map ofSubscriptionItemAdjustmentPriceDetailby adjustment reference, containing the details about how the discount affects the prorated unit amount, credited amount, and prior unbilled amount.voidsetAttributes(Map<String, Object> attributes) Map holding any additional attributes passed in the request not matching any defined properties.voidsetCartItemId(String cartItemId) Reference to the subscriptionCartItemvoidsetCreditedAmount(javax.money.MonetaryAmount creditedAmount) Stores the credited portion of the item subtotal, which is based on thegetCreditedUnitAmount().voidsetCreditedUnitAmount(javax.money.MonetaryAmount creditedUnitAmount) For edits, upgrades, and downgrades on a subscription that’s using a PREPAID payment strategy, the customer has already paid the full amount for this billing cycle at the previous rate.voidsetDueNowQuantityOverride(Integer dueNowQuantityOverride) An item's quantity override value used for "due now" price calculations where the item's quantity decreased due to the subscription action.voidsetExistingSubscriptionItemQuantity(Integer existingSubscriptionItemQuantity) The existing subscription item's quantity prior the subscription action (e.g.voidsetItemName(String itemName) Name of the item identified bygetItemRefType()&getItemRef().voidsetItemRef(String itemRef) Reference to the id of the item represented by this object.voidsetItemRefType(String itemRefType) Type of item that this object represents.voidsetItemSubtotal(javax.money.MonetaryAmount itemSubtotal) Stores the item subtotal, which is equal togetProratedAmount()+getPriorUnbilledAmount()-getCreditedAmount().voidsetParentItemRef(String parentItemRef) Reference of the parent subscription item's backing item if this is a child subscription itemvoidsetParentItemRefType(String parentItemRefType) Type of the parent subscription item's backing item if this is a child subscription itemvoidsetParentQuantity(Integer parentQuantity) The item's parent quantity following the subscription action (e.g.voidsetPriorUnbilledAmount(javax.money.MonetaryAmount priorUnbilledAmount) Stores the prior unbilled portion of the item subtotal, which is based on thegetPriorUnbilledUnitAmount().voidsetPriorUnbilledUnitAmount(javax.money.MonetaryAmount priorUnbilledUnitAmount) Prior to an edit, upgrade, or downgrade on a subscription that’s using a Postpaid payment strategy, the system will have prior unbilled charges that will be part of the next invoice.voidsetProratedAmount(javax.money.MonetaryAmount proratedAmount) Stores the prorated portion of the item subtotal, which is based on thegetProratedUnitAmount().voidsetProratedUnitAmount(javax.money.MonetaryAmount proratedUnitAmount) The subscription item price per unit, prorated relative to the next invoice date.voidsetQuantity(Integer quantity) The item's quantity following the subscription action (e.g.toString()
-
Constructor Details
-
SubscriptionItemPriceDetail
public SubscriptionItemPriceDetail()
-
-
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.
-
getCartItemId
Reference to the subscriptionCartItem -
getItemRefType
Type of item that this object represents. For example, BLC_PRODUCT. -
getItemRef
Reference to the id of the item represented by this object. For example, the product id. -
getItemName
Name of the item identified bygetItemRefType()&getItemRef(). -
getParentItemRefType
Type of the parent subscription item's backing item if this is a child subscription item -
getParentItemRef
Reference of the parent subscription item's backing item if this is a child subscription item -
getParentQuantity
The item's parent quantity following the subscription action (e.g. create, edit, upgrade, downgrade, etc.). This is typically used to scale a dependent item's quantity based on its parent for calculating subtotals. -
getProratedUnitAmount
public javax.money.MonetaryAmount getProratedUnitAmount()The subscription item price per unit, 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. -
getCreditedUnitAmount
public javax.money.MonetaryAmount getCreditedUnitAmount()For edits, upgrades, and downgrades on a subscription that’s using a PREPAID payment strategy, the customer has already paid the full amount for this billing cycle at the previous rate. For example, consider a customer who is upgrading from 10 to 20 licenses at $1 each half-way through a 30-day month. The user prorated amount would be $10 for 20 licenses. This user has already partially paid for 10 of the licenses, so they will be due a credit of $5 toward the second-half-of-the-month amount. Note: This typically only impacts the first period in the estimatedFuturePayments list. -
getPriorUnbilledUnitAmount
public javax.money.MonetaryAmount getPriorUnbilledUnitAmount()Prior to an edit, upgrade, or downgrade on a subscription that’s using a Postpaid payment strategy, the system will have prior unbilled charges that will be part of the next invoice. In this case, the user will owe this in addition to the prorated charges for the changes being made. For example, consider a customer who is upgrading from 10 to 20 licenses at $1 each half-way through a 30-day month. The user prorated amount would be $10 for 20 licenses. This user also owes $5 for access to the 10 licenses in the first half of the month. Note: This typically only impacts the first period in the estimatedFuturePayments list. -
getQuantity
The item's quantity following the subscription action (e.g. create, edit, upgrade, downgrade, etc.). -
getDueNowQuantityOverride
An item's quantity override value used for "due now" price calculations where the item's quantity decreased due to the subscription action. -
getExistingSubscriptionItemQuantity
The existing subscription item's quantity prior the subscription action (e.g. edit, upgrade, downgrade, etc.). -
getAdjustmentPriceDetailsByAdjustmentRef
The map ofSubscriptionItemAdjustmentPriceDetailby adjustment reference, containing the details about how the discount affects the prorated unit amount, credited amount, and prior unbilled amount. -
getAttributes
Map holding any additional attributes passed in the request not matching any defined properties. -
getItemSubtotal
public javax.money.MonetaryAmount getItemSubtotal()Stores the item subtotal, which is equal togetProratedAmount()+getPriorUnbilledAmount()-getCreditedAmount().Note: Keep in mind that the
getProratedAmount()is based on a unit price that's scaled based on the item's new quantity, whereas thegetPriorUnbilledAmount()&getCreditedAmount()are based on unit prices that are scaled based on the item's previous quantity.- Returns:
- the item subtotal.
-
getProratedAmount
public javax.money.MonetaryAmount getProratedAmount()Stores the prorated portion of the item subtotal, which is based on thegetProratedUnitAmount(). This unit amount is scaled by thegetDueNowQuantityOverride()if it's present. Otherwise, the unit amount is scaled by thegetQuantity().- Returns:
- the prorated portion of the item subtotal.
-
getCreditedAmount
public javax.money.MonetaryAmount getCreditedAmount()Stores the credited portion of the item subtotal, which is based on thegetCreditedUnitAmount(). This unit amount is scaled by thegetExistingSubscriptionItemQuantity().- Returns:
- the credited portion of the item subtotal.
-
getPriorUnbilledAmount
public javax.money.MonetaryAmount getPriorUnbilledAmount()Stores the prior unbilled portion of the item subtotal, which is based on thegetPriorUnbilledUnitAmount(). This unit amount is scaled by thegetExistingSubscriptionItemQuantity().- Returns:
- the prior unbilled portion of the item subtotal.
-
setCartItemId
Reference to the subscriptionCartItem -
setItemRefType
Type of item that this object represents. For example, BLC_PRODUCT. -
setItemRef
Reference to the id of the item represented by this object. For example, the product id. -
setItemName
Name of the item identified bygetItemRefType()&getItemRef(). -
setParentItemRefType
Type of the parent subscription item's backing item if this is a child subscription item -
setParentItemRef
Reference of the parent subscription item's backing item if this is a child subscription item -
setParentQuantity
The item's parent quantity following the subscription action (e.g. create, edit, upgrade, downgrade, etc.). This is typically used to scale a dependent item's quantity based on its parent for calculating subtotals. -
setProratedUnitAmount
public void setProratedUnitAmount(javax.money.MonetaryAmount proratedUnitAmount) The subscription item price per unit, 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. -
setCreditedUnitAmount
public void setCreditedUnitAmount(javax.money.MonetaryAmount creditedUnitAmount) For edits, upgrades, and downgrades on a subscription that’s using a PREPAID payment strategy, the customer has already paid the full amount for this billing cycle at the previous rate. For example, consider a customer who is upgrading from 10 to 20 licenses at $1 each half-way through a 30-day month. The user prorated amount would be $10 for 20 licenses. This user has already partially paid for 10 of the licenses, so they will be due a credit of $5 toward the second-half-of-the-month amount. Note: This typically only impacts the first period in the estimatedFuturePayments list. -
setPriorUnbilledUnitAmount
public void setPriorUnbilledUnitAmount(javax.money.MonetaryAmount priorUnbilledUnitAmount) Prior to an edit, upgrade, or downgrade on a subscription that’s using a Postpaid payment strategy, the system will have prior unbilled charges that will be part of the next invoice. In this case, the user will owe this in addition to the prorated charges for the changes being made. For example, consider a customer who is upgrading from 10 to 20 licenses at $1 each half-way through a 30-day month. The user prorated amount would be $10 for 20 licenses. This user also owes $5 for access to the 10 licenses in the first half of the month. Note: This typically only impacts the first period in the estimatedFuturePayments list. -
setQuantity
The item's quantity following the subscription action (e.g. create, edit, upgrade, downgrade, etc.). -
setDueNowQuantityOverride
An item's quantity override value used for "due now" price calculations where the item's quantity decreased due to the subscription action. -
setExistingSubscriptionItemQuantity
The existing subscription item's quantity prior the subscription action (e.g. edit, upgrade, downgrade, etc.). -
setAdjustmentPriceDetailsByAdjustmentRef
public void setAdjustmentPriceDetailsByAdjustmentRef(Map<String, SubscriptionItemAdjustmentPriceDetail> adjustmentPriceDetailsByAdjustmentRef) The map ofSubscriptionItemAdjustmentPriceDetailby adjustment reference, containing the details about how the discount affects the prorated unit amount, credited amount, and prior unbilled amount. -
setAttributes
Map holding any additional attributes passed in the request not matching any defined properties. -
setItemSubtotal
public void setItemSubtotal(javax.money.MonetaryAmount itemSubtotal) Stores the item subtotal, which is equal togetProratedAmount()+getPriorUnbilledAmount()-getCreditedAmount().Note: Keep in mind that the
getProratedAmount()is based on a unit price that's scaled based on the item's new quantity, whereas thegetPriorUnbilledAmount()&getCreditedAmount()are based on unit prices that are scaled based on the item's previous quantity. -
setProratedAmount
public void setProratedAmount(javax.money.MonetaryAmount proratedAmount) Stores the prorated portion of the item subtotal, which is based on thegetProratedUnitAmount(). This unit amount is scaled by thegetDueNowQuantityOverride()if it's present. Otherwise, the unit amount is scaled by thegetQuantity(). -
setCreditedAmount
public void setCreditedAmount(javax.money.MonetaryAmount creditedAmount) Stores the credited portion of the item subtotal, which is based on thegetCreditedUnitAmount(). This unit amount is scaled by thegetExistingSubscriptionItemQuantity(). -
setPriorUnbilledAmount
public void setPriorUnbilledAmount(javax.money.MonetaryAmount priorUnbilledAmount) Stores the prior unbilled portion of the item subtotal, which is based on thegetPriorUnbilledUnitAmount(). This unit amount is scaled by thegetExistingSubscriptionItemQuantity(). -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-