Interface ConsignmentAmountCalculationStrategy
- All Known Implementing Classes:
DefaultConsignmentAmountCalculationStrategy
public interface ConsignmentAmountCalculationStrategy
This strategy provides methods to calculate amount for a
ConsignmentModel to perform payment and tax related operations.-
Method Summary
Modifier and TypeMethodDescriptioncalculateAlreadyCapturedAmount(ConsignmentModel consignment) Calculates the amount which has been already captured on theOrderModelof the givenConsignmentModelcalculateCaptureAmount(ConsignmentModel consignment) Calculates the amount to be captured for the givenConsignmentModelcalculateConsignmentEntryAmount(ConsignmentEntryModel consignmentEntry, boolean includeTaxes) Calculates amount forConsignmentEntryModelcalculateDiscountAmount(ConsignmentModel consignment) Calculates the discount amount for theConsignmentModeltaking a part ofAbstractOrderModel.TOTALDISCOUNTScalculateTotalOrderAmount(ConsignmentModel consignment) Calculates the order total of the givenConsignmentModel
-
Method Details
-
calculateCaptureAmount
Calculates the amount to be captured for the givenConsignmentModel- Parameters:
consignment- givenConsignmentModel- Returns:
- the amount to be captured for the given
ConsignmentModel
-
calculateAlreadyCapturedAmount
Calculates the amount which has been already captured on theOrderModelof the givenConsignmentModel- Parameters:
consignment- givenConsignmentModel- Returns:
BigDecimalthe sum of all previously captured amount
-
calculateTotalOrderAmount
Calculates the order total of the givenConsignmentModel- Parameters:
consignment- givenConsignmentModel- Returns:
BigDecimalthe order total
-
calculateDiscountAmount
Calculates the discount amount for theConsignmentModeltaking a part ofAbstractOrderModel.TOTALDISCOUNTS- Parameters:
consignment- givenConsignmentModel- Returns:
BigDecimalthe discount for the give consignment
-
calculateConsignmentEntryAmount
BigDecimal calculateConsignmentEntryAmount(ConsignmentEntryModel consignmentEntry, boolean includeTaxes) Calculates amount forConsignmentEntryModel- Parameters:
consignmentEntry- givenConsignmentEntryModelincludeTaxes- if true returns the amount with taxes otherwise - without taxes- Returns:
BigDecimalamount of the consignment entry
-