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

Add transaction UID validation to all messages

This commit is contained in:
2017-04-18 20:22:07 -04:00
parent 8712be5a9d
commit bc541d881d
5 changed files with 30 additions and 0 deletions

View File

@ -29,6 +29,9 @@ func (r *CCStatementRequest) Name() string {
// Valid returns (true, nil) if this struct would be valid OFX if marshalled
// into XML/SGML
func (r *CCStatementRequest) Valid(version ofxVersion) (bool, error) {
if ok, err := r.TrnUID.Valid(); !ok {
return false, err
}
// TODO implement
return true, nil
}
@ -74,6 +77,9 @@ func (sr *CCStatementResponse) Name() string {
// Valid returns (true, nil) if this struct was valid OFX when unmarshalled
func (sr *CCStatementResponse) Valid(version ofxVersion) (bool, error) {
if ok, err := sr.TrnUID.Valid(); !ok {
return false, err
}
//TODO implement
return true, nil
}