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

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

impl SquareApiVersion {
    /// Convert the SquareApiVersion to a string
    pub fn to_string(&self) -> String {
        match self {
            SquareApiVersion::V20230925 => "2023-09-25".to_string(),
        }
    }
}

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

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