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/hybrid_transaction_all_of.rs | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'src/models/hybrid_transaction_all_of.rs') diff --git a/src/models/hybrid_transaction_all_of.rs b/src/models/hybrid_transaction_all_of.rs index 42fd515..7092a71 100644 --- a/src/models/hybrid_transaction_all_of.rs +++ b/src/models/hybrid_transaction_all_of.rs @@ -9,40 +9,37 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct HybridTransactionAllOf { /// Whether the hybrid transaction represents a regular transaction or a subtransaction #[serde(rename = "type")] - pub _type: String, - /// For subtransaction types, this is the id of the pararent transaction. For transaction types, this id will be always be null. + pub _type: Type, + /// For subtransaction types, this is the id of the parent transaction. For transaction types, this id will be always be null. #[serde(rename = "parent_transaction_id", skip_serializing_if = "Option::is_none")] pub parent_transaction_id: Option, #[serde(rename = "account_name")] pub account_name: String, #[serde(rename = "payee_name", skip_serializing_if = "Option::is_none")] pub payee_name: Option, - #[serde(rename = "category_name")] - pub category_name: String, + #[serde(rename = "category_name", skip_serializing_if = "Option::is_none")] + pub category_name: Option, } impl HybridTransactionAllOf { - pub fn new(_type: String, account_name: String, category_name: String) -> HybridTransactionAllOf { + pub fn new(_type: Type, account_name: String) -> HybridTransactionAllOf { HybridTransactionAllOf { _type: _type, parent_transaction_id: None, account_name: account_name, payee_name: None, - category_name: category_name, + category_name: None, } } } /// Whether the hybrid transaction represents a regular transaction or a subtransaction -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub enum Type { #[serde(rename = "transaction")] Transaction, -- cgit v1.2.3-54-g00ecf