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/transaction_detail.rs | |
parent | a43423c5f36f8ff6642c9f6ad85800ab38758395 (diff) | |
download | ynab-api-4c94e5f9101c14bfc5c6989d11ea6c855c809f0b.tar.gz ynab-api-4c94e5f9101c14bfc5c6989d11ea6c855c809f0b.zip |
update openapi spec2.0.0
Diffstat (limited to 'src/models/transaction_detail.rs')
-rw-r--r-- | src/models/transaction_detail.rs | 35 |
1 files changed, 3 insertions, 32 deletions
diff --git a/src/models/transaction_detail.rs b/src/models/transaction_detail.rs index 956eae9..ca6be2e 100644 --- a/src/models/transaction_detail.rs +++ b/src/models/transaction_detail.rs @@ -9,11 +9,8 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct TransactionDetail { #[serde(rename = "id")] pub id: String, @@ -63,11 +60,11 @@ pub struct TransactionDetail { pub category_name: Option<String>, /// If a split transaction, the subtransactions. #[serde(rename = "subtransactions")] - pub subtransactions: Vec<::models::SubTransaction>, + pub subtransactions: Vec<crate::models::SubTransaction>, } impl TransactionDetail { - pub fn new(id: String, date: String, amount: i64, cleared: String, approved: bool, account_id: String, deleted: bool, account_name: String, subtransactions: Vec<::models::SubTransaction>) -> TransactionDetail { + pub fn new(id: String, date: String, amount: i64, cleared: String, approved: bool, account_id: String, deleted: bool, account_name: String, subtransactions: Vec<crate::models::SubTransaction>) -> TransactionDetail { TransactionDetail { id: id, date: date, @@ -92,30 +89,4 @@ impl TransactionDetail { } } -/// The cleared status of the transaction -#[derive(Debug, Serialize, Deserialize)] -pub enum Cleared { - #[serde(rename = "cleared")] - Cleared, - #[serde(rename = "uncleared")] - Uncleared, - #[serde(rename = "reconciled")] - Reconciled, -} -/// The transaction flag -#[derive(Debug, Serialize, Deserialize)] -pub enum FlagColor { - #[serde(rename = "red")] - Red, - #[serde(rename = "orange")] - Orange, - #[serde(rename = "yellow")] - Yellow, - #[serde(rename = "green")] - Green, - #[serde(rename = "blue")] - Blue, - #[serde(rename = "purple")] - Purple, -} |