Package io.scanbot.sdk.creditcard
Class CreditCardScannerConfiguration
java.lang.Object
io.scanbot.sdk.creditcard.CreditCardScannerConfiguration
Configuration for the credit card scanner.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs CreditCardScannerConfiguration with default parameters.CreditCardScannerConfiguration(boolean useDocumentDetector, boolean requireExpiryDate, boolean requireCardholderName, ResultAccumulationConfiguration resultAccumulationConfig, boolean returnCreditCardImage, ProcessingMode processingMode) Constructs CreditCardScannerConfiguration with the given params. -
Method Summary
Modifier and TypeMethodDescriptionGetter for processingMode field.booleanGetter for requireCardholderName field.booleanGetter for requireExpiryDate field.Getter for resultAccumulationConfig field.booleanGetter for returnCreditCardImage field.booleanGetter for useDocumentDetector field.voidsetProcessingMode(ProcessingMode processingMode) Setter for processingMode field.voidsetRequireCardholderName(boolean requireCardholderName) Setter for requireCardholderName field.voidsetRequireExpiryDate(boolean requireExpiryDate) Setter for requireExpiryDate field.voidsetResultAccumulationConfig(ResultAccumulationConfiguration resultAccumulationConfig) Setter for resultAccumulationConfig field.voidsetReturnCreditCardImage(boolean returnCreditCardImage) Setter for returnCreditCardImage field.voidsetUseDocumentDetector(boolean useDocumentDetector) Setter for useDocumentDetector field.
-
Constructor Details
-
CreditCardScannerConfiguration
public CreditCardScannerConfiguration(boolean useDocumentDetector, boolean requireExpiryDate, boolean requireCardholderName, ResultAccumulationConfiguration resultAccumulationConfig, boolean returnCreditCardImage, ProcessingMode processingMode) Constructs CreditCardScannerConfiguration with the given params.- Parameters:
useDocumentDetector- If true, the document detector will be used to find where the credit card is in the input image. If false, the scanner will assume that the credit card has been pre-cropped and takes the entirety of the input image. Default is `true`.requireExpiryDate- Whether the expiry date is required for a successful scan. Default is `true`.requireCardholderName- Whether the cardholder name is required for a successful scan. Default is `true`.resultAccumulationConfig- Configuration for how to accumulate results.returnCreditCardImage- If true, the credit card image will be returned in creditCard field of CreditCardScanningResult. Default is `false`.processingMode- Scanners typically can produce better results from a single image if they are allowed to spend a longer time analyzing it. On the other hand, scanners can produce even better results if they can analyze multiple images of the same subject and cross-check and combine the results. The processing mode tells the scanner whether to optimize for single or multiple images of a subject. Default is `AUTO`.
-
CreditCardScannerConfiguration
public CreditCardScannerConfiguration()Constructs CreditCardScannerConfiguration with default parameters.
-
-
Method Details
-
getUseDocumentDetector
public boolean getUseDocumentDetector()Getter for useDocumentDetector field. See constructor documentation for more information about the field.- Returns:
- useDocumentDetector
-
setUseDocumentDetector
public void setUseDocumentDetector(boolean useDocumentDetector) Setter for useDocumentDetector field. See constructor documentation for more information about the field.- Parameters:
useDocumentDetector- Value to set.
-
getRequireExpiryDate
public boolean getRequireExpiryDate()Getter for requireExpiryDate field. See constructor documentation for more information about the field.- Returns:
- requireExpiryDate
-
setRequireExpiryDate
public void setRequireExpiryDate(boolean requireExpiryDate) Setter for requireExpiryDate field. See constructor documentation for more information about the field.- Parameters:
requireExpiryDate- Value to set.
-
getRequireCardholderName
public boolean getRequireCardholderName()Getter for requireCardholderName field. See constructor documentation for more information about the field.- Returns:
- requireCardholderName
-
setRequireCardholderName
public void setRequireCardholderName(boolean requireCardholderName) Setter for requireCardholderName field. See constructor documentation for more information about the field.- Parameters:
requireCardholderName- Value to set.
-
getResultAccumulationConfig
Getter for resultAccumulationConfig field. See constructor documentation for more information about the field.- Returns:
- resultAccumulationConfig
-
setResultAccumulationConfig
Setter for resultAccumulationConfig field. See constructor documentation for more information about the field.- Parameters:
resultAccumulationConfig- Value to set.
-
getReturnCreditCardImage
public boolean getReturnCreditCardImage()Getter for returnCreditCardImage field. See constructor documentation for more information about the field.- Returns:
- returnCreditCardImage
-
setReturnCreditCardImage
public void setReturnCreditCardImage(boolean returnCreditCardImage) Setter for returnCreditCardImage field. See constructor documentation for more information about the field.- Parameters:
returnCreditCardImage- Value to set.
-
getProcessingMode
Getter for processingMode field. See constructor documentation for more information about the field.- Returns:
- processingMode
-
setProcessingMode
Setter for processingMode field. See constructor documentation for more information about the field.- Parameters:
processingMode- Value to set.
-