coop_to_ofx 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +38 -0
- data/Rakefile +141 -0
- data/bin/coop_to_ofx +60 -0
- data/lib/coop_scraper/base.rb +8 -0
- data/lib/coop_scraper/credit_card.rb +94 -0
- data/lib/coop_scraper/current_account.rb +92 -0
- data/lib/coop_scraper/version.rb +12 -0
- data/lib/coop_scraper.rb +2 -0
- data/lib/ofx/statement/base.rb +53 -0
- data/lib/ofx/statement/credit_card.rb +15 -0
- data/lib/ofx/statement/current_account.rb +14 -0
- data/lib/ofx/statement/output/base.rb +131 -0
- data/lib/ofx/statement/output/builder.rb +76 -0
- data/lib/ofx/statement/output/credit_card.rb +31 -0
- data/lib/ofx/statement/output/current_account.rb +29 -0
- data/lib/ofx/statement/transaction.rb +52 -0
- data/lib/ofx/statement.rb +3 -0
- data/lib/ofx.rb +1 -0
- data/spec/coop_scraper/base_spec.rb +15 -0
- data/spec/coop_scraper/credit_card_spec.rb +229 -0
- data/spec/coop_scraper/current_account_spec.rb +154 -0
- data/spec/fixtures/credit_card/cc_statement_fixture.html +927 -0
- data/spec/fixtures/credit_card/foreign_transaction_fixture.html +447 -0
- data/spec/fixtures/credit_card/interest_transaction_fixture.html +438 -0
- data/spec/fixtures/credit_card/maybe.txt +43 -0
- data/spec/fixtures/credit_card/merchandise_interest_fixture.html +0 -0
- data/spec/fixtures/credit_card/normal_transaction_fixture.html +439 -0
- data/spec/fixtures/credit_card/overlimit_charge_fixture.html +446 -0
- data/spec/fixtures/credit_card/payment_in_transaction_fixture.html +439 -0
- data/spec/fixtures/credit_card/simple_cc_statement.ofx +43 -0
- data/spec/fixtures/credit_card/statement_with_interest_line_fixture.html +452 -0
- data/spec/fixtures/current_account/cash_point_transaction_fixture.html +372 -0
- data/spec/fixtures/current_account/current_account_fixture.html +420 -0
- data/spec/fixtures/current_account/current_account_fixture.ofx +83 -0
- data/spec/fixtures/current_account/debit_interest_transaction_fixture.html +372 -0
- data/spec/fixtures/current_account/no_transactions_fixture.html +364 -0
- data/spec/fixtures/current_account/normal_transaction_fixture.html +372 -0
- data/spec/fixtures/current_account/payment_in_transaction_fixture.html +372 -0
- data/spec/fixtures/current_account/service_charge_transaction_fixture.html +372 -0
- data/spec/fixtures/current_account/transfer_transaction_fixture.html +372 -0
- data/spec/ofx/statement/base_spec.rb +116 -0
- data/spec/ofx/statement/credit_card_spec.rb +20 -0
- data/spec/ofx/statement/current_account_spec.rb +20 -0
- data/spec/ofx/statement/output/base_spec.rb +249 -0
- data/spec/ofx/statement/output/builder_spec.rb +38 -0
- data/spec/ofx/statement/output/credit_card_spec.rb +84 -0
- data/spec/ofx/statement/output/current_account_spec.rb +81 -0
- data/spec/ofx/statement/transaction_spec.rb +76 -0
- data/spec/spec.opts +2 -0
- data/spec/spec_helper.rb +36 -0
- metadata +172 -0
@@ -0,0 +1,446 @@
|
|
1
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
2
|
+
|
3
|
+
|
4
|
+
|
5
|
+
<html>
|
6
|
+
<head>
|
7
|
+
<TITLE>The Co-operative Bank p.l.c.</TITLE>
|
8
|
+
<link rel="stylesheet" href="https://welcome27.co-operativebank.co.uk/CBIBSImages/theme/Master.css" type="text/css">
|
9
|
+
<META content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
|
10
|
+
<META http-equiv="Content-Type" content="no-cache">
|
11
|
+
<META http-equiv="Pragma" content="no-cache">
|
12
|
+
<META http-equiv="Expires" content="-1">
|
13
|
+
<META http-equiv="Pragma-directive" content="no-cache">
|
14
|
+
<META http-equiv="cache-directive" content="no-cache">
|
15
|
+
</head>
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
<body>
|
20
|
+
<table width="100%" cellpadding="0" cellspacing="0">
|
21
|
+
<tr>
|
22
|
+
<td>
|
23
|
+
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
|
28
|
+
|
29
|
+
|
30
|
+
<table width="100%" cellpadding="0" border="0" cellspacing="0">
|
31
|
+
<tr>
|
32
|
+
<td class="pageheader" height="0" width="50%"> </td>
|
33
|
+
<td class="pageheader" width="20%"> </td>
|
34
|
+
<td class="pageheader" height="10" width="30%"> </td>
|
35
|
+
</tr>
|
36
|
+
<tr>
|
37
|
+
<td class="pageheader" valign="TOP" width="50%"><img src="https://welcome27.co-operativebank.co.uk/CBIBSImages/images/coop_logo_top.gif" align="left" alt="Top of the co-operative bank logo"></td>
|
38
|
+
<TD class="pageheader" valign="baseline" align="left" width="20%">
|
39
|
+
<table border="0" cellspacing="0" cellpadding="0" width="100%"><!--Table is used for vertical alignment-->
|
40
|
+
<tr><td> </td></tr>
|
41
|
+
<tr>
|
42
|
+
<TD class="pageheader" valign="BOTTOM" align="right" width="100%" height="100%">
|
43
|
+
<a href="/CBIBSWeb" title="Log Off" class="whiteLinks"><img src="https://welcome27.co-operativebank.co.uk/CBIBSImages/images/logoffbutton.gif" align="middle" alt="Log Off"></a>
|
44
|
+
</TD>
|
45
|
+
</tr>
|
46
|
+
</table>
|
47
|
+
</TD>
|
48
|
+
|
49
|
+
<TD class="pageheader" valign="baseline" align="left" width="35%">
|
50
|
+
<table border="0" cellspacing="0" cellpadding="0" width="100%"><!--Table is used for vertical alignment-->
|
51
|
+
<tr><td> </td></tr><!--Used for alignment-->
|
52
|
+
<tr>
|
53
|
+
|
54
|
+
|
55
|
+
|
56
|
+
<td class="pageheadernew" valign="baseline" width="22.5%"><a href="http://www.smile.co.uk/helppages/cbibs/statements/visaAccountLatestStatement.htm" target="_blank" class="whiteLinks" title="New Help Window Opened">
|
57
|
+
<img src="https://welcome27.co-operativebank.co.uk/CBIBSImages/images/helpbutton.gif" align="left" alt="Help"></a></coop:HelpLinkTag>
|
58
|
+
</td>
|
59
|
+
<td class="pageheader" align="left" valign="baseline" width="77.5%"><a href="/CBIBSWeb" title="Printer Friendly Page" class="whiteLinks"><img src="https://welcome27.co-operativebank.co.uk/CBIBSImages/images/printbutton.gif" align="left" alt="Print"></a>
|
60
|
+
</td>
|
61
|
+
|
62
|
+
|
63
|
+
|
64
|
+
</tr>
|
65
|
+
</table>
|
66
|
+
</td>
|
67
|
+
</tr>
|
68
|
+
<tr align="left">
|
69
|
+
<td>
|
70
|
+
<table width="100%" border="0">
|
71
|
+
<tr>
|
72
|
+
<td align="left"> </td>
|
73
|
+
<td align="left" valign="baseline" width="40%">Friday 06 February 2009</td>
|
74
|
+
<td align="left" valign="baseline" width="60%"><span class="H4">MR M</span></td>
|
75
|
+
</tr>
|
76
|
+
<tr><td> </td></tr>
|
77
|
+
</table>
|
78
|
+
</td>
|
79
|
+
</tr>
|
80
|
+
</table>
|
81
|
+
</td>
|
82
|
+
</tr>
|
83
|
+
<tr valign="top" align="left">
|
84
|
+
<td class="sidebar" >
|
85
|
+
<table width="100%">
|
86
|
+
<tr valign="top" align="left">
|
87
|
+
<td width="20%" class="sidebar">
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
<table cellpadding="3" cellspacing="5" width="78%" border="0">
|
95
|
+
<tr>
|
96
|
+
<td valign="top" height="26"><br></td>
|
97
|
+
</tr>
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
<tr valign="top">
|
103
|
+
<td valign="top" class="sidebar">
|
104
|
+
<a href="/CBIBSWeb" title="Your Accounts" class="sidebar">Your Accounts</a>
|
105
|
+
</td>
|
106
|
+
</tr>
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
<tr valign="top">
|
112
|
+
<td valign="top" class="backgroundSelected">
|
113
|
+
<a href="/CBIBSWeb" title="Statements" class="sidebarSelected">Statements</a>
|
114
|
+
</td>
|
115
|
+
</tr>
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
<tr valign="top">
|
121
|
+
<td valign="top" class="sidebar">
|
122
|
+
<a href="/CBIBSWeb" title="Pay Bills" class="sidebar">Pay Bills</a>
|
123
|
+
</td>
|
124
|
+
</tr>
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
<tr valign="top">
|
130
|
+
<td valign="top" class="sidebar">
|
131
|
+
<a href="/CBIBSWeb" title="Standing Orders" class="sidebar">Standing Orders</a>
|
132
|
+
</td>
|
133
|
+
</tr>
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
<tr valign="top">
|
139
|
+
<td valign="top" class="sidebar">
|
140
|
+
<a href="/CBIBSWeb" title="Funds Transfers" class="sidebar">Funds Transfers</a>
|
141
|
+
</td>
|
142
|
+
</tr>
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
<tr valign="top">
|
148
|
+
<td valign="top" class="sidebar">
|
149
|
+
<a href="/CBIBSWeb" title="Direct Debits" class="sidebar">Direct Debits</a>
|
150
|
+
</td>
|
151
|
+
</tr>
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
<tr valign="top">
|
157
|
+
<td valign="top" class="sidebar">
|
158
|
+
<a href="/CBIBSWeb" title="Customer Services" class="sidebar">Customer Services</a>
|
159
|
+
</td>
|
160
|
+
</tr>
|
161
|
+
|
162
|
+
<tr>
|
163
|
+
<td> </td>
|
164
|
+
</tr>
|
165
|
+
</table>
|
166
|
+
</td>
|
167
|
+
<td width="80%" class="sidebar" >
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
<table width="100%" border="0" cellpadding="0" cellspacing="0" >
|
179
|
+
<tr>
|
180
|
+
<td class="field"><span class="H2">Statement<br>
|
181
|
+
</span></td>
|
182
|
+
</tr>
|
183
|
+
</table>
|
184
|
+
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
185
|
+
<tr>
|
186
|
+
<td bgcolor="#000000"><img src="https://welcome27.co-operativebank.co.uk/CBIBSImages/images/spacer.gif" height="1" width="1" alt=""></td>
|
187
|
+
</tr>
|
188
|
+
</table>
|
189
|
+
<table width="100%" border="0" cellpadding="0" cellspacing="0" >
|
190
|
+
<tbody>
|
191
|
+
<tr><td><br/></td></tr>
|
192
|
+
<tr>
|
193
|
+
<td class="field">
|
194
|
+
<h4>
|
195
|
+
TRAVEL CARD
|
196
|
+
|
197
|
+
1234123412341234
|
198
|
+
|
199
|
+
</h4>
|
200
|
+
</td>
|
201
|
+
</tr>
|
202
|
+
</tbody>
|
203
|
+
</table>
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
<table width="100%" border="0" cellpadding="0" cellspacing="0" >
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
|
218
|
+
<tr>
|
219
|
+
<td class="field">
|
220
|
+
<table width="70%" border="0" cellpadding="2" cellspacing="0" >
|
221
|
+
<tbody>
|
222
|
+
|
223
|
+
<tr>
|
224
|
+
<td class="field" width="150">Statement Date</td>
|
225
|
+
<td class="field">03/02/2009</td>
|
226
|
+
<td class="field" width="150"></td>
|
227
|
+
<td class="field"></td>
|
228
|
+
</tr>
|
229
|
+
<tr>
|
230
|
+
<td class="field">Credit Limit</td>
|
231
|
+
<td class="field">£2000.00</td>
|
232
|
+
<td class="field">Available Credit</td>
|
233
|
+
|
234
|
+
|
235
|
+
<td class="field">£1000.00</td>
|
236
|
+
|
237
|
+
</tr>
|
238
|
+
<tr>
|
239
|
+
<td class="field">Statement Balance</td>
|
240
|
+
<td class="field">£123.21 DR</td>
|
241
|
+
|
242
|
+
|
243
|
+
<td class="field"> </td>
|
244
|
+
<td class="field"> </td>
|
245
|
+
|
246
|
+
</tr>
|
247
|
+
<tr>
|
248
|
+
<td class="field">Minimum Due</td>
|
249
|
+
<td class="field">£5.00</td>
|
250
|
+
<td class="field">Part Payment by</td>
|
251
|
+
<td class="field">03/03/2009</td>
|
252
|
+
</tr>
|
253
|
+
|
254
|
+
</tbody>
|
255
|
+
</table>
|
256
|
+
</td>
|
257
|
+
</tr>
|
258
|
+
<tr>
|
259
|
+
<td class="field"><br>
|
260
|
+
<table cellpadding="0" cellspacing="0" border="0">
|
261
|
+
|
262
|
+
<tr>
|
263
|
+
<td class="field" align="left"> If you make only the minimum payment each month, it will take you longer and cost you more to clear your balance. </td>
|
264
|
+
</tr>
|
265
|
+
<tr><td> </td></tr>
|
266
|
+
<tr>
|
267
|
+
<td class="field" align="left">For details of how your outstanding balance is reduced when you make a payment please click
|
268
|
+
<a href="http://www.smile.co.uk/helppages/cbibs/allocationofpaymentsforcreditcards.html" target="_blank" class="whiteLinks" title="new help window opened"><span class="bodyhighlight"> here</span></a>.</td>
|
269
|
+
</tr>
|
270
|
+
<tr><td> </td></tr>
|
271
|
+
|
272
|
+
</table>
|
273
|
+
</td>
|
274
|
+
<tr>
|
275
|
+
<tr>
|
276
|
+
<td class="field"><br>
|
277
|
+
<table cellpadding="0" cellspacing="0" border="0">
|
278
|
+
<tbody>
|
279
|
+
|
280
|
+
|
281
|
+
|
282
|
+
<tr>
|
283
|
+
<td class="field">To pay this bill click <a href="/CBIBSWeb" title="Click here to pay your visa bill"><span class="bodyhighlight">here</span></a>.<br/><br/></td>
|
284
|
+
</tr>
|
285
|
+
|
286
|
+
|
287
|
+
|
288
|
+
<tr>
|
289
|
+
<td class="field">
|
290
|
+
<table align="left" cellpadding="0" cellspacing="0" border="1">
|
291
|
+
<col span="1" align="center">
|
292
|
+
<thead>
|
293
|
+
<tr>
|
294
|
+
<th>Date</th>
|
295
|
+
<th>Transaction</th>
|
296
|
+
<th>Deposits</th>
|
297
|
+
<th>Withdrawals</th>
|
298
|
+
</tr>
|
299
|
+
</thead>
|
300
|
+
<tbody class="contents">
|
301
|
+
|
302
|
+
|
303
|
+
<tr>
|
304
|
+
<td class="dataRowL">06/01/2009</td>
|
305
|
+
<td class="transData"> SOME TRANSACTION HERE </td>
|
306
|
+
<td class="moneyData"> </td>
|
307
|
+
<td class="moneyData"> £23.00 </td>
|
308
|
+
</tr>
|
309
|
+
|
310
|
+
<tr>
|
311
|
+
<td class="dataRowL"> </td>
|
312
|
+
<td class="transData">OVERLIMIT CHARGE</td>
|
313
|
+
<td class="moneyData"> </td>
|
314
|
+
<td class="moneyData">£12.00</td>
|
315
|
+
</tr>
|
316
|
+
|
317
|
+
</tbody>
|
318
|
+
</table>
|
319
|
+
</td>
|
320
|
+
</tr>
|
321
|
+
<tr>
|
322
|
+
|
323
|
+
<td align="right"><br>
|
324
|
+
|
325
|
+
|
326
|
+
|
327
|
+
|
328
|
+
<a href="#" title="previous"><span class="bodyhighlight">previous</span></a>
|
329
|
+
|
330
|
+
|
331
|
+
|
332
|
+
|
333
|
+
</td>
|
334
|
+
</tr>
|
335
|
+
</tbody>
|
336
|
+
</table>
|
337
|
+
</td>
|
338
|
+
</tr>
|
339
|
+
<tr>
|
340
|
+
<td class="field">
|
341
|
+
<p class="smallprint"> <STRONG> Note - </STRONG> Available credit includes items in transit. <br>
|
342
|
+
<br>
|
343
|
+
Your statement balance consists of any balance showing on your previous statement, plus all transactions posted within this statement.
|
344
|
+
<br><br>
|
345
|
+
Interest is charged daily and will increase the longer payment is delayed. If your account is not fully cleared, interest will be charged on your daily balance, not just your outstanding balance. <br><br>Statements are available online for up to 3 months.
|
346
|
+
<br/><br/>
|
347
|
+
|
348
|
+
</p>
|
349
|
+
</td>
|
350
|
+
</tr>
|
351
|
+
|
352
|
+
|
353
|
+
|
354
|
+
|
355
|
+
<tr>
|
356
|
+
<td class="field" colspan="2"><br/>
|
357
|
+
To view Recent Items click <a href="/CBIBSWeb" title="Recent Items"><span class="bodyhighlight">Recent Items</span></a>.<br>
|
358
|
+
<br>
|
359
|
+
</td>
|
360
|
+
</tr>
|
361
|
+
|
362
|
+
</table>
|
363
|
+
<table width="100%" border="0" cellpadding="0" cellspacing="0" >
|
364
|
+
|
365
|
+
<tr>
|
366
|
+
<td class="field" colspan="2">
|
367
|
+
To select another service click the menu on the left. <br/><br/>
|
368
|
+
</td>
|
369
|
+
</tr>
|
370
|
+
<tr>
|
371
|
+
<td colspan="2" align="left"> To view another account, please select from the list below </td>
|
372
|
+
</tr>
|
373
|
+
</table>
|
374
|
+
<table cellpadding="0" cellspacing="0" border="0">
|
375
|
+
<tr>
|
376
|
+
<td class="error"></td>
|
377
|
+
</tr>
|
378
|
+
</table>
|
379
|
+
<B></B></td>
|
380
|
+
</tr>
|
381
|
+
<tr valign="top" align="left">
|
382
|
+
<td></td>
|
383
|
+
<td align="left">
|
384
|
+
|
385
|
+
|
386
|
+
|
387
|
+
<form name="viewAccountForm" method="post" action="/CBIBSWeb"><input type="hidden" name="org.apache.struts.taglib.html.TOKEN" value="">
|
388
|
+
<table cellpadding="0" cellspacing="0" border="0">
|
389
|
+
<tr>
|
390
|
+
<td><label for="accounts" class="nodisplay">accounts</label></td>
|
391
|
+
</tr>
|
392
|
+
<tr valign="bottom">
|
393
|
+
<td class="field" width="56%">
|
394
|
+
<select name="selectedAccount" id="accounts">
|
395
|
+
<option value ="Select Account">Select Account</option>
|
396
|
+
<option value ="%1234123412341234V">TRAVEL CARD 1234123412341234</option>
|
397
|
+
|
398
|
+
</select>
|
399
|
+
</td>
|
400
|
+
<td class="field">
|
401
|
+
<input type="image" name="VIEW" src="https://welcome27.co-operativebank.co.uk/CBIBSImages/images/viewbutton.gif" title="view account" alt="view">
|
402
|
+
</td>
|
403
|
+
</tr>
|
404
|
+
<tr>
|
405
|
+
<td class="error" colspan="2"></td>
|
406
|
+
</tr>
|
407
|
+
<tr>
|
408
|
+
<td colspan="2"> </td>
|
409
|
+
</tr>
|
410
|
+
|
411
|
+
|
412
|
+
|
413
|
+
|
414
|
+
|
415
|
+
|
416
|
+
|
417
|
+
|
418
|
+
|
419
|
+
|
420
|
+
|
421
|
+
<tr>
|
422
|
+
<td colspan="2" align="left">For details of charges for card transactions in any currency other than sterling click<a href="http://www.smile.co.uk/helppages/cbibs/foreigncardtransactions.html" target="_blank" class="whiteLinks" title="new help window opened">
|
423
|
+
<span class="bodyhighlight"> here</span></a>.</td>
|
424
|
+
</tr>
|
425
|
+
|
426
|
+
|
427
|
+
|
428
|
+
|
429
|
+
|
430
|
+
|
431
|
+
</table>
|
432
|
+
</form>
|
433
|
+
</td>
|
434
|
+
</tr>
|
435
|
+
</table>
|
436
|
+
</td>
|
437
|
+
</tr>
|
438
|
+
<tr>
|
439
|
+
<td align="left"><table width="100%">
|
440
|
+
<tr><td/>
|
441
|
+
</tr>
|
442
|
+
</table></td>
|
443
|
+
</tr>
|
444
|
+
</table>
|
445
|
+
</body>
|
446
|
+
</html>
|