ynab_api_async_fork/models/
currency_format.rs1#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
16pub struct CurrencyFormat {
17 #[serde(rename = "iso_code")]
18 pub iso_code: String,
19 #[serde(rename = "example_format")]
20 pub example_format: String,
21 #[serde(rename = "decimal_digits")]
22 pub decimal_digits: i32,
23 #[serde(rename = "decimal_separator")]
24 pub decimal_separator: String,
25 #[serde(rename = "symbol_first")]
26 pub symbol_first: bool,
27 #[serde(rename = "group_separator")]
28 pub group_separator: String,
29 #[serde(rename = "currency_symbol")]
30 pub currency_symbol: String,
31 #[serde(rename = "display_symbol")]
32 pub display_symbol: bool,
33}
34
35impl CurrencyFormat {
36 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 {
38 CurrencyFormat {
39 iso_code,
40 example_format,
41 decimal_digits,
42 decimal_separator,
43 symbol_first,
44 group_separator,
45 currency_symbol,
46 display_symbol,
47 }
48 }
49}
50
51