ofx_br 0.3.3 → 0.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.rdoc +2 -2
- data/lib/{ofx_br → ofx}/parser/ofx102.rb +13 -8
- data/lib/{ofx_br → ofx}/parser.rb +1 -3
- data/lib/ofx/statement.rb +11 -0
- data/lib/{ofx_br → ofx}/version.rb +1 -1
- data/lib/ofx.rb +34 -0
- data/spec/{ofx_br → ofx}/ofx102_spec.rb +1 -1
- data/spec/{ofx_br → ofx}/ofx_parser_spec.rb +53 -18
- data/spec/{ofx_br → ofx}/transaction_spec.rb +53 -34
- data/spec/spec_helper.rb +8 -3
- metadata +82 -87
- data/.github/dependabot.yml +0 -13
- data/.gitignore +0 -4
- data/.rspec +0 -1
- data/.travis.yml +0 -9
- data/Gemfile +0 -2
- data/Gemfile.lock +0 -50
- data/lib/ofx_br/parser/ofx103.rb +0 -7
- data/lib/ofx_br/statement.rb +0 -5
- data/lib/ofx_br.rb +0 -33
- data/ofx_br.gemspec +0 -32
- data/spec/fixtures/avatar.gif +0 -0
- data/spec/fixtures/bb.ofx +0 -700
- data/spec/fixtures/bradesco.ofx +0 -96
- data/spec/fixtures/creditcard.ofx +0 -79
- data/spec/fixtures/dtsof_balance_issue.ofx +0 -54
- data/spec/fixtures/error.ofx +0 -24
- data/spec/fixtures/invalid_version.ofx +0 -308
- data/spec/fixtures/nd-amex-sample.ofx +0 -12
- data/spec/fixtures/sample.ofx +0 -315
- data/spec/fixtures/santander.ofx +0 -91
- data/spec/fixtures/utf8.ofx +0 -308
- data/spec/fixtures/v103.ofx +0 -80
- data/spec/fixtures/v211.ofx +0 -85
- data/spec/ofx_br/ofx103_spec.rb +0 -50
- /data/lib/{ofx_br → ofx}/account.rb +0 -0
- /data/lib/{ofx_br → ofx}/balance.rb +0 -0
- /data/lib/{ofx_br → ofx}/errors.rb +0 -0
- /data/lib/{ofx_br → ofx}/foundation.rb +0 -0
- /data/lib/{ofx_br → ofx}/parser/ofx211.rb +0 -0
- /data/lib/{ofx_br → ofx}/sign_on.rb +0 -0
- /data/lib/{ofx_br → ofx}/status.rb +0 -0
- /data/lib/{ofx_br → ofx}/transaction.rb +0 -0
- /data/spec/{ofx_br → ofx}/account_spec.rb +0 -0
- /data/spec/{ofx_br → ofx}/ofx211_spec.rb +0 -0
- /data/spec/{ofx_br → ofx}/ofx_spec.rb +0 -0
- /data/spec/{ofx_br → ofx}/sign_on_spec.rb +0 -0
- /data/spec/{ofx_br → ofx}/statement_spec.rb +0 -0
- /data/spec/{ofx_br → ofx}/status_spec.rb +0 -0
data/spec/fixtures/v103.ofx
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
OFXHEADER:100
|
|
4
|
-
DATA:OFXSGML
|
|
5
|
-
VERSION:103
|
|
6
|
-
SECURITY:NONE
|
|
7
|
-
ENCODING:USASCII
|
|
8
|
-
CHARSET:1252
|
|
9
|
-
COMPRESSION:NONE
|
|
10
|
-
OLDFILEUID:NONE
|
|
11
|
-
NEWFILEUID:NONE
|
|
12
|
-
|
|
13
|
-
<OFX>
|
|
14
|
-
<SIGNONMSGSRSV1>
|
|
15
|
-
<SONRS>
|
|
16
|
-
<STATUS>
|
|
17
|
-
<CODE>0</CODE>
|
|
18
|
-
<SEVERITY>INFO</SEVERITY>
|
|
19
|
-
</STATUS>
|
|
20
|
-
<DTSERVER>20150507164333.979[-0300:BRT]</DTSERVER>
|
|
21
|
-
<LANGUAGE>POR</LANGUAGE>
|
|
22
|
-
<FI>
|
|
23
|
-
<ORG>HSBC Bank Brasil S.A.</ORG>
|
|
24
|
-
<FID>1</FID>
|
|
25
|
-
</FI>
|
|
26
|
-
</SONRS>
|
|
27
|
-
</SIGNONMSGSRSV1>
|
|
28
|
-
<BANKMSGSRSV1>
|
|
29
|
-
<STMTTRNRS>
|
|
30
|
-
<TRNUID>1</TRNUID>
|
|
31
|
-
<STATUS>
|
|
32
|
-
<CODE>0</CODE>
|
|
33
|
-
<SEVERITY>INFO</SEVERITY>
|
|
34
|
-
</STATUS>
|
|
35
|
-
<STMTRS>
|
|
36
|
-
<CURDEF>BRL</CURDEF>
|
|
37
|
-
<BANKACCTFROM>
|
|
38
|
-
<BANKID>399</BANKID>
|
|
39
|
-
<ACCTID>26215973324</ACCTID>
|
|
40
|
-
<ACCTTYPE>CHECKING</ACCTTYPE>
|
|
41
|
-
</BANKACCTFROM>
|
|
42
|
-
<BANKTRANLIST>
|
|
43
|
-
<DTSTART>20150501</DTSTART>
|
|
44
|
-
<DTEND>20150507</DTEND>
|
|
45
|
-
|
|
46
|
-
<STMTTRN>
|
|
47
|
-
<TRNTYPE>PAYMENT</TRNTYPE>
|
|
48
|
-
<DTPOSTED>20150504120000</DTPOSTED>
|
|
49
|
-
<DTUSER>20150504120000</DTUSER>
|
|
50
|
-
<TRNAMT>-1020.88</TRNAMT>
|
|
51
|
-
<FITID>201505041</FITID>
|
|
52
|
-
<CHECKNUM>0390003</CHECKNUM>
|
|
53
|
-
<NAME>PAGAMENTO TITULO-CNB </NAME>
|
|
54
|
-
<MEMO>PAGAMENTO TITULO-CNB </MEMO>
|
|
55
|
-
</STMTTRN>
|
|
56
|
-
|
|
57
|
-
<STMTTRN>
|
|
58
|
-
<TRNTYPE>PAYMENT</TRNTYPE>
|
|
59
|
-
<DTPOSTED>20150505120000</DTPOSTED>
|
|
60
|
-
<DTUSER>20150505120000</DTUSER>
|
|
61
|
-
<TRNAMT>-82.10</TRNAMT>
|
|
62
|
-
<FITID>201505051</FITID>
|
|
63
|
-
<CHECKNUM>0000000</CHECKNUM>
|
|
64
|
-
<NAME>TAR PACOTE MENSAL </NAME>
|
|
65
|
-
<MEMO>TAR PACOTE MENSAL </MEMO>
|
|
66
|
-
</STMTTRN>
|
|
67
|
-
|
|
68
|
-
</BANKTRANLIST>
|
|
69
|
-
<LEDGERBAL>
|
|
70
|
-
<BALAMT>3806.63</BALAMT>
|
|
71
|
-
<DTASOF>20150507164333.980[-0300:BRT]</DTASOF>
|
|
72
|
-
</LEDGERBAL>
|
|
73
|
-
<AVAILBAL>
|
|
74
|
-
<BALAMT>3806.63</BALAMT>
|
|
75
|
-
<DTASOF>20150507164333.980[-0300:BRT]</DTASOF>
|
|
76
|
-
</AVAILBAL>
|
|
77
|
-
</STMTRS>
|
|
78
|
-
</STMTTRNRS>
|
|
79
|
-
</BANKMSGSRSV1>
|
|
80
|
-
</OFX>
|
data/spec/fixtures/v211.ofx
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="US-ASCII"?>
|
|
2
|
-
|
|
3
|
-
<!-- This example is taken from the 2.1.1 specification, pages 610-612 -->
|
|
4
|
-
<?OFX OFXHEADER="200" VERSION="211" SECURITY="NONE" OLDFILEUID="NONE" NEWFILEUID="NONE"?>
|
|
5
|
-
<OFX>
|
|
6
|
-
<SIGNONMSGSRSV1>
|
|
7
|
-
<SONRS>
|
|
8
|
-
<STATUS>
|
|
9
|
-
<CODE>0</CODE>
|
|
10
|
-
<SEVERITY>INFO</SEVERITY>
|
|
11
|
-
</STATUS>
|
|
12
|
-
<DTSERVER>20050831165153.000[-8:PST]</DTSERVER>
|
|
13
|
-
<LANGUAGE>ENG</LANGUAGE>
|
|
14
|
-
</SONRS>
|
|
15
|
-
</SIGNONMSGSRSV1>
|
|
16
|
-
<BANKMSGSRSV1>
|
|
17
|
-
<STMTTRNRS>
|
|
18
|
-
<TRNUID>0</TRNUID>
|
|
19
|
-
<STATUS>
|
|
20
|
-
<CODE>0</CODE>
|
|
21
|
-
<SEVERITY>INFO</SEVERITY>
|
|
22
|
-
</STATUS>
|
|
23
|
-
<STMTRS>
|
|
24
|
-
<CURDEF>USD</CURDEF>
|
|
25
|
-
<BANKACCTFROM>
|
|
26
|
-
<BANKID>000000123</BANKID>
|
|
27
|
-
<ACCTID>123456</ACCTID>
|
|
28
|
-
<ACCTTYPE>CHECKING</ACCTTYPE>
|
|
29
|
-
</BANKACCTFROM>
|
|
30
|
-
<BANKTRANLIST>
|
|
31
|
-
<DTSTART>20040801</DTSTART>
|
|
32
|
-
<DTEND>20050831165153.000[-8:PST]</DTEND>
|
|
33
|
-
<STMTTRN>
|
|
34
|
-
<TRNTYPE>POS</TRNTYPE>
|
|
35
|
-
<DTPOSTED>20050824080000</DTPOSTED>
|
|
36
|
-
<TRNAMT>-80</TRNAMT>
|
|
37
|
-
<FITID>219378</FITID>
|
|
38
|
-
<NAME>FrogKick Scuba Gear</NAME>
|
|
39
|
-
</STMTTRN>
|
|
40
|
-
</BANKTRANLIST>
|
|
41
|
-
<LEDGERBAL>
|
|
42
|
-
<BALAMT>2156.56</BALAMT>
|
|
43
|
-
<DTASOF>20050831165153</DTASOF>
|
|
44
|
-
</LEDGERBAL>
|
|
45
|
-
</STMTRS>
|
|
46
|
-
</STMTTRNRS>
|
|
47
|
-
</BANKMSGSRSV1>
|
|
48
|
-
<CREDITCARDMSGSRSV1>
|
|
49
|
-
<CCSTMTTRNRS>
|
|
50
|
-
<TRNUID>0</TRNUID>
|
|
51
|
-
<STATUS>
|
|
52
|
-
<CODE>0</CODE>
|
|
53
|
-
<SEVERITY>INFO</SEVERITY>
|
|
54
|
-
</STATUS>
|
|
55
|
-
<CCSTMTRS>
|
|
56
|
-
<CURDEF>USD</CURDEF>
|
|
57
|
-
<CCACCTFROM>
|
|
58
|
-
<ACCTID>123412341234</ACCTID>
|
|
59
|
-
</CCACCTFROM>
|
|
60
|
-
<BANKTRANLIST>
|
|
61
|
-
<DTSTART>20050801</DTSTART>
|
|
62
|
-
<DTEND>20050831165153.000[-8:PST]</DTEND>
|
|
63
|
-
<STMTTRN>
|
|
64
|
-
<TRNTYPE>INT</TRNTYPE>
|
|
65
|
-
<DTPOSTED>20050811080000</DTPOSTED>
|
|
66
|
-
<TRNAMT>-23.00</TRNAMT>
|
|
67
|
-
<FITID>219867</FITID>
|
|
68
|
-
<NAME>Interest Charge</NAME>
|
|
69
|
-
</STMTTRN>
|
|
70
|
-
<STMTTRN>
|
|
71
|
-
<TRNTYPE>CREDIT</TRNTYPE>
|
|
72
|
-
<DTPOSTED>20050811080000</DTPOSTED>
|
|
73
|
-
<TRNAMT>350.00</TRNAMT>
|
|
74
|
-
<FITID>219868</FITID>
|
|
75
|
-
<NAME>Payment - Thank You</NAME>
|
|
76
|
-
</STMTTRN>
|
|
77
|
-
</BANKTRANLIST>
|
|
78
|
-
<LEDGERBAL>
|
|
79
|
-
<BALAMT>-562.00</BALAMT>
|
|
80
|
-
<DTASOF>20050831165153</DTASOF>
|
|
81
|
-
</LEDGERBAL>
|
|
82
|
-
</CCSTMTRS>
|
|
83
|
-
</CCSTMTTRNRS>
|
|
84
|
-
</CREDITCARDMSGSRSV1>
|
|
85
|
-
</OFX>
|
data/spec/ofx_br/ofx103_spec.rb
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
require "spec_helper"
|
|
2
|
-
|
|
3
|
-
describe OFX::Parser::OFX103 do
|
|
4
|
-
before do
|
|
5
|
-
@ofx = OFX::Parser::Base.new("spec/fixtures/v103.ofx")
|
|
6
|
-
@parser = @ofx.parser
|
|
7
|
-
end
|
|
8
|
-
|
|
9
|
-
it "should have a version" do
|
|
10
|
-
OFX::Parser::OFX103::VERSION.should == "1.0.3"
|
|
11
|
-
end
|
|
12
|
-
|
|
13
|
-
it "should set headers" do
|
|
14
|
-
@parser.headers.should == @ofx.headers
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
it "should trim trailing whitespace from headers" do
|
|
18
|
-
headers = OFX::Parser::OFX103.parse_headers("VERSION:103 ")
|
|
19
|
-
headers["VERSION"].should == "103"
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
it "should set body" do
|
|
23
|
-
@parser.body.should == @ofx.body
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
it "should set account" do
|
|
27
|
-
@parser.account.should be_a_kind_of(OFX::Account)
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
it "should set account" do
|
|
31
|
-
@parser.sign_on.should be_a_kind_of(OFX::SignOn)
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
it "should set statements" do
|
|
35
|
-
@parser.statements.size.should == 1
|
|
36
|
-
@parser.statements.first.should be_a_kind_of(OFX::Statement)
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
it "should know about all transaction types" do
|
|
40
|
-
valid_types = [
|
|
41
|
-
'CREDIT', 'DEBIT', 'INT', 'DIV', 'FEE', 'SRVCHG', 'DEP', 'ATM', 'POS', 'XFER',
|
|
42
|
-
'CHECK', 'PAYMENT', 'CASH', 'DIRECTDEP', 'DIRECTDEBIT', 'REPEATPMT', 'OTHER'
|
|
43
|
-
]
|
|
44
|
-
valid_types.sort.should == OFX::Parser::OFX103::TRANSACTION_TYPES.keys.sort
|
|
45
|
-
|
|
46
|
-
valid_types.each do |transaction_type|
|
|
47
|
-
transaction_type.downcase.to_sym.should equal OFX::Parser::OFX103::TRANSACTION_TYPES[transaction_type]
|
|
48
|
-
end
|
|
49
|
-
end
|
|
50
|
-
end
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|