From 4c94e5f9101c14bfc5c6989d11ea6c855c809f0b Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sat, 14 Sep 2019 14:19:01 -0400 Subject: update openapi spec --- src/models/transaction_detail.rs | 35 +++-------------------------------- 1 file changed, 3 insertions(+), 32 deletions(-) (limited to 'src/models/transaction_detail.rs') 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, /// If a split transaction, the subtransactions. #[serde(rename = "subtransactions")] - pub subtransactions: Vec<::models::SubTransaction>, + pub subtransactions: Vec, } 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) -> 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, -} -- cgit v1.2.3-54-g00ecf