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

Add simple investment requests/responses

This is lacking (at least) parsing the list of securities frequently
sent with investment statements
This commit is contained in:
2017-03-19 21:08:58 -04:00
parent 81814feaff
commit f59f3713c2
7 changed files with 148 additions and 28 deletions

View File

@ -55,22 +55,6 @@ func (r *SignonRequest) Valid() (bool, error) {
return true, nil
}
type Status struct {
XMLName xml.Name `xml:"STATUS"`
Code Int `xml:"CODE"`
Severity String `xml:"SEVERITY"`
Message String `xml:"MESSAGE,omitempty"`
}
func (s *Status) Valid() (bool, error) {
switch s.Severity {
case "INFO", "WARN", "ERROR":
return true, nil
default:
return false, errors.New("Invalid STATUS>SEVERITY")
}
}
type SignonResponse struct {
XMLName xml.Name `xml:"SONRS"`
Status Status `xml:"STATUS"`