Commit Graph

12 Commits

Author SHA1 Message Date
Aaron Ross 2b8a79e4b7 review changes 2021-01-04 07:24:40 -05:00
John Starich 8ad638c7e2 Rename ofxgo_test package to ofxgo and remove self-imports/references
* Fix package in generate_constants.py
* Update generate_constants.py to use the new imports
2020-04-03 08:38:41 -04:00
John Starich f19189de45 Add DecodeResponse and *Response.Valid() for fine-grained parse control 2020-03-31 11:42:08 -04:00
John Starich 677a09295a Continue parsing after hitting validation errors
Supports mixed-case severity for Ally Bank's Quicken downloads 🙄
2020-03-30 10:50:10 -04:00
Aaron Lindsay 35c7116654 Add the ability to marshal a Response to SGML/XML and test it
This allows for ofxgo to be used to create well-formatted OFX from poor
OFX, or even be used to generate OFX from other formats for easier
importing into financial management software.

Test this functionality by adding "round trip" testing to all existing
tests - ensure that responses' content is the same after a round trip of
marshalling and unmarshalling them.
2019-03-02 07:03:11 -05:00
Martin Kobetic 0f6ceccd86 Work around missing blank line after last header
Detect when a newline doesn't follow the last header when parsing SGML and break out of the header-parsing loop early. Add an example .qfx file demonstrating the broken behavior we're working around and a test.
2019-01-04 11:18:55 -05:00
Aaron Lindsay ddc674b287 go fmt 2017-11-18 05:58:32 -05:00
Aaron Lindsay 1e55cb8bd7 Switch to copy of encoding/xml with only that subdirectory 2017-10-02 09:21:56 -04:00
Aaron Lindsay ff18c86aea Test parsing of some sample responses 2017-04-10 20:01:01 -04:00
Aaron Lindsay 4521bb377a Use named constants instead of strings for enum-like OFX fields
This adds a python script to generate constants.go when `go generate` is
called, and updates the structs, tests, and command-line client to all
use the new named constants.
2017-04-06 09:06:41 -04:00
Aaron Lindsay f185d78d29 Generalize response parsing code
This removes the many decodeXXXMessageSet() functions and replaces them
with a large map and a single generic decodeMessageSet() function. Also
change Responses to satisfy the Message interface as pointer types
(instead of the raw types), add the full set of top-level message sets
(though most of them still lack any message-parsing ability), adjust the
message set names to more closely mirror their OFX names, and fixup
tests and the command-line client to match the above changes.
2017-03-31 11:54:43 -04:00
Aaron Lindsay 6efd3ae921 Add test for banking responses
This also adds a generic response equality testing framework, a missing
Status field to all current responses, and Equal() methods to all basic
types.
2017-03-30 07:08:34 -04:00