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};

/// DateTimeFormat : Types of accepted and handled datetime formats
/// Types of accepted and handled datetime formats
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum DateTimeFormat {
    #[serde(rename = "UNIX")]
    Unix,
    #[serde(rename = "RFC3339")]
    Rfc3339,

}

impl std::fmt::Display for DateTimeFormat {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Self::Unix => write!(f, "UNIX"),
            Self::Rfc3339 => write!(f, "RFC3339"),
        }
    }
}

impl Default for DateTimeFormat {
    fn default() -> DateTimeFormat {
        Self::Unix
    }
}