-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
61c8b35
commit 32202c5
Showing
4 changed files
with
156 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,55 @@ | ||
// 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. | ||
/* | ||
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. | ||
# Example to get account transactions | ||
c := newClient() | ||
testAccount := domain.AccountConnection{ | ||
AccountID: "1000000000", CountryCode: 280, BankID: "100000000" | ||
} | ||
timeframe := domain.Timeframe{ | ||
StartDate: domain.NewShortDate(time.Now().AddDate(0, 0, -90)), | ||
} | ||
transactions, err := c.AccountTransactions(testAccount, timeframe, false, "") | ||
if err != nil { | ||
panic(err) | ||
} | ||
for _, transaction := range transactions { | ||
fmt.Printf("%+v\n", transaction) | ||
} | ||
Example to get account balances | ||
c := newClient() | ||
testAccount := domain.AccountConnection{ | ||
AccountID: "1000000000", CountryCode: 280, BankID: "100000000" | ||
} | ||
balances, err := c.AccountBalances(testAccount, true) | ||
if err != nil { | ||
panic(err) | ||
} | ||
for _, balance := range balances { | ||
fmt.Printf("%+v\n", balance) | ||
} | ||
*/ | ||
package client |