Class TransactionCalculationStrategy
java.lang.Object
de.hybris.platform.travelservices.accommodation.strategies.impl.TransactionCalculationStrategy
- Direct Known Subclasses:
AccommodationTransactionCreationStrategy,DefaultAccommodationTotalRefundCalculationStrategy,DefaultOrderTotalByEntryTypeCalculationStrategy,DefaultOrderTotalPaidCalculationStrategy,DefaultOrderTotalPaidForAccommodationGroupCalculationStrategy,DefaultOrderTotalPaidForOrderEntryTypeCalculationStrategy,TransportTransactionCreationStrategy
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAvailableFunds(PaymentTransactionModel transaction) This method returns the difference between the captured total and the refunded total, if present.protected de.hybris.platform.servicelayer.config.ConfigurationServiceprotected BigDecimalThis method returns the minimum amount added to the transaction in order to create the payment transactions in case the amount is to be paid at check-in Timeprotected TravelCartServicegetValidPaymentTransactions(List<PaymentTransactionModel> paymentTransactions) It returns all the valid payment transaction for the list of paymentTransactions.getValidPaymentTransactionsForType(AbstractOrderModel orderModel, OrderEntryType orderEntryType) This method returns the valid payment transaction for a certain orderEntryType.voidsetConfigurationService(de.hybris.platform.servicelayer.config.ConfigurationService configurationService) voidsetTravelCartService(TravelCartService travelCartService)
-
Constructor Details
-
TransactionCalculationStrategy
public TransactionCalculationStrategy()
-
-
Method Details
-
getValidPaymentTransactions
public List<PaymentTransactionModel> getValidPaymentTransactions(List<PaymentTransactionModel> paymentTransactions) It returns all the valid payment transaction for the list of paymentTransactions. This method checks if there is at least one paymentTransactionEntry with paymentTransactionType CAPTURE. This method can be an extension point, because in a real case scenario, it may be necessary to perform more checks on the paymentTransactionEntry type, to verify that there are no entries with type CANCEL.- Parameters:
paymentTransactions- as the list of paymentTransaction to be filtered- Returns:
- the list of valid payment transactions
-
getValidPaymentTransactionsForType
public List<PaymentTransactionModel> getValidPaymentTransactionsForType(AbstractOrderModel orderModel, OrderEntryType orderEntryType) This method returns the valid payment transaction for a certain orderEntryType. The assumption is that all the entries linked to a transaction will be of a certain type- Parameters:
orderModel-orderEntryType-- Returns:
-
getAvailableFunds
This method returns the difference between the captured total and the refunded total, if present. Used to re-distribute entries among available transactions in case of refunding.- Parameters:
transaction-- Returns:
-
getEntriesAmount
-
getPaymentAuthourizationAmount
This method returns the minimum amount added to the transaction in order to create the payment transactions in case the amount is to be paid at check-in Time -
getConfigurationService
protected de.hybris.platform.servicelayer.config.ConfigurationService getConfigurationService()- Returns:
- the configurationService
-
setConfigurationService
public void setConfigurationService(de.hybris.platform.servicelayer.config.ConfigurationService configurationService) - Parameters:
configurationService- the configurationService to set
-
getTravelCartService
- Returns:
- the travelCartService
-
setTravelCartService
- Parameters:
travelCartService- the travelCartService to set
-