bankserv 0.8.1 → 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/.gitignore +1 -0
- data/bankserv.gemspec +1 -1
- data/lib/bankserv/transmission/set/eft.rb +3 -3
- data/lib/bankserv/version.rb +1 -1
- data/spec/examples/input/correct_input_file +174 -0
- data/spec/examples/input/wrong_input_file +174 -0
- data/spec/lib/bankserv/transmission/input_document_spec.rb +87 -1
- metadata +9 -5
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZGIwMDkxNTEyZDIyMzdkNjllOWY3NjVjNWJiZTRiZjVkNDBjZmI4Yg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MzUwZjlkODczM2U4ZmYyY2Q3MGVjOGNkNTk2MzliY2UzNDUzOTI2OQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZDZhZjk0NjQ5NzBmMDJhNzM4YzRkYmU4YjA3N2ZhOTBlOTZhZDQ0ZjRkZjQ5
|
10
|
+
ZDU5MmNjODk0MjVlNjI4NDhiYTIwYzRiNTNkNmJmNTM3MDcxNWUyZmQzOTMy
|
11
|
+
Yjk4MGExMGM4NjIxNDE3NDFkM2YyNTYyMmJmYTdkNTkxYmQwMjY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
Y2FkMGM4N2NhN2RmMTI5ZTY3NWJlNmJlMDM1ZmRiNDY4MmNkODk0NmJmYjQ3
|
14
|
+
OTAwZjdjMGFlYWQwM2M1ZTA2YWQ4OWI2YWI2ZTIwZDM3MmVmMjA4NDZjYWM5
|
15
|
+
ZDI4MTFiNzMxYzM0YWVlMmEwMzA3Y2ZkYzBkNjcyYmZjYjhjODM=
|
data/.gitignore
CHANGED
data/bankserv.gemspec
CHANGED
@@ -24,7 +24,7 @@ Gem::Specification.new do |s|
|
|
24
24
|
s.add_dependency "activesupport"
|
25
25
|
s.add_dependency "activerecord", "~> 3.0"
|
26
26
|
s.add_dependency "i18n"
|
27
|
-
s.add_dependency "absa-h2h", "~> 0.1.
|
27
|
+
s.add_dependency "absa-h2h", "~> 0.1.7"
|
28
28
|
s.add_dependency "absa-esd", "~> 0.0.3"
|
29
29
|
s.add_dependency "absa-notify-me", "~> 0.0.7"
|
30
30
|
|
@@ -87,7 +87,7 @@ module Bankserv
|
|
87
87
|
record_data = Absa::H2h::Transmission::Eft.record_type('standard_record').template_options
|
88
88
|
homing_account_number = transaction.bank_account.account_number.to_i.to_s
|
89
89
|
homing_branch_code = transaction.bank_account.branch_code.to_i.to_s
|
90
|
-
|
90
|
+
|
91
91
|
record_data.merge!(
|
92
92
|
rec_id: rec_id,
|
93
93
|
user_nominated_account: transaction.contra_bank_details.account_number,
|
@@ -145,12 +145,12 @@ module Bankserv
|
|
145
145
|
def hash_total_of_homing_account_numbers
|
146
146
|
hash_total = 0
|
147
147
|
|
148
|
-
transactions.each do |transaction|
|
148
|
+
transactions.each do |transaction|
|
149
149
|
hash_total += transaction.data[:homing_account_number].to_i
|
150
150
|
hash_total += transaction.data[:non_standard_homing_account_number].to_i if transaction.record_type == "standard_record"
|
151
151
|
end
|
152
152
|
|
153
|
-
hash_total.to_s.reverse[0,
|
153
|
+
hash_total.to_s.reverse[0,11].reverse.to_i
|
154
154
|
end
|
155
155
|
|
156
156
|
def total_debit_value
|
data/lib/bankserv/version.rb
CHANGED
@@ -0,0 +1,174 @@
|
|
1
|
+
000L2015053004136RENTAL CONNECT PTY LTD 000084600000 4908
|
2
|
+
020L04A8551505301505301505301505300000013446BATCH YY
|
3
|
+
020L1063200504079323748A85500000119876501983075795100000114984150530880 RAWSONPROP23FISHEAGLE UTILITY N VISAGIE 00000000000000000000 21
|
4
|
+
020L1263200504079323748A85500000263200504079323748100000114984150530100000RAWSONPROPCONTRA33636
|
5
|
+
020L92A855000001000002150530150530000001000001000001000000114984000000114984006062399543
|
6
|
+
020L04A8551505301505301505301505300000033447BATCH YY
|
7
|
+
020L1063200504079323748A85500000325465562480444406100000080000150530880 RAWSONPROPCOMMISSION RAWSON RENTALS GWR 00000000000000000000 21
|
8
|
+
020L1263200504079323748A85500000463200504079323748100000080000150530100000RAWSONPROPCONTRA33647
|
9
|
+
020L92A855000003000004150530150530000001000001000001000000080000000000080000066559768154
|
10
|
+
020L04A8551505301505301505301505300000053448BATCH YY
|
11
|
+
020L1063200504079323748A85500000525400562480444406100000034375150530880 RAWSONPROP17MISSISSIPPILATEFEERAWSON RENTALS GWR 00000000000000000000 21
|
12
|
+
020L1263200504079323748A85500000663200504079323748100000034375150530100000RAWSONPROPCONTRA33650
|
13
|
+
020L92A855000005000006150530150530000001000001000001000000034375000000034375066559768154
|
14
|
+
020L04A8551505301505301505301505300000073449BATCH YY
|
15
|
+
020L1063200504079323748A85500000725400562480444406100000006927150530880 RAWSONPROP20MOUNTAINVIEWCASHFERAWSON RENTALS GWR 00000000000000000000 21
|
16
|
+
020L1263200504079323748A85500000863200504079323748100000006927150530100000RAWSONPROPCONTRA33653
|
17
|
+
020L92A855000007000008150530150530000001000001000001000000006927000000006927066559768154
|
18
|
+
020L04A8551505301505301505301505300000093450BATCH YY
|
19
|
+
020L1063200504079323748A85500000925400562480444406100000127463150530880 RAWSONPROP57 EAGLE GROVE RAWSON RENTALS GWR 00000000000000000000 21
|
20
|
+
020L1263200504079323748A85500001063200504079323748100000127463150530100000RAWSONPROPCONTRA33654
|
21
|
+
020L92A855000009000010150530150530000001000001000001000000127463000000127463066559768154
|
22
|
+
020L04A8551505301505301505301505300000113451BATCH YY
|
23
|
+
020L1063200504079323748A85500001163200504079328316100000005000150530880 RAWSONPROP2X8KF RAWSON RENTALS GWR 00000000000000000000 21
|
24
|
+
020L1263200504079323748A85500001263200504079323748100000005000150530100000RAWSONPROPCONTRA33689
|
25
|
+
020L92A855000011000012150530150530000001000001000001000000005000000000005000008158652064
|
26
|
+
020L04A8551505301505301505301505300000133452BATCH YY
|
27
|
+
020L1063200504079323748A85500001300020500000165557100000337906150530880 RAWSONPROP552687914 CITY OF JOHANNESBURG 00000000000000000000 21
|
28
|
+
020L1263200504079323748A85500001463200504079323748100000337906150530100000RAWSONPROPCONTRA34008
|
29
|
+
020L92A855000013000014150530150530000001000001000001000000337906000000337906004079489305
|
30
|
+
020L04A8551505301505301505301505300000153453BATCH YY
|
31
|
+
020L1063200504079323748A85500001563200504046186298100000209452150530880 RAWSONPROP26CHELSEAPARTPAYRENTMC LORD 00000000000000000000 21
|
32
|
+
020L1263200504079323748A85500001663200504079323748100000209452150530100000RAWSONPROPCONTRA34009
|
33
|
+
020L92A855000015000016150530150530000001000001000001000000209452000000209452008125510046
|
34
|
+
020L04A8551505301505301505301505300000173454BATCH YY
|
35
|
+
020L1063200504084166323A85500001725400562202987791100000312251150530880 RAWSONPROP00088204 1C BROOKWOOD RENPROP MANAGEMEN00000000000000000000 21
|
36
|
+
020L1263200504084166323A85500001863200504084166323100000312251150530100000RAWSONPROPCONTRA34054
|
37
|
+
020L92A855000017000018150530150530000001000001000001000000312251000000312251066287154114
|
38
|
+
020L04A8551505301505301505301505300000193455BATCH YY
|
39
|
+
020L1063200504084166323A85500001925345562300770098100000873689150530880 RAWSONPROP13 SANDOWN COURT, 13G SIDAKI 00000000000000000000 21
|
40
|
+
020L1263200504084166323A85500002063200504084166323100000873689150530100000RAWSONPROPCONTRA34056
|
41
|
+
020L92A855000019000020150530150530000001000001000001000000873689000000873689066384936421
|
42
|
+
020L04A8551505301505301505301505300000213456BATCH YY
|
43
|
+
020L1063200504084166323A85500002119700501434009548100000704284150530880 RAWSONPROP1C BROOKWOOD, 1 KINGB RHEEDERS 00000000000000000000 21
|
44
|
+
020L1263200504084166323A85500002263200504084166323100000704284150530100000RAWSONPROPCONTRA34208
|
45
|
+
020L92A855000021000022150530150530000001000001000001000000704284000000704284005518175871
|
46
|
+
020L04A8551505301505301505301505300000233457BATCH YY
|
47
|
+
020L1063200504084166323A85500002363200501238130031100000498649150530880 RAWSONPROPB202 MONTEGA, 95 KATA HAFFEJEE 00000000000000000000 21
|
48
|
+
020L1263200504084166323A85500002463200504084166323100000498649150530100000RAWSONPROPCONTRA34209
|
49
|
+
020L92A855000023000024150530150530000001000001000001000000498649000000498649005322296354
|
50
|
+
020L04A8551505301505301505301505300000253458BATCH YY
|
51
|
+
020L1063200504084166323A85500002519876501955005982100000870450150530880 RAWSONPROP5 VIA ORVIETTO, 14 OA CARR 00000000000000000000 21
|
52
|
+
020L1263200504084166323A85500002663200504084166323100000870450150530100000RAWSONPROPCONTRA34210
|
53
|
+
020L92A855000025000026150530150530000001000001000001000000870450000000870450006039172305
|
54
|
+
020L04A8551505301505301505301505300000273459BATCH YY
|
55
|
+
020L1063200504084166323A85500002705100100270739335100000426774150530880 RAWSONPROP32950022007 TRAFALGAR PROPERTY MANAGEMENT 00000000000000000000 21
|
56
|
+
020L1263200504084166323A85500002863200504084166323100000426774150530100000RAWSONPROPCONTRA34211
|
57
|
+
020L92A855000027000028150530150530000001000001000001000000426774000000426774004354905658
|
58
|
+
020L04A8551505301505301505301505300000293460BATCH YY
|
59
|
+
020L1063200504084166323A85500002905100100005833450100000811686150530880 RAWSONPROP22 MELROSE GARDENS, J NAIK 00000000000000000000 21
|
60
|
+
020L1263200504084166323A85500003063200504084166323100000811686150530100000RAWSONPROPCONTRA34212
|
61
|
+
020L92A855000029000030150530150530000001000001000001000000811686000000811686004089999773
|
62
|
+
020L04A8551505301505301505301505300000313461BATCH YY
|
63
|
+
020L1063200504084166357A85500003119600501969197862100000300000150530880 RAWSONPROPISS GC DAVY 00000000000000000000 21
|
64
|
+
020L1263200504084166357A85500003263200504084166357100000300000150530100000RAWSONPROPCONTRA34185
|
65
|
+
020L92A855000031000032150530150530000001000001000001000000300000000000300000006053364219
|
66
|
+
020L04A8551505301505301505301505300000333462BATCH YY
|
67
|
+
020L1063200504084267606A85500003325065560447260790100000717760150530880 RAWSONPROP75 OAKMONT, 1 , NORTDW HEDDING 00000000000000000000 21
|
68
|
+
020L1263200504084267606A85500003463200504084267606100000717760150530100000RAWSONPROPCONTRA34186
|
69
|
+
020L92A855000033000034150530150530000001000001000001000000717760000000717760064531528396
|
70
|
+
020L04A8551505301505301505301505300000353463BATCH YY
|
71
|
+
020L1063200504084267606A85500003563200504082853366100000049792150530880 RAWSONPROPCOMMISSION EXPERTPROP PTY LTD T/A RAWSON 00000000000000000000 21
|
72
|
+
020L1263200504084267606A85500003663200504084267606100000049792150530100000RAWSONPROPCONTRA34187
|
73
|
+
020L92A855000035000036150530150530000001000001000001000000049792000000049792008167120972
|
74
|
+
020L04A8551505301505301505301505300000373464BATCH YY
|
75
|
+
020L1063200504084267606A85500003763200504082853366100000540586150530880 RAWSONPROPCOMMISSION EXPERTPROP PTY LTD T/A RAWSON 00000000000000000000 21
|
76
|
+
020L1263200504084267606A85500003863200504084267606100000540586150530100000RAWSONPROPCONTRA34188
|
77
|
+
020L92A855000037000038150530150530000001000001000001000000540586000000540586008167120972
|
78
|
+
020L04A8551505301505301505301505300000393465BATCH YY
|
79
|
+
020L1063200504084267737A85500003925400562114258587100000046500150530880 RAWSONPROPUNIT 17 MILANO BODY CORPORATE 00000000000000000000 21
|
80
|
+
020L1263200504084267737A85500004063200504084267737100000046500150530100000RAWSONPROPCONTRA34189
|
81
|
+
020L92A855000039000040150530150530000001000001000001000000046500000000046500066198526324
|
82
|
+
020L04A8551505301505301505301505300000413466BATCH YY
|
83
|
+
020L1063200504084267737A85500004105100100071995382100000343340150530880 RAWSONPROPMILANO 17, HYACINTH J. DANIELS 00000000000000000000 21
|
84
|
+
020L1263200504084267737A85500004263200504084267737100000343340150530100000RAWSONPROPCONTRA34190
|
85
|
+
020L92A855000041000042150530150530000001000001000001000000343340000000343340004156263119
|
86
|
+
020L04A8551505301505301505301505300000433467BATCH YY
|
87
|
+
020L1063200504084267737A85500004319876501186019581100000086225150530880 RAWSONPROP700/077 HILLCREST BODY CORP 00000000000000000000 21
|
88
|
+
020L1263200504084267737A85500004463200504084267737100000086225150530100000RAWSONPROPCONTRA34191
|
89
|
+
020L92A855000043000044150530150530000001000001000001000000086225000000086225005270287318
|
90
|
+
020L04A8551505301505301505301505300000453468BATCH YY
|
91
|
+
020L1063200504084267737A85500004563200509305660980100000285895150530880 RAWSONPROPHILLCREST 77, HILLCRD. STEYN 00000000000000000000 21
|
92
|
+
020L1263200504084267737A85500004663200504084267737100000285895150530100000RAWSONPROPCONTRA34192
|
93
|
+
020L92A855000045000046150530150530000001000001000001000000285895000000285895013389928717
|
94
|
+
020L04A8551505301505301505301505300000473469BATCH YY
|
95
|
+
020L1063200504084267737A85500004705100100072003197100000080000150530880 RAWSONPROPVILLAGE WALK 5, 31 CY. GUO 00000000000000000000 21
|
96
|
+
020L1263200504084267737A85500004863200504084267737100000080000150530100000RAWSONPROPCONTRA34194
|
97
|
+
020L92A855000047000048150530150530000001000001000001000000080000000000080000004156270934
|
98
|
+
020L04A8551505301505301505301505300000493470BATCH YY
|
99
|
+
020L1063200504084267737A85500004919876501186047607100000039200150530880 RAWSONPROPOAK15A WATCHPROP 00000000000000000000 21
|
100
|
+
020L1263200504084267737A85500005063200504084267737100000039200150530100000RAWSONPROPCONTRA34195
|
101
|
+
020L92A855000049000050150530150530000001000001000001000000039200000000039200005270315344
|
102
|
+
020L04A8551505301505301505301505300000513471BATCH YY
|
103
|
+
020L1063200504084267737A85500005125014962480135526100000341780150530880 RAWSONPROPOAKTREE GARDENS 15, A.C. TILL 00000000000000000000 21
|
104
|
+
020L1263200504084267737A85500005263200504084267737100000341780150530100000RAWSONPROPCONTRA34196
|
105
|
+
020L92A855000051000052150530150530000001000001000001000000341780000000341780066564403263
|
106
|
+
020L04A8551505301505301505301505300000533472BATCH YY
|
107
|
+
020L1063200504084267737A85500005363200504056584569100000012440150530880 RAWSONPROP207144766 CITY OF CAPE TOWN 00000000000000000000 21
|
108
|
+
020L1263200504084267737A85500005463200504084267737100000012440150530100000RAWSONPROPCONTRA34197
|
109
|
+
020L92A855000053000054150530150530000001000001000001000000012440000000012440008140852306
|
110
|
+
020L04A8551505301505301505301505300000553473BATCH YY
|
111
|
+
020L1063200504084267737A85500005563200504052886814100000096030150530880 RAWSONPROPIL BACARO 1, PARK STHENQUE 3186 CC 00000000000000000000 21
|
112
|
+
020L1263200504084267737A85500005663200504084267737100000096030150530100000RAWSONPROPCONTRA34198
|
113
|
+
020L92A855000055000056150530150530000001000001000001000000096030000000096030008137154551
|
114
|
+
020L04A8551505301505301505301505300000573474BATCH YY
|
115
|
+
020L1063200504084267737A85500005763200504052571302100000046500150530880 RAWSONPROP1 IL BACARO BODY CORPORATE - OSR00000000000000000000 21
|
116
|
+
020L1263200504084267737A85500005863200504084267737100000046500150530100000RAWSONPROPCONTRA34199
|
117
|
+
020L92A855000057000058150530150530000001000001000001000000046500000000046500008136839039
|
118
|
+
020L04A8551505301505301505301505300000593475BATCH YY
|
119
|
+
020L1063200504084267737A85500005963200504075050587100000055339150530880 RAWSONPROPA2 PARC DURMONTE BODY CORPORATE 00000000000000000000 21
|
120
|
+
020L1263200504084267737A85500006063200504084267737100000055339150530100000RAWSONPROPCONTRA34200
|
121
|
+
020L92A855000059000060150530150530000001000001000001000000055339000000055339008159318324
|
122
|
+
020L04A8551505301505301505301505300000613476BATCH YY
|
123
|
+
020L1063200504084267737A85500006163200504056584569100000020000150530880 RAWSONPROP221353008 CITY OF CAPE TOWN 00000000000000000000 21
|
124
|
+
020L1263200504084267737A85500006263200504084267737100000020000150530100000RAWSONPROPCONTRA34201
|
125
|
+
020L92A855000061000062150530150530000001000001000001000000020000000000020000008140852306
|
126
|
+
020L04A8551505301505301505301505300000633477BATCH YY
|
127
|
+
020L1063200504084267737A85500006325400562415516717100000303963150530880 RAWSONPROPPARC DURMONTE A2, DUM.D. MABASO 00000000000000000000 21
|
128
|
+
020L1263200504084267737A85500006463200504084267737100000303963150530100000RAWSONPROPCONTRA34202
|
129
|
+
020L92A855000063000064150530150530000001000001000001000000303963000000303963066499784454
|
130
|
+
020L04A8551505301505301505301505300000653478BATCH YY
|
131
|
+
020L1063200504084267737A85500006517030500000000000100000394713150530880 RAWSONPROPDE OUDE PASTORIE 106A. PEDRO 00000008145583477001 21
|
132
|
+
020L1263200504084267737A85500006663200504084267737100000394713150530100000RAWSONPROPCONTRA34203
|
133
|
+
020L92A855000065000066150530150530000001000001000001000000394713000000394713049667744738
|
134
|
+
020L04A8551505301505301505301505300000673479BATCH YY
|
135
|
+
020L1063200504084267737A85500006720040962530128778100000886000150530880 RAWSONPROPTIJGER VILLAS 40, OLM.A. FREEMAN 00000000000000000000 21
|
136
|
+
020L1263200504084267737A85500006863200504084267737100000886000150530100000RAWSONPROPCONTRA34204
|
137
|
+
020L92A855000067000068150530150530000001000001000001000000886000000000886000066614396515
|
138
|
+
020L04A8551505301505301505301505300000693480BATCH YY
|
139
|
+
020L1063200504084267737A85500006925065562072695996100000425280150530880 RAWSONPROPSERENGETI 8, SABIE SA.R. SCHILDER 00000000000000000000 21
|
140
|
+
020L1263200504084267737A85500007063200504084267737100000425280150530100000RAWSONPROPCONTRA34205
|
141
|
+
020L92A855000069000070150530150530000001000001000001000000425280000000425280066156963733
|
142
|
+
020L04A8551505301505301505301505300000713481BATCH YY
|
143
|
+
020L1063200504084267737A85500007105100110036911990100001063200150530880 RAWSONPROPSTELLENVILLAS 21, KRC.G. LEE 00000000000000000000 21
|
144
|
+
020L1263200504084267737A85500007263200504084267737100001063200150530100000RAWSONPROPCONTRA34206
|
145
|
+
020L92A855000071000072150530150530000001000001000001000001063200000001063200014121179727
|
146
|
+
020L04A8551505301505301505301505300000733482BATCH YY
|
147
|
+
020L1063200504084267737A85500007305100110036911990100000070000150530880 RAWSONPROPSTELLENVILLAS 21, KRC.G. LEE 00000000000000000000 21
|
148
|
+
020L1263200504084267737A85500007463200504084267737100000070000150530100000RAWSONPROPCONTRA34207
|
149
|
+
020L92A855000073000074150530150530000001000001000001000000070000000000070000014121179727
|
150
|
+
020L04A8551505301505301505301505300000753483BATCH YY
|
151
|
+
020L1063200504079323853A85500007563200504056584569100000081555150530880 RAWSONPROP212433033 CITY OF CAPE TOWN MUNICIPALITY00000000000000000000 21
|
152
|
+
020L1263200504079323853A85500007663200504079323853100000081555150530100000RAWSONPROPCONTRA34193
|
153
|
+
020L92A855000075000076150530150530000001000001000001000000081555000000081555008135908422
|
154
|
+
020L04A8551505301505301505301505300000773484BATCH YY
|
155
|
+
020L1063200504084267630A85500007700610500227371984100000450000150530880 RAWSONPROPMANATOKA HEIGHTS 3, B NAGEL 00000000000000000000 21
|
156
|
+
020L1263200504084267630A85500007863200504084267630100000450000150530100000RAWSONPROPCONTRA34213
|
157
|
+
020L92A855000077000078150530150530000001000001000001000000450000000000450000004311639614
|
158
|
+
020L04A8551505301505301505301505300000793485BATCH YY
|
159
|
+
020L1063200504084267575A85500007963200504073717042100000207689150530880 RAWSONPROPSAN0019C SECOND AVENUE BODY CORPORATE 00000000000000000000 21
|
160
|
+
020L1263200504084267575A85500008063200504084267575100000207689150530100000RAWSONPROPCONTRA34214
|
161
|
+
020L92A855000079000080150530150530000001000001000001000000207689000000207689008157984617
|
162
|
+
020L04A8551505301505301505301505300000813486BATCH YY
|
163
|
+
020L1063200504084267575A85500008100020500000165557100000043400150530880 RAWSONPROP552728092 CITY OF JOHANNESBURG 00000000000000000000 21
|
164
|
+
020L1263200504084267575A85500008263200504084267575100000043400150530100000RAWSONPROPCONTRA34215
|
165
|
+
020L92A855000081000082150530150530000001000001000001000000043400000000043400004084433132
|
166
|
+
020L04A8551505301505301505301505300000833487BATCH YY
|
167
|
+
020L1063200504084267575A85500008327144462343848258100000686472150530880 RAWSONPROP19 SECOND AVENUE, 2NL.M SARMAN 00000000000000000000 21
|
168
|
+
020L1263200504084267575A85500008463200504084267575100000686472150530100000RAWSONPROPCONTRA34216
|
169
|
+
020L92A855000083000084150530150530000001000001000001000000686472000000686472066428115833
|
170
|
+
020L04A8551505301505301505301505300000853488BATCH YY
|
171
|
+
020L1063200504084267575A85500008505100100220723249100000036000150530880 RAWSONPROPCOMMISSION DTC PROPERTIES TRADING AS RAWS00000000000000000000 21
|
172
|
+
020L1263200504084267575A85500008663200504084267575100000036000150530100000RAWSONPROPCONTRA34217
|
173
|
+
020L92A855000085000086150530150530000001000001000001000000036000000000036000004304990824
|
174
|
+
999L000000174
|
@@ -0,0 +1,174 @@
|
|
1
|
+
000L2015053004136RENTAL CONNECT PTY LTD 000084600000 4908
|
2
|
+
020L04A8551505301505301505301505300000013446BATCH YY
|
3
|
+
020L1063200504079323748A85500000119876501983075795100000114984150530880 RAWSONPROP23FISHEAGLE UTILITY N VISAGIE 00000000000000000000 21
|
4
|
+
020L1263200504079323748A85500000263200504079323748100000114984150530100000RAWSONPROPCONTRA33636
|
5
|
+
020L92A855000001000002150530150530000001000001000001000000114984000000114984006062399543
|
6
|
+
020L04A8551505301505301505301505300000033447BATCH YY
|
7
|
+
020L1063200504079323748A85500000325465562480444406100000080000150530880 RAWSONPROPCOMMISSION RAWSON RENTALS GWR 00000000000000000000 21
|
8
|
+
020L1263200504079323748A85500000463200504079323748100000080000150530100000RAWSONPROPCONTRA33647
|
9
|
+
020L92A855000003000004150530150530000001000001000001000000080000000000080000066559768154
|
10
|
+
020L04A8551505301505301505301505300000053448BATCH YY
|
11
|
+
020L1063200504079323748A85500000525400562480444406100000034375150530880 RAWSONPROP17MISSISSIPPILATEFEERAWSON RENTALS GWR 00000000000000000000 21
|
12
|
+
020L1263200504079323748A85500000663200504079323748100000034375150530100000RAWSONPROPCONTRA33650
|
13
|
+
020L92A855000005000006150530150530000001000001000001000000034375000000034375066559768154
|
14
|
+
020L04A8551505301505301505301505300000073449BATCH YY
|
15
|
+
020L1063200504079323748A85500000725400562480444406100000006927150530880 RAWSONPROP20MOUNTAINVIEWCASHFERAWSON RENTALS GWR 00000000000000000000 21
|
16
|
+
020L1263200504079323748A85500000863200504079323748100000006927150530100000RAWSONPROPCONTRA33653
|
17
|
+
020L92A855000007000008150530150530000001000001000001000000006927000000006927066559768154
|
18
|
+
020L04A8551505301505301505301505300000093450BATCH YY
|
19
|
+
020L1063200504079323748A85500000925400562480444406100000127463150530880 RAWSONPROP57 EAGLE GROVE RAWSON RENTALS GWR 00000000000000000000 21
|
20
|
+
020L1263200504079323748A85500001063200504079323748100000127463150530100000RAWSONPROPCONTRA33654
|
21
|
+
020L92A855000009000010150530150530000001000001000001000000127463000000127463066559768154
|
22
|
+
020L04A8551505301505301505301505300000113451BATCH YY
|
23
|
+
020L1063200504079323748A85500001163200504079328316100000005000150530880 RAWSONPROP2X8KF RAWSON RENTALS GWR 00000000000000000000 21
|
24
|
+
020L1263200504079323748A85500001263200504079323748100000005000150530100000RAWSONPROPCONTRA33689
|
25
|
+
020L92A855000011000012150530150530000001000001000001000000005000000000005000008158652064
|
26
|
+
020L04A8551505301505301505301505300000133452BATCH YY
|
27
|
+
020L1063200504079323748A85500001300020500000165557100000337906150530880 RAWSONPROP552687914 CITY OF JOHANNESBURG 00000000000000000000 21
|
28
|
+
020L1263200504079323748A85500001463200504079323748100000337906150530100000RAWSONPROPCONTRA34008
|
29
|
+
020L92A855000013000014150530150530000001000001000001000000337906000000337906004079489305
|
30
|
+
020L04A8551505301505301505301505300000153453BATCH YY
|
31
|
+
020L1063200504079323748A85500001563200504046186298100000209452150530880 RAWSONPROP26CHELSEAPARTPAYRENTMC LORD 00000000000000000000 21
|
32
|
+
020L1263200504079323748A85500001663200504079323748100000209452150530100000RAWSONPROPCONTRA34009
|
33
|
+
020L92A855000015000016150530150530000001000001000001000000209452000000209452008125510046
|
34
|
+
020L04A8551505301505301505301505300000173454BATCH YY
|
35
|
+
020L1063200504084166323A85500001725400562202987791100000312251150530880 RAWSONPROP00088204 1C BROOKWOOD RENPROP MANAGEMEN00000000000000000000 21
|
36
|
+
020L1263200504084166323A85500001863200504084166323100000312251150530100000RAWSONPROPCONTRA34054
|
37
|
+
020L92A855000017000018150530150530000001000001000001000000312251000000312251066287154114
|
38
|
+
020L04A8551505301505301505301505300000193455BATCH YY
|
39
|
+
020L1063200504084166323A85500001925345562300770098100000873689150530880 RAWSONPROP13 SANDOWN COURT, 13G SIDAKI 00000000000000000000 21
|
40
|
+
020L1263200504084166323A85500002063200504084166323100000873689150530100000RAWSONPROPCONTRA34056
|
41
|
+
020L92A855000019000020150530150530000001000001000001000000873689000000873689066384936421
|
42
|
+
020L04A8551505301505301505301505300000213456BATCH YY
|
43
|
+
020L1063200504084166323A85500002119700501434009548100000704284150530880 RAWSONPROP1C BROOKWOOD, 1 KINGB RHEEDERS 00000000000000000000 21
|
44
|
+
020L1263200504084166323A85500002263200504084166323100000704284150530100000RAWSONPROPCONTRA34208
|
45
|
+
020L92A855000021000022150530150530000001000001000001000000704284000000704284005518175871
|
46
|
+
020L04A8551505301505301505301505300000233457BATCH YY
|
47
|
+
020L1063200504084166323A85500002363200501238130031100000498649150530880 RAWSONPROPB202 MONTEGA, 95 KATA HAFFEJEE 00000000000000000000 21
|
48
|
+
020L1263200504084166323A85500002463200504084166323100000498649150530100000RAWSONPROPCONTRA34209
|
49
|
+
020L92A855000023000024150530150530000001000001000001000000498649000000498649005322296354
|
50
|
+
020L04A8551505301505301505301505300000253458BATCH YY
|
51
|
+
020L1063200504084166323A85500002519876501955005982100000870450150530880 RAWSONPROP5 VIA ORVIETTO, 14 OA CARR 00000000000000000000 21
|
52
|
+
020L1263200504084166323A85500002663200504084166323100000870450150530100000RAWSONPROPCONTRA34210
|
53
|
+
020L92A855000025000026150530150530000001000001000001000000870450000000870450006039172305
|
54
|
+
020L04A8551505301505301505301505300000273459BATCH YY
|
55
|
+
020L1063200504084166323A85500002705100100270739335100000426774150530880 RAWSONPROP32950022007 TRAFALGAR PROPERTY MANAGEMENT 00000000000000000000 21
|
56
|
+
020L1263200504084166323A85500002863200504084166323100000426774150530100000RAWSONPROPCONTRA34211
|
57
|
+
020L92A855000027000028150530150530000001000001000001000000426774000000426774004354905658
|
58
|
+
020L04A8551505301505301505301505300000293460BATCH YY
|
59
|
+
020L1063200504084166323A85500002905100100005833450100000811686150530880 RAWSONPROP22 MELROSE GARDENS, J NAIK 00000000000000000000 21
|
60
|
+
020L1263200504084166323A85500003063200504084166323100000811686150530100000RAWSONPROPCONTRA34212
|
61
|
+
020L92A855000029000030150530150530000001000001000001000000811686000000811686004089999773
|
62
|
+
020L04A8551505301505301505301505300000313461BATCH YY
|
63
|
+
020L1063200504084166357A85500003119600501969197862100000300000150530880 RAWSONPROPISS GC DAVY 00000000000000000000 21
|
64
|
+
020L1263200504084166357A85500003263200504084166357100000300000150530100000RAWSONPROPCONTRA34185
|
65
|
+
020L92A855000031000032150530150530000001000001000001000000300000000000300000006053364219
|
66
|
+
020L04A8551505301505301505301505300000333462BATCH YY
|
67
|
+
020L1063200504084267606A85500003325065560447260790100000717760150530880 RAWSONPROP75 OAKMONT, 1 , NORTDW HEDDING 00000000000000000000 21
|
68
|
+
020L1263200504084267606A85500003463200504084267606100000717760150530100000RAWSONPROPCONTRA34186
|
69
|
+
020L92A855000033000034150530150530000001000001000001000000717760000000717760064531528396
|
70
|
+
020L04A8551505301505301505301505300000353463BATCH YY
|
71
|
+
020L1063200504084267606A85500003563200504082853366100000049792150530880 RAWSONPROPCOMMISSION EXPERTPROP PTY LTD T/A RAWSON 00000000000000000000 21
|
72
|
+
020L1263200504084267606A85500003663200504084267606100000049792150530100000RAWSONPROPCONTRA34187
|
73
|
+
020L92A855000035000036150530150530000001000001000001000000049792000000049792008167120972
|
74
|
+
020L04A8551505301505301505301505300000373464BATCH YY
|
75
|
+
020L1063200504084267606A85500003763200504082853366100000540586150530880 RAWSONPROPCOMMISSION EXPERTPROP PTY LTD T/A RAWSON 00000000000000000000 21
|
76
|
+
020L1263200504084267606A85500003863200504084267606100000540586150530100000RAWSONPROPCONTRA34188
|
77
|
+
020L92A855000037000038150530150530000001000001000001000000540586000000540586008167120972
|
78
|
+
020L04A8551505301505301505301505300000393465BATCH YY
|
79
|
+
020L1063200504084267737A85500003925400562114258587100000046500150530880 RAWSONPROPUNIT 17 MILANO BODY CORPORATE 00000000000000000000 21
|
80
|
+
020L1263200504084267737A85500004063200504084267737100000046500150530100000RAWSONPROPCONTRA34189
|
81
|
+
020L92A855000039000040150530150530000001000001000001000000046500000000046500066198526324
|
82
|
+
020L04A8551505301505301505301505300000413466BATCH YY
|
83
|
+
020L1063200504084267737A85500004105100100071995382100000343340150530880 RAWSONPROPMILANO 17, HYACINTH J. DANIELS 00000000000000000000 21
|
84
|
+
020L1263200504084267737A85500004263200504084267737100000343340150530100000RAWSONPROPCONTRA34190
|
85
|
+
020L92A855000041000042150530150530000001000001000001000000343340000000343340004156263119
|
86
|
+
020L04A8551505301505301505301505300000433467BATCH YY
|
87
|
+
020L1063200504084267737A85500004319876501186019581100000086225150530880 RAWSONPROP700/077 HILLCREST BODY CORP 00000000000000000000 21
|
88
|
+
020L1263200504084267737A85500004463200504084267737100000086225150530100000RAWSONPROPCONTRA34191
|
89
|
+
020L92A855000043000044150530150530000001000001000001000000086225000000086225005270287318
|
90
|
+
020L04A8551505301505301505301505300000453468BATCH YY
|
91
|
+
020L1063200504084267737A85500004563200509305660980100000285895150530880 RAWSONPROPHILLCREST 77, HILLCRD. STEYN 00000000000000000000 21
|
92
|
+
020L1263200504084267737A85500004663200504084267737100000285895150530100000RAWSONPROPCONTRA34192
|
93
|
+
020L92A855000045000046150530150530000001000001000001000000285895000000285895013389928717
|
94
|
+
020L04A8551505301505301505301505300000473469BATCH YY
|
95
|
+
020L1063200504084267737A85500004705100100072003197100000080000150530880 RAWSONPROPVILLAGE WALK 5, 31 CY. GUO 00000000000000000000 21
|
96
|
+
020L1263200504084267737A85500004863200504084267737100000080000150530100000RAWSONPROPCONTRA34194
|
97
|
+
020L92A855000047000048150530150530000001000001000001000000080000000000080000004156270934
|
98
|
+
020L04A8551505301505301505301505300000493470BATCH YY
|
99
|
+
020L1063200504084267737A85500004919876501186047607100000039200150530880 RAWSONPROPOAK15A WATCHPROP 00000000000000000000 21
|
100
|
+
020L1263200504084267737A85500005063200504084267737100000039200150530100000RAWSONPROPCONTRA34195
|
101
|
+
020L92A855000049000050150530150530000001000001000001000000039200000000039200005270315344
|
102
|
+
020L04A8551505301505301505301505300000513471BATCH YY
|
103
|
+
020L1063200504084267737A85500005125014962480135526100000341780150530880 RAWSONPROPOAKTREE GARDENS 15, A.C. TILL 00000000000000000000 21
|
104
|
+
020L1263200504084267737A85500005263200504084267737100000341780150530100000RAWSONPROPCONTRA34196
|
105
|
+
020L92A855000051000052150530150530000001000001000001000000341780000000341780066564403263
|
106
|
+
020L04A8551505301505301505301505300000533472BATCH YY
|
107
|
+
020L1063200504084267737A85500005363200504056584569100000012440150530880 RAWSONPROP207144766 CITY OF CAPE TOWN 00000000000000000000 21
|
108
|
+
020L1263200504084267737A85500005463200504084267737100000012440150530100000RAWSONPROPCONTRA34197
|
109
|
+
020L92A855000053000054150530150530000001000001000001000000012440000000012440008140852306
|
110
|
+
020L04A8551505301505301505301505300000553473BATCH YY
|
111
|
+
020L1063200504084267737A85500005563200504052886814100000096030150530880 RAWSONPROPIL BACARO 1, PARK STHENQUE 3186 CC 00000000000000000000 21
|
112
|
+
020L1263200504084267737A85500005663200504084267737100000096030150530100000RAWSONPROPCONTRA34198
|
113
|
+
020L92A855000055000056150530150530000001000001000001000000096030000000096030008137154551
|
114
|
+
020L04A8551505301505301505301505300000573474BATCH YY
|
115
|
+
020L1063200504084267737A85500005763200504052571302100000046500150530880 RAWSONPROP1 IL BACARO BODY CORPORATE - OSR00000000000000000000 21
|
116
|
+
020L1263200504084267737A85500005863200504084267737100000046500150530100000RAWSONPROPCONTRA34199
|
117
|
+
020L92A855000057000058150530150530000001000001000001000000046500000000046500008136839039
|
118
|
+
020L04A8551505301505301505301505300000593475BATCH YY
|
119
|
+
020L1063200504084267737A85500005963200504075050587100000055339150530880 RAWSONPROPA2 PARC DURMONTE BODY CORPORATE 00000000000000000000 21
|
120
|
+
020L1263200504084267737A85500006063200504084267737100000055339150530100000RAWSONPROPCONTRA34200
|
121
|
+
020L92A855000059000060150530150530000001000001000001000000055339000000055339008159318324
|
122
|
+
020L04A8551505301505301505301505300000613476BATCH YY
|
123
|
+
020L1063200504084267737A85500006163200504056584569100000020000150530880 RAWSONPROP221353008 CITY OF CAPE TOWN 00000000000000000000 21
|
124
|
+
020L1263200504084267737A85500006263200504084267737100000020000150530100000RAWSONPROPCONTRA34201
|
125
|
+
020L92A855000061000062150530150530000001000001000001000000020000000000020000008140852306
|
126
|
+
020L04A8551505301505301505301505300000633477BATCH YY
|
127
|
+
020L1063200504084267737A85500006325400562415516717100000303963150530880 RAWSONPROPPARC DURMONTE A2, DUM.D. MABASO 00000000000000000000 21
|
128
|
+
020L1263200504084267737A85500006463200504084267737100000303963150530100000RAWSONPROPCONTRA34202
|
129
|
+
020L92A855000063000064150530150530000001000001000001000000303963000000303963066499784454
|
130
|
+
020L04A8551505301505301505301505300000653478BATCH YY
|
131
|
+
020L1063200504084267737A85500006517030500000000000100000394713150530880 RAWSONPROPDE OUDE PASTORIE 106A. PEDRO 00000008145583477001 21
|
132
|
+
020L1263200504084267737A85500006663200504084267737100000394713150530100000RAWSONPROPCONTRA34203
|
133
|
+
020L92A855000065000066150530150530000001000001000001000000394713000000394713149667744738
|
134
|
+
020L04A8551505301505301505301505300000673479BATCH YY
|
135
|
+
020L1063200504084267737A85500006720040962530128778100000886000150530880 RAWSONPROPTIJGER VILLAS 40, OLM.A. FREEMAN 00000000000000000000 21
|
136
|
+
020L1263200504084267737A85500006863200504084267737100000886000150530100000RAWSONPROPCONTRA34204
|
137
|
+
020L92A855000067000068150530150530000001000001000001000000886000000000886000066614396515
|
138
|
+
020L04A8551505301505301505301505300000693480BATCH YY
|
139
|
+
020L1063200504084267737A85500006925065562072695996100000425280150530880 RAWSONPROPSERENGETI 8, SABIE SA.R. SCHILDER 00000000000000000000 21
|
140
|
+
020L1263200504084267737A85500007063200504084267737100000425280150530100000RAWSONPROPCONTRA34205
|
141
|
+
020L92A855000069000070150530150530000001000001000001000000425280000000425280066156963733
|
142
|
+
020L04A8551505301505301505301505300000713481BATCH YY
|
143
|
+
020L1063200504084267737A85500007105100110036911990100001063200150530880 RAWSONPROPSTELLENVILLAS 21, KRC.G. LEE 00000000000000000000 21
|
144
|
+
020L1263200504084267737A85500007263200504084267737100001063200150530100000RAWSONPROPCONTRA34206
|
145
|
+
020L92A855000071000072150530150530000001000001000001000001063200000001063200014121179727
|
146
|
+
020L04A8551505301505301505301505300000733482BATCH YY
|
147
|
+
020L1063200504084267737A85500007305100110036911990100000070000150530880 RAWSONPROPSTELLENVILLAS 21, KRC.G. LEE 00000000000000000000 21
|
148
|
+
020L1263200504084267737A85500007463200504084267737100000070000150530100000RAWSONPROPCONTRA34207
|
149
|
+
020L92A855000073000074150530150530000001000001000001000000070000000000070000014121179727
|
150
|
+
020L04A8551505301505301505301505300000753483BATCH YY
|
151
|
+
020L1063200504079323853A85500007563200504056584569100000081555150530880 RAWSONPROP212433033 CITY OF CAPE TOWN MUNICIPALITY00000000000000000000 21
|
152
|
+
020L1263200504079323853A85500007663200504079323853100000081555150530100000RAWSONPROPCONTRA34193
|
153
|
+
020L92A855000075000076150530150530000001000001000001000000081555000000081555008135908422
|
154
|
+
020L04A8551505301505301505301505300000773484BATCH YY
|
155
|
+
020L1063200504084267630A85500007700610500227371984100000450000150530880 RAWSONPROPMANATOKA HEIGHTS 3, B NAGEL 00000000000000000000 21
|
156
|
+
020L1263200504084267630A85500007863200504084267630100000450000150530100000RAWSONPROPCONTRA34213
|
157
|
+
020L92A855000077000078150530150530000001000001000001000000450000000000450000004311639614
|
158
|
+
020L04A8551505301505301505301505300000793485BATCH YY
|
159
|
+
020L1063200504084267575A85500007963200504073717042100000207689150530880 RAWSONPROPSAN0019C SECOND AVENUE BODY CORPORATE 00000000000000000000 21
|
160
|
+
020L1263200504084267575A85500008063200504084267575100000207689150530100000RAWSONPROPCONTRA34214
|
161
|
+
020L92A855000079000080150530150530000001000001000001000000207689000000207689008157984617
|
162
|
+
020L04A8551505301505301505301505300000813486BATCH YY
|
163
|
+
020L1063200504084267575A85500008100020500000165557100000043400150530880 RAWSONPROP552728092 CITY OF JOHANNESBURG 00000000000000000000 21
|
164
|
+
020L1263200504084267575A85500008263200504084267575100000043400150530100000RAWSONPROPCONTRA34215
|
165
|
+
020L92A855000081000082150530150530000001000001000001000000043400000000043400004084433132
|
166
|
+
020L04A8551505301505301505301505300000833487BATCH YY
|
167
|
+
020L1063200504084267575A85500008327144462343848258100000686472150530880 RAWSONPROP19 SECOND AVENUE, 2NL.M SARMAN 00000000000000000000 21
|
168
|
+
020L1263200504084267575A85500008463200504084267575100000686472150530100000RAWSONPROPCONTRA34216
|
169
|
+
020L92A855000083000084150530150530000001000001000001000000686472000000686472066428115833
|
170
|
+
020L04A8551505301505301505301505300000853488BATCH YY
|
171
|
+
020L1063200504084267575A85500008505100100220723249100000036000150530880 RAWSONPROPCOMMISSION DTC PROPERTIES TRADING AS RAWS00000000000000000000 21
|
172
|
+
020L1263200504084267575A85500008663200504084267575100000036000150530100000RAWSONPROPCONTRA34217
|
173
|
+
020L92A855000085000086150530150530000001000001000001000000036000000000036000004304990824
|
174
|
+
999L000000174
|
@@ -168,7 +168,7 @@ describe Bankserv::InputDocument do
|
|
168
168
|
t = Time.local(2008, 8, 8, 10, 5, 0)
|
169
169
|
Timecop.travel(t)
|
170
170
|
|
171
|
-
@bankserv_service = Bankserv::CreditService.register(client_code: '986', client_name: "TESTTEST", client_abbreviated_name: 'TESTTEST', user_code: "9999", generation_number:
|
171
|
+
@bankserv_service = Bankserv::CreditService.register(client_code: '986', client_name: "TESTTEST", client_abbreviated_name: 'TESTTEST', user_code: "9999", generation_number: 3446, sequence_number: 78, sequence_number_updated_at: Time.now, transmission_status: "L", transmission_number: "846")
|
172
172
|
create_credit_request(@bankserv_service)
|
173
173
|
end
|
174
174
|
|
@@ -187,4 +187,90 @@ describe Bankserv::InputDocument do
|
|
187
187
|
end
|
188
188
|
end
|
189
189
|
|
190
|
+
context "Create an input file that contains an transaction with a non-standard homing account number" do
|
191
|
+
|
192
|
+
before(:each) do
|
193
|
+
tear_it_down
|
194
|
+
t = Time.local(2015, 5, 30, 10, 5, 0)
|
195
|
+
Timecop.travel(t)
|
196
|
+
@cs = Bankserv::CreditService.register(client_code: '4136', client_name: "RENTAL CONNECT PTY LTD", client_abbreviated_name: 'RAWSONPROP', user_code: "A855", generation_number: 3446, transmission_status: "L", transmission_number: "846", sequence_number: 1, sequence_number_updated_at: Date.yesterday)
|
197
|
+
|
198
|
+
@file_contents = File.open("./spec/examples/input/wrong_input_file", "rb").read
|
199
|
+
@input_document = Bankserv::InputDocument.store(@file_contents)
|
200
|
+
|
201
|
+
options = Absa::H2h::Transmission::Document.hash_from_s(@file_contents, 'input')
|
202
|
+
options[:data].each do |entry|
|
203
|
+
if entry[:data].count == 4
|
204
|
+
c = entry[:data].map {|x| x[:data]}
|
205
|
+
account_num = (c[1][:homing_account_number] if c[1][:homing_account_number] != "0") || (c[1][:non_standard_homing_account_number] if c[1][:non_standard_homing_account_number] != "0")
|
206
|
+
request = Bankserv::Request.create!({
|
207
|
+
type: "credit",
|
208
|
+
data: {
|
209
|
+
:type_of_service=>"BATCH",
|
210
|
+
:batches=>[{
|
211
|
+
:debit=>{:account_number=>c[2][:homing_account_number], :id_number=>"", :initials=>"", :account_name=>c[2][:homing_account_name], :branch_code=>c[2][:homing_branch], :account_type=>"cheque", :amount=>c[2][:amount], :user_ref=>c[2][:user_ref].gsub("RAWSONPROPCONTRA", ""), :action_date=>"2015-05-30".to_date},
|
212
|
+
:credit=>{:account_number=>account_num, :id_number=>"", :initials=>"", :account_name=>c[1][:homing_account_name], :branch_code=>c[1][:homing_branch], :account_type=>"cheque", :amount=>c[1][:amount], :user_ref=>c[1][:user_ref].gsub("RAWSONPROP", ""), :action_date=>"2015-05-30".to_date}
|
213
|
+
}]
|
214
|
+
}
|
215
|
+
})
|
216
|
+
|
217
|
+
request.service_id = @cs.id
|
218
|
+
request.save!
|
219
|
+
end
|
220
|
+
end
|
221
|
+
|
222
|
+
@cs.reload
|
223
|
+
@cs.config[:sequence_number] = 1
|
224
|
+
@cs.save!
|
225
|
+
|
226
|
+
Bankserv::InputDocument.generate!(@cs)
|
227
|
+
end
|
228
|
+
|
229
|
+
it 'should create 43 bankserv requests' do
|
230
|
+
Bankserv::Request.all.count.should == 43
|
231
|
+
end
|
232
|
+
|
233
|
+
it 'should build a correct input file' do
|
234
|
+
document = Bankserv::Document.last
|
235
|
+
hash = document.to_hash
|
236
|
+
|
237
|
+
hash[:data].first[:data][:th_for_use_of_ld_user] = "4908"
|
238
|
+
|
239
|
+
string = File.open("./spec/examples/input/correct_input_file", "rb").read
|
240
|
+
options = Absa::H2h::Transmission::Document.hash_from_s(string, 'input')
|
241
|
+
|
242
|
+
hash.should == options
|
243
|
+
|
244
|
+
end
|
245
|
+
|
246
|
+
it 'should compare the all entries for both files and they should match' do
|
247
|
+
document = Bankserv::Document.last
|
248
|
+
hash = document.to_hash
|
249
|
+
|
250
|
+
hash[:data].first[:data][:th_for_use_of_ld_user] = "4908"
|
251
|
+
|
252
|
+
string = File.open("./spec/examples/input/correct_input_file", "rb").read
|
253
|
+
options = Absa::H2h::Transmission::Document.hash_from_s(string, 'input')
|
254
|
+
|
255
|
+
hash[:data].should == options[:data]
|
256
|
+
|
257
|
+
end
|
258
|
+
|
259
|
+
it 'should generate the file without any errors' do
|
260
|
+
document = Bankserv::Document.last
|
261
|
+
|
262
|
+
lambda {Absa::H2h::Transmission::Document.build([document.to_hash])}.should_not raise_error(Exception)
|
263
|
+
|
264
|
+
# file_name = generate_input_file_name(document)
|
265
|
+
|
266
|
+
# File.open("#{@service.config[:outgoing_directory]}/#{file_name}", 'w') { |f|
|
267
|
+
# f.write transmission
|
268
|
+
# }
|
269
|
+
# @logs[:input_files] << "Input Document File created. File name: #{file_name}"
|
270
|
+
# true
|
271
|
+
|
272
|
+
end
|
273
|
+
|
274
|
+
end
|
275
|
+
|
190
276
|
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.8.
|
4
|
+
version: 0.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeffrey van Aswegen
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-07-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -59,14 +59,14 @@ dependencies:
|
|
59
59
|
requirements:
|
60
60
|
- - ~>
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: 0.1.
|
62
|
+
version: 0.1.7
|
63
63
|
type: :runtime
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
67
|
- - ~>
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: 0.1.
|
69
|
+
version: 0.1.7
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: absa-esd
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
@@ -176,6 +176,8 @@ files:
|
|
176
176
|
- spec/examples/empty_output.txt
|
177
177
|
- spec/examples/failed_output_file.txt
|
178
178
|
- spec/examples/host2host/tmp.log
|
179
|
+
- spec/examples/input/correct_input_file
|
180
|
+
- spec/examples/input/wrong_input_file
|
179
181
|
- spec/examples/input_long.txt
|
180
182
|
- spec/examples/input_with_warning_generated.txt
|
181
183
|
- spec/examples/input_with_wrong_trans_num.txt
|
@@ -238,7 +240,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
238
240
|
version: '0'
|
239
241
|
requirements: []
|
240
242
|
rubyforge_project: bankserv
|
241
|
-
rubygems_version: 2.4.
|
243
|
+
rubygems_version: 2.4.7
|
242
244
|
signing_key:
|
243
245
|
specification_version: 4
|
244
246
|
summary: A rails 3 engine wrapped around the Absa Host 2 Host gem.
|
@@ -259,6 +261,8 @@ test_files:
|
|
259
261
|
- spec/examples/empty_output.txt
|
260
262
|
- spec/examples/failed_output_file.txt
|
261
263
|
- spec/examples/host2host/tmp.log
|
264
|
+
- spec/examples/input/correct_input_file
|
265
|
+
- spec/examples/input/wrong_input_file
|
262
266
|
- spec/examples/input_long.txt
|
263
267
|
- spec/examples/input_with_warning_generated.txt
|
264
268
|
- spec/examples/input_with_wrong_trans_num.txt
|