1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/*
 * Firefly III API
 *
 * This is the official documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. This version of the API is live from version v4.7.9 and onwards. You may use the \"Authorize\" button to try the API below. 
 *
 * The version of the OpenAPI document: 0.10.4
 * Contact: thegrumpydictator@gmail.com
 * Generated by: https://openapi-generator.tech
 */


use serde::{Deserialize, Serialize};



#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct ExchangeRateAttributes {
    #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
    pub created_at: Option<String>,
    #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")]
    pub updated_at: Option<String>,
    #[serde(rename = "from_currency_id", skip_serializing_if = "Option::is_none")]
    pub from_currency_id: Option<i32>,
    #[serde(rename = "from_currency_name", skip_serializing_if = "Option::is_none")]
    pub from_currency_name: Option<String>,
    #[serde(rename = "from_currency_code", skip_serializing_if = "Option::is_none")]
    pub from_currency_code: Option<String>,
    #[serde(rename = "from_currency_symbol", skip_serializing_if = "Option::is_none")]
    pub from_currency_symbol: Option<String>,
    #[serde(rename = "from_currency_decimal_places", skip_serializing_if = "Option::is_none")]
    pub from_currency_decimal_places: Option<i32>,
    #[serde(rename = "to_currency_id", skip_serializing_if = "Option::is_none")]
    pub to_currency_id: Option<i32>,
    #[serde(rename = "to_currency_code", skip_serializing_if = "Option::is_none")]
    pub to_currency_code: Option<String>,
    #[serde(rename = "to_currency_symbol", skip_serializing_if = "Option::is_none")]
    pub to_currency_symbol: Option<String>,
    #[serde(rename = "to_currency_decimal_places", skip_serializing_if = "Option::is_none")]
    pub to_currency_decimal_places: Option<i32>,
    #[serde(rename = "date", skip_serializing_if = "Option::is_none")]
    pub date: Option<String>,
    #[serde(rename = "rate", skip_serializing_if = "Option::is_none")]
    pub rate: Option<f32>,
    /// The amount in the \"to\"-currency, if provided in the request.
    #[serde(rename = "amount", skip_serializing_if = "Option::is_none")]
    pub amount: Option<f64>,
}

impl ExchangeRateAttributes {
    pub fn new() -> ExchangeRateAttributes {
        ExchangeRateAttributes {
            created_at: None,
            updated_at: None,
            from_currency_id: None,
            from_currency_name: None,
            from_currency_code: None,
            from_currency_symbol: None,
            from_currency_decimal_places: None,
            to_currency_id: None,
            to_currency_code: None,
            to_currency_symbol: None,
            to_currency_decimal_places: None,
            date: None,
            rate: None,
            amount: None,
        }
    }
}