Interface ConsignmentAmountCalculationStrategy
-
- All Known Implementing Classes:
DefaultConsignmentAmountCalculationStrategy
public interface ConsignmentAmountCalculationStrategyThis strategy provides methods to calculate amount for aConsignmentModelto perform payment and tax related operations.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.math.BigDecimalcalculateAlreadyCapturedAmount(ConsignmentModel consignment)Calculates the amount which has been already captured on theOrderModelof the givenConsignmentModeljava.math.BigDecimalcalculateCaptureAmount(ConsignmentModel consignment)Calculates the amount to be captured for the givenConsignmentModeljava.math.BigDecimalcalculateConsignmentEntryAmount(ConsignmentEntryModel consignmentEntry, boolean includeTaxes)Calculates amount forConsignmentEntryModeljava.math.BigDecimalcalculateDiscountAmount(ConsignmentModel consignment)Calculates the discount amount for theConsignmentModeltaking a part ofAbstractOrderModel.TOTALDISCOUNTSjava.math.BigDecimalcalculateTotalOrderAmount(ConsignmentModel consignment)Calculates the order total of the givenConsignmentModel
-
-
-
Method Detail
-
calculateCaptureAmount
java.math.BigDecimal calculateCaptureAmount(ConsignmentModel consignment)
Calculates the amount to be captured for the givenConsignmentModel- Parameters:
consignment- givenConsignmentModel- Returns:
- the amount to be captured for the given
ConsignmentModel
-
calculateAlreadyCapturedAmount
java.math.BigDecimal calculateAlreadyCapturedAmount(ConsignmentModel consignment)
Calculates the amount which has been already captured on theOrderModelof the givenConsignmentModel- Parameters:
consignment- givenConsignmentModel- Returns:
BigDecimalthe sum of all previously captured amount
-
calculateTotalOrderAmount
java.math.BigDecimal calculateTotalOrderAmount(ConsignmentModel consignment)
Calculates the order total of the givenConsignmentModel- Parameters:
consignment- givenConsignmentModel- Returns:
BigDecimalthe order total
-
calculateDiscountAmount
java.math.BigDecimal calculateDiscountAmount(ConsignmentModel consignment)
Calculates the discount amount for theConsignmentModeltaking a part ofAbstractOrderModel.TOTALDISCOUNTS- Parameters:
consignment- givenConsignmentModel- Returns:
BigDecimalthe discount for the give consignment
-
calculateConsignmentEntryAmount
java.math.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
-
-