pub struct BankClient { /* private fields */ }Expand description
A bank to talk to: its configuration (URL, BLZ, TAN overrides), the
product ID registered with the Deutsche Kreditwirtschaft, and the
transport (default: HTTPS with feature http).
Implementations§
Source§impl BankClient
impl BankClient
pub fn new(config: BankConfig, product_id: ProductId) -> Self
Sourcepub fn with_now(self, now: DateTime) -> Self
pub fn with_now(self, now: DateTime) -> Self
Pin the local time for everything the library reads from the clock:
the HNSHK and HNVSK stamps, the pain.001 CreDtTm and the date of the
day (the storage-period clamp of transactions) in this client’s
dialogs. For tests and replays, which must not depend on the real
clock; the default is the system’s local time. Paused-dialog timing
(expires_at, not_before) stays on real timestamps.
Sourcepub fn now(&self) -> DateTime
pub fn now(&self) -> DateTime
The pinned local time (BankClient::with_now), else the system’s.
A consumer that computes date ranges uses it, so its tests can pin
the clock the same way.
Sourcepub fn today(&self) -> Date
pub fn today(&self) -> Date
The date of BankClient::now.
Sourcepub fn with_transport(self, transport: SharedTransport) -> Self
pub fn with_transport(self, transport: SharedTransport) -> Self
Send through transport instead of the default.
Sourcepub fn with_quirks(
self,
quirks: impl Fn() -> QuirkChain + Send + Sync + 'static,
) -> Self
pub fn with_quirks( self, quirks: impl Fn() -> QuirkChain + Send + Sync + 'static, ) -> Self
Repair the bank’s answers with the chain quirks builds (one per
dialog) instead of the default chain.