use super::super::{GasError, GasSteamUser};
use crate::types::{AddPhoneNumberResponse, ConfirmPhoneCodeResponse, RemovePhoneResult};
impl GasSteamUser {
pub async fn get_phone_number_status(&self) -> Result<Option<String>, GasError> {
self.call("get_phone_number_status", &[]).await
}
pub async fn add_phone_number(&self, phone: &str) -> Result<AddPhoneNumberResponse, GasError> {
self.call("add_phone_number", &[("phone", phone)]).await
}
pub async fn confirm_phone_code_for_add(&self, code: &str) -> Result<ConfirmPhoneCodeResponse, GasError> {
self.call("confirm_phone_code_for_add", &[("code", code)]).await
}
pub async fn resend_phone_verification_code(&self) -> Result<serde_json::Value, GasError> {
self.call_raw("resend_phone_verification_code", &[]).await
}
pub async fn get_remove_phone_number_type(&self) -> Result<Option<RemovePhoneResult>, GasError> {
self.call("get_remove_phone_number_type", &[]).await
}
pub async fn send_account_recovery_code(&self, wizard_param: serde_json::Value, method: i32) -> Result<serde_json::Value, GasError> {
let wp = serde_json::to_string(&wizard_param).map_err(GasError::Json)?;
let m = method.to_string();
self.call_raw("send_account_recovery_code", &[("wizardParam", &wp), ("method", &m)]).await
}
pub async fn confirm_remove_phone_number_code(&self, wizard_param: serde_json::Value, code: &str) -> Result<serde_json::Value, GasError> {
let wp = serde_json::to_string(&wizard_param).map_err(GasError::Json)?;
self.call_raw("confirm_remove_phone_number_code", &[("wizardParam", &wp), ("code", code)]).await
}
pub async fn send_confirmation_2_steam_mobile_app(&self, wizard_param: serde_json::Value) -> Result<serde_json::Value, GasError> {
let wp = serde_json::to_string(&wizard_param).map_err(GasError::Json)?;
self.call_raw("send_confirmation_2_steam_mobile_app", &[("wizardParam", &wp)]).await
}
pub async fn send_confirmation_2_steam_mobile_app_final(&self, wizard_param: serde_json::Value) -> Result<serde_json::Value, GasError> {
let wp = serde_json::to_string(&wizard_param).map_err(GasError::Json)?;
self.call_raw("send_confirmation_2_steam_mobile_app_final", &[("wizardParam", &wp)]).await
}
}