Documentation ¶
Index ¶
- type AccountInfo
- type AccountResponse
- type AccountsResponse
- type Address
- type Client
- func (a *Client) Account(uid, aid string) (AccountResponse, error)
- func (a *Client) Accounts(uid string) (AccountsResponse, error)
- func (a *Client) Customer(uid string) (CustomersReponse, error)
- func (a *Client) Transactions(uid, aid string, from, to *time.Time, offset, limit *int) (TransactionsResponse, error)
- type Customer
- type CustomersReponse
- type PhoneNumber
- type Transaction
- type TransactionsResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountInfo ¶
type AccountInfo struct { AccountNumber string `json:"accountNumber"` CustomerID string `json:"customerId"` OwnerCustomerID string `json:"ownerCustomerId"` Name string `json:"name"` AccountType string `json:"accountType"` Available float64 `json:"available"` Balance float64 `json:"balance"` CreditLimit float64 `json:"creditLimit"` DefaultAccount bool `json:"defaultAccount"` }
func (AccountInfo) String ¶
func (a AccountInfo) String() string
type AccountResponse ¶
type AccountResponse struct { Account AccountInfo `json:"item"` ErrorType string `json:"errorType"` IsError bool `json:"isError"` ErrorMessage string `json:"errorMessage"` TraceID string `json:"traceId"` }
type AccountsResponse ¶
type Address ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client can be used to communicate with the sbank APIs. https://sbanken.no/bruke/utviklerportalen/
func NewWithClient ¶
NewWithClient returns a new Client using the provided http.Client as underlying transport. Note that the provided http.Client must handle the authorization.
func (*Client) Account ¶
func (a *Client) Account(uid, aid string) (AccountResponse, error)
Account returns the account information for a single account.
func (*Client) Accounts ¶
func (a *Client) Accounts(uid string) (AccountsResponse, error)
Accounts returns the account information for all accounts which belongs to the provided user.
func (*Client) Customer ¶
func (a *Client) Customer(uid string) (CustomersReponse, error)
Customer returns information about a bank customer.
func (*Client) Transactions ¶
func (a *Client) Transactions(uid, aid string, from, to *time.Time, offset, limit *int) (TransactionsResponse, error)
Transactions returns transactions for a single account. Additional parameters can be provided to limit the results returned.
* from/to: the range of dates to retrieve transactions for. * offset/limit: pagination for results.
type Customer ¶
type Customer struct { CustomerID string `json:"customerId"` FirstName string `json:"firstName"` LastName string `json:"lastName"` EmailAddress string `json:"emailAddress"` DateOfBirth string `json:"dateOfBirth"` PostalAddress Address `json:"postalAddress"` StreetAddress Address `json:"streetAddress"` PhoneNumbers []PhoneNumber `json:"phoneNumbers"` }
Customer contains all information about a banking customer in sbank.
type CustomersReponse ¶
type PhoneNumber ¶
func (PhoneNumber) String ¶
func (p PhoneNumber) String() string
type Transaction ¶
type Transaction struct { TransactionID string `json:"transactionId"` CustomerID string `json:"customerId"` AccountNumber string `json:"accountNumber"` Amount float64 `json:"amount"` Text string `json:"text"` TransactionType string `json:"transactionType"` RegistrationDate time.Time `json:"registrationDate"` AccountingDate time.Time `json:"accountingDate"` InterestDate time.Time `json:"interestDate"` }
func (Transaction) String ¶
func (t Transaction) String() string