Skip to main content

Dialog

Struct Dialog 

Source
pub struct Dialog<S: Debug> {
    pub params: BankParams,
    /* private fields */
}

Fields§

§params: BankParams

Implementations§

Source§

impl<S: Debug> Dialog<S>

Source

pub fn system_id(&self) -> &SystemId

Source

pub fn bank_params(&self) -> &BankParams

Source

pub fn bank_params_mut(&mut self) -> &mut BankParams

Source§

impl Dialog<New>

Source

pub fn new( url: &str, blz: &Blz, user_id: &UserId, pin: &Pin, product_id: &ProductId, ) -> Result<Self>

Source

pub fn with_system_id(self, system_id: &SystemId) -> Self

Source

pub fn with_params(self, params: &BankParams) -> Self

Source

pub fn with_tan_medium(self, medium: &TanMediumName) -> Self

Source

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.

Source

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

pub async fn init_no_tan(self) -> Result<(Dialog<Open>, Response)>

Initialize WITHOUT HKTAN — PIN-only. Used when bank doesn’t require SCA.

Source§

impl Dialog<Synced>

Source

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>

Source

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.

Source

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).

Source

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

pub async fn end(self) -> Result<()>

End the dialog.

Source§

impl Dialog<TanPending>

Source

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).

Source

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.

Source

pub async fn cancel(self) -> Result<()>

Cancel: end dialog without completing TAN.

Trait Implementations§

Source§

impl<S: Debug> Debug for Dialog<S>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<S> Freeze for Dialog<S>

§

impl<S> !RefUnwindSafe for Dialog<S>

§

impl<S> Send for Dialog<S>
where S: Send,

§

impl<S> Sync for Dialog<S>
where S: Sync,

§

impl<S> Unpin for Dialog<S>
where S: Unpin,

§

impl<S> UnsafeUnpin for Dialog<S>

§

impl<S> !UnwindSafe for Dialog<S>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more