-
Notifications
You must be signed in to change notification settings - Fork 39
/
associatedTypeSubTypes.go
98 lines (88 loc) · 3.36 KB
/
associatedTypeSubTypes.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
package wire
// associatedTypeSubTypes models the TypeSubType associations from
// section 15 (Business Function Code Reference) of the Format Reference Guide
type associatedTypeSubTypes []string
// Contains returns true if the target typeSubType string is in the associations list
func (t associatedTypeSubTypes) Contains(target string) bool {
for _, typeSubType := range t {
if typeSubType == target {
return true
}
}
return false
}
// btrTypeSubTypes contains the types/subtypes associated with a BankTransfer BusinessFunctionCode
var btrTypeSubTypes = associatedTypeSubTypes{
FundsTransfer + BasicFundsTransfer,
FundsTransfer + ReversalTransfer,
FundsTransfer + ReversalPriorDayTransfer,
ForeignTransfer + BasicFundsTransfer,
ForeignTransfer + ReversalTransfer,
ForeignTransfer + ReversalPriorDayTransfer,
SettlementTransfer + BasicFundsTransfer,
SettlementTransfer + ReversalTransfer,
SettlementTransfer + ReversalPriorDayTransfer,
}
// ctrTypeSubTypes contains the types/subtypes associated with a CustomerTransfer BusinessFunctionCode
var ctrTypeSubTypes = associatedTypeSubTypes{
FundsTransfer + BasicFundsTransfer,
FundsTransfer + ReversalTransfer,
FundsTransfer + ReversalPriorDayTransfer,
ForeignTransfer + BasicFundsTransfer,
ForeignTransfer + ReversalTransfer,
ForeignTransfer + ReversalPriorDayTransfer,
SettlementTransfer + BasicFundsTransfer,
SettlementTransfer + ReversalTransfer,
SettlementTransfer + ReversalPriorDayTransfer,
}
var ctpTypeSubTypes = associatedTypeSubTypes{
FundsTransfer + BasicFundsTransfer,
FundsTransfer + RequestReversal,
FundsTransfer + ReversalTransfer,
FundsTransfer + RequestReversalPriorDayTransfer,
FundsTransfer + ReversalPriorDayTransfer,
ForeignTransfer + BasicFundsTransfer,
ForeignTransfer + RequestReversal,
ForeignTransfer + ReversalTransfer,
ForeignTransfer + RequestReversalPriorDayTransfer,
ForeignTransfer + ReversalPriorDayTransfer,
SettlementTransfer + BasicFundsTransfer,
SettlementTransfer + RequestReversal,
SettlementTransfer + ReversalTransfer,
SettlementTransfer + RequestReversalPriorDayTransfer,
SettlementTransfer + ReversalPriorDayTransfer,
}
// these TypeSubType associations are shared between CKS, DEP, FFR, and FFS
var cksTypeSubTypes = associatedTypeSubTypes{
SettlementTransfer + BasicFundsTransfer,
SettlementTransfer + ReversalTransfer,
SettlementTransfer + ReversalPriorDayTransfer,
}
var depTypeSubTypes = cksTypeSubTypes
var ffrTypeSubTypes = cksTypeSubTypes
var ffsTypeSubTypes = cksTypeSubTypes
var drwTypeSubTypes = associatedTypeSubTypes{
FundsTransfer + FundsTransferRequestCredit,
SettlementTransfer + FundsTransferRequestCredit,
}
var drbTypeSubTypes = associatedTypeSubTypes{
SettlementTransfer + RequestCredit,
SettlementTransfer + RefusalRequestCredit,
}
var drcTypeSubTypes = associatedTypeSubTypes{
FundsTransfer + RequestCredit,
FundsTransfer + RefusalRequestCredit,
}
var svcTypeSubTypes = associatedTypeSubTypes{
FundsTransfer + RequestReversal,
FundsTransfer + RequestReversalPriorDayTransfer,
FundsTransfer + RefusalRequestCredit,
FundsTransfer + SSIServiceMessage,
ForeignTransfer + RequestReversal,
ForeignTransfer + RequestReversalPriorDayTransfer,
ForeignTransfer + SSIServiceMessage,
SettlementTransfer + RequestReversal,
SettlementTransfer + RequestReversalPriorDayTransfer,
SettlementTransfer + RefusalRequestCredit,
SettlementTransfer + SSIServiceMessage,
}