use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum PriceStatus {
#[serde(rename = "tradeable")]
Tradeable,
#[serde(rename = "non-tradeable")]
NonTradeable,
#[serde(rename = "invalid")]
Invalid,
}
impl std::fmt::Display for PriceStatus {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
match self {
Self::Tradeable => write!(f, "tradeable"),
Self::NonTradeable => write!(f, "non-tradeable"),
Self::Invalid => write!(f, "invalid"),
}
}
}
impl Default for PriceStatus {
fn default() -> PriceStatus {
Self::Tradeable
}
}