use serde::{Deserialize, Serialize};
use serde_json::Value;
use std::fmt;
#[derive(Debug, Clone, Deserialize, Serialize)]
pub enum InvoiceType {
#[serde(rename = "STANDARD")]
Standard,
#[serde(rename = "AMP")]
Amp,
}
impl From<InvoiceType> for Value {
fn from(val: InvoiceType) -> Self {
Value::from(val.to_string())
}
}
impl fmt::Display for InvoiceType {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match self {
Self::Standard => write!(f, "STANDARD"),
Self::Amp => write!(f, "AMP"),
}
}
}