Skip to main content

hanzo_client/models/
book_request.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 BookRequest {
16    /// Override books this bill even when one of the SAME economic identity (vendor, total, issue date) already posted — the explicit human confirmation that a same-looking bill is a genuine second spend, not the same receipt re-scanned.
17    #[serde(rename = "override", skip_serializing_if = "Option::is_none")]
18    pub r#override: Option<bool>,
19    /// ScanID is the scanned document's file hash, as GET /v1/books/inbox and the scan draft report it. It is the idempotency key: re-booking the same scan writes nothing.
20    #[serde(rename = "scanId", skip_serializing_if = "Option::is_none")]
21    pub scan_id: Option<String>,
22    /// Voucher is the reviewed voucher to post. Its source is FORCED to (scan, scanId) server-side, so it can never be booked under another source's key.
23    #[serde(rename = "voucher", skip_serializing_if = "Option::is_none")]
24    pub voucher: Option<Box<models::Voucher>>,
25}
26
27impl BookRequest {
28    pub fn new() -> BookRequest {
29        BookRequest {
30            r#override: None,
31            scan_id: None,
32            voucher: None,
33        }
34    }
35}
36