wsdp 0.1.0

Async high-level client for ČÚZK WSDP real-estate cadastre services
Documentation
use quick_xml::Writer;

use super::soap::{self, XmlResult};
use crate::NewPassword;
use crate::client::Operation;
use crate::model::ServiceKind;

pub(crate) fn change_password_operation() -> Operation {
    Operation::new(
        ServiceKind::Account,
        "zmenHeslo",
        "ZmenHesloRequest",
        "ZmenHesloResponse",
    )
}

pub(crate) fn write_change_password(
    writer: &mut Writer<Vec<u8>>,
    password: &NewPassword,
) -> XmlResult {
    use secrecy::ExposeSecret as _;
    soap::text_element(writer, "noveHeslo", password.0.expose_secret())
}