1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
//! Square API version enum
use std::fmt;

/// Square API version
#[derive(Debug, Clone)]
pub enum SquareApiVersion {
    V20230925,
}

impl fmt::Display for SquareApiVersion {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        match self {
            SquareApiVersion::V20230925 => write!(f, "2023-09-25"),
        }
    }
}

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn test_to_string() {
        assert_eq!(SquareApiVersion::V20230925.to_string(), "2023-09-25".to_string());
    }
}