mirror of
https://github.com/aclindsa/ofxgo.git
synced 2024-11-22 03:30:04 -05:00
Standardize transaction wrapper fields
This commit is contained in:
parent
6efd3ae921
commit
c1777df3df
@ -8,6 +8,9 @@ import (
|
|||||||
type StatementRequest struct {
|
type StatementRequest struct {
|
||||||
XMLName xml.Name `xml:"STMTTRNRQ"`
|
XMLName xml.Name `xml:"STMTTRNRQ"`
|
||||||
TrnUID UID `xml:"TRNUID"`
|
TrnUID UID `xml:"TRNUID"`
|
||||||
|
CltCookie String `xml:"CLTCOOKIE,omitempty"`
|
||||||
|
TAN String `xml:"TAN,omitempty"` // Transaction authorization number
|
||||||
|
// TODO `xml:"OFXEXTENSION,omitempty"`
|
||||||
BankAcctFrom BankAcct `xml:"STMTRQ>BANKACCTFROM"`
|
BankAcctFrom BankAcct `xml:"STMTRQ>BANKACCTFROM"`
|
||||||
DtStart *Date `xml:"STMTRQ>INCTRAN>DTSTART,omitempty"`
|
DtStart *Date `xml:"STMTRQ>INCTRAN>DTSTART,omitempty"`
|
||||||
DtEnd *Date `xml:"STMTRQ>INCTRAN>DTEND,omitempty"`
|
DtEnd *Date `xml:"STMTRQ>INCTRAN>DTEND,omitempty"`
|
||||||
@ -127,6 +130,8 @@ type StatementResponse struct {
|
|||||||
XMLName xml.Name `xml:"STMTTRNRS"`
|
XMLName xml.Name `xml:"STMTTRNRS"`
|
||||||
TrnUID UID `xml:"TRNUID"`
|
TrnUID UID `xml:"TRNUID"`
|
||||||
Status Status `xml:"STATUS"`
|
Status Status `xml:"STATUS"`
|
||||||
|
CltCookie String `xml:"CLTCOOKIE,omitempty"`
|
||||||
|
// TODO `xml:"OFXEXTENSION,omitempty"`
|
||||||
CurDef String `xml:"STMTRS>CURDEF"`
|
CurDef String `xml:"STMTRS>CURDEF"`
|
||||||
BankAcctFrom BankAcct `xml:"STMTRS>BANKACCTFROM"`
|
BankAcctFrom BankAcct `xml:"STMTRS>BANKACCTFROM"`
|
||||||
BankTranList *TransactionList `xml:"STMTRS>BANKTRANLIST,omitempty"`
|
BankTranList *TransactionList `xml:"STMTRS>BANKTRANLIST,omitempty"`
|
||||||
|
@ -32,7 +32,6 @@ func getAccounts() {
|
|||||||
acctInfo := ofxgo.AcctInfoRequest{
|
acctInfo := ofxgo.AcctInfoRequest{
|
||||||
TrnUID: *uid,
|
TrnUID: *uid,
|
||||||
DtAcctUp: ofxgo.Date(time.Unix(0, 0)),
|
DtAcctUp: ofxgo.Date(time.Unix(0, 0)),
|
||||||
CltCookie: 1,
|
|
||||||
}
|
}
|
||||||
query.Signup = append(query.Signup, &acctInfo)
|
query.Signup = append(query.Signup, &acctInfo)
|
||||||
|
|
||||||
|
@ -8,6 +8,9 @@ import (
|
|||||||
type CCStatementRequest struct {
|
type CCStatementRequest struct {
|
||||||
XMLName xml.Name `xml:"CCSTMTTRNRQ"`
|
XMLName xml.Name `xml:"CCSTMTTRNRQ"`
|
||||||
TrnUID UID `xml:"TRNUID"`
|
TrnUID UID `xml:"TRNUID"`
|
||||||
|
CltCookie String `xml:"CLTCOOKIE,omitempty"`
|
||||||
|
TAN String `xml:"TAN,omitempty"`
|
||||||
|
// TODO OFXEXTENSION
|
||||||
CCAcctFrom CCAcct `xml:"CCSTMTRQ>CCACCTFROM"`
|
CCAcctFrom CCAcct `xml:"CCSTMTRQ>CCACCTFROM"`
|
||||||
DtStart *Date `xml:"CCSTMTRQ>INCTRAN>DTSTART,omitempty"`
|
DtStart *Date `xml:"CCSTMTRQ>INCTRAN>DTSTART,omitempty"`
|
||||||
DtEnd *Date `xml:"CCSTMTRQ>INCTRAN>DTEND,omitempty"`
|
DtEnd *Date `xml:"CCSTMTRQ>INCTRAN>DTEND,omitempty"`
|
||||||
@ -29,6 +32,8 @@ type CCStatementResponse struct {
|
|||||||
XMLName xml.Name `xml:"CCSTMTTRNRS"`
|
XMLName xml.Name `xml:"CCSTMTTRNRS"`
|
||||||
TrnUID UID `xml:"TRNUID"`
|
TrnUID UID `xml:"TRNUID"`
|
||||||
Status Status `xml:"STATUS"`
|
Status Status `xml:"STATUS"`
|
||||||
|
CltCookie String `xml:"CLTCOOKIE,omitempty"`
|
||||||
|
// TODO `xml:"OFXEXTENSION,omitempty"`
|
||||||
CurDef String `xml:"CCSTMTRS>CURDEF"`
|
CurDef String `xml:"CCSTMTRS>CURDEF"`
|
||||||
CCAcctFrom CCAcct `xml:"CCSTMTRS>CCACCTFROM"`
|
CCAcctFrom CCAcct `xml:"CCSTMTRS>CCACCTFROM"`
|
||||||
BankTranList *TransactionList `xml:"CCSTMTRS>BANKTRANLIST,omitempty"`
|
BankTranList *TransactionList `xml:"CCSTMTRS>BANKTRANLIST,omitempty"`
|
||||||
|
@ -794,7 +794,7 @@ type InvStatementResponse struct {
|
|||||||
TrnUID UID `xml:"TRNUID"`
|
TrnUID UID `xml:"TRNUID"`
|
||||||
Status Status `xml:"STATUS"`
|
Status Status `xml:"STATUS"`
|
||||||
CltCookie String `xml:"CLTCOOKIE,omitempty"`
|
CltCookie String `xml:"CLTCOOKIE,omitempty"`
|
||||||
// TODO OFXEXTENSION
|
// TODO `xml:"OFXEXTENSION,omitempty"`
|
||||||
DtAsOf Date `xml:"INVSTMTRS>DTASOF"`
|
DtAsOf Date `xml:"INVSTMTRS>DTASOF"`
|
||||||
CurDef String `xml:"INVSTMTRS>CURDEF"`
|
CurDef String `xml:"INVSTMTRS>CURDEF"`
|
||||||
InvAcctFrom InvAcct `xml:"INVSTMTRS>INVACCTFROM"`
|
InvAcctFrom InvAcct `xml:"INVSTMTRS>INVACCTFROM"`
|
||||||
|
@ -8,6 +8,9 @@ import (
|
|||||||
type ProfileRequest struct {
|
type ProfileRequest struct {
|
||||||
XMLName xml.Name `xml:"PROFTRNRQ"`
|
XMLName xml.Name `xml:"PROFTRNRQ"`
|
||||||
TrnUID UID `xml:"TRNUID"`
|
TrnUID UID `xml:"TRNUID"`
|
||||||
|
CltCookie String `xml:"CLTCOOKIE,omitempty"`
|
||||||
|
TAN String `xml:"TAN,omitempty"` // Transaction authorization number
|
||||||
|
// TODO `xml:"OFXEXTENSION,omitempty"`
|
||||||
ClientRouting String `xml:"PROFRQ>CLIENTROUTING"` // Forced to NONE
|
ClientRouting String `xml:"PROFRQ>CLIENTROUTING"` // Forced to NONE
|
||||||
DtProfUp Date `xml:"PROFRQ>DTPROFUP"`
|
DtProfUp Date `xml:"PROFRQ>DTPROFUP"`
|
||||||
}
|
}
|
||||||
@ -98,6 +101,8 @@ type ProfileResponse struct {
|
|||||||
XMLName xml.Name `xml:"PROFTRNRS"`
|
XMLName xml.Name `xml:"PROFTRNRS"`
|
||||||
TrnUID UID `xml:"TRNUID"`
|
TrnUID UID `xml:"TRNUID"`
|
||||||
Status Status `xml:"STATUS"`
|
Status Status `xml:"STATUS"`
|
||||||
|
CltCookie String `xml:"CLTCOOKIE,omitempty"`
|
||||||
|
// TODO `xml:"OFXEXTENSION,omitempty"`
|
||||||
MessageSetList MessageSetList `xml:"PROFRS>MSGSETLIST"`
|
MessageSetList MessageSetList `xml:"PROFRS>MSGSETLIST"`
|
||||||
SignonInfoList []SignonInfo `xml:"PROFRS>SIGNONINFOLIST>SIGNONINFO"`
|
SignonInfoList []SignonInfo `xml:"PROFRS>SIGNONINFOLIST>SIGNONINFO"`
|
||||||
DtProfUp Date `xml:"PROFRS>DTPROFUP"`
|
DtProfUp Date `xml:"PROFRS>DTPROFUP"`
|
||||||
|
@ -24,6 +24,7 @@ type SecListRequest struct {
|
|||||||
TrnUID UID `xml:"TRNUID"`
|
TrnUID UID `xml:"TRNUID"`
|
||||||
CltCookie String `xml:"CLTCOOKIE,omitempty"`
|
CltCookie String `xml:"CLTCOOKIE,omitempty"`
|
||||||
TAN String `xml:"TAN,omitempty"` // Transaction authorization number
|
TAN String `xml:"TAN,omitempty"` // Transaction authorization number
|
||||||
|
// TODO `xml:"OFXEXTENSION,omitempty"`
|
||||||
Securities []SecurityRequest `xml:"SECLISTRQ>SECRQ,omitempty"`
|
Securities []SecurityRequest `xml:"SECLISTRQ>SECRQ,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,6 +42,7 @@ type SecListResponse struct {
|
|||||||
TrnUID UID `xml:"TRNUID"`
|
TrnUID UID `xml:"TRNUID"`
|
||||||
Status Status `xml:"STATUS"`
|
Status Status `xml:"STATUS"`
|
||||||
CltCookie String `xml:"CLTCOOKIE,omitempty"`
|
CltCookie String `xml:"CLTCOOKIE,omitempty"`
|
||||||
|
// TODO `xml:"OFXEXTENSION,omitempty"`
|
||||||
// SECLISTRS is always empty, so we don't parse it here. The actual securities list will be in a top-level element parallel to SECLISTTRNRS
|
// SECLISTRS is always empty, so we don't parse it here. The actual securities list will be in a top-level element parallel to SECLISTTRNRS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,7 +9,9 @@ import (
|
|||||||
type AcctInfoRequest struct {
|
type AcctInfoRequest struct {
|
||||||
XMLName xml.Name `xml:"ACCTINFOTRNRQ"`
|
XMLName xml.Name `xml:"ACCTINFOTRNRQ"`
|
||||||
TrnUID UID `xml:"TRNUID"`
|
TrnUID UID `xml:"TRNUID"`
|
||||||
CltCookie Int `xml:"CLTCOOKIE"`
|
CltCookie String `xml:"CLTCOOKIE,omitempty"`
|
||||||
|
TAN String `xml:"TAN,omitempty"` // Transaction authorization number
|
||||||
|
// TODO `xml:"OFXEXTENSION,omitempty"`
|
||||||
DtAcctUp Date `xml:"ACCTINFORQ>DTACCTUP"`
|
DtAcctUp Date `xml:"ACCTINFORQ>DTACCTUP"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -108,6 +110,8 @@ type AcctInfoResponse struct {
|
|||||||
XMLName xml.Name `xml:"ACCTINFOTRNRS"`
|
XMLName xml.Name `xml:"ACCTINFOTRNRS"`
|
||||||
TrnUID UID `xml:"TRNUID"`
|
TrnUID UID `xml:"TRNUID"`
|
||||||
Status Status `xml:"STATUS"`
|
Status Status `xml:"STATUS"`
|
||||||
|
CltCookie String `xml:"CLTCOOKIE,omitempty"`
|
||||||
|
// TODO `xml:"OFXEXTENSION,omitempty"`
|
||||||
DtAcctUp Date `xml:"ACCTINFORS>DTACCTUP"`
|
DtAcctUp Date `xml:"ACCTINFORS>DTACCTUP"`
|
||||||
AcctInfo []AcctInfo `xml:"ACCTINFORS>ACCTINFO,omitempty"`
|
AcctInfo []AcctInfo `xml:"ACCTINFORS>ACCTINFO,omitempty"`
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user