ynab_api/models/
transaction_cleared_status.rs

1/*
2 * YNAB API Endpoints
3 *
4 * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body.  API Documentation is at https://api.ynab.com
5 *
6 * The version of the OpenAPI document: 1.72.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// TransactionClearedStatus : The cleared status of the transaction
15/// The cleared status of the transaction
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum TransactionClearedStatus {
18    #[serde(rename = "cleared")]
19    Cleared,
20    #[serde(rename = "uncleared")]
21    Uncleared,
22    #[serde(rename = "reconciled")]
23    Reconciled,
24
25}
26
27impl std::fmt::Display for TransactionClearedStatus {
28    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
29        match self {
30            Self::Cleared => write!(f, "cleared"),
31            Self::Uncleared => write!(f, "uncleared"),
32            Self::Reconciled => write!(f, "reconciled"),
33        }
34    }
35}
36
37impl Default for TransactionClearedStatus {
38    fn default() -> TransactionClearedStatus {
39        Self::Cleared
40    }
41}
42