1
0
mirror of https://github.com/aclindsa/ofxgo.git synced 2025-07-01 11:48:38 -04:00

Add Type() to Message interface, check types when marshalling requests

This commit is contained in:
2017-03-31 09:25:07 -04:00
parent 85684883c6
commit d822179446
8 changed files with 170 additions and 11 deletions

View File

@ -24,6 +24,10 @@ func (r *AcctInfoRequest) Valid() (bool, error) {
return true, nil
}
func (r *AcctInfoRequest) Type() messageType {
return SignupRq
}
type HolderInfo struct {
XMLName xml.Name
FirstName String `xml:"FIRSTNAME"`
@ -125,6 +129,10 @@ func (air AcctInfoResponse) Valid() (bool, error) {
return true, nil
}
func (air AcctInfoResponse) Type() messageType {
return SignupRs
}
func decodeSignupMessageSet(d *xml.Decoder, start xml.StartElement) ([]Message, error) {
var msgs []Message
for {