/*
* Firefly III API v6.4.14
*
* This is the documentation of the Firefly III API. Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. <br><br> Please keep in mind that the demo site does **not** accept requests from `curl`, `colly`, `wget`, etc. You must use a browser or a tool like Insomnia to make your test requests. <br><br> To learn more about the idiosyncrasies of this API, please read about the API in the [Firefly III API documentation](https://docs.firefly-iii.org/references/firefly-iii/api/). <br><br> <small>This file was last generated on 2025-12-26 @ 15:17:41 (Europe/Amsterdam)</small>
*
* The version of the OpenAPI document: v6.4.14
* Contact: james@firefly-iii.org
* Generated by: https://openapi-generator.tech
*/
#![allow(unused_imports)]
use crate::models::{self, *};
use std::fmt;
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct BasicSummaryEntry {
/// This is a reference to the type of info shared, not influenced by translations or user preferences. The EUR value is a reference to the currency code. Possibilities are: balance-in-ABC, spent-in-ABC, earned-in-ABC, bills-paid-in-ABC, bills-unpaid-in-ABC, left-to-spend-in-ABC and net-worth-in-ABC.
#[serde(rename = "key", skip_serializing_if = "Option::is_none")]
pub key: Option<String>,
/// A translated title for the information shared.
#[serde(rename = "title", skip_serializing_if = "Option::is_none")]
pub title: Option<String>,
/// The amount as a float.
#[serde(rename = "monetary_value", skip_serializing_if = "Option::is_none")]
pub monetary_value: Option<f64>,
/// The currency ID of the associated currency.
#[serde(rename = "currency_id", skip_serializing_if = "Option::is_none")]
pub currency_id: Option<String>,
#[serde(rename = "currency_code", skip_serializing_if = "Option::is_none")]
pub currency_code: Option<String>,
#[serde(rename = "currency_symbol", skip_serializing_if = "Option::is_none")]
pub currency_symbol: Option<String>,
/// Number of decimals for the associated currency.
#[serde(
rename = "currency_decimal_places",
skip_serializing_if = "Option::is_none"
)]
pub currency_decimal_places: Option<i32>,
/// True if there are no available budgets available.
#[serde(
rename = "no_available_budgets",
skip_serializing_if = "Option::is_none"
)]
pub no_available_budgets: Option<bool>,
/// The amount formatted according to the users locale
#[serde(rename = "value_parsed", skip_serializing_if = "Option::is_none")]
pub value_parsed: Option<String>,
/// Reference to a font-awesome icon without the fa- part.
#[serde(rename = "local_icon", skip_serializing_if = "Option::is_none")]
pub local_icon: Option<String>,
/// A short explanation of the amounts origin. Already formatted according to the locale of the user or translated, if relevant.
#[serde(rename = "sub_title", skip_serializing_if = "Option::is_none")]
pub sub_title: Option<String>,
}
impl BasicSummaryEntry {
pub fn new() -> BasicSummaryEntry {
BasicSummaryEntry {
key: None,
title: None,
monetary_value: None,
currency_id: None,
currency_code: None,
currency_symbol: None,
currency_decimal_places: None,
no_available_budgets: None,
value_parsed: None,
local_icon: None,
sub_title: None,
}
}
}
impl fmt::Display for BasicSummaryEntry {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match serde_json::to_string(self) {
Ok(json) => write!(f, "{}", json),
Err(_) => write!(f, "{{{{}}}}"),
}
}
}