Package com.idanalyzer
Class Profile
java.lang.Object
com.idanalyzer.Profile
Builds a KYC profile / profileOverride object that can be attached to scan,
biometric and docupass calls, or used to create/update a stored profile via
ProfileApi. All mutators return this for chaining.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringBuilt-in profile preset that applies a high level of security checks.static final StringBuilt-in profile preset that applies a low level of security checks.static final StringBuilt-in profile preset that applies a medium level of security checks.static final StringBuilt-in profile preset that applies no security checks. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaamvaBarcodeParsing(boolean enabled) Enable or disable parsing of AAMVA barcodes (US/Canada driver licenses).autoCrop(boolean crop, boolean advancedCrop) Configure automatic cropping of the document from the image.canvasSize(int pixels) Set the working canvas size, in pixels, used during image processing.decisionTrigger(double reviewTrigger, double rejectTrigger) Set the overall decision-trigger scores that move a transaction to review or reject.Returns the accumulated profileOverride map of settings applied to this profile.Returns the profile id this profile was created with.inferFullName(boolean enabled) Enable or disable inferring the full name from name components.loadFromJson(Map<String, Object> config) Bulk-load override settings from a map (e.g.objectDetection(boolean enabled) Enable or disable object detection on the document image.Obscure (redact) the given result field keys in the output.orientationCorrection(boolean enabled) Enable or disable automatic orientation correction of input images.outputImage(boolean enable, String format) Configure whether a processed output image is returned, and its format.outputSize(int pixels) Set the maximum output image size, in pixels.restrictDocumentCountry(String countryCodes) Restrict accepted documents to the given issuing country code(s).restrictDocumentState(String states) Restrict accepted documents to the given issuing state(s)/province(s).restrictDocumentType(String documentType) Restrict accepted documents to the given document type(s).saveResult(boolean saveTransaction, boolean saveImages) Configure whether the transaction and its images are saved.setTimezone(String timezone) Set the timezone used for date/time fields in the transaction.setWarning(String code, boolean enabled, double reviewThreshold, double rejectThreshold, double weight) Configure how a specific warning code influences the decision.splitFirstName(boolean enabled) Enable or disable splitting the first name into separate name fields.Set an individual decision threshold value.transactionAuditReport(boolean enabled) Enable or disable generation of a transaction audit report.Set the webhook URL that result notifications are posted to.
-
Field Details
-
SECURITY_NONE
Built-in profile preset that applies no security checks.- See Also:
-
SECURITY_LOW
Built-in profile preset that applies a low level of security checks.- See Also:
-
SECURITY_MEDIUM
Built-in profile preset that applies a medium level of security checks.- See Also:
-
SECURITY_HIGH
Built-in profile preset that applies a high level of security checks.- See Also:
-
-
Constructor Details
-
Profile
Creates a Profile. If profileId is null/empty,SECURITY_NONEis used.- Parameters:
profileId- the stored profile id or a built-in security preset; null/empty selectsSECURITY_NONE.
-
-
Method Details
-
getProfileId
Returns the profile id this profile was created with.- Returns:
- the profile id (or
SECURITY_NONEif none was supplied).
-
getOverride
Returns the accumulated profileOverride map of settings applied to this profile.- Returns:
- the mutable override map; empty when no overrides have been set.
-
loadFromJson
Bulk-load override settings from a map (e.g. a previously exported profile).- Parameters:
config- the settings to merge into this profile's override map.- Returns:
- this profile, for chaining.
-
canvasSize
Set the working canvas size, in pixels, used during image processing.- Parameters:
pixels- the canvas size in pixels.- Returns:
- this profile, for chaining.
-
orientationCorrection
Enable or disable automatic orientation correction of input images.- Parameters:
enabled- true to auto-correct orientation.- Returns:
- this profile, for chaining.
-
objectDetection
Enable or disable object detection on the document image.- Parameters:
enabled- true to enable object detection.- Returns:
- this profile, for chaining.
-
aamvaBarcodeParsing
Enable or disable parsing of AAMVA barcodes (US/Canada driver licenses).- Parameters:
enabled- true to enable AAMVA barcode parsing.- Returns:
- this profile, for chaining.
-
outputSize
Set the maximum output image size, in pixels.- Parameters:
pixels- the output image size in pixels.- Returns:
- this profile, for chaining.
-
inferFullName
Enable or disable inferring the full name from name components.- Parameters:
enabled- true to infer the full name.- Returns:
- this profile, for chaining.
-
splitFirstName
Enable or disable splitting the first name into separate name fields.- Parameters:
enabled- true to split the first name.- Returns:
- this profile, for chaining.
-
transactionAuditReport
Enable or disable generation of a transaction audit report.- Parameters:
enabled- true to generate a transaction audit report.- Returns:
- this profile, for chaining.
-
setTimezone
Set the timezone used for date/time fields in the transaction.- Parameters:
timezone- the timezone identifier (e.g. "UTC").- Returns:
- this profile, for chaining.
-
obscure
Obscure (redact) the given result field keys in the output.- Parameters:
fieldKeys- the list of field keys to obscure.- Returns:
- this profile, for chaining.
-
webhook
Set the webhook URL that result notifications are posted to.- Parameters:
url- the webhook URL.- Returns:
- this profile, for chaining.
-
saveResult
Configure whether the transaction and its images are saved.- Parameters:
saveTransaction- true to persist the transaction result.saveImages- true to persist images; only applied when saveTransaction is true.- Returns:
- this profile, for chaining.
-
outputImage
Configure whether a processed output image is returned, and its format.- Parameters:
enable- true to return an output image.format- the output image format; only applied when enable is true.- Returns:
- this profile, for chaining.
-
autoCrop
Configure automatic cropping of the document from the image.- Parameters:
crop- true to enable cropping.advancedCrop- true to enable advanced cropping.- Returns:
- this profile, for chaining.
-
threshold
Set an individual decision threshold value.- Parameters:
key- the threshold key.value- the threshold value.- Returns:
- this profile, for chaining.
-
decisionTrigger
Set the overall decision-trigger scores that move a transaction to review or reject.- Parameters:
reviewTrigger- the score at or above which the decision becomes "review".rejectTrigger- the score at or above which the decision becomes "reject".- Returns:
- this profile, for chaining.
-
setWarning
public Profile setWarning(String code, boolean enabled, double reviewThreshold, double rejectThreshold, double weight) Configure how a specific warning code influences the decision.- Parameters:
code- the warning code to configure.enabled- true to enable this warning.reviewThreshold- the score contribution at which this warning triggers a review.rejectThreshold- the score contribution at which this warning triggers a reject.weight- the weight applied to this warning in scoring.- Returns:
- this profile, for chaining.
-
restrictDocumentCountry
Restrict accepted documents to the given issuing country code(s).- Parameters:
countryCodes- comma-separated ISO country code(s) to accept.- Returns:
- this profile, for chaining.
-
restrictDocumentState
Restrict accepted documents to the given issuing state(s)/province(s).- Parameters:
states- comma-separated state/province code(s) to accept.- Returns:
- this profile, for chaining.
-
restrictDocumentType
Restrict accepted documents to the given document type(s).- Parameters:
documentType- the document type(s) to accept (e.g. "P" passport, "D" driver license).- Returns:
- this profile, for chaining.
-