-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathofxhome.h
53 lines (39 loc) · 1.26 KB
/
ofxhome.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#ifndef OFXHOME_H
#define OFXHOME_H
#include <map>
#include <string>
#include <vector>
using std::map;
using std::string;
using std::vector;
namespace ofxget {
struct Institution {
int ofxhome_id;
string name;
string fid;
string org;
string url;
int ofxfail;
int sslfail;
string lastofxvalidation;
string lastsslvalidation;
string brokerid;
string bankid;
map<string, string> profile;
friend std::ostream& operator<<(std::ostream& stream,
const Institution& inst);
};
string OfxHomeFullDumpString();
vector<Institution> OfxDumpStringToInstitutions(const string& dump);
const Institution* FindInstitutionByName(
const vector<Institution>& institutions,
const string& name);
// Upload a successful request to OFX Home. The request string will be sanitized
// server side, however, to be safe AnonymizeRequest is called beforehand.
string UploadSuccessfulRequest(const string& api_key, const string& url, const string& request);
// Returns true if the api_key is avalid.
bool ValidateApiKey(const std::string& api_key);
// Remove any personal information from USERID, ACCTID, and USERPASS fields.
string AnonymizeRequest(const string& request);
} // namespace ofxget
#endif // OFXHOME_H