lightspeed_api 0.1.4

A Rust crate for the Lightspeed eCommerce (C-Series) API
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std::error::Error;
use std::fmt;

#[derive(Debug)]
pub struct LightspeedApiError {
    pub message: String,
    pub status_code: u16,
}

impl fmt::Display for LightspeedApiError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "Lightspeed API Error ({}): {}", self.status_code, self.message)
    }
}

impl Error for LightspeedApiError {}