diff options
author | Jesse Luehrs <doy@tozt.net> | 2019-08-09 03:55:27 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2019-08-09 03:55:27 -0400 |
commit | 057912a0bac78d57e6c95ccecd865f27476e5006 (patch) | |
tree | 96cfcc8b90b6b5fdb4203a7bee1152f627c12cb1 /ynab-api/src/models/account.rs | |
parent | 16e155d5ad923bb8046e07c7f6d3ce6bc66def1c (diff) | |
download | ynab-api-057912a0bac78d57e6c95ccecd865f27476e5006.tar.gz ynab-api-057912a0bac78d57e6c95ccecd865f27476e5006.zip |
fix the provided openapi spec
a lot of things marked required actually aren't
Diffstat (limited to 'ynab-api/src/models/account.rs')
-rw-r--r-- | ynab-api/src/models/account.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ynab-api/src/models/account.rs b/ynab-api/src/models/account.rs index 88f0353..6ffa1d5 100644 --- a/ynab-api/src/models/account.rs +++ b/ynab-api/src/models/account.rs @@ -28,8 +28,8 @@ pub struct Account { /// Whether this account is closed or not #[serde(rename = "closed")] pub closed: bool, - #[serde(rename = "note")] - pub note: String, + #[serde(rename = "note", skip_serializing_if = "Option::is_none")] + pub note: Option<String>, /// The current balance of the account in milliunits format #[serde(rename = "balance")] pub balance: i64, @@ -48,14 +48,14 @@ pub struct Account { } impl Account { - pub fn new(id: String, name: String, _type: String, on_budget: bool, closed: bool, note: String, balance: i64, cleared_balance: i64, uncleared_balance: i64, transfer_payee_id: String, deleted: bool) -> Account { + pub fn new(id: String, name: String, _type: String, on_budget: bool, closed: bool, balance: i64, cleared_balance: i64, uncleared_balance: i64, transfer_payee_id: String, deleted: bool) -> Account { Account { id: id, name: name, _type: _type, on_budget: on_budget, closed: closed, - note: note, + note: None, balance: balance, cleared_balance: cleared_balance, uncleared_balance: uncleared_balance, |