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
/*
* 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 Voucher {
/// Description is the human line for the event, e.g. the vendor a bill came from.
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
/// Legs are the sides of the posting. They must balance: Σdebit == Σcredit, give or take the 2¢ round-off allowance.
#[serde(rename = "legs", skip_serializing_if = "Option::is_none")]
pub legs: Option<Vec<models::Leg>>,
/// PostingAt is the RFC3339 instant the event posts at — the time every statement window filters on.
#[serde(rename = "postingAt", skip_serializing_if = "Option::is_none")]
pub posting_at: Option<String>,
/// SourceID is the source event's own id within that namespace. Together with SourceKind it is the key that makes a repeat posting a no-op.
#[serde(rename = "sourceId", skip_serializing_if = "Option::is_none")]
pub source_id: Option<String>,
/// SourceKind is the idempotency namespace naming what booked this, e.g. \"scan\".
#[serde(rename = "sourceKind", skip_serializing_if = "Option::is_none")]
pub source_kind: Option<String>,
}
impl Voucher {
pub fn new() -> Voucher {
Voucher {
description: None,
legs: None,
posting_at: None,
source_id: None,
source_kind: None,
}
}
}