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
#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct ScheduledTransactionSummary {
#[serde(rename = "id")]
pub id: String,
#[serde(rename = "date_first")]
pub date_first: String,
#[serde(rename = "date_next")]
pub date_next: String,
#[serde(rename = "frequency")]
pub frequency: String,
#[serde(rename = "amount")]
pub amount: i64,
#[serde(rename = "memo", skip_serializing_if = "Option::is_none")]
pub memo: Option<String>,
#[serde(rename = "flag_color", skip_serializing_if = "Option::is_none")]
pub flag_color: Option<String>,
#[serde(rename = "account_id")]
pub account_id: String,
#[serde(rename = "payee_id", skip_serializing_if = "Option::is_none")]
pub payee_id: Option<String>,
#[serde(rename = "category_id", skip_serializing_if = "Option::is_none")]
pub category_id: Option<String>,
#[serde(rename = "transfer_account_id", skip_serializing_if = "Option::is_none")]
pub transfer_account_id: Option<String>,
#[serde(rename = "deleted")]
pub deleted: bool,
}
impl ScheduledTransactionSummary {
pub fn new(id: String, date_first: String, date_next: String, frequency: String, amount: i64, account_id: String, deleted: bool) -> ScheduledTransactionSummary {
ScheduledTransactionSummary {
id: id,
date_first: date_first,
date_next: date_next,
frequency: frequency,
amount: amount,
memo: None,
flag_color: None,
account_id: account_id,
payee_id: None,
category_id: None,
transfer_account_id: None,
deleted: deleted,
}
}
}