aboutsummaryrefslogtreecommitdiffstats
path: root/ynab-api/src/models/currency_format.rs
blob: 476856a950d6fc14837b5b91869bd740af0d9415 (plain) (blame)
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
/*
 * YNAB API Endpoints
 *
 * 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.youneedabudget.com
 *
 * The version of the OpenAPI document: 1.0.0
 * 
 * Generated by: https://openapi-generator.tech
 */

/// CurrencyFormat : The currency format setting for the budget.  In some cases the format will not be available and will be specified as null.

#[allow(unused_imports)]
use serde_json::Value;


#[derive(Debug, Serialize, Deserialize)]
pub struct CurrencyFormat {
    #[serde(rename = "iso_code")]
    pub iso_code: String,
    #[serde(rename = "example_format")]
    pub example_format: String,
    #[serde(rename = "decimal_digits")]
    pub decimal_digits: i32,
    #[serde(rename = "decimal_separator")]
    pub decimal_separator: String,
    #[serde(rename = "symbol_first")]
    pub symbol_first: bool,
    #[serde(rename = "group_separator")]
    pub group_separator: String,
    #[serde(rename = "currency_symbol")]
    pub currency_symbol: String,
    #[serde(rename = "display_symbol")]
    pub display_symbol: bool,
}

impl CurrencyFormat {
    /// The currency format setting for the budget.  In some cases the format will not be available and will be specified as null.
    pub fn new(iso_code: String, example_format: String, decimal_digits: i32, decimal_separator: String, symbol_first: bool, group_separator: String, currency_symbol: String, display_symbol: bool) -> CurrencyFormat {
        CurrencyFormat {
            iso_code: iso_code,
            example_format: example_format,
            decimal_digits: decimal_digits,
            decimal_separator: decimal_separator,
            symbol_first: symbol_first,
            group_separator: group_separator,
            currency_symbol: currency_symbol,
            display_symbol: display_symbol,
        }
    }
}