class Abbyy::Models::ProcessReceiptRequest

Overview

Request object for /processReceipt API-method.

Included Modules

Defined in:

abbyy/models/process_receipt_request.cr

Constant Summary

DEFAULT_CORRECT_ORIENTATION = true
DEFAULT_CORRECT_SKEW = true
DEFAULT_COUNTRY = Country::USA
DEFAULT_DESCRIPTION = ""
DEFAULT_IMAGE_SOURCE = ImageSource::Auto
DEFAULT_PDF_PASSWORD = ""
DEFAULT_XML_WRITE_EXTENDED_CHARACTER_INFO = false

Constructors

Instance Method Summary

Instance methods inherited from module Abbyy::Models::FileBody

body : HTTP::Client::BodyType body, file_path : String file_path, file_path=(file_path : String) file_path=

Constructor methods inherited from module Abbyy::Models::FileBody

new(file_path : String) new

Instance methods inherited from class Abbyy::Models::BaseRequest

body : HTTP::Client::BodyType body, params : Hash(String, String) params

Constructor Detail

def self.new(file_path : String, country : Country | Array(Country) | Nil = nil, image_source : ImageSource | Nil = nil, correct_orientation : Bool | Nil = nil, correct_skew : Bool | Nil = nil, xml_write_extended_character_info : Bool | Nil = nil, description : String | Nil = nil, pdf_password : String | Nil = nil) #

[View source]

Instance Method Detail

def correct_orientation : Bool | Nil #

Specifies whether the orientation of the image should be automatically detected and corrected. It can have one of the following values:

  • true The page orientation is automatically detected, and if it differs from normal the image is rotated.
  • false The page orientation detection and correction is not performed.

This parameter is not required.

Default value is true.


[View source]
def correct_orientation=(correct_orientation : Bool | Nil) #

Specifies whether the orientation of the image should be automatically detected and corrected. It can have one of the following values:

  • true The page orientation is automatically detected, and if it differs from normal the image is rotated.
  • false The page orientation detection and correction is not performed.

This parameter is not required.

Default value is true.


[View source]
def correct_skew : Bool | Nil #

Specifies whether the skew of the image should be automatically detected and corrected. It can have either true or false value.

This parameter is not required.

Default value is true.


[View source]
def correct_skew=(correct_skew : Bool | Nil) #

Specifies whether the skew of the image should be automatically detected and corrected. It can have either true or false value.

This parameter is not required.

Default value is true.


[View source]
def country : Country | Array(Country) | Nil #

Specifies the country where the receipt was printed. This parameter can contain several countries in an array, for example:

[Country::Taiwan, Country::China]

Important! The technology fully supports US receipts, other countries are currently supported in beta mode.


[View source]
def country=(country : Country | Array(Country) | Nil) #

Specifies the country where the receipt was printed. This parameter can contain several countries in an array, for example:

[Country::Taiwan, Country::China]

Important! The technology fully supports US receipts, other countries are currently supported in beta mode.


[View source]
def description : String | Nil #

Contains the description of the processing task. Cannot contain more than 255 characters.

This parameter is not required.


[View source]
def description=(description : String | Nil) #

[View source]
def image_source : ImageSource | Nil #

Specifies the source of the image. It can be either a scanned image, or a photograph created with a digital camera. Special preprocessing operations can be performed with the image depending on the selected source. For example, the system can automatically correct distorted text lines, poor focus and lighting on photos.

The value of this parameter can be one of the following:

This parameter is not required.

Default value is ImageSource::Auto.


[View source]
def image_source=(image_source : ImageSource | Nil) #

Specifies the source of the image. It can be either a scanned image, or a photograph created with a digital camera. Special preprocessing operations can be performed with the image depending on the selected source. For example, the system can automatically correct distorted text lines, poor focus and lighting on photos.

The value of this parameter can be one of the following:

This parameter is not required.

Default value is ImageSource::Auto.


[View source]
def params : Hash(String, String) #

[View source]
def pdf_password : String | Nil #

Contains a password for accessing password-protected images in PDF format.

This parameter is not required.


[View source]
def pdf_password=(pdf_password : String | Nil) #

Contains a password for accessing password-protected images in PDF format.

This parameter is not required.


[View source]
def set_description(description : String | Nil) #

[View source]
def xml_write_extended_character_info : Bool | Nil #

Specifies whether the additional information on the recognized characters (e.g. whether the character is recognized uncertainly) should be written to an output file in XML format. The parameter can have one of the following values:

  • true
  • false

This parameter is not required.

Default value is false.


[View source]
def xml_write_extended_character_info=(xml_write_extended_character_info : Bool | Nil) #

Specifies whether the additional information on the recognized characters (e.g. whether the character is recognized uncertainly) should be written to an output file in XML format. The parameter can have one of the following values:

  • true
  • false

This parameter is not required.

Default value is false.


[View source]