Permalink
Browse files

Edited documentation to show what methods return.

  • Loading branch information...
1 parent 662c1a8 commit 3e8e792841bf00f5bb4969f0811dcf0fb1e9784d @Doppp Doppp committed Apr 2, 2013
Showing with 26 additions and 0 deletions.
  1. +26 −0 README.md
View
@@ -23,6 +23,32 @@ Paxmex.parse_eptrn('/path/to/amex/eptrn/raw/file')
Paxmex.parse_epraw('/path/to/amex/epraw/raw/file')
```
+Both methods return a readable hash in the following format:
+
+```ruby
+ {
+ "DATA_FILE_TRAILER_RECORD" => {
@tdumitrescu
tdumitrescu Apr 3, 2013

so is this stuff all dummy data or did it also come from parsing one of our production data files?

@Doppp
Doppp Apr 3, 2013

It is output from our dummy files.

@Doppp
Doppp Apr 3, 2013

Which are scrambled.

@tdumitrescu
tdumitrescu Apr 3, 2013

cool. only thing i would still add to the readme is something a bit more explicit about the required input formats. just something like:

Example

require 'paxmex'
Paxmex.parse_eptrn('/path/to/amex/eptrn/raw/file')
Paxmex.parse_epraw('/path/to/amex/epraw/raw/file')

The input file for either method is a data report file provided by American Express in the RAW or TRN format. We gives you a dummy example (at some location). Both methods return a readable hash in the following format:

@Doppp
Doppp Apr 3, 2013

Sounds good. I'll do that. Thanks!

+ "DF_TRL_RECORD_TYPE" => "DFTRL",
+ "DF_TRL_DATE" => "03082013",
+ "DF_TRL_TIME" => "0435",
+ "DF_TRL_FILE_ID" => "000000",
+ "DF_TRL_FILE_NAME" => "LUMOS LABS INC ",
+ "DF_TRL_RECIPIENT_KEY" => "00000000002754170029 0000000000",
+ "DF_TRL_RECORD_COUNT"=>"0000004"
+ },
+ "DATA_FILE_HEADER_RECORD" => {
+ "DF_HDR_RECORD_TYPE" => "DFHDR",
+ "DF_HDR_DATE" => "03082013",
+ "DF_HDR_TIME" => "0435",
+ "DF_HDR_FILE_ID" => "000000",
+ "DF_HDR_FILE_NAME" => "LUMOS LABS INC"
+ },
+ ...
+ }
+```
+
+Output and key-value pairs vary depending on whether you choose to parse an EPTRN or EPRAW file.
+
## Contributing
Fork and submit a pull request and make sure you add a test for any feature you add.

0 comments on commit 3e8e792

Please sign in to comment.