Class TransactionCalculationStrategy

java.lang.Object
de.hybris.platform.travelservices.accommodation.strategies.impl.TransactionCalculationStrategy
Direct Known Subclasses:
AccommodationTransactionCreationStrategy, DefaultAccommodationTotalRefundCalculationStrategy, DefaultOrderTotalByEntryTypeCalculationStrategy, DefaultOrderTotalPaidCalculationStrategy, DefaultOrderTotalPaidForAccommodationGroupCalculationStrategy, DefaultOrderTotalPaidForOrderEntryTypeCalculationStrategy, TransportTransactionCreationStrategy

public class TransactionCalculationStrategy extends Object
  • 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

      public Double getAvailableFunds(PaymentTransactionModel transaction)
      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

      protected BigDecimal getEntriesAmount(Collection<AbstractOrderEntryModel> entries)
    • getPaymentAuthourizationAmount

      public Double 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

      protected TravelCartService getTravelCartService()
      Returns:
      the travelCartService
    • setTravelCartService

      public void setTravelCartService(TravelCartService travelCartService)
      Parameters:
      travelCartService - the travelCartService to set