Struct veryfi::client::Client [−][src]
pub struct Client {
pub client_id: String,
pub client_secret: String,
pub username: String,
pub api_key: String,
pub url: String,
pub api_version: String,
pub api_timeout: Duration,
}
Expand description
Veryfi Rust Client to call Veryfi API.
Fields
client_id: String
Client id provided by Veryfi.
client_secret: String
Client secret provided by Veryfi.
username: String
Username provided by Veryfi
api_key: String
Api key provided by Veryfi.
url: String
Base URL to Veryfi API.
api_version: String
Api Version
api_timeout: Duration
Api timeout to call Veryfi API by default 120.
Implementations
Get list of documents
return
- A JSON String list of processes documents and metadata.
Retrieve document by ID.
Arguments
-
document_id
- ID of the document you’d like to retrieve. -
return
- A JSON String of data extracted from the Document.
Process a document and extract all the fields from it.
Arguments
-
file_path
- Path on disk to a file to submit for data extraction. -
categories
- Array of categories Veryfi can use to categorize the document. -
delete_after_processing
- Delete this document from Veryfi after data has been extracted. -
additional_request_parameters
- Map with Additional request parameters. -
return
- A JSON String with data extracted from the document.
Process Document from url and extract all the fields from it.
Arguments
-
file_url
- Publicly accessible URL to a file, e.g. “https://cdn.example.com/receipt.jpg”. -
categories
- Array of categories to use when categorizing the document. -
delete_after_processing
- Delete this/these document(s) from Veryfi after data has been extracted. -
boost_mode
- Flag that tells Veryfi whether boost mode should be enabled. When set to 1, Veryfi will skip data enrichment steps, but will process the document faster. -
external_id
- Optional custom document identifier. Use this if you would like to assign your own ID to documents. -
max_pages_to_process
- When sending a long document to Veryfi for processing, this parameter controls how many pages of the document will be read and processed, starting from page 1. -
additional_request_parameters
- Additional request parameters. -
return
- A JSON String with data extracted from the document.
Update data for a previously processed document, including almost any field like vendor
, date
, notes
and etc.
Arguments
-
document_id
- ID of the document you“d like to update. -
parameters_to_update
- Fields to update. -
return
- A JSON String with updated fields, if fields are writable. Otherwise a document with unchanged fields.
Delete Document from Veryfi.
Arguments
-
document_id
- ID of the document you’d like to delete. -
return
A JSON String with response code and a message.
Auto Trait Implementations
impl RefUnwindSafe for Client
impl UnwindSafe for Client
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more