use super::super::{GasError, GasSteamUser};
use crate::types::{AccountDetails, PurchaseHistoryItem, RedeemWalletCodeResponse, WalletBalance};
impl GasSteamUser {
pub async fn get_account_details(&self) -> Result<AccountDetails, GasError> {
self.call("get_account_details", &[]).await
}
pub async fn get_steam_wallet_balance(&self) -> Result<WalletBalance, GasError> {
self.call("get_steam_wallet_balance", &[]).await
}
pub async fn get_amount_spent_on_steam(&self) -> Result<String, GasError> {
self.call("get_amount_spent_on_steam", &[]).await
}
pub async fn get_purchase_history(&self) -> Result<Vec<PurchaseHistoryItem>, GasError> {
self.call("get_purchase_history", &[]).await
}
pub async fn redeem_wallet_code(&self, code: &str) -> Result<RedeemWalletCodeResponse, GasError> {
self.call("redeem_wallet_code", &[("walletCode", code)]).await
}
pub async fn parental_unlock(&self, pin: &str) -> Result<(), GasError> {
self.call_void("parental_unlock", &[("pin", pin)]).await
}
pub async fn get_account_email(&self) -> Result<String, GasError> {
self.call("get_account_email", &[]).await
}
pub async fn get_current_steam_login(&self) -> Result<String, GasError> {
self.call("get_current_steam_login", &[]).await
}
}