mirror of
https://github.com/aclindsa/ofxgo.git
synced 2024-11-22 03:30:04 -05:00
Comment credit card statement requests/responses
This commit is contained in:
parent
eee9348766
commit
6c20007ada
3
bank.go
3
bank.go
@ -180,8 +180,7 @@ func (sr *StatementResponse) Name() string {
|
||||
return "STMTTRNRS"
|
||||
}
|
||||
|
||||
// Valid returns (true, nil) if this struct would be valid OFX if marshalled
|
||||
// into XML/SGML
|
||||
// Valid returns (true, nil) if this struct was valid OFX when unmarshalled
|
||||
func (sr *StatementResponse) Valid() (bool, error) {
|
||||
//TODO implement
|
||||
return true, nil
|
||||
|
@ -4,6 +4,9 @@ import (
|
||||
"github.com/aclindsa/go/src/encoding/xml"
|
||||
)
|
||||
|
||||
// CCStatementRequest represents a request for a credit card statement. It is
|
||||
// used to request balances and/or transactions. See StatementRequest for the
|
||||
// analog for all other bank accounts.
|
||||
type CCStatementRequest struct {
|
||||
XMLName xml.Name `xml:"CCSTMTTRNRQ"`
|
||||
TrnUID UID `xml:"TRNUID"`
|
||||
@ -18,19 +21,27 @@ type CCStatementRequest struct {
|
||||
IncTranImg Boolean `xml:"CCSTMTRQ>INCTRANIMG,omitempty"` // Include transaction images
|
||||
}
|
||||
|
||||
// Name returns the name of the top-level transaction XML/SGML element
|
||||
func (r *CCStatementRequest) Name() string {
|
||||
return "CCSTMTTRNRQ"
|
||||
}
|
||||
|
||||
// Valid returns (true, nil) if this struct would be valid OFX if marshalled
|
||||
// into XML/SGML
|
||||
func (r *CCStatementRequest) Valid() (bool, error) {
|
||||
// TODO implement
|
||||
return true, nil
|
||||
}
|
||||
|
||||
// Type returns which message set this message belongs to (which Request
|
||||
// element of type []Message it should appended to)
|
||||
func (r *CCStatementRequest) Type() messageType {
|
||||
return CreditCardRq
|
||||
}
|
||||
|
||||
// CCStatementResponse represents a credit card statement, including its
|
||||
// balances and possibly transactions. It is a response to CCStatementRequest,
|
||||
// or sometimes provided as part of an OFX file downloaded manually from an FI.
|
||||
type CCStatementResponse struct {
|
||||
XMLName xml.Name `xml:"CCSTMTTRNRS"`
|
||||
TrnUID UID `xml:"TRNUID"`
|
||||
@ -56,15 +67,19 @@ type CCStatementResponse struct {
|
||||
MktgInfo String `xml:"CCSTMTRS>MKTGINFO,omitempty"` // Marketing information
|
||||
}
|
||||
|
||||
// Name returns the name of the top-level transaction XML/SGML element
|
||||
func (sr *CCStatementResponse) Name() string {
|
||||
return "CCSTMTTRNRS"
|
||||
}
|
||||
|
||||
// Valid returns (true, nil) if this struct was valid OFX when unmarshalled
|
||||
func (sr *CCStatementResponse) Valid() (bool, error) {
|
||||
//TODO implement
|
||||
return true, nil
|
||||
}
|
||||
|
||||
// Type returns which message set this message belongs to (which Response
|
||||
// element of type []Message it belongs to)
|
||||
func (sr *CCStatementResponse) Type() messageType {
|
||||
return CreditCardRs
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user