account

package
v0.0.0-2415 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2021 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const AccountIDPattern = `\d{14}`
View Source
const AccountNumberPattern = `\d{3}-\d{1}-\d{5}-\d{1}`

Variables

This section is empty.

Functions

func GenerateLogAccountNumbers

func GenerateLogAccountNumbers(accountsToLog map[AccountNumber]*Account) string

func GetAccountIDRegexp

func GetAccountIDRegexp() *regexp.Regexp

func GetAccountNumberRegexp

func GetAccountNumberRegexp() *regexp.Regexp

func LogAccounts

func LogAccounts(accountsToLog map[AccountNumber]*Account)

Types

type Account

type Account struct {
	// Number is the account number in the format XXX-X-XXXXX-X. This is the account number a Kasikorn customer sees
	Number AccountNumber `json:"accountNumber"`

	// Internally ID used by Kasikorn. It is a 14 digits number.
	ID AccountID `json:"id"`

	// Friendly name of the account
	Name string `json:"name"`

	// Nickname, this is more informative than for processing purposes.
	NickName string `json:"nickName"`

	// Type of the account, such as Savings account
	Type AccountType `json:"type"`
}

Account defines an account, i.e. money ledger within Kasikorn One customer might have multiple accounts, like a saving account, current account, etc.

type AccountID

type AccountID string

type AccountNumber

type AccountNumber string

type AccountType

type AccountType string

func GetAccountType

func GetAccountType(accountTypeAsString string) *AccountType

type AllAccountTypes

type AllAccountTypes struct {
	Savings AccountType
	Current AccountType
	Deposit AccountType
}

func GetAllAccountTypes

func GetAllAccountTypes() *AllAccountTypes

Jump to

Keyboard shortcuts

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