Documentation ¶
Overview ¶
Package client provides a high level API for HBCI-Requests
The main types of this package are the Config and the Client itself. The
Config provides general information about the account to use. It should be sufficient to provide a config with BankID (i.e. 'Bankleitzahl, BLZ), AccountID (i.e. Kontonummer) and the PIN. The fields URL and HBCIVersion are optional fields for users with deeper knowledge about the bank institute and its HBCI endpoints. If one of these is not provided it will be looked up from the bankinfo package.
Client provides a convenient way of issuing certain requests to the HBCI server. All low level APIs are queried from the Client and it returns only types from the domain package.
Index ¶
- type AnonymousClient
- type Client
- func (c *Client) AccountBalances(account domain.AccountConnection, allAccounts bool) ([]domain.AccountBalance, error)
- func (c *Client) AccountInformation(account domain.AccountConnection, allAccounts bool) error
- func (c *Client) AccountTransactions(account domain.AccountConnection, timeframe domain.Timeframe, allAccounts bool, ...) ([]domain.AccountTransaction, error)
- func (c *Client) Accounts() ([]domain.AccountInformation, error)
- func (c *Client) SepaAccountTransactions(account domain.InternationalAccountConnection, timeframe domain.Timeframe, ...) ([]domain.AccountTransaction, error)
- func (c *Client) Status(from, to time.Time, maxEntries int, continuationReference string) ([]domain.StatusAcknowledgement, error)
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnonymousClient ¶
type AnonymousClient struct {
*Client
}
AnonymousClient wraps a Client and allows anonymous requests to bank institutes. Examples for those jobs are stock exchange news.
func (*AnonymousClient) CommunicationAccess ¶
func (a *AnonymousClient) CommunicationAccess(from, to domain.BankID, maxEntries int) ([]byte, error)
CommunicationAccess returns data used to make calls to a given institute. Not yet properly implemented, therefore only the raw data are returned.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the main entrypoint to perform high level HBCI requests.
Its methods reflect possible actions and abstract the lower level dialog methods.
func New ¶
New creates a new HBCI client. It returns an error if the provided HBCI-Version of the config is not supported or if there is no entry in the bank institute database for the provided BankID.
If the provided Config does not provide a URL or a HBCI-Version it will be looked up in the bankinfo database.
func (*Client) AccountBalances ¶
func (c *Client) AccountBalances(account domain.AccountConnection, allAccounts bool) ([]domain.AccountBalance, error)
AccountBalances retrieves the balance for the provided account. If allAccounts is true it will fetch also the balances for all accounts associated with the account.
func (*Client) AccountInformation ¶
func (c *Client) AccountInformation(account domain.AccountConnection, allAccounts bool) error
AccountInformation will print all information attached to the provided account. If allAccounts is true it will fetch also the information associated with the account.
func (*Client) AccountTransactions ¶
func (c *Client) AccountTransactions(account domain.AccountConnection, timeframe domain.Timeframe, allAccounts bool, continuationReference string) ([]domain.AccountTransaction, error)
AccountTransactions return all transactions for the provided timeframe. If allAccouts is true, it will fetch all transactions associated with the proviced account. For the initial request no continuationReference is needed, as this method will be called recursivly if the server sends one.
func (*Client) Accounts ¶
func (c *Client) Accounts() ([]domain.AccountInformation, error)
Accounts return the basic account information for the provided client config.
func (*Client) SepaAccountTransactions ¶
func (c *Client) SepaAccountTransactions(account domain.InternationalAccountConnection, timeframe domain.Timeframe, allAccounts bool, continuationReference string) ([]domain.AccountTransaction, error)
SepaAccountTransactions return all transactions for the provided timeframe. If allAccouts is true, it will fetch all transactions associated with the provided account. For the initial request no continuationReference is needed, as this method will be called recursivly if the server sends one.
func (*Client) Status ¶
func (c *Client) Status(from, to time.Time, maxEntries int, continuationReference string) ([]domain.StatusAcknowledgement, error)
Status returns information about open jobs to fetch from the institute. If a continuationReference is present, the status information attached to it will be fetched.
type Config ¶
type Config struct { BankID string `json:"bank_id"` AccountID string `json:"account_id"` PIN string `json:"pin"` URL string `json:"url"` HBCIVersion int `json:"hbci_version"` SecurityFunction string Transport transport.Transport }
Config defines the basic configuration needed for a Client to work.