Interface ProrationService
-
- All Known Implementing Classes:
DefaultProrationService
public interface ProrationService- Author:
- Nathan Moore (nathanmoore).
-
-
Method Summary
-
-
-
Method Detail
-
calculateProratedItemAdjustments
@NonNull Set<EnhancedProratedItemOfferAdjustment> calculateProratedItemAdjustments(@NonNull EnhancedOrder order)
For anyOfferthat has aDiscount.prorationTypeofProrationType.TARGET_AND_QUALIFIER, this will populate all of theProratedItemOfferAdjustmentson theLineItemOfferDetailsmostly for the sake of reporting instruments.- Parameters:
order- theEnhancedOrderwhose items may needProratedItemOfferAdjustments- Returns:
- all of the
ProratedItemOfferAdjustmentsfor thisOrder'sorder and fulfillmentLineItems.
-
populateProratedOrderAdjustments
@NonNull void populateProratedOrderAdjustments(@NonNull EnhancedOrder order)Populates all of theEnhancedProratedOfferAdjustmentsfor anyOfferthat has aDiscount.getTargetType()ofDiscountTargetType.ORDERand add them onto the individual discountableorder line items.- Parameters:
order- theEnhancedOrderto populate the order offer adjustment prorations
-
populateProratedFulfillmentGroupAdjustments
@NonNull void populateProratedFulfillmentGroupAdjustments(@NonNull EnhancedOrder order)Populates all of theEnhancedProratedOfferAdjustmentsfor anyOfferthat has aDiscount.getTargetType()ofDiscountTargetType.FULFILLMENT_GROUPand add them onto the individual discountablefulfillment items, as well as populatingEnhancedFulfillmentGroup.getProratedFulfillmentAdjustments().- Parameters:
order- theEnhancedOrderto populate the fulfillment group offer adjustment prorations
-
addProratedItemOfferAdjustmentsToParentOfferDetails
void addProratedItemOfferAdjustmentsToParentOfferDetails(@NonNull Collection<? extends EnhancedProratedItemOfferAdjustment> proratedAdjustments)Adds theProratedItemOfferAdjustmentsto their parentLineItemOfferDetails- Parameters:
proratedAdjustments-ProratedItemOfferAdjustmentsto be added
-
-