shared/api/endpoints/
account.rsuse super::ApiEndpoint;
use crate::api::Method;
use crate::domain::billing::{
CreateSchoolAccountPath, CreateSchoolAccountRequest, GetSchoolAccountResponse,
IndividualAccountPath, IndividualAccountResponse, SchoolAccountPath, SchoolId,
UpdateSchoolAccountRequest,
};
use crate::error::AccountError;
pub struct CreateSchoolAccount;
impl ApiEndpoint for CreateSchoolAccount {
type Path = CreateSchoolAccountPath;
type Req = CreateSchoolAccountRequest;
type Res = SchoolId;
type Err = AccountError;
const METHOD: Method = Method::Post;
}
pub struct GetSchoolAccount;
impl ApiEndpoint for GetSchoolAccount {
type Path = SchoolAccountPath;
type Req = ();
type Res = GetSchoolAccountResponse;
type Err = AccountError;
const METHOD: Method = Method::Get;
}
pub struct UpdateSchoolAccount;
impl ApiEndpoint for UpdateSchoolAccount {
type Path = SchoolAccountPath;
type Req = UpdateSchoolAccountRequest;
type Res = ();
type Err = AccountError;
const METHOD: Method = Method::Put;
}
pub struct DeleteSchoolAccount;
impl ApiEndpoint for DeleteSchoolAccount {
type Path = SchoolAccountPath;
type Req = ();
type Res = ();
type Err = AccountError;
const METHOD: Method = Method::Delete;
}
pub struct GetIndividualAccount;
impl ApiEndpoint for GetIndividualAccount {
type Path = IndividualAccountPath;
type Req = ();
type Res = IndividualAccountResponse;
type Err = AccountError;
const METHOD: Method = Method::Get;
}