forked from quickfixgo/quickfix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SettlementInstructions.go
152 lines (142 loc) · 6.86 KB
/
SettlementInstructions.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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
//Package settlementinstructions msg type = T.
package settlementinstructions
import (
"github.com/quickfixgo/quickfix"
"github.com/quickfixgo/quickfix/enum"
"github.com/quickfixgo/quickfix/fix44"
"github.com/quickfixgo/quickfix/fix44/parties"
"github.com/quickfixgo/quickfix/fix44/settlinstructionsdata"
"time"
)
//NoSettlInst is a repeating group in SettlementInstructions
type NoSettlInst struct {
//SettlInstID is a non-required field for NoSettlInst.
SettlInstID *string `fix:"162"`
//SettlInstTransType is a non-required field for NoSettlInst.
SettlInstTransType *string `fix:"163"`
//SettlInstRefID is a non-required field for NoSettlInst.
SettlInstRefID *string `fix:"214"`
//Parties is a non-required component for NoSettlInst.
Parties *parties.Parties
//Side is a non-required field for NoSettlInst.
Side *string `fix:"54"`
//Product is a non-required field for NoSettlInst.
Product *int `fix:"460"`
//SecurityType is a non-required field for NoSettlInst.
SecurityType *string `fix:"167"`
//CFICode is a non-required field for NoSettlInst.
CFICode *string `fix:"461"`
//EffectiveTime is a non-required field for NoSettlInst.
EffectiveTime *time.Time `fix:"168"`
//ExpireTime is a non-required field for NoSettlInst.
ExpireTime *time.Time `fix:"126"`
//LastUpdateTime is a non-required field for NoSettlInst.
LastUpdateTime *time.Time `fix:"779"`
//SettlInstructionsData is a non-required component for NoSettlInst.
SettlInstructionsData *settlinstructionsdata.SettlInstructionsData
//PaymentMethod is a non-required field for NoSettlInst.
PaymentMethod *int `fix:"492"`
//PaymentRef is a non-required field for NoSettlInst.
PaymentRef *string `fix:"476"`
//CardHolderName is a non-required field for NoSettlInst.
CardHolderName *string `fix:"488"`
//CardNumber is a non-required field for NoSettlInst.
CardNumber *string `fix:"489"`
//CardStartDate is a non-required field for NoSettlInst.
CardStartDate *string `fix:"503"`
//CardExpDate is a non-required field for NoSettlInst.
CardExpDate *string `fix:"490"`
//CardIssNum is a non-required field for NoSettlInst.
CardIssNum *string `fix:"491"`
//PaymentDate is a non-required field for NoSettlInst.
PaymentDate *string `fix:"504"`
//PaymentRemitterID is a non-required field for NoSettlInst.
PaymentRemitterID *string `fix:"505"`
}
//NewNoSettlInst returns an initialized NoSettlInst instance
func NewNoSettlInst() *NoSettlInst {
var m NoSettlInst
return &m
}
func (m *NoSettlInst) SetSettlInstID(v string) { m.SettlInstID = &v }
func (m *NoSettlInst) SetSettlInstTransType(v string) { m.SettlInstTransType = &v }
func (m *NoSettlInst) SetSettlInstRefID(v string) { m.SettlInstRefID = &v }
func (m *NoSettlInst) SetParties(v parties.Parties) { m.Parties = &v }
func (m *NoSettlInst) SetSide(v string) { m.Side = &v }
func (m *NoSettlInst) SetProduct(v int) { m.Product = &v }
func (m *NoSettlInst) SetSecurityType(v string) { m.SecurityType = &v }
func (m *NoSettlInst) SetCFICode(v string) { m.CFICode = &v }
func (m *NoSettlInst) SetEffectiveTime(v time.Time) { m.EffectiveTime = &v }
func (m *NoSettlInst) SetExpireTime(v time.Time) { m.ExpireTime = &v }
func (m *NoSettlInst) SetLastUpdateTime(v time.Time) { m.LastUpdateTime = &v }
func (m *NoSettlInst) SetSettlInstructionsData(v settlinstructionsdata.SettlInstructionsData) {
m.SettlInstructionsData = &v
}
func (m *NoSettlInst) SetPaymentMethod(v int) { m.PaymentMethod = &v }
func (m *NoSettlInst) SetPaymentRef(v string) { m.PaymentRef = &v }
func (m *NoSettlInst) SetCardHolderName(v string) { m.CardHolderName = &v }
func (m *NoSettlInst) SetCardNumber(v string) { m.CardNumber = &v }
func (m *NoSettlInst) SetCardStartDate(v string) { m.CardStartDate = &v }
func (m *NoSettlInst) SetCardExpDate(v string) { m.CardExpDate = &v }
func (m *NoSettlInst) SetCardIssNum(v string) { m.CardIssNum = &v }
func (m *NoSettlInst) SetPaymentDate(v string) { m.PaymentDate = &v }
func (m *NoSettlInst) SetPaymentRemitterID(v string) { m.PaymentRemitterID = &v }
//Message is a SettlementInstructions FIX Message
type Message struct {
FIXMsgType string `fix:"T"`
fix44.Header
//SettlInstMsgID is a required field for SettlementInstructions.
SettlInstMsgID string `fix:"777"`
//SettlInstReqID is a non-required field for SettlementInstructions.
SettlInstReqID *string `fix:"791"`
//SettlInstMode is a required field for SettlementInstructions.
SettlInstMode string `fix:"160"`
//SettlInstReqRejCode is a non-required field for SettlementInstructions.
SettlInstReqRejCode *int `fix:"792"`
//Text is a non-required field for SettlementInstructions.
Text *string `fix:"58"`
//EncodedTextLen is a non-required field for SettlementInstructions.
EncodedTextLen *int `fix:"354"`
//EncodedText is a non-required field for SettlementInstructions.
EncodedText *string `fix:"355"`
//ClOrdID is a non-required field for SettlementInstructions.
ClOrdID *string `fix:"11"`
//TransactTime is a required field for SettlementInstructions.
TransactTime time.Time `fix:"60"`
//NoSettlInst is a non-required field for SettlementInstructions.
NoSettlInst []NoSettlInst `fix:"778,omitempty"`
fix44.Trailer
}
//Marshal converts Message to a quickfix.Message instance
func (m Message) Marshal() quickfix.Message { return quickfix.Marshal(m) }
//New returns an initialized SettlementInstructions instance
func New(settlinstmsgid string, settlinstmode string, transacttime time.Time) *Message {
var m Message
m.SetSettlInstMsgID(settlinstmsgid)
m.SetSettlInstMode(settlinstmode)
m.SetTransactTime(transacttime)
return &m
}
func (m *Message) SetSettlInstMsgID(v string) { m.SettlInstMsgID = v }
func (m *Message) SetSettlInstReqID(v string) { m.SettlInstReqID = &v }
func (m *Message) SetSettlInstMode(v string) { m.SettlInstMode = v }
func (m *Message) SetSettlInstReqRejCode(v int) { m.SettlInstReqRejCode = &v }
func (m *Message) SetText(v string) { m.Text = &v }
func (m *Message) SetEncodedTextLen(v int) { m.EncodedTextLen = &v }
func (m *Message) SetEncodedText(v string) { m.EncodedText = &v }
func (m *Message) SetClOrdID(v string) { m.ClOrdID = &v }
func (m *Message) SetTransactTime(v time.Time) { m.TransactTime = v }
func (m *Message) SetNoSettlInst(v []NoSettlInst) { m.NoSettlInst = v }
//A RouteOut is the callback type that should be implemented for routing Message
type RouteOut func(msg Message, sessionID quickfix.SessionID) quickfix.MessageRejectError
//Route returns the beginstring, message type, and MessageRoute for this Message type
func Route(router RouteOut) (string, string, quickfix.MessageRoute) {
r := func(msg quickfix.Message, sessionID quickfix.SessionID) quickfix.MessageRejectError {
m := new(Message)
if err := quickfix.Unmarshal(msg, m); err != nil {
return err
}
return router(*m, sessionID)
}
return enum.BeginStringFIX44, "T", r
}