bankserv 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module Bankserv
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
3
3
  end
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <ns0:TransactionRequest xmlns:ns0="http://ABSA.DTM.NMB">
3
+ <NOTIF-HEADER><SEQUENCE-NO>736</SEQUENCE-NO><CREATION-DATE>20120627</CREATION-DATE><CREATION-TIME>17102306</CREATION-TIME><CLIENT-ID>NMB00246</CLIENT-ID><CLIENT-ACN>4079189120</CLIENT-ACN><SNAME>RENTAL</SNAME></NOTIF-HEADER>
4
+ <DETAILS>
5
+ <TRANSACTION><TRG-ACC>0000004079189120</TRG-ACC><EVENT-NO>000000060</EVENT-NO><CLREF>ABSA BANK RC000000001</CLREF><CURR>ZAR</CURR><AMT> 500.00</AMT><ACC-BAL> 500.00+</ACC-BAL><TRAN-TYPE>C</TRAN-TYPE><PDATE>20120627</PDATE><PTIME>17035390</PTIME><CLR-PAYM-IND>N</CLR-PAYM-IND><PAYM-DESC>ACB CREDIT</PAYM-DESC><CHECKSUM>2CED0B2E33DA43AA1819A246076659E7</CHECKSUM></TRANSACTION>
6
+ </DETAILS>
7
+ <NOTIF-TRAILER><TOTAL-CR> 500.00</TOTAL-CR><TOTAL-DT> 0.00</TOTAL-DT><TOTAL-RECS> 1</TOTAL-RECS><CHECK-SUM>AD70FD8FE0117F7961B7CC217902CE4E</CHECK-SUM></NOTIF-TRAILER>
8
+ </ns0:TransactionRequest>
@@ -66,5 +66,22 @@ describe Bankserv::NotifyMeStatement do
66
66
  end
67
67
 
68
68
  end
69
+
70
+ context "Storing a document containing one record" do
71
+ before(:each) do
72
+ tear_it_down
73
+ Bankserv::NotifyMeStatementService.register(client_code: 'NMB00246', client_name: "TESTTEST", client_abbreviated_name: 'TESTTEST', user_code: "9999", generation_number: 1, transmission_status: "L", transmission_number: "1")
74
+ @statement = Bankserv::NotifyMeStatement.store("#{Dir.pwd}/spec/examples/notify_me_with_one_record.xml")
75
+ @statement.process!
76
+ end
77
+
78
+ it "should store a document with 1 unprocessed transaction" do
79
+ Bankserv::NotifyMeTransaction.unprocessed.count.should == 1
80
+ end
81
+
82
+ it "should have stripped the account number before recording it in the database" do
83
+ Bankserv::NotifyMeTransaction.unprocessed.first.data[:account_number].should == "4079189120"
84
+ end
85
+ end
69
86
 
70
87
  end
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.5.0
4
+ version: 0.5.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -14,7 +14,7 @@ date: 2012-07-03 00:00:00.000000000Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport
17
- requirement: &70116104979160 !ruby/object:Gem::Requirement
17
+ requirement: &70100863785440 !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: *70116104979160
25
+ version_requirements: *70100863785440
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: activerecord
28
- requirement: &70116104978660 !ruby/object:Gem::Requirement
28
+ requirement: &70100863784920 !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: *70116104978660
36
+ version_requirements: *70100863784920
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: i18n
39
- requirement: &70116104978200 !ruby/object:Gem::Requirement
39
+ requirement: &70100863784480 !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: *70116104978200
47
+ version_requirements: *70100863784480
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: absa-h2h
50
- requirement: &70116104977620 !ruby/object:Gem::Requirement
50
+ requirement: &70100863783900 !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: *70116104977620
58
+ version_requirements: *70100863783900
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: absa-esd
61
- requirement: &70116104977060 !ruby/object:Gem::Requirement
61
+ requirement: &70100863783280 !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: *70116104977060
69
+ version_requirements: *70100863783280
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: absa-notify-me
72
- requirement: &70116104976580 !ruby/object:Gem::Requirement
72
+ requirement: &70100863698740 !ruby/object:Gem::Requirement
73
73
  none: false
74
74
  requirements:
75
75
  - - ~>
@@ -77,10 +77,10 @@ dependencies:
77
77
  version: 0.0.7
78
78
  type: :runtime
79
79
  prerelease: false
80
- version_requirements: *70116104976580
80
+ version_requirements: *70100863698740
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: combustion
83
- requirement: &70116104976100 !ruby/object:Gem::Requirement
83
+ requirement: &70100863698260 !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: *70116104976100
91
+ version_requirements: *70100863698260
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. "
@@ -155,6 +155,7 @@ files:
155
155
  - spec/examples/eft_output_file.txt
156
156
  - spec/examples/host2host/tmp.log
157
157
  - spec/examples/notify_me.xml
158
+ - spec/examples/notify_me_with_one_record.xml
158
159
  - spec/examples/reply/rejected_transmission.txt
159
160
  - spec/examples/reply/reply_file.txt
160
161
  - spec/examples/statement4_unpacked.dat
@@ -223,6 +224,7 @@ test_files:
223
224
  - spec/examples/eft_output_file.txt
224
225
  - spec/examples/host2host/tmp.log
225
226
  - spec/examples/notify_me.xml
227
+ - spec/examples/notify_me_with_one_record.xml
226
228
  - spec/examples/reply/rejected_transmission.txt
227
229
  - spec/examples/reply/reply_file.txt
228
230
  - spec/examples/statement4_unpacked.dat