mirror of
https://github.com/aclindsa/ofxgo.git
synced 2025-07-04 04:48:38 -04:00
Add Type() to Message interface, check types when marshalling requests
This commit is contained in:
@ -28,6 +28,10 @@ func (r *StatementRequest) Valid() (bool, error) {
|
||||
return true, nil
|
||||
}
|
||||
|
||||
func (r *StatementRequest) Type() messageType {
|
||||
return BankRq
|
||||
}
|
||||
|
||||
type Payee struct {
|
||||
XMLName xml.Name `xml:"PAYEE"`
|
||||
Name String `xml:"NAME"`
|
||||
@ -155,6 +159,10 @@ func (sr StatementResponse) Valid() (bool, error) {
|
||||
return true, nil
|
||||
}
|
||||
|
||||
func (sr StatementResponse) Type() messageType {
|
||||
return BankRs
|
||||
}
|
||||
|
||||
func decodeBankingMessageSet(d *xml.Decoder, start xml.StartElement) ([]Message, error) {
|
||||
var msgs []Message
|
||||
for {
|
||||
|
Reference in New Issue
Block a user