module Finance.BgMax.TK where
import Data.Time(LocalTime(..),Day)
import Data.ByteString(ByteString)
data TestMark =
T
| P
deriving Show
data Currency = EUR | SEK deriving Show
data Reference =
Ref0
| Ref1
| Ref2 Integer
| Ref3 ByteString
| Ref4 ByteString
| Ref5 ByteString
| Ref Int ByteString
deriving Show
data DepositType = K | D | S deriving Show
data Transaction =
Transaction {
senderBG :: Integer,
reference :: Reference,
ammount :: Integer,
paymentChannel :: Int,
bcgNo :: Integer,
imageMark :: Int }
deriving Show
data TK01_t =
TK01_t {
layoutName :: ByteString,
layoutVersion :: Int,
timeStamp :: LocalTime,
testMark :: TestMark }
deriving Show
data TK05_t =
TK05_t {
recipientBG :: Integer,
recipientPG :: Maybe Integer,
currency :: Currency }
deriving Show
data TK20_t =
TK20_t {
payment :: Transaction }
deriving Show
data TK21_t =
TK21_t {
deduction :: Transaction,
deductionCode :: Int }
deriving Show
data TK22_t =
TK22_t {
positiveReference :: Transaction }
deriving Show
data TK23_t =
TK23_t {
negativeReference :: Transaction }
deriving Show
data TK25_t =
TK25_t {
information :: ByteString }
deriving Show
data TK26_t =
TK26_t {
name :: ByteString,
extraName :: ByteString }
deriving Show
data TK27_t =
TK27_t {
address :: ByteString,
zipCode :: ByteString }
deriving Show
data TK28_t =
TK28_t {
city :: ByteString,
country :: ByteString,
countryCode :: ByteString }
deriving Show
data TK29_t =
TK29_t {
orgNo :: Integer }
deriving Show
data TK15_t =
TK15_t {
recipientAccount :: Integer,
paymentDate :: Day,
depositNo :: Int,
depositAmmount :: Integer,
depositCurrency :: Currency,
paymentDeductionCount :: Int,
depositType :: Maybe DepositType }
deriving Show
data TK70_t =
TK70_t {
paymentsCount :: Int,
deductionsCount :: Int,
extraReferenceCount :: Int,
depositCount :: Int }
deriving Show
data Post =
TK01 TK01_t
| TK05 TK05_t
| TK20 TK20_t
| TK21 TK21_t
| TK22 TK22_t
| TK23 TK23_t
| TK25 TK25_t
| TK26 TK26_t
| TK27 TK27_t
| TK28 TK28_t
| TK29 TK29_t
| TK15 TK15_t
| TK70 TK70_t
| TK Int
deriving Show