Package com.idanalyzer
Class Transaction
java.lang.Object
com.idanalyzer.Transaction
Transaction history, decisions, vault assets and export (/transaction, /imagevault, /filevault, /export).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classFilters for listing/exporting transactions. -
Method Summary
Modifier and TypeMethodDescriptioncom.fasterxml.jackson.databind.JsonNodedeleteTransaction(String transactionId) Delete a transaction (DELETE /transaction/{id}).voidexportTransaction(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).com.fasterxml.jackson.databind.JsonNodegetTransaction(String transactionId) Retrieve a single transaction (GET /transaction/{id}).com.fasterxml.jackson.databind.JsonNodeRetrieve transaction history (GET /transaction).voidDownload a vault file to dest (GET /filevault/{name}).voidDownload a vault image to dest (GET /imagevault/{token}).com.fasterxml.jackson.databind.JsonNodeupdateTransaction(String transactionId, String decision) Update a transaction decision (PATCH /transaction/{id}).
-
Method Details
-
getTransaction
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
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
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
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
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.
-