diff options
author | Jesse Luehrs <doy@tozt.net> | 2019-09-14 14:19:01 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2019-09-14 14:39:29 -0400 |
commit | 4c94e5f9101c14bfc5c6989d11ea6c855c809f0b (patch) | |
tree | 4e4e7ba93d41eda4c8a4c5346c3e02fc88d8789d /src/models/category.rs | |
parent | a43423c5f36f8ff6642c9f6ad85800ab38758395 (diff) | |
download | ynab-api-4c94e5f9101c14bfc5c6989d11ea6c855c809f0b.tar.gz ynab-api-4c94e5f9101c14bfc5c6989d11ea6c855c809f0b.zip |
update openapi spec2.0.0
Diffstat (limited to 'src/models/category.rs')
-rw-r--r-- | src/models/category.rs | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/models/category.rs b/src/models/category.rs index 1a62c6a..6677f8d 100644 --- a/src/models/category.rs +++ b/src/models/category.rs @@ -9,11 +9,8 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct Category { #[serde(rename = "id")] pub id: String, @@ -38,9 +35,9 @@ pub struct Category { /// Balance in milliunits format #[serde(rename = "balance")] pub balance: i64, - /// The type of goal, if the cagegory has a goal (TB=Target Category Balance, TBD=Target Category Balance by Date, MF=Monthly Funding) + /// The type of goal, if the category has a goal (TB=Target Category Balance, TBD=Target Category Balance by Date, MF=Monthly Funding) #[serde(rename = "goal_type", skip_serializing_if = "Option::is_none")] - pub goal_type: Option<String>, + pub goal_type: Option<GoalType>, /// The month a goal was created #[serde(rename = "goal_creation_month", skip_serializing_if = "Option::is_none")] pub goal_creation_month: Option<String>, @@ -80,8 +77,8 @@ impl Category { } } -/// The type of goal, if the cagegory has a goal (TB=Target Category Balance, TBD=Target Category Balance by Date, MF=Monthly Funding) -#[derive(Debug, Serialize, Deserialize)] +/// The type of goal, if the category has a goal (TB=Target Category Balance, TBD=Target Category Balance by Date, MF=Monthly Funding) +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub enum GoalType { #[serde(rename = "TB")] TB, @@ -89,5 +86,7 @@ pub enum GoalType { TBD, #[serde(rename = "MF")] MF, + #[serde(rename = "NEED")] + NEED, } |