From aa52e632b866b51d455787a96bcd2f5a63b7ac89 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Mon, 19 Aug 2019 00:19:38 -0400 Subject: move ynab-api to its own repository --- src/models/currency_format.rs | 53 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 src/models/currency_format.rs (limited to 'src/models/currency_format.rs') diff --git a/src/models/currency_format.rs b/src/models/currency_format.rs new file mode 100644 index 0000000..476856a --- /dev/null +++ b/src/models/currency_format.rs @@ -0,0 +1,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, + } + } +} + + -- cgit v1.2.3-54-g00ecf