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
#[derive(Debug, PartialEq, 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 {
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,
}
}
}