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
#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct HybridTransactionAllOf {
#[serde(rename = "type")]
pub _type: Type,
#[serde(rename = "parent_transaction_id", skip_serializing_if = "Option::is_none")]
pub parent_transaction_id: Option<String>,
#[serde(rename = "account_name")]
pub account_name: String,
#[serde(rename = "payee_name", skip_serializing_if = "Option::is_none")]
pub payee_name: Option<String>,
#[serde(rename = "category_name", skip_serializing_if = "Option::is_none")]
pub category_name: Option<String>,
}
impl HybridTransactionAllOf {
pub fn new(_type: Type, account_name: String) -> HybridTransactionAllOf {
HybridTransactionAllOf {
_type: _type,
parent_transaction_id: None,
account_name: account_name,
payee_name: None,
category_name: None,
}
}
}
#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum Type {
#[serde(rename = "transaction")]
Transaction,
#[serde(rename = "subtransaction")]
Subtransaction,
}