pub enum AccountKey {
National {
blz: Blz,
number: String,
subaccount: Option<String>,
},
Iban {
iban: Iban,
subaccount: Option<String>,
},
}tooling only.Expand description
The identity of an account of the UPD, stable across logins: its KTV (Kontoverbindung, HIUPD DE 1), or its IBAN when the UPD entry has no account number.
Normalised: the BLZ is the KTV’s own (not the login’s), leading zeros
of the number are dropped (0 stays 0), an empty subaccount is no
subaccount, the IBAN is upper case without spaces. Two UPD entries that
share IBAN and number but differ in the subaccount (a clearing account
and its depot) have different keys.
The string form (Display, FromStr,
also the serde form) is <blz>/<number>[/<subaccount>] or
iban:<IBAN>[/<subaccount>]; % and / inside the BLZ, number and
IBAN are written %25 and %2F. It round-trips and suits an app’s
reference to a synced account.
Variants§
National
The KTV: bank code, account number, subaccount.
Iban
A UPD entry without account number (or without bank code): IBAN and subaccount.
Implementations§
Source§impl AccountKey
impl AccountKey
Sourcepub fn national(
blz: &str,
number: &str,
subaccount: Option<&str>,
) -> Option<Self>
pub fn national( blz: &str, number: &str, subaccount: Option<&str>, ) -> Option<Self>
The key of a KTV. None without a number or bank code.
Sourcepub fn iban(iban: &str, subaccount: Option<&str>) -> Option<Self>
pub fn iban(iban: &str, subaccount: Option<&str>) -> Option<Self>
The key of an account known by IBAN only. None for an empty IBAN.
Sourcepub fn subaccount(&self) -> Option<&str>
pub fn subaccount(&self) -> Option<&str>
The subaccount (Unterkontomerkmal), if any.