1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
* Hanzo Cloud API
*
* The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
*
* The version of the OpenAPI document: v1
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Extracted {
/// Category is the expense bucket the SCANNER guessed, as a slug — a hint only. Vendor rules override it whenever they know better, so this is the model's reading and not the account the entry will land on.
#[serde(rename = "category", skip_serializing_if = "Option::is_none")]
pub category: Option<String>,
/// Currency is the ISO code the document is denominated in.
#[serde(rename = "currency", skip_serializing_if = "Option::is_none")]
pub currency: Option<String>,
/// IssuedAt is the document's OWN date as YYYY-MM-DD — when the bill was issued, which is not when it was uploaded or when it will post.
#[serde(rename = "issuedAt", skip_serializing_if = "Option::is_none")]
pub issued_at: Option<String>,
/// LineItems are the individual lines read off the document, where it had any. They need not sum to totalCents: a document may carry lines the scanner could not read, and the total is taken from the total.
#[serde(rename = "lineItems", skip_serializing_if = "Option::is_none")]
pub line_items: Option<Vec<models::LineItem>>,
/// Merchant is the supplier as printed on the document.
#[serde(rename = "merchant", skip_serializing_if = "Option::is_none")]
pub merchant: Option<String>,
/// Note is anything else worth carrying from the document that has no field of its own.
#[serde(rename = "note", skip_serializing_if = "Option::is_none")]
pub note: Option<String>,
/// TaxCents is how much of that total is tax, in cents. It is part of totalCents, not additional to it.
#[serde(rename = "taxCents", skip_serializing_if = "Option::is_none")]
pub tax_cents: Option<i32>,
/// TotalCents is the document total in whole cents, tax INCLUDED.
#[serde(rename = "totalCents", skip_serializing_if = "Option::is_none")]
pub total_cents: Option<i32>,
}
impl Extracted {
pub fn new() -> Extracted {
Extracted {
category: None,
currency: None,
issued_at: None,
line_items: None,
merchant: None,
note: None,
tax_cents: None,
total_cents: None,
}
}
}