Class Transaction

java.lang.Object
com.idanalyzer.Transaction

public class Transaction extends Object
Transaction history, decisions, vault assets and export (/transaction, /imagevault, /filevault, /export).
  • Method Details

    • getTransaction

      public com.fasterxml.jackson.databind.JsonNode getTransaction(String transactionId)
      Retrieve a single transaction (GET /transaction/{id}).
      Parameters:
      transactionId - the transaction id to retrieve.
      Returns:
      the API response as a JsonNode.
      Throws:
      InvalidArgumentException - if transactionId is null or empty.
      ApiException - if the API returns an error or a transport error occurs.
    • listTransaction

      public com.fasterxml.jackson.databind.JsonNode listTransaction(Transaction.ListOptions opts)
      Retrieve transaction history (GET /transaction).
      Parameters:
      opts - the filter/pagination options; defaults are used when null.
      Returns:
      the API response as a JsonNode.
      Throws:
      ApiException - if the API returns an error or a transport error occurs.
    • updateTransaction

      public com.fasterxml.jackson.databind.JsonNode updateTransaction(String transactionId, String decision)
      Update a transaction decision (PATCH /transaction/{id}).
      Parameters:
      transactionId - the transaction id to update.
      decision - the new decision; must be one of "accept", "review" or "reject".
      Returns:
      the API response as a JsonNode.
      Throws:
      InvalidArgumentException - if transactionId is null/empty or decision is not a valid value.
      ApiException - if the API returns an error or a transport error occurs.
    • deleteTransaction

      public com.fasterxml.jackson.databind.JsonNode deleteTransaction(String transactionId)
      Delete a transaction (DELETE /transaction/{id}).
      Parameters:
      transactionId - the transaction id to delete.
      Returns:
      the API response as a JsonNode.
      Throws:
      InvalidArgumentException - if transactionId is null or empty.
      ApiException - if the API returns an error or a transport error occurs.
    • saveImage

      public void saveImage(String imageToken, String dest)
      Download a vault image to dest (GET /imagevault/{token}).
      Parameters:
      imageToken - the image vault token identifying the image.
      dest - the local file path to write the downloaded image to.
      Throws:
      InvalidArgumentException - if imageToken or dest is null or empty.
      ApiException - if the download fails (transport error).
    • saveFile

      public void saveFile(String fileName, String dest)
      Download a vault file to dest (GET /filevault/{name}).
      Parameters:
      fileName - the file vault name identifying the file.
      dest - the local file path to write the downloaded file to.
      Throws:
      InvalidArgumentException - if fileName or dest is null or empty.
      ApiException - if the download fails (transport error).
    • exportTransaction

      public void exportTransaction(String dest, String exportType, List<String> transactionIds, boolean ignoreUnrecognized, boolean ignoreDuplicate, Transaction.ListOptions opts)
      Request a transaction archive and download it to dest (POST /export/transaction).
      Parameters:
      dest - the local file path to write the downloaded archive to.
      exportType - the export format; defaults to "csv" when null/empty, must be "csv" or "json".
      transactionIds - optional explicit list of transaction ids to export; sent when non-empty.
      ignoreUnrecognized - whether to exclude unrecognized documents from the export.
      ignoreDuplicate - whether to exclude duplicate transactions from the export.
      opts - optional filter/pagination options; defaults are used when null.
      Throws:
      InvalidArgumentException - if dest is null/empty or exportType is not "csv"/"json".
      ApiException - if the API returns an error or a transport/download error occurs.