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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
use serde::{Deserialize, Serialize};
#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum AccountTypeFilter {
#[serde(rename = "all")]
All,
#[serde(rename = "asset")]
Asset,
#[serde(rename = "cash")]
Cash,
#[serde(rename = "expense")]
Expense,
#[serde(rename = "revenue")]
Revenue,
#[serde(rename = "special")]
Special,
#[serde(rename = "hidden")]
Hidden,
#[serde(rename = "liability")]
Liability,
#[serde(rename = "liabilities")]
Liabilities,
#[serde(rename = "Default account")]
DefaultAccount,
#[serde(rename = "Cash account")]
CashAccount,
#[serde(rename = "Asset account")]
AssetAccount,
#[serde(rename = "Expense account")]
ExpenseAccount,
#[serde(rename = "Revenue account")]
RevenueAccount,
#[serde(rename = "Initial balance account")]
InitialBalanceAccount,
#[serde(rename = "Beneficiary account")]
BeneficiaryAccount,
#[serde(rename = "Import account")]
ImportAccount,
#[serde(rename = "Reconciliation account")]
ReconciliationAccount,
#[serde(rename = "Loan")]
Loan,
#[serde(rename = "Debt")]
Debt,
#[serde(rename = "Mortgage")]
Mortgage,
}
impl std::string::ToString for AccountTypeFilter {
fn to_string(&self) -> String {
match self {
Self::All => "all".to_string(),
Self::Asset => "asset".to_string(),
Self::Cash => "cash".to_string(),
Self::Expense => "expense".to_string(),
Self::Revenue => "revenue".to_string(),
Self::Special => "special".to_string(),
Self::Hidden => "hidden".to_string(),
Self::Liability => "liability".to_string(),
Self::Liabilities => "liabilities".to_string(),
Self::DefaultAccount => "Default account".to_string(),
Self::CashAccount => "Cash account".to_string(),
Self::AssetAccount => "Asset account".to_string(),
Self::ExpenseAccount => "Expense account".to_string(),
Self::RevenueAccount => "Revenue account".to_string(),
Self::InitialBalanceAccount => "Initial balance account".to_string(),
Self::BeneficiaryAccount => "Beneficiary account".to_string(),
Self::ImportAccount => "Import account".to_string(),
Self::ReconciliationAccount => "Reconciliation account".to_string(),
Self::Loan => "Loan".to_string(),
Self::Debt => "Debt".to_string(),
Self::Mortgage => "Mortgage".to_string(),
}
}
}