correlate 0.3.0

correlate is a standalone server that listens for Stripe webhook events and sends notification emails about successful orders.
use rocket::serde::Deserialize;
use std::fmt;

pub mod charge;
pub mod checkout;
pub mod customer;
pub mod date;
pub mod event;

/// Supported currencies for Stripe transactions
#[derive(Debug, Deserialize)]
#[serde(crate = "rocket::serde")]
#[serde(rename_all = "lowercase")]
pub enum StripeCurrency {
    CAD,
    EUR,
    GBP,
    USD,
}

impl fmt::Display for StripeCurrency {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        match self {
            Self::USD => write!(f, "$"),
            Self::EUR => write!(f, ""),
            Self::CAD => write!(f, "CA$\u{a0}"),
            Self::GBP => write!(f, "£"),
        }
    }
}