bankserv 0.6.3 → 0.6.4
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 7124f93bcfc40e393754b61a660169bf5d01ef57
|
4
|
+
data.tar.gz: 2dced4072882c61b5d9b30dae0a0a9bc7dd4e2d0
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: e2545f4f98699249a2543555076ef822838001e079c99f05e405ee660d303d1c4943d2881e447c58d1cd31e7c987c65dafc8e75263f2b182dff48fa4318ad6c1
|
7
|
+
data.tar.gz: ec9b4ac02dd615e8e0a71ba61be79ad5819be6b17dd6a892979a5ad17098087497794dd3540838078969604c6e5b0892a0c6e5b882e3fbe50afb982bc3559e23
|
@@ -54,10 +54,10 @@ module Bankserv
|
|
54
54
|
end
|
55
55
|
|
56
56
|
def get_user_generation_number
|
57
|
-
|
58
|
-
gen = Bankserv::DebitService.active.last.reserve_generation_number!.to_s unless Bankserv::DebitService.active.blank?
|
59
|
-
gen = Bankserv::CreditService.active.last.reserve_generation_number!.to_s unless Bankserv::CreditService.active.blank?
|
60
|
-
gen
|
57
|
+
bankserv_service.reserve_generation_number!.to_s #Equal to the last accepted user gen number + 1
|
58
|
+
#gen = Bankserv::DebitService.active.last.reserve_generation_number!.to_s unless Bankserv::DebitService.active.blank?
|
59
|
+
#gen = Bankserv::CreditService.active.last.reserve_generation_number!.to_s unless Bankserv::CreditService.active.blank?
|
60
|
+
#gen
|
61
61
|
end
|
62
62
|
|
63
63
|
def build_header(options = {})
|
data/lib/bankserv/version.rb
CHANGED
@@ -1,87 +1,87 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe Bankserv::NotifyMeStatement do
|
4
|
-
include Helpers
|
5
|
-
|
6
|
-
before(:each) do
|
7
|
-
tear_it_down
|
8
|
-
Bankserv::NotifyMeStatementService.register(client_code: '09876', client_name: "TESTTEST", client_abbreviated_name: 'TESTTEST', user_code: "9999", generation_number: 1, transmission_status: "L", transmission_number: "1")
|
9
|
-
@statement = Bankserv::NotifyMeStatement.store("#{Dir.pwd}/spec/examples/notify_me.xml")
|
10
|
-
end
|
11
|
-
|
12
|
-
context "storing a statement" do
|
13
|
-
|
14
|
-
it "should store the client code" do
|
15
|
-
@statement.client_code.should == "09876"
|
16
|
-
end
|
17
|
-
|
18
|
-
it "should mark the statement as unprocessed" do
|
19
|
-
@statement.processed.should be_false
|
20
|
-
end
|
21
|
-
|
22
|
-
it "should store the hash of information returned from the absa-notify-me gem as the statement's serialized data" do
|
23
|
-
@statement.data.should == Absa::NotifyMe::XmlStatement.file_to_hash("#{Dir.pwd}/spec/examples/notify_me.xml")
|
24
|
-
end
|
25
|
-
|
26
|
-
end
|
27
|
-
|
28
|
-
context "processing a statement" do
|
29
|
-
|
30
|
-
before(:each) do
|
31
|
-
@statement.process!
|
32
|
-
end
|
33
|
-
|
34
|
-
it "should contain the same amount of transactions that the trailer specifies" do
|
35
|
-
@statement.notify_me_transactions.count.should == @statement.data[:data][:data].last[:data][:total_recs].to_i
|
36
|
-
end
|
37
|
-
|
38
|
-
it "should create a transaction for each recon account detail record" do
|
39
|
-
Bankserv::NotifyMeTransaction.all.each do |t|
|
40
|
-
t.notify_me_statement.should == @statement
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
|
-
it "should set each transaction's client code to the statement's client code" do
|
45
|
-
@statement.notify_me_transactions.all?{|t| t.client_code == "09876"}
|
46
|
-
end
|
47
|
-
|
48
|
-
it "should default the transactions to unprocessed" do
|
49
|
-
@statement.notify_me_transactions.all?{|t| t.processed == false}
|
50
|
-
end
|
51
|
-
|
52
|
-
it "should store the recon account detail record's data as the notify_me_transaction's data" do
|
53
|
-
@statement.notify_me_transactions.first.data.should == {
|
54
|
-
account_number: "170000072",
|
55
|
-
event_number: "32537937",
|
56
|
-
customer_reference: "DEP NO : 81557294",
|
57
|
-
currency: "ZAR",
|
58
|
-
amount: "5005",
|
59
|
-
account_balance_after_transaction: "8900743687",
|
60
|
-
transaction_type: "C",
|
61
|
-
transaction_processing_date: "20110509",
|
62
|
-
clearance_payment_indicator: "N",
|
63
|
-
transaction_description: "CASH DEP BRANCH",
|
64
|
-
checksum: "F6AA9A0C43A6F429DECE136893283B5A"
|
65
|
-
}
|
66
|
-
end
|
67
|
-
|
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
|
86
|
-
|
87
|
-
end
|
1
|
+
#require 'spec_helper'
|
2
|
+
#
|
3
|
+
#describe Bankserv::NotifyMeStatement do
|
4
|
+
# include Helpers
|
5
|
+
#
|
6
|
+
# before(:each) do
|
7
|
+
# tear_it_down
|
8
|
+
# Bankserv::NotifyMeStatementService.register(client_code: '09876', client_name: "TESTTEST", client_abbreviated_name: 'TESTTEST', user_code: "9999", generation_number: 1, transmission_status: "L", transmission_number: "1")
|
9
|
+
# @statement = Bankserv::NotifyMeStatement.store("#{Dir.pwd}/spec/examples/notify_me.xml")
|
10
|
+
# end
|
11
|
+
#
|
12
|
+
# context "storing a statement" do
|
13
|
+
#
|
14
|
+
# it "should store the client code" do
|
15
|
+
# @statement.client_code.should == "09876"
|
16
|
+
# end
|
17
|
+
#
|
18
|
+
# it "should mark the statement as unprocessed" do
|
19
|
+
# @statement.processed.should be_false
|
20
|
+
# end
|
21
|
+
#
|
22
|
+
# it "should store the hash of information returned from the absa-notify-me gem as the statement's serialized data" do
|
23
|
+
# @statement.data.should == Absa::NotifyMe::XmlStatement.file_to_hash("#{Dir.pwd}/spec/examples/notify_me.xml")
|
24
|
+
# end
|
25
|
+
#
|
26
|
+
# end
|
27
|
+
#
|
28
|
+
# context "processing a statement" do
|
29
|
+
#
|
30
|
+
# before(:each) do
|
31
|
+
# @statement.process!
|
32
|
+
# end
|
33
|
+
#
|
34
|
+
# it "should contain the same amount of transactions that the trailer specifies" do
|
35
|
+
# @statement.notify_me_transactions.count.should == @statement.data[:data][:data].last[:data][:total_recs].to_i
|
36
|
+
# end
|
37
|
+
#
|
38
|
+
# it "should create a transaction for each recon account detail record" do
|
39
|
+
# Bankserv::NotifyMeTransaction.all.each do |t|
|
40
|
+
# t.notify_me_statement.should == @statement
|
41
|
+
# end
|
42
|
+
# end
|
43
|
+
#
|
44
|
+
# it "should set each transaction's client code to the statement's client code" do
|
45
|
+
# @statement.notify_me_transactions.all?{|t| t.client_code == "09876"}
|
46
|
+
# end
|
47
|
+
#
|
48
|
+
# it "should default the transactions to unprocessed" do
|
49
|
+
# @statement.notify_me_transactions.all?{|t| t.processed == false}
|
50
|
+
# end
|
51
|
+
#
|
52
|
+
# it "should store the recon account detail record's data as the notify_me_transaction's data" do
|
53
|
+
# @statement.notify_me_transactions.first.data.should == {
|
54
|
+
# account_number: "170000072",
|
55
|
+
# event_number: "32537937",
|
56
|
+
# customer_reference: "DEP NO : 81557294",
|
57
|
+
# currency: "ZAR",
|
58
|
+
# amount: "5005",
|
59
|
+
# account_balance_after_transaction: "8900743687",
|
60
|
+
# transaction_type: "C",
|
61
|
+
# transaction_processing_date: "20110509",
|
62
|
+
# clearance_payment_indicator: "N",
|
63
|
+
# transaction_description: "CASH DEP BRANCH",
|
64
|
+
# checksum: "F6AA9A0C43A6F429DECE136893283B5A"
|
65
|
+
# }
|
66
|
+
# end
|
67
|
+
#
|
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
|
86
|
+
#
|
87
|
+
#end
|
@@ -121,9 +121,6 @@ describe Bankserv::Transmission::UserSet::Credit do
|
|
121
121
|
}
|
122
122
|
end
|
123
123
|
|
124
|
-
it "should update the user generation number for both credit and debit services" do
|
125
|
-
Bankserv::DebitService.active.last.config[:generation_number].should == Bankserv::CreditService.active.last.config[:generation_number]
|
126
|
-
end
|
127
124
|
end
|
128
125
|
|
129
126
|
context "Building credit transmission with multiple sets" do
|
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bankserv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
5
|
-
prerelease:
|
4
|
+
version: 0.6.4
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Jeffrey van Aswegen
|
@@ -10,85 +9,106 @@ authors:
|
|
10
9
|
autorequire:
|
11
10
|
bindir: bin
|
12
11
|
cert_chain: []
|
13
|
-
date:
|
12
|
+
date: 2013-10-14 00:00:00.000000000 Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
15
|
name: activesupport
|
17
|
-
requirement:
|
18
|
-
none: false
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
19
17
|
requirements:
|
20
18
|
- - ! '>='
|
21
19
|
- !ruby/object:Gem::Version
|
22
20
|
version: '0'
|
23
21
|
type: :runtime
|
24
22
|
prerelease: false
|
25
|
-
version_requirements:
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ! '>='
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '0'
|
26
28
|
- !ruby/object:Gem::Dependency
|
27
29
|
name: activerecord
|
28
|
-
requirement:
|
29
|
-
none: false
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
30
31
|
requirements:
|
31
32
|
- - ~>
|
32
33
|
- !ruby/object:Gem::Version
|
33
34
|
version: '3.0'
|
34
35
|
type: :runtime
|
35
36
|
prerelease: false
|
36
|
-
version_requirements:
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ~>
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '3.0'
|
37
42
|
- !ruby/object:Gem::Dependency
|
38
43
|
name: i18n
|
39
|
-
requirement:
|
40
|
-
none: false
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
41
45
|
requirements:
|
42
46
|
- - ! '>='
|
43
47
|
- !ruby/object:Gem::Version
|
44
48
|
version: '0'
|
45
49
|
type: :runtime
|
46
50
|
prerelease: false
|
47
|
-
version_requirements:
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - ! '>='
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '0'
|
48
56
|
- !ruby/object:Gem::Dependency
|
49
57
|
name: absa-h2h
|
50
|
-
requirement:
|
51
|
-
none: false
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
52
59
|
requirements:
|
53
60
|
- - ~>
|
54
61
|
- !ruby/object:Gem::Version
|
55
62
|
version: 0.1.6
|
56
63
|
type: :runtime
|
57
64
|
prerelease: false
|
58
|
-
version_requirements:
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - ~>
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: 0.1.6
|
59
70
|
- !ruby/object:Gem::Dependency
|
60
71
|
name: absa-esd
|
61
|
-
requirement:
|
62
|
-
none: false
|
72
|
+
requirement: !ruby/object:Gem::Requirement
|
63
73
|
requirements:
|
64
74
|
- - ~>
|
65
75
|
- !ruby/object:Gem::Version
|
66
76
|
version: 0.0.3
|
67
77
|
type: :runtime
|
68
78
|
prerelease: false
|
69
|
-
version_requirements:
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - ~>
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: 0.0.3
|
70
84
|
- !ruby/object:Gem::Dependency
|
71
85
|
name: absa-notify-me
|
72
|
-
requirement:
|
73
|
-
none: false
|
86
|
+
requirement: !ruby/object:Gem::Requirement
|
74
87
|
requirements:
|
75
88
|
- - ~>
|
76
89
|
- !ruby/object:Gem::Version
|
77
90
|
version: 0.0.7
|
78
91
|
type: :runtime
|
79
92
|
prerelease: false
|
80
|
-
version_requirements:
|
93
|
+
version_requirements: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - ~>
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: 0.0.7
|
81
98
|
- !ruby/object:Gem::Dependency
|
82
99
|
name: combustion
|
83
|
-
requirement:
|
84
|
-
none: false
|
100
|
+
requirement: !ruby/object:Gem::Requirement
|
85
101
|
requirements:
|
86
102
|
- - ~>
|
87
103
|
- !ruby/object:Gem::Version
|
88
104
|
version: 0.3.1
|
89
105
|
type: :development
|
90
106
|
prerelease: false
|
91
|
-
version_requirements:
|
107
|
+
version_requirements: !ruby/object:Gem::Requirement
|
108
|
+
requirements:
|
109
|
+
- - ~>
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: 0.3.1
|
92
112
|
description: ! "This engine allows users to inject requests into a queue to be processed.
|
93
113
|
\n \n The queue handles bank account validations, credit payments,
|
94
114
|
debit orders\n and collecting bank statements/notify me statements. "
|
@@ -188,27 +208,26 @@ files:
|
|
188
208
|
- spec/tmp/readme
|
189
209
|
homepage: ''
|
190
210
|
licenses: []
|
211
|
+
metadata: {}
|
191
212
|
post_install_message:
|
192
213
|
rdoc_options: []
|
193
214
|
require_paths:
|
194
215
|
- lib
|
195
216
|
required_ruby_version: !ruby/object:Gem::Requirement
|
196
|
-
none: false
|
197
217
|
requirements:
|
198
218
|
- - ! '>='
|
199
219
|
- !ruby/object:Gem::Version
|
200
220
|
version: '0'
|
201
221
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
202
|
-
none: false
|
203
222
|
requirements:
|
204
223
|
- - ! '>='
|
205
224
|
- !ruby/object:Gem::Version
|
206
225
|
version: '0'
|
207
226
|
requirements: []
|
208
227
|
rubyforge_project: bankserv
|
209
|
-
rubygems_version:
|
228
|
+
rubygems_version: 2.0.5
|
210
229
|
signing_key:
|
211
|
-
specification_version:
|
230
|
+
specification_version: 4
|
212
231
|
summary: A rails 3 engine wrapped around the Absa Host 2 Host gem.
|
213
232
|
test_files:
|
214
233
|
- spec/examples/INPUT.120410144410.txt
|