mirror of
https://github.com/aclindsa/ofxgo.git
synced 2025-07-03 12:28:38 -04:00
Add Type() to Message interface, check types when marshalling requests
This commit is contained in:
@ -33,6 +33,10 @@ func (r *InvStatementRequest) Valid() (bool, error) {
|
||||
return true, nil
|
||||
}
|
||||
|
||||
func (r *InvStatementRequest) Type() messageType {
|
||||
return InvStmtRq
|
||||
}
|
||||
|
||||
type InvTran struct {
|
||||
XMLName xml.Name `xml:"INVTRAN"`
|
||||
FiTId String `xml:"FITID"`
|
||||
@ -816,6 +820,10 @@ func (sr InvStatementResponse) Valid() (bool, error) {
|
||||
return true, nil
|
||||
}
|
||||
|
||||
func (sr InvStatementResponse) Type() messageType {
|
||||
return InvStmtRs
|
||||
}
|
||||
|
||||
func decodeInvestmentsMessageSet(d *xml.Decoder, start xml.StartElement) ([]Message, error) {
|
||||
var msgs []Message
|
||||
for {
|
||||
|
Reference in New Issue
Block a user