iban

package
v0.1.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsValid added in v0.1.4

func IsValid(input string) bool

IsValid validates the IBAN for its proof number

func Print added in v0.1.4

func Print(iban IBAN) string

Print returns the IBAN in paper format, i.e. with spaces after every fourth character

Types

type IBAN

type IBAN string

IBAN represents an International Bank Account Number. It is defined by ISO 13616:2007

func From added in v0.1.4

func From(input string) (IBAN, error)

From creates an IBAN from the provided input. If the input is not a valid IBAN, it returns an error.

func New added in v0.1.4

func New(countryCode string, BBAN string) (IBAN, error)

New returns a new IBAN for the provided countryCode and BBAN

func NewGerman

func NewGerman(bankID, accountID string) (IBAN, error)

NewGerman calculates the Iban for the provided bankID and accountID. It will return an error if the accountID can not be parsed as int. It returns only valid german IBANs, as it is hard coded to use german settings.

func (IBAN) AccountID

func (i IBAN) AccountID() string

AccountID returns the parts of the IBAN which refer to the AccountID

func (IBAN) BBAN added in v0.1.4

func (i IBAN) BBAN() string

BBAN returns the BBAN, that is, the bank account identifier

func (IBAN) BankID

func (i IBAN) BankID() string

BankID returns the parts of the IBAN which refer to the bank institute ID

func (IBAN) CountryCode

func (i IBAN) CountryCode() string

CountryCode returns the country code used by the IBAN. The country code is defined by ISO 3166-1 alpha-2

func (IBAN) ProofNumber

func (i IBAN) ProofNumber() string

ProofNumber returns the used number to make a sanity check whether the IBAN is valid or not.

func (IBAN) String added in v0.1.4

func (i IBAN) String() string

String returns the string representation of i

func (IBAN) Valid added in v0.1.4

func (i IBAN) Valid() bool

Valid returns true if the IBAN is valid, false otherwise

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL