Class ReconciliationFile


  • public class ReconciliationFile
    extends Object
    Provides a payment Reconciliation File class.
    Since:
    4.0.0
    • Constructor Detail

      • ReconciliationFile

        public ReconciliationFile​(Client client,
                                  String fileName,
                                  byte[] contents,
                                  Date fileDate,
                                  Map<String,​Object> csvConfig)
                           throws IOException,
                                  ParseException
        Create a ReconciliationFile object from the specified byte array.
        Parameters:
        client - the client the file is associated with
        fileName - the file name of the file
        contents - the contents of the file
        fileDate - the date for the file
        csvConfig - the file format configuration
        Throws:
        IOException - Signals that an I/O exception has occurred.
        ParseException - the parse exception
      • ReconciliationFile

        public ReconciliationFile​(Client client,
                                  String fileName,
                                  String contents,
                                  Date fileDate,
                                  Map<String,​Object> csvConfig)
                           throws IOException,
                                  ParseException
        Create a ReconciliationFile object from the specified content.
        Parameters:
        client - the client the file is associated with
        fileName - the file name of the file
        contents - the contents of the file
        fileDate - the date for the file
        csvConfig - the file format configuration
        Throws:
        IOException - Signals that an I/O exception has occurred.
        ParseException - the parse exception
    • Method Detail

      • getReconciliationItems

        public Map<String,​ReconciliationItem> getReconciliationItems()
        Return a map of the reconciliation items and keys contained within the file
        Returns:
        the map of reconciliation items and keys
      • getFileDate

        public Date getFileDate()
        Return the file date
        Returns:
        the file date
      • getFileName

        public String getFileName()
        Return the file name
        Returns:
        the file name
      • findMatchingItem

        public ReconciliationItem findMatchingItem​(String reference1,
                                                   String reference2)
        Attempt to find a entry for the submission in the file
        Parameters:
        reference1 - a reference string to look for
        reference2 - a second reference to look for if the first is not found
        Returns:
        the found line item, null if not found
      • formatKey

        public static String formatKey​(Client client,
                                       Date dateStamp)
        format a file key to identify the file in the file cache
        Parameters:
        client - the client the file is related to
        dateStamp - the datestamp for the file
        Returns:
        the file key
      • getExpectedStartTimestamp

        public Date getExpectedStartTimestamp()
        return the expected start timestamp.
        Returns:
        the expected start timestamp
      • getExpectedStopTimestamp

        public Date getExpectedStopTimestamp()
        return the expected stop timestamp.
        Returns:
        the expected stop timestamp
      • getAdditionalDays

        public Map<Date,​Long> getAdditionalDays()
        return any additional days.
        Returns:
        the additional days