bankserv 0.4.6 → 0.4.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -22,6 +22,7 @@ module Bankserv
22
22
  raise "Document already processed" if processed?
23
23
 
24
24
  recon_account_detail_records.each do |record|
25
+ next if record[:data][:transaction_description] == "GEEN/NO TRAN"
25
26
  Bankserv::Transaction.create! data: record[:data], client_code: client_code, bankserv_statement_id: id
26
27
  end
27
28
 
@@ -1,3 +1,3 @@
1
1
  module Bankserv
2
- VERSION = "0.4.6"
2
+ VERSION = "0.4.7"
3
3
  end
@@ -0,0 +1,5 @@
1
+ 00000000000000000000P2012052110831RENTAL CONNECT PTY LTD 10831 000000016
2
+ 10000000004079058521000170000120120520 +000000000000000-00000000000015138 AA0A 000000016
3
+ 2000000000407905852100017000012012052020120520000000000000000000+000000000000000-00000000000015138GEEN/NO TRAN AA9AAA9A+000000000 +000000000+000000000 000000000000000003000000000000000000000000000000000000000 000000000000000 0000000000000000 0000000000000000000 0000000160000
4
+ 89999999999999999999 +00000000000000000 0000000003 000000016
5
+ 99999999999999999999P20120521 0000000005 000000016
@@ -27,6 +27,27 @@ describe Bankserv::Statement do
27
27
 
28
28
  end
29
29
 
30
+ context "storing a blank document" do
31
+
32
+ before(:each) do
33
+ Bankserv::StatementService.register(client_code: '12346', client_name: "TESTTEST", client_abbreviated_name: 'TESTTEST', user_code: "9999", generation_number: 1, transmission_status: "L", transmission_number: "1")
34
+
35
+ @blank_file_contents = File.open("./spec/examples/blank_statement.dat", "rb").read
36
+ @blank_statement = Bankserv::Statement.store(@blank_file_contents)
37
+ end
38
+
39
+ it "should store the file" do
40
+ @blank_statement.client_code.should == "10831"
41
+ end
42
+
43
+ it "should not store any transactions when processed" do
44
+ @blank_statement.process!
45
+ Bankserv::Transaction.all.should be_blank
46
+ @blank_statement.should be_processed
47
+ end
48
+
49
+ end
50
+
30
51
  context "processing a statement" do
31
52
 
32
53
  before(:each) do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bankserv
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.6
4
+ version: 0.4.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,11 +10,11 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-06-25 00:00:00.000000000Z
13
+ date: 2012-06-26 00:00:00.000000000Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport
17
- requirement: &70223164867020 !ruby/object:Gem::Requirement
17
+ requirement: &70272531742720 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: '0'
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *70223164867020
25
+ version_requirements: *70272531742720
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: activerecord
28
- requirement: &70223164866300 !ruby/object:Gem::Requirement
28
+ requirement: &70272531742160 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ~>
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: '3.0'
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *70223164866300
36
+ version_requirements: *70272531742160
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: i18n
39
- requirement: &70223164865760 !ruby/object:Gem::Requirement
39
+ requirement: &70272531741740 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ! '>='
@@ -44,10 +44,10 @@ dependencies:
44
44
  version: '0'
45
45
  type: :runtime
46
46
  prerelease: false
47
- version_requirements: *70223164865760
47
+ version_requirements: *70272531741740
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: absa-h2h
50
- requirement: &70223164864940 !ruby/object:Gem::Requirement
50
+ requirement: &70272531741060 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ~>
@@ -55,10 +55,10 @@ dependencies:
55
55
  version: 0.1.5
56
56
  type: :runtime
57
57
  prerelease: false
58
- version_requirements: *70223164864940
58
+ version_requirements: *70272531741060
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: absa-esd
61
- requirement: &70223164864100 !ruby/object:Gem::Requirement
61
+ requirement: &70272531740560 !ruby/object:Gem::Requirement
62
62
  none: false
63
63
  requirements:
64
64
  - - ~>
@@ -66,10 +66,10 @@ dependencies:
66
66
  version: 0.0.3
67
67
  type: :runtime
68
68
  prerelease: false
69
- version_requirements: *70223164864100
69
+ version_requirements: *70272531740560
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: absa-notify-me
72
- requirement: &70223164863540 !ruby/object:Gem::Requirement
72
+ requirement: &70272531740100 !ruby/object:Gem::Requirement
73
73
  none: false
74
74
  requirements:
75
75
  - - ~>
@@ -77,10 +77,10 @@ dependencies:
77
77
  version: 0.0.5
78
78
  type: :runtime
79
79
  prerelease: false
80
- version_requirements: *70223164863540
80
+ version_requirements: *70272531740100
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: combustion
83
- requirement: &70223164862980 !ruby/object:Gem::Requirement
83
+ requirement: &70272531739640 !ruby/object:Gem::Requirement
84
84
  none: false
85
85
  requirements:
86
86
  - - ~>
@@ -88,7 +88,7 @@ dependencies:
88
88
  version: 0.3.1
89
89
  type: :development
90
90
  prerelease: false
91
- version_requirements: *70223164862980
91
+ version_requirements: *70272531739640
92
92
  description: ! "This engine allows users to inject requests into a queue to be processed.
93
93
  \n \n The queue handles bank account validations, credit payments,
94
94
  debit orders\n and collecting bank statements/notify me statements. "
@@ -148,6 +148,7 @@ files:
148
148
  - spec/examples/TJRRECF.0605
149
149
  - spec/examples/ahv_input_file.txt
150
150
  - spec/examples/ahv_output_file.txt
151
+ - spec/examples/blank_statement.dat
151
152
  - spec/examples/credit_eft_input.txt
152
153
  - spec/examples/debit_eft_input_file.txt
153
154
  - spec/examples/eft_input_with_2_sets.txt
@@ -215,6 +216,7 @@ test_files:
215
216
  - spec/examples/TJRRECF.0605
216
217
  - spec/examples/ahv_input_file.txt
217
218
  - spec/examples/ahv_output_file.txt
219
+ - spec/examples/blank_statement.dat
218
220
  - spec/examples/credit_eft_input.txt
219
221
  - spec/examples/debit_eft_input_file.txt
220
222
  - spec/examples/eft_input_with_2_sets.txt