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
57
58
59
60
/*
* 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 GlRow {
/// Account is the chart-of-accounts number this leg posts to.
#[serde(rename = "account", skip_serializing_if = "Option::is_none")]
pub account: Option<String>,
/// Against names the OTHER accounts in the same voucher — the contra side of this leg — so a single row reads as an entry rather than as half of one.
#[serde(rename = "against", skip_serializing_if = "Option::is_none")]
pub against: Option<String>,
/// Credit is the amount credited to that account, in whole cents.
#[serde(rename = "credit", skip_serializing_if = "Option::is_none")]
pub credit: Option<i32>,
/// Debit is the amount debited to that account, in whole cents. Exactly one of debit and credit is non-zero on a leg; a negative amount is never used to mean the other side.
#[serde(rename = "debit", skip_serializing_if = "Option::is_none")]
pub debit: Option<i32>,
/// ID is the entry's position in the ledger. The ledger is append-only, so ids ascend with posting order and a higher id is a later entry.
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
pub id: Option<i32>,
/// PostingAt is the accounting date this entry belongs to — what the reports window on, which need not be when the row was written.
#[serde(rename = "postingAt", skip_serializing_if = "Option::is_none")]
pub posting_at: Option<String>,
/// Remarks is the memo carried onto the entry, for a human reading the ledger.
#[serde(rename = "remarks", skip_serializing_if = "Option::is_none")]
pub remarks: Option<String>,
/// SourceID identifies that originating record within its kind.
#[serde(rename = "sourceId", skip_serializing_if = "Option::is_none")]
pub source_id: Option<String>,
/// SourceKind is what caused the posting: a bank line, a scanned document, a commerce sale. With sourceId it traces the entry back to the thing that produced it.
#[serde(rename = "sourceKind", skip_serializing_if = "Option::is_none")]
pub source_kind: Option<String>,
}
impl GlRow {
pub fn new() -> GlRow {
GlRow {
account: None,
against: None,
credit: None,
debit: None,
id: None,
posting_at: None,
remarks: None,
source_id: None,
source_kind: None,
}
}
}