1use serde_derive::{Serialize, Deserialize};
2use restson::{Error as RestsonError,RestPath};
3
4#[non_exhaustive]
11pub enum AuthenticateWith<'a> {
12 Basic(&'a str, &'a str),
13 APIKey(&'a str),
14}
15
16#[derive(Debug, PartialEq, Eq, Serialize, Deserialize)]
18pub struct Member {
19 id: u8,
20 company_name: String,
21 postcode: u8,
22 active: bool,
23}
24
25impl RestPath<()> for Member {
26 fn get_path(_: ()) -> Result<String, RestsonError> { Ok(String::from("member")) }
27}
28
29#[derive(Debug, Default, Clone, PartialEq, Eq, Serialize, Deserialize)]
33pub struct Account {
34 pub address: String,
35 pub email: String,
36 pub name: String,
37 pub postcode: String,
38 pub state: String,
39 pub suburb: String,
40 #[serde(alias = "type")]
41 pub kind: String, pub country: String, pub company_name: String,
44}