pub struct Dialog<S: Debug> {
pub params: BankParams,
/* private fields */
}Fields§
§params: BankParamsImplementations§
Source§impl<S: Debug> Dialog<S>
impl<S: Debug> Dialog<S>
pub fn system_id(&self) -> &SystemId
pub fn bank_params(&self) -> &BankParams
pub fn bank_params_mut(&mut self) -> &mut BankParams
Source§impl Dialog<New>
impl Dialog<New>
pub fn new( url: &str, blz: &Blz, user_id: &UserId, pin: &Pin, product_id: &ProductId, ) -> Result<Self>
pub fn with_system_id(self, system_id: &SystemId) -> Self
pub fn with_params(self, params: &BankParams) -> Self
pub fn with_tan_medium(self, medium: &TanMediumName) -> Self
Sourcepub async fn sync(self) -> Result<(Dialog<Synced>, Response)>
pub async fn sync(self) -> Result<(Dialog<Synced>, Response)>
Synchronization dialog (spec: Initialisierung mit Synchronisierung).
Sends HKIDN + HKVVB + HKSYN (mode=0 for new system_id). The bank responds with BPD, UPD, HITANS, HIPINS, and HISYN(system_id). This dialog is ONLY for synchronization — no business segments allowed.
Sourcepub async fn init(self) -> Result<InitResult>
pub async fn init(self) -> Result<InitResult>
Normal dialog initialization (spec: Dialoginitialisierung).
Sends HKIDN + HKVVB + HKTAN(process=4, ref=HKIDN).
Response-driven: returns InitResult::Opened or InitResult::TanRequired
based on the bank’s response codes.
Source§impl Dialog<Synced>
impl Dialog<Synced>
Sourcepub async fn end(self) -> Result<(BankParams, SystemId)>
pub async fn end(self) -> Result<(BankParams, SystemId)>
End the sync dialog. Returns bank params and system_id for use in normal dialogs.
Source§impl Dialog<Open>
impl Dialog<Open>
Sourcepub async fn balance(&mut self, account: &Account) -> Result<BalanceResult>
pub async fn balance(&mut self, account: &Account) -> Result<BalanceResult>
Request account balance (HKSAL).
Takes a validated Account — IBAN and BIC are guaranteed non-empty.
Automatically selects the correct HKSAL version from BPD and bundles
HKTAN:4 when HIPINS says TAN is required for this operation.
Sourcepub async fn transactions(
&mut self,
account: &Account,
start_date: NaiveDate,
end_date: NaiveDate,
touchdown: Option<&TouchdownPoint>,
) -> Result<TransactionResult>
pub async fn transactions( &mut self, account: &Account, start_date: NaiveDate, end_date: NaiveDate, touchdown: Option<&TouchdownPoint>, ) -> Result<TransactionResult>
Request account transactions (HKKAZ) — single page.
Takes a validated Account. For pagination, pass the touchdown value
from a previous TransactionPage — pass None for the first request.
HKTAN:4 is only bundled on the first request (not on touchdown pages).
Sourcepub async fn holdings(
&mut self,
account: &Account,
currency: Option<&Currency>,
touchdown: Option<&TouchdownPoint>,
) -> Result<HoldingsResult>
pub async fn holdings( &mut self, account: &Account, currency: Option<&Currency>, touchdown: Option<&TouchdownPoint>, ) -> Result<HoldingsResult>
Request securities holdings (HKWPD).
Takes a validated Account — IBAN and BIC are guaranteed non-empty.
Automatically selects the correct HKWPD version from BPD.
Pass touchdown from a previous HoldingsPage for pagination,
or None for the first request.
Source§impl Dialog<TanPending>
impl Dialog<TanPending>
Sourcepub async fn poll(self, task_reference: &TaskReference) -> Result<PollResult>
pub async fn poll(self, task_reference: &TaskReference) -> Result<PollResult>
Poll decoupled TAN status (HKTAN process S).
Per spec: sends HKTAN alone, no business segments.
Returns Confirmed (→ Open) or Pending (→ still TanPending).
Sourcepub async fn submit_tan(
self,
task_reference: &TaskReference,
tan: &str,
) -> Result<(Dialog<Open>, Response)>
pub async fn submit_tan( self, task_reference: &TaskReference, tan: &str, ) -> Result<(Dialog<Open>, Response)>
Submit TAN for process 2 (non-decoupled: chipTAN, SMS-TAN). TAN value is included in HNSHA.