payments-pl 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. data/.yardoc/checksums +6 -0
  2. data/.yardoc/objects/Payments.dat +0 -0
  3. data/.yardoc/objects/Payments/ENCODINGS.dat +0 -0
  4. data/.yardoc/objects/Payments/ERRORS.dat +0 -0
  5. data/.yardoc/objects/Payments/POS_TYPES.dat +0 -0
  6. data/.yardoc/objects/Payments/Pos.dat +0 -0
  7. data/.yardoc/objects/Payments/Pos/cancel_i.dat +0 -0
  8. data/.yardoc/objects/Payments/Pos/confirm_i.dat +0 -0
  9. data/.yardoc/objects/Payments/Pos/encoding_i.dat +0 -0
  10. data/.yardoc/objects/Payments/Pos/encrypt_i.dat +0 -0
  11. data/.yardoc/objects/Payments/Pos/get_i.dat +0 -0
  12. data/.yardoc/objects/Payments/Pos/initialize_i.dat +0 -0
  13. data/.yardoc/objects/Payments/Pos/key1_i.dat +0 -0
  14. data/.yardoc/objects/Payments/Pos/key2_i.dat +0 -0
  15. data/.yardoc/objects/Payments/Pos/new_transaction_i.dat +0 -0
  16. data/.yardoc/objects/Payments/Pos/new_transaction_url_i.dat +0 -0
  17. data/.yardoc/objects/Payments/Pos/parse_response_body_i.dat +0 -0
  18. data/.yardoc/objects/Payments/Pos/path_for_i.dat +0 -0
  19. data/.yardoc/objects/Payments/Pos/pos_auth_key_i.dat +0 -0
  20. data/.yardoc/objects/Payments/Pos/pos_id_i.dat +0 -0
  21. data/.yardoc/objects/Payments/Pos/prepare_data_i.dat +0 -0
  22. data/.yardoc/objects/Payments/Pos/send_request_i.dat +0 -0
  23. data/.yardoc/objects/Payments/Pos/type_i.dat +0 -0
  24. data/.yardoc/objects/Payments/Pos/verify_i.dat +0 -0
  25. data/.yardoc/objects/Payments/PosInvalid.dat +0 -0
  26. data/.yardoc/objects/Payments/PosNotFound.dat +0 -0
  27. data/.yardoc/objects/Payments/RequestFailed.dat +0 -0
  28. data/.yardoc/objects/Payments/SignatureInvalid.dat +0 -0
  29. data/.yardoc/objects/Payments/Transaction.dat +0 -0
  30. data/.yardoc/objects/Payments/Transaction/column_c.dat +0 -0
  31. data/.yardoc/objects/Payments/Transaction/columns_c.dat +0 -0
  32. data/.yardoc/objects/Payments/Transaction/new_url_i.dat +0 -0
  33. data/.yardoc/objects/Payments/Transaction/pos_i.dat +0 -0
  34. data/.yardoc/objects/Payments/ViewHelpers.dat +0 -0
  35. data/.yardoc/objects/Payments/ViewHelpers/transaction_hidden_fields_i.dat +0 -0
  36. data/.yardoc/objects/Payments/_40_40pos_table.dat +0 -0
  37. data/.yardoc/objects/Payments/_5B_5D_c.dat +0 -0
  38. data/.yardoc/objects/Payments/error_text_c.dat +0 -0
  39. data/.yardoc/objects/Payments/get_pos_by_id_c.dat +0 -0
  40. data/.yardoc/objects/Payments/get_pos_by_name_c.dat +0 -0
  41. data/.yardoc/objects/Payments/init_c.dat +0 -0
  42. data/.yardoc/objects/root.dat +0 -0
  43. data/.yardoc/proxy_types +0 -0
  44. data/VERSION +1 -1
  45. data/doc/Payments.html +288 -46
  46. data/doc/Payments/Pos.html +177 -426
  47. data/doc/Payments/PosInvalid.html +100 -0
  48. data/doc/Payments/PosNotFound.html +1 -1
  49. data/doc/Payments/RequestFailed.html +1 -1
  50. data/doc/Payments/SignatureInvalid.html +1 -1
  51. data/doc/Payments/Transaction.html +81 -15
  52. data/doc/Payments/ViewHelpers.html +1 -1
  53. data/doc/_index.html +10 -3
  54. data/doc/class_list.html +1 -1
  55. data/doc/file.README.html +2 -2
  56. data/doc/frames.html +1 -1
  57. data/doc/index.html +2 -2
  58. data/doc/method_list.html +13 -61
  59. data/doc/top-level-namespace.html +1 -1
  60. data/lib/payments/pos.rb +32 -17
  61. data/lib/payments/transaction.rb +4 -0
  62. data/lib/payments_pl.rb +30 -5
  63. data/payments-pl.gemspec +46 -2
  64. metadata +48 -4
data/.yardoc/checksums ADDED
@@ -0,0 +1,6 @@
1
+ LICENSE 05ed4a9e26f94a5963bf0224bff72332537a67bb
2
+ lib/payments_pl.rb f1df4334ffb3c35af984fef11ccfda314c8a3a18
3
+ lib/payments/transaction.rb 6b8626b3484b4875c60072522155364b61f17256
4
+ lib/payments/pos.rb 0193c7441cb1d10901ac02bdfc84f70b577362b2
5
+ README.rdoc 53b5b5c9d3c9477963deaf6a92bf18431eb1b296
6
+ lib/payments/view_helpers.rb bf278b4e619a35aa333d0882e74adcb9b6cc4ed8
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.1
1
+ 0.4.2
data/doc/Payments.html CHANGED
@@ -74,7 +74,7 @@
74
74
 
75
75
 
76
76
 
77
- <strong class="classes">Classes:</strong> <a href="Payments/Pos.html" title="Payments::Pos (class)">Pos</a>, <a href="Payments/PosNotFound.html" title="Payments::PosNotFound (class)">PosNotFound</a>, <a href="Payments/RequestFailed.html" title="Payments::RequestFailed (class)">RequestFailed</a>, <a href="Payments/SignatureInvalid.html" title="Payments::SignatureInvalid (class)">SignatureInvalid</a>, <a href="Payments/Transaction.html" title="Payments::Transaction (class)">Transaction</a>
77
+ <strong class="classes">Classes:</strong> <a href="Payments/Pos.html" title="Payments::Pos (class)">Pos</a>, <a href="Payments/PosInvalid.html" title="Payments::PosInvalid (class)">PosInvalid</a>, <a href="Payments/PosNotFound.html" title="Payments::PosNotFound (class)">PosNotFound</a>, <a href="Payments/RequestFailed.html" title="Payments::RequestFailed (class)">RequestFailed</a>, <a href="Payments/SignatureInvalid.html" title="Payments::SignatureInvalid (class)">SignatureInvalid</a>, <a href="Payments/Transaction.html" title="Payments::Transaction (class)">Transaction</a>
78
78
 
79
79
 
80
80
  </p>
@@ -125,6 +125,18 @@
125
125
  <span class='rbrace token'>}</span>
126
126
  </pre></dd>
127
127
 
128
+ <dt id="POS_TYPES-constant" class="">POS_TYPES =
129
+
130
+ </dt>
131
+ <dd><pre class="code"><span class='lbrack token'>[</span><span class='string val'>'default'</span><span class='comma token'>,</span> <span class='string val'>'sms_premium'</span><span class='rbrack token'>]</span>
132
+ </pre></dd>
133
+
134
+ <dt id="ENCODINGS-constant" class="">ENCODINGS =
135
+
136
+ </dt>
137
+ <dd><pre class="code"><span class='lbrack token'>[</span><span class='string val'>'ISO'</span><span class='comma token'>,</span> <span class='string val'>'WIN'</span><span class='comma token'>,</span> <span class='string val'>'UTF'</span><span class='rbrack token'>]</span>
138
+ </pre></dd>
139
+
128
140
  <dt id="pos_table-classvariable" class="">@@pos_table =
129
141
 
130
142
  </dt>
@@ -160,7 +172,10 @@
160
172
 
161
173
 
162
174
 
163
- <span class="summary_desc"><div class='inline'></div></span>
175
+ <span class="summary_desc"><div class='inline'><p>
176
+ Combined accessor, returns Pos object with given pos_id or name.
177
+ </p>
178
+ </div></span>
164
179
 
165
180
  </li>
166
181
 
@@ -168,7 +183,7 @@
168
183
  <li class="public ">
169
184
  <span class="summary_signature">
170
185
 
171
- <a href="#error_text-class_method" title="error_text (class method)">+ (Object) <strong>error_text</strong>(error_code) </a>
186
+ <a href="#error_text-class_method" title="error_text (class method)">+ (String) <strong>error_text</strong>(error_code) </a>
172
187
 
173
188
 
174
189
 
@@ -181,7 +196,10 @@
181
196
 
182
197
 
183
198
 
184
- <span class="summary_desc"><div class='inline'></div></span>
199
+ <span class="summary_desc"><div class='inline'><p>
200
+ Returns error explanation for given error code.
201
+ </p>
202
+ </div></span>
185
203
 
186
204
  </li>
187
205
 
@@ -202,7 +220,10 @@
202
220
 
203
221
 
204
222
 
205
- <span class="summary_desc"><div class='inline'></div></span>
223
+ <span class="summary_desc"><div class='inline'><p>
224
+ Returns Pos object with given pos_id, the same as in payments.yml file.
225
+ </p>
226
+ </div></span>
206
227
 
207
228
  </li>
208
229
 
@@ -223,7 +244,10 @@
223
244
 
224
245
 
225
246
 
226
- <span class="summary_desc"><div class='inline'></div></span>
247
+ <span class="summary_desc"><div class='inline'><p>
248
+ Returns Pos object with given name, the same as in payments.yml file.
249
+ </p>
250
+ </div></span>
227
251
 
228
252
  </li>
229
253
 
@@ -244,7 +268,10 @@
244
268
 
245
269
 
246
270
 
247
- <span class="summary_desc"><div class='inline'></div></span>
271
+ <span class="summary_desc"><div class='inline'><p>
272
+ Loads payments.yml file and creates specified Pos objects.
273
+ </p>
274
+ </div></span>
248
275
 
249
276
  </li>
250
277
 
@@ -265,18 +292,69 @@
265
292
 
266
293
 
267
294
 
268
- </p><table class="source_code">
295
+ </p><div class="docstring">
296
+ <div class="discussion">
297
+ <p>
298
+ Combined accessor, returns Pos object with given pos_id or name
299
+ </p>
300
+
301
+
302
+ </div>
303
+ </div>
304
+ <div class="tags">
305
+ <h3>Parameters:</h3>
306
+ <ul class="param">
307
+
308
+ <li>
309
+
310
+ <span class='type'>(<tt>String</tt>, <tt>Integer</tt>)</span>
311
+
312
+
313
+ <span class='name'>name_or_id</span>
314
+
315
+
316
+
317
+ &mdash;
318
+ <div class='inline'><p>
319
+ name or pos_id of Pos
320
+ </p>
321
+ </div>
322
+
323
+ </li>
324
+
325
+ </ul>
326
+ <h3>Returns:</h3>
327
+ <ul class="return">
328
+
329
+ <li>
330
+
331
+ <span class='type'>(<tt>Object</tt>)</span>
332
+
333
+
334
+
335
+
336
+ &mdash;
337
+ <div class='inline'><p>
338
+ the Pos object
339
+ </p>
340
+ </div>
341
+
342
+ </li>
343
+
344
+ </ul>
345
+
346
+ </div><table class="source_code">
269
347
  <tr>
270
348
  <td>
271
349
  <pre class="lines">
272
350
 
273
351
 
274
- 61
275
- 62
276
- 63</pre>
352
+ 74
353
+ 75
354
+ 76</pre>
277
355
  </td>
278
356
  <td>
279
- <pre class="code"><span class="info file"># File 'lib/payments_pl.rb', line 61</span>
357
+ <pre class="code"><span class="info file"># File 'lib/payments_pl.rb', line 74</span>
280
358
 
281
359
  <span class='def def kw'>def</span> <span class='aref op'>[]</span><span class='lparen token'>(</span><span class='name_or_id identifier id'>name_or_id</span><span class='rparen token'>)</span>
282
360
  <span class='get_pos_by_name identifier id'>get_pos_by_name</span><span class='lparen token'>(</span><span class='name_or_id identifier id'>name_or_id</span><span class='rparen token'>)</span> <span class='orop op'>||</span> <span class='get_pos_by_id identifier id'>get_pos_by_id</span><span class='lparen token'>(</span><span class='name_or_id identifier id'>name_or_id</span><span class='rparen token'>)</span> <span class='orop op'>||</span> <span class='raise identifier id'>raise</span><span class='lparen token'>(</span><span class='PosNotFound constant id'>PosNotFound</span><span class='rparen token'>)</span>
@@ -290,22 +368,67 @@
290
368
  <div class="method_details ">
291
369
  <p class="signature " id="error_text-class_method">
292
370
 
293
- + (<tt>Object</tt>) <strong>error_text</strong>(error_code)
371
+ + (<tt>String</tt>) <strong>error_text</strong>(error_code)
294
372
 
295
373
 
296
374
 
297
- </p><table class="source_code">
375
+ </p><div class="docstring">
376
+ <div class="discussion">
377
+ <p>
378
+ Returns error explanation for given error code
379
+ </p>
380
+
381
+
382
+ </div>
383
+ </div>
384
+ <div class="tags">
385
+ <h3>Parameters:</h3>
386
+ <ul class="param">
387
+
388
+ <li>
389
+
390
+ <span class='type'>(<tt>Integer</tt>)</span>
391
+
392
+
393
+ <span class='name'>error_code</span>
394
+
395
+
396
+
397
+ </li>
398
+
399
+ </ul>
400
+ <h3>Returns:</h3>
401
+ <ul class="return">
402
+
403
+ <li>
404
+
405
+ <span class='type'>(<tt>String</tt>)</span>
406
+
407
+
408
+
409
+
410
+ &mdash;
411
+ <div class='inline'><p>
412
+ string with error message
413
+ </p>
414
+ </div>
415
+
416
+ </li>
417
+
418
+ </ul>
419
+
420
+ </div><table class="source_code">
298
421
  <tr>
299
422
  <td>
300
423
  <pre class="lines">
301
424
 
302
425
 
303
- 77
304
- 78
305
- 79</pre>
426
+ 102
427
+ 103
428
+ 104</pre>
306
429
  </td>
307
430
  <td>
308
- <pre class="code"><span class="info file"># File 'lib/payments_pl.rb', line 77</span>
431
+ <pre class="code"><span class="info file"># File 'lib/payments_pl.rb', line 102</span>
309
432
 
310
433
  <span class='def def kw'>def</span> <span class='error_text identifier id'>error_text</span><span class='lparen token'>(</span><span class='error_code identifier id'>error_code</span><span class='rparen token'>)</span>
311
434
  <span class='ERRORS constant id'>ERRORS</span><span class='lbrack token'>[</span><span class='error_code identifier id'>error_code</span><span class='dot token'>.</span><span class='to_i identifier id'>to_i</span><span class='rbrack token'>]</span>
@@ -323,22 +446,73 @@
323
446
 
324
447
 
325
448
 
326
- </p><table class="source_code">
449
+ </p><div class="docstring">
450
+ <div class="discussion">
451
+ <p>
452
+ Returns Pos object with given pos_id, the same as in payments.yml file
453
+ </p>
454
+
455
+
456
+ </div>
457
+ </div>
458
+ <div class="tags">
459
+ <h3>Parameters:</h3>
460
+ <ul class="param">
461
+
462
+ <li>
463
+
464
+ <span class='type'>(<tt>Integer</tt>)</span>
465
+
466
+
467
+ <span class='name'>id</span>
468
+
469
+
470
+
471
+ &mdash;
472
+ <div class='inline'><p>
473
+ pos_id of Pos
474
+ </p>
475
+ </div>
476
+
477
+ </li>
478
+
479
+ </ul>
480
+ <h3>Returns:</h3>
481
+ <ul class="return">
482
+
483
+ <li>
484
+
485
+ <span class='type'>(<tt>Object</tt>)</span>
486
+
487
+
488
+
489
+
490
+ &mdash;
491
+ <div class='inline'><p>
492
+ the Pos object
493
+ </p>
494
+ </div>
495
+
496
+ </li>
497
+
498
+ </ul>
499
+
500
+ </div><table class="source_code">
327
501
  <tr>
328
502
  <td>
329
503
  <pre class="lines">
330
504
 
331
505
 
332
- 69
333
- 70
334
- 71
335
- 72
336
- 73
337
- 74
338
- 75</pre>
506
+ 90
507
+ 91
508
+ 92
509
+ 93
510
+ 94
511
+ 95
512
+ 96</pre>
339
513
  </td>
340
514
  <td>
341
- <pre class="code"><span class="info file"># File 'lib/payments_pl.rb', line 69</span>
515
+ <pre class="code"><span class="info file"># File 'lib/payments_pl.rb', line 90</span>
342
516
 
343
517
  <span class='def def kw'>def</span> <span class='get_pos_by_id identifier id'>get_pos_by_id</span><span class='lparen token'>(</span><span class='id identifier id'>id</span><span class='rparen token'>)</span>
344
518
  <span class='id identifier id'>id</span> <span class='assign token'>=</span> <span class='id identifier id'>id</span><span class='dot token'>.</span><span class='to_i identifier id'>to_i</span>
@@ -360,18 +534,69 @@
360
534
 
361
535
 
362
536
 
363
- </p><table class="source_code">
537
+ </p><div class="docstring">
538
+ <div class="discussion">
539
+ <p>
540
+ Returns Pos object with given name, the same as in payments.yml file
541
+ </p>
542
+
543
+
544
+ </div>
545
+ </div>
546
+ <div class="tags">
547
+ <h3>Parameters:</h3>
548
+ <ul class="param">
549
+
550
+ <li>
551
+
552
+ <span class='type'>(<tt>String</tt>)</span>
553
+
554
+
555
+ <span class='name'>name</span>
556
+
557
+
558
+
559
+ &mdash;
560
+ <div class='inline'><p>
561
+ name of Pos
562
+ </p>
563
+ </div>
564
+
565
+ </li>
566
+
567
+ </ul>
568
+ <h3>Returns:</h3>
569
+ <ul class="return">
570
+
571
+ <li>
572
+
573
+ <span class='type'>(<tt>Object</tt>)</span>
574
+
575
+
576
+
577
+
578
+ &mdash;
579
+ <div class='inline'><p>
580
+ the Pos object
581
+ </p>
582
+ </div>
583
+
584
+ </li>
585
+
586
+ </ul>
587
+
588
+ </div><table class="source_code">
364
589
  <tr>
365
590
  <td>
366
591
  <pre class="lines">
367
592
 
368
593
 
369
- 65
370
- 66
371
- 67</pre>
594
+ 82
595
+ 83
596
+ 84</pre>
372
597
  </td>
373
598
  <td>
374
- <pre class="code"><span class="info file"># File 'lib/payments_pl.rb', line 65</span>
599
+ <pre class="code"><span class="info file"># File 'lib/payments_pl.rb', line 82</span>
375
600
 
376
601
  <span class='def def kw'>def</span> <span class='get_pos_by_name identifier id'>get_pos_by_name</span><span class='lparen token'>(</span><span class='name identifier id'>name</span><span class='rparen token'>)</span>
377
602
  <span class='@@pos_table ivar id'>@@pos_table</span><span class='lbrack token'>[</span><span class='name identifier id'>name</span><span class='rbrack token'>]</span>
@@ -389,28 +614,45 @@
389
614
 
390
615
 
391
616
 
392
- </p><table class="source_code">
617
+ </p><div class="docstring">
618
+ <div class="discussion">
619
+ <p>
620
+ Loads payments.yml file and creates specified Pos objects
621
+ </p>
622
+
623
+
624
+ </div>
625
+ </div>
626
+ <div class="tags">
627
+
628
+ </div><table class="source_code">
393
629
  <tr>
394
630
  <td>
395
631
  <pre class="lines">
396
632
 
397
633
 
398
- 53
399
- 54
400
- 55
401
- 56
402
- 57
403
- 58
404
- 59</pre>
634
+ 59
635
+ 60
636
+ 61
637
+ 62
638
+ 63
639
+ 64
640
+ 65
641
+ 66
642
+ 67
643
+ 68</pre>
405
644
  </td>
406
645
  <td>
407
- <pre class="code"><span class="info file"># File 'lib/payments_pl.rb', line 53</span>
646
+ <pre class="code"><span class="info file"># File 'lib/payments_pl.rb', line 59</span>
408
647
 
409
648
  <span class='def def kw'>def</span> <span class='init identifier id'>init</span>
410
- <span class='config identifier id'>config</span> <span class='assign token'>=</span> <span class='YAML constant id'>YAML</span><span class='dot token'>.</span><span class='load_file identifier id'>load_file</span><span class='lparen token'>(</span><span class='File constant id'>File</span><span class='dot token'>.</span><span class='join identifier id'>join</span><span class='lparen token'>(</span><span class='RAILS_ROOT constant id'>RAILS_ROOT</span><span class='comma token'>,</span> <span class='string val'>'config'</span><span class='comma token'>,</span> <span class='string val'>'payments.yml'</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
411
- <span class='config identifier id'>config</span><span class='dot token'>.</span><span class='each identifier id'>each</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='k identifier id'>k</span><span class='comma token'>,</span> <span class='v identifier id'>v</span><span class='bitor op'>|</span>
412
- <span class='pos identifier id'>pos</span> <span class='assign token'>=</span> <span class='Pos constant id'>Pos</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='v identifier id'>v</span><span class='rparen token'>)</span>
413
- <span class='@@pos_table ivar id'>@@pos_table</span><span class='lbrack token'>[</span><span class='k identifier id'>k</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='pos identifier id'>pos</span>
649
+ <span class='filename identifier id'>filename</span> <span class='assign token'>=</span> <span class='File constant id'>File</span><span class='dot token'>.</span><span class='join identifier id'>join</span><span class='lparen token'>(</span><span class='Rails constant id'>Rails</span><span class='dot token'>.</span><span class='root identifier id'>root</span><span class='comma token'>,</span> <span class='string val'>'config'</span><span class='comma token'>,</span> <span class='string val'>'payments.yml'</span><span class='rparen token'>)</span>
650
+ <span class='if if kw'>if</span> <span class='File constant id'>File</span><span class='dot token'>.</span><span class='exist? fid id'>exist?</span><span class='lparen token'>(</span><span class='filename identifier id'>filename</span><span class='rparen token'>)</span>
651
+ <span class='config identifier id'>config</span> <span class='assign token'>=</span> <span class='YAML constant id'>YAML</span><span class='dot token'>.</span><span class='load_file identifier id'>load_file</span><span class='lparen token'>(</span><span class='filename identifier id'>filename</span><span class='rparen token'>)</span>
652
+ <span class='config identifier id'>config</span><span class='dot token'>.</span><span class='each identifier id'>each</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='k identifier id'>k</span><span class='comma token'>,</span> <span class='v identifier id'>v</span><span class='bitor op'>|</span>
653
+ <span class='pos identifier id'>pos</span> <span class='assign token'>=</span> <span class='Pos constant id'>Pos</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='v identifier id'>v</span><span class='rparen token'>)</span>
654
+ <span class='@@pos_table ivar id'>@@pos_table</span><span class='lbrack token'>[</span><span class='k identifier id'>k</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='pos identifier id'>pos</span>
655
+ <span class='end end kw'>end</span>
414
656
  <span class='end end kw'>end</span>
415
657
  <span class='end end kw'>end</span>
416
658
  </pre>
@@ -424,7 +666,7 @@
424
666
  </div>
425
667
 
426
668
  <div id="footer">
427
- Generated on Tue Aug 17 16:13:28 2010 by
669
+ Generated on Wed Aug 18 22:12:45 2010 by
428
670
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool">yard</a>
429
671
  0.5.8 (ruby-1.8.7).
430
672
  </div>