oanda-v20-openapi 0.2.1

The full OANDA v20 API Specification. This specification defines how to interact with v20 Accounts, Trades, Orders, Pricing and more.
Documentation
/*
 * OANDA v20 API
 *
 * The full OANDA v20 API Specification. This specification defines how to interact with v20 Accounts, Trades, Orders, Pricing and more.
 *
 * The version of the OpenAPI document: 0.2.1
 * Contact: jmicoud02@gmail.com
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// AccountCurrency : The home currency of the Account
/// The home currency of the Account
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum AccountCurrency {
    #[serde(rename = "AUD")]
    Aud,
    #[serde(rename = "CAD")]
    Cad,
    #[serde(rename = "CHF")]
    Chf,
    #[serde(rename = "EUR")]
    Eur,
    #[serde(rename = "GBP")]
    Gbp,
    #[serde(rename = "HKD")]
    Hkd,
    #[serde(rename = "JPY")]
    Jpy,
    #[serde(rename = "SGD")]
    Sgd,
    #[serde(rename = "USD")]
    Usd,

}

impl std::fmt::Display for AccountCurrency {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Self::Aud => write!(f, "AUD"),
            Self::Cad => write!(f, "CAD"),
            Self::Chf => write!(f, "CHF"),
            Self::Eur => write!(f, "EUR"),
            Self::Gbp => write!(f, "GBP"),
            Self::Hkd => write!(f, "HKD"),
            Self::Jpy => write!(f, "JPY"),
            Self::Sgd => write!(f, "SGD"),
            Self::Usd => write!(f, "USD"),
        }
    }
}

impl Default for AccountCurrency {
    fn default() -> AccountCurrency {
        Self::Aud
    }
}