Skip to main content

hanzo_client/models/
extracted.rs

1/*
2 * Hanzo Cloud API
3 *
4 * 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/.
5 *
6 * The version of the OpenAPI document: v1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct Extracted {
16    /// 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.
17    #[serde(rename = "category", skip_serializing_if = "Option::is_none")]
18    pub category: Option<String>,
19    /// Currency is the ISO code the document is denominated in.
20    #[serde(rename = "currency", skip_serializing_if = "Option::is_none")]
21    pub currency: Option<String>,
22    /// 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.
23    #[serde(rename = "issuedAt", skip_serializing_if = "Option::is_none")]
24    pub issued_at: Option<String>,
25    /// 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.
26    #[serde(rename = "lineItems", skip_serializing_if = "Option::is_none")]
27    pub line_items: Option<Vec<models::LineItem>>,
28    /// Merchant is the supplier as printed on the document.
29    #[serde(rename = "merchant", skip_serializing_if = "Option::is_none")]
30    pub merchant: Option<String>,
31    /// Note is anything else worth carrying from the document that has no field of its own.
32    #[serde(rename = "note", skip_serializing_if = "Option::is_none")]
33    pub note: Option<String>,
34    /// TaxCents is how much of that total is tax, in cents. It is part of totalCents, not additional to it.
35    #[serde(rename = "taxCents", skip_serializing_if = "Option::is_none")]
36    pub tax_cents: Option<i32>,
37    /// TotalCents is the document total in whole cents, tax INCLUDED.
38    #[serde(rename = "totalCents", skip_serializing_if = "Option::is_none")]
39    pub total_cents: Option<i32>,
40}
41
42impl Extracted {
43    pub fn new() -> Extracted {
44        Extracted {
45            category: None,
46            currency: None,
47            issued_at: None,
48            line_items: None,
49            merchant: None,
50            note: None,
51            tax_cents: None,
52            total_cents: None,
53        }
54    }
55}
56