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/month_detail.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/month_detail.rs')
-rw-r--r-- | ynab-api/src/models/month_detail.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ynab-api/src/models/month_detail.rs b/ynab-api/src/models/month_detail.rs index 9a2b1c2..a6f55d4 100644 --- a/ynab-api/src/models/month_detail.rs +++ b/ynab-api/src/models/month_detail.rs @@ -17,8 +17,8 @@ use serde_json::Value; pub struct MonthDetail { #[serde(rename = "month")] pub month: String, - #[serde(rename = "note")] - pub note: String, + #[serde(rename = "note", skip_serializing_if = "Option::is_none")] + pub note: Option<String>, /// The total amount in transactions categorized to 'Inflow: To be Budgeted' in the month #[serde(rename = "income")] pub income: i64, @@ -32,8 +32,8 @@ pub struct MonthDetail { #[serde(rename = "to_be_budgeted")] pub to_be_budgeted: i64, /// The Age of Money as of the month - #[serde(rename = "age_of_money")] - pub age_of_money: i32, + #[serde(rename = "age_of_money", skip_serializing_if = "Option::is_none")] + pub age_of_money: Option<i32>, /// Whether or not the month has been deleted. Deleted months will only be included in delta requests. #[serde(rename = "deleted")] pub deleted: bool, @@ -43,15 +43,15 @@ pub struct MonthDetail { } impl MonthDetail { - pub fn new(month: String, note: String, income: i64, budgeted: i64, activity: i64, to_be_budgeted: i64, age_of_money: i32, deleted: bool, categories: Vec<::models::Category>) -> MonthDetail { + pub fn new(month: String, income: i64, budgeted: i64, activity: i64, to_be_budgeted: i64, deleted: bool, categories: Vec<::models::Category>) -> MonthDetail { MonthDetail { month: month, - note: note, + note: None, income: income, budgeted: budgeted, activity: activity, to_be_budgeted: to_be_budgeted, - age_of_money: age_of_money, + age_of_money: None, deleted: deleted, categories: categories, } |