diff --git a/creditcard.go b/creditcard.go index 94b93e0..d0529a1 100644 --- a/creditcard.go +++ b/creditcard.go @@ -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 } diff --git a/invstmt.go b/invstmt.go index b2e6470..12bba13 100644 --- a/invstmt.go +++ b/invstmt.go @@ -35,6 +35,9 @@ func (r *InvStatementRequest) Name() string { // Valid returns (true, nil) if this struct would be valid OFX if marshalled // into XML/SGML func (r *InvStatementRequest) Valid(version ofxVersion) (bool, error) { + if ok, err := r.TrnUID.Valid(); !ok { + return false, err + } // TODO implement return true, nil } @@ -1181,6 +1184,9 @@ func (sr *InvStatementResponse) Name() string { // Valid returns (true, nil) if this struct was valid OFX when unmarshalled func (sr *InvStatementResponse) Valid(version ofxVersion) (bool, error) { + if ok, err := sr.TrnUID.Valid(); !ok { + return false, err + } //TODO implement return true, nil } diff --git a/profile.go b/profile.go index 086cff1..6713a0b 100644 --- a/profile.go +++ b/profile.go @@ -26,6 +26,9 @@ func (r *ProfileRequest) Name() string { // Valid returns (true, nil) if this struct would be valid OFX if marshalled // into XML/SGML func (r *ProfileRequest) Valid(version ofxVersion) (bool, error) { + if ok, err := r.TrnUID.Valid(); !ok { + return false, err + } // TODO implement r.ClientRouting = "NONE" return true, nil @@ -159,6 +162,9 @@ func (pr *ProfileResponse) Name() string { // Valid returns (true, nil) if this struct was valid OFX when unmarshalled func (pr *ProfileResponse) Valid(version ofxVersion) (bool, error) { + if ok, err := pr.TrnUID.Valid(); !ok { + return false, err + } //TODO implement return true, nil } diff --git a/seclist.go b/seclist.go index fe2b505..c49eb44 100644 --- a/seclist.go +++ b/seclist.go @@ -43,6 +43,9 @@ func (r *SecListRequest) Name() string { // Valid returns (true, nil) if this struct would be valid OFX if marshalled // into XML/SGML func (r *SecListRequest) 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 (r *SecListResponse) Name() string { // Valid returns (true, nil) if this struct was valid OFX when unmarshalled func (r *SecListResponse) Valid(version ofxVersion) (bool, error) { + if ok, err := r.TrnUID.Valid(); !ok { + return false, err + } // TODO implement return true, nil } diff --git a/signup.go b/signup.go index 9bfa754..c797cb6 100644 --- a/signup.go +++ b/signup.go @@ -24,6 +24,9 @@ func (r *AcctInfoRequest) Name() string { // Valid returns (true, nil) if this struct would be valid OFX if marshalled // into XML/SGML func (r *AcctInfoRequest) Valid(version ofxVersion) (bool, error) { + if ok, err := r.TrnUID.Valid(); !ok { + return false, err + } // TODO implement return true, nil } @@ -149,6 +152,9 @@ func (air *AcctInfoResponse) Name() string { // Valid returns (true, nil) if this struct was valid OFX when unmarshalled func (air *AcctInfoResponse) Valid(version ofxVersion) (bool, error) { + if ok, err := air.TrnUID.Valid(); !ok { + return false, err + } //TODO implement return true, nil }