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:
16
signon.go
16
signon.go
@ -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"`
|
||||
|
Reference in New Issue
Block a user