1
0
mirror of https://github.com/aclindsa/ofxgo.git synced 2024-11-14 17:20:04 -05:00
ofxgo/profile.go

25 lines
521 B
Go
Raw Normal View History

2017-03-11 07:15:15 -05:00
package ofxgo
import (
"github.com/golang/go/src/encoding/xml"
)
2017-03-11 07:18:02 -05:00
type ProfileRequest struct {
XMLName xml.Name `xml:"PROFTRNRQ"`
TrnUID UID `xml:"TRNUID"`
ClientRouting String `xml:"PROFRQ>CLIENTROUTING"` // Forced to NONE
DtProfup Date `xml:"PROFRQ>DTPROFUP"`
2017-03-11 07:15:15 -05:00
}
2017-03-11 07:18:02 -05:00
func (r *ProfileRequest) Name() string {
2017-03-11 07:15:15 -05:00
return "PROFTRNRQ"
}
2017-03-11 07:18:02 -05:00
func (r *ProfileRequest) Valid() (bool, error) {
2017-03-11 07:15:15 -05:00
if ok, err := r.TrnUID.Valid(); !ok {
return false, err
}
r.ClientRouting = "NONE"
return true, nil
}