Package com.creditcall.chipdnamobile

# Class SOAPTransactionHistory

java.lang.Object
com.creditcall.chipdnamobile.SOAPTransactionHistory

public class SOAPTransactionHistory extends Object
This class should be used to access the transaction history and statistics.

The first time that the method is invoked on the SOAPTransactionHistory instance, the login will be carried out, as such, the first call might take slightly longer then successive calls. The login will expire after 15 minutes and if another method is invoked on instance 15 minutes after the last method, the login will be carried out again.

Author:
  Creditcall Ltd

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static void`
  `dispose()`
  Disposes of the current instance.
  `static SOAPTransactionHistory`
  `getInstance()`
  Returns an instance of SOAPTransactionHistory.
  `void`
  `getTransaction(String transactionDate, String guid, ISOAPListener listener)`
  Retrieves the transaction with specified date and GUID.
  `void`
  `getTransactions(String fromDate, String toDate, ISOAPListener listener)`
  Retrieves the transactions between the given dates.
  `void`
  `getTransactionsStatistics(String fromDate, String toDate, ISOAPListener listener)`
  Retrieves the transaction statistics between the given dates.

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### getInstance

    public static SOAPTransactionHistory getInstance()
    Returns an instance of SOAPTransactionHistory.

    This method should only be called after ChipDnaMobile has been initialised using `initialise`.

    `isInitialized` can be used to check whether ChipDnaMobile has been initialised.

    Transaction history must be supported and set-up, otherwise an exception will be thrown. This can be checked using `isTransactionHistorySupported` and `isTransactionHistorySetUp`.

    Returns:
      an instance of SOAPTransactionHistory.
    Throws:
      `ChipDnaMobileInitialisationException` - Thrown if the method is accessed before ChipDnaMobile has been initialised.

  - ### dispose

    public static void dispose()
    Disposes of the current instance. If a new instance is retrieved after calling this method, the user will have to be logged in again.

    This method is also called internally when `ChipDnaMobileProperties.save()` is invoked, if application mode or SOAP credentials were changed. It ensures that the instance uses the right credentials. It means that a new copy of SOAPTransactionHistory instance should be retrieved after changing the ChipDnaMobileProperties.

  - ### getTransactions

    public void getTransactions(String fromDate, String toDate, ISOAPListener listener)
    Retrieves the transactions between the given dates. Once the result is retrieved, `ISOAPListener.retrievedTransactions(java.util.List, ChipDnaMobileErrorCode)` will be invoked.
    Parameters:
      `fromDate` - the date from which the transactions should be retrieved, in UTC, in "dd/MM/yyyy HH:mm:ss" format.
      `toDate` - the date to which the transactions should be retrieved, in UTC, in "dd/MM/yyyy HH:mm:ss" format.
      `listener` - The delegate to be notified when the result of the query has been retrieved.

  - ### getTransaction

    public void getTransaction(String transactionDate, String guid, ISOAPListener listener)
    Retrieves the transaction with specified date and GUID. Once the result is retrieved, `ISOAPListener.retrievedTransaction(SOAPExtendedTransaction, ChipDnaMobileErrorCode)` will be invoked.
    Parameters:
      `transactionDate` - The date of the transaction, in UTC, in "dd/MM/yyyy HH:mm:ss" format.
      `guid` - GUID (CardEase reference) of the transaction.
      `listener` - The delegate to be notified when the result of the query has been retrieved.

  - ### getTransactionsStatistics

    public void getTransactionsStatistics(String fromDate, String toDate, ISOAPListener listener)
    Retrieves the transaction statistics between the given dates. Once the result is retrieved, `ISOAPListener.retrievedTransactionStatistics(java.util.List, ChipDnaMobileErrorCode)` will be invoked.
    Parameters:
      `fromDate` - the date from which the transaction statistics should be retrieved, in UTC, in "dd/MM/yyyy HH:mm:ss" format.
      `toDate` - the date to which the transaction statistics should be retrieved, in UTC, in "dd/MM/yyyy HH:mm:ss" format.
      `listener` - The delegate to be notified when the result of the query has been retrieved.