use serde_derive::{Serialize, Deserialize};
use restson::{Error as RestsonError,RestPath};
#[non_exhaustive]
pub enum AuthenticateWith<'a> {
Basic(&'a str, &'a str),
APIKey(&'a str),
}
#[derive(Debug, PartialEq, Eq, Serialize, Deserialize)]
pub struct Member {
id: u8,
company_name: String,
postcode: u8,
active: bool,
}
impl RestPath<()> for Member {
fn get_path(_: ()) -> Result<String, RestsonError> { Ok(String::from("member")) }
}
#[derive(Debug, Default, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct Account {
pub address: String,
pub email: String,
pub name: String,
pub postcode: String,
pub state: String,
pub suburb: String,
#[serde(alias = "type")]
pub kind: String, pub country: String, pub company_name: String,
}