use crate::{
error::StabilityAIError,
types::{AccountResponseBody, BalanceResponseBody},
Client,
};
pub struct User<'c> {
client: &'c Client,
}
impl<'c> User<'c> {
pub fn new(client: &'c Client) -> Self {
Self { client }
}
pub async fn account(&self) -> Result<AccountResponseBody, StabilityAIError> {
self.client.get("/user/account").await
}
pub async fn balance(&self) -> Result<BalanceResponseBody, StabilityAIError> {
self.client.get("/user/balance").await
}
}