pub trait AccountsApiMut {
type Error;
// Required methods
fn create_account(
&mut self,
body: AccountRequest,
) -> Result<Account, Self::Error>;
fn delete_account(&mut self, account_id: Uuid) -> Result<(), Self::Error>;
fn get_account(&mut self, account_id: Uuid) -> Result<Account, Self::Error>;
fn get_accounts(&mut self) -> Result<AccountListResponse, Self::Error>;
fn select_account(&mut self, account_id: Uuid) -> Result<(), Self::Error>;
fn update_account(
&mut self,
account_id: Uuid,
body: AccountUpdateRequest,
) -> Result<Account, Self::Error>;
}
Required Associated Types§
Required Methods§
Sourcefn create_account(
&mut self,
body: AccountRequest,
) -> Result<Account, Self::Error>
fn create_account( &mut self, body: AccountRequest, ) -> Result<Account, Self::Error>
Create a new account.
Sourcefn get_account(&mut self, account_id: Uuid) -> Result<Account, Self::Error>
fn get_account(&mut self, account_id: Uuid) -> Result<Account, Self::Error>
Get a specific account.
Sourcefn get_accounts(&mut self) -> Result<AccountListResponse, Self::Error>
fn get_accounts(&mut self) -> Result<AccountListResponse, Self::Error>
Get all accounts.
Sourcefn select_account(&mut self, account_id: Uuid) -> Result<(), Self::Error>
fn select_account(&mut self, account_id: Uuid) -> Result<(), Self::Error>
Select a user’s account to work on.
Sourcefn update_account(
&mut self,
account_id: Uuid,
body: AccountUpdateRequest,
) -> Result<Account, Self::Error>
fn update_account( &mut self, account_id: Uuid, body: AccountUpdateRequest, ) -> Result<Account, Self::Error>
Update an account.