swift

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountTag

type AccountTag struct {
	Tag       string
	BankID    string
	AccountID string
}

AccountTag represents an account in S.W.I.F.T.

func (*AccountTag) Unmarshal

func (a *AccountTag) Unmarshal(value []byte) error

Unmarshal unmarshals value into a

type AlphaNumericTag

type AlphaNumericTag struct {
	// contains filtered or unexported fields
}

An AlphaNumericTag represents alphanumeric data in a S.W.I.F.T. tag

func (AlphaNumericTag) ID

func (t AlphaNumericTag) ID() string

func (*AlphaNumericTag) Unmarshal

func (a *AlphaNumericTag) Unmarshal(value []byte) error

Unmarshal unmarshals value into a

func (*AlphaNumericTag) Val

func (a *AlphaNumericTag) Val() string

Val returns the string embodied in a

func (AlphaNumericTag) Value

func (t AlphaNumericTag) Value() interface{}

type BalanceTag

type BalanceTag struct {
	Tag                  string
	DebitCreditIndicator string
	BookingDate          domain.ShortDate
	Currency             string
	Amount               float64
}

A BalanceTag represents a balance in S.W.I.F.T.

func (*BalanceTag) Balance added in v0.1.4

func (b *BalanceTag) Balance() domain.Balance

Balance returns the balance embodied in b

func (*BalanceTag) Unmarshal

func (b *BalanceTag) Unmarshal(value []byte) error

Unmarshal unmarshals value into b

type CustomFieldTag

type CustomFieldTag struct {
	Tag                string
	TransactionID      int
	BookingText        string
	PrimanotenNumber   string
	Purpose            []string
	BankID             string
	AccountID          string
	Name               string
	MessageKeyAddition int
	Purpose2           []string
}

A CustomFieldTag represents holds multiple information about a transaction

func (*CustomFieldTag) Unmarshal

func (c *CustomFieldTag) Unmarshal(value []byte) error

Unmarshal unmarshals the tag bytes into c

type FloatTag

type FloatTag struct {
	// contains filtered or unexported fields
}

A FloatTag represents float data in a S.W.I.F.T. tag

func (FloatTag) ID

func (t FloatTag) ID() string

func (*FloatTag) Unmarshal

func (f *FloatTag) Unmarshal(value []byte) error

Unmarshal unmarshals value into f

func (*FloatTag) Val

func (f *FloatTag) Val() float64

Val returns the value of f

func (FloatTag) Value

func (t FloatTag) Value() interface{}

type MT940

type MT940 struct {
	JobReference         *AlphaNumericTag
	Reference            *AlphaNumericTag
	Account              *AccountTag
	StatementNumber      *StatementNumberTag
	StartingBalance      *BalanceTag
	Transactions         []*TransactionSequence
	ClosingBalance       *BalanceTag
	CurrentValutaBalance *BalanceTag
	FutureValutaBalance  *BalanceTag
	CustomField          *CustomFieldTag
}

MT940 represents a S.W.I.F.T. Transaction Report

func (*MT940) AccountTransactions

func (m *MT940) AccountTransactions() []domain.AccountTransaction

AccountTransactions returns a slice of account transactions created from m

func (*MT940) Unmarshal

func (m *MT940) Unmarshal(value []byte) error

Unmarshal unmarshals value into m

type MessageExtractor

type MessageExtractor struct {
	// contains filtered or unexported fields
}

MessageExtractor represents an extractor for S.W.I.F.T. messages

func NewMessageExtractor

func NewMessageExtractor(swiftMessage []byte) *MessageExtractor

NewMessageExtractor returns a message extractor feasable extracting S.W.I.F.T. messages from the given input

func (*MessageExtractor) Extract

func (m *MessageExtractor) Extract() ([][]byte, error)

Extract extracts raw S.W.I.F.T. messages from the given input

type NumberTag

type NumberTag struct {
	// contains filtered or unexported fields
}

A NumberTag represents numeric data in a S.W.I.F.T. tag

func (NumberTag) ID

func (t NumberTag) ID() string

func (*NumberTag) Unmarshal

func (n *NumberTag) Unmarshal(value []byte) error

Unmarshal unmarshals value into n

func (*NumberTag) Val

func (n *NumberTag) Val() int

Val returns the int embodied in n

func (NumberTag) Value

func (t NumberTag) Value() interface{}

type StatementNumberTag

type StatementNumberTag struct {
	Tag         string
	Number      int
	SheetNumber int
}

StatementNumberTag represents a S.W.I.F.T. statement number

func (*StatementNumberTag) Unmarshal

func (s *StatementNumberTag) Unmarshal(value []byte) error

Unmarshal unmarshals value into s

type Tag

type Tag interface {
	Unmarshal([]byte) error
	Value() interface{}
	ID() string
}

A Tag represents a S.W.I.F.T. tag

type TransactionSequence

type TransactionSequence struct {
	Transaction *TransactionTag
	Description *CustomFieldTag
}

A TransactionSequence represents a transaction with an additional description in S.W.I.F.T.

type TransactionTag

type TransactionTag struct {
	Tag                   string
	ValutaDate            domain.ShortDate
	BookingDate           domain.ShortDate
	DebitCreditIndicator  string
	CurrencyKind          string
	Amount                float64
	BookingKey            string
	Reference             string
	BankReference         string
	AdditionalInformation string
}

A TransactionTag represents a transaction in S.W.I.F.T.

func (*TransactionTag) Unmarshal

func (t *TransactionTag) Unmarshal(value []byte) error

Unmarshal unmarshals value into t

Jump to

Keyboard shortcuts

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