openpayu 0.0.2 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/README.md +26 -21
- data/doc/EmptyResponseError.html +4 -4
- data/doc/HttpStatusException.html +4 -4
- data/doc/NotImplementedException.html +4 -4
- data/doc/OpenPayU.html +13 -13
- data/doc/OpenPayU/Configuration.html +19 -17
- data/doc/OpenPayU/Connection.html +35 -43
- data/doc/OpenPayU/Document.html +24 -228
- data/doc/OpenPayU/Documents.html +4 -4
- data/doc/OpenPayU/Documents/Request.html +5 -5
- data/doc/OpenPayU/Documents/Response.html +72 -120
- data/doc/OpenPayU/Models.html +5 -5
- data/doc/OpenPayU/Models/Address.html +5 -6
- data/doc/OpenPayU/Models/Buyer.html +5 -6
- data/doc/OpenPayU/Models/Buyer/Delivery.html +5 -6
- data/doc/OpenPayU/Models/Card.html +5 -6
- data/doc/OpenPayU/Models/Fee.html +5 -6
- data/doc/OpenPayU/Models/Model.html +122 -207
- data/doc/OpenPayU/Models/NotifyResponse.html +5 -6
- data/doc/OpenPayU/Models/Order.html +8 -9
- data/doc/OpenPayU/Models/PayMethod.html +5 -6
- data/doc/OpenPayU/Models/Product.html +5 -6
- data/doc/OpenPayU/Models/Refund.html +13 -102
- data/doc/OpenPayU/Models/ShippingMethod.html +13 -14
- data/doc/OpenPayU/Models/StatusUpdate.html +5 -6
- data/doc/OpenPayU/Models/Token.html +5 -6
- data/doc/OpenPayU/Order.html +53 -89
- data/doc/OpenPayU/Refund.html +6 -18
- data/doc/OpenPayU/Token.html +4 -4
- data/doc/WrongConfigurationError.html +4 -4
- data/doc/WrongNotifyRequest.html +4 -4
- data/doc/WrongOrderParameters.html +4 -4
- data/doc/WrongSignatureException.html +4 -4
- data/doc/_index.html +13 -31
- data/doc/class_list.html +1 -1
- data/doc/css/style.css +2 -1
- data/doc/file.README.html +38 -30
- data/doc/frames.html +1 -1
- data/doc/index.html +38 -30
- data/doc/js/app.js +7 -2
- data/doc/method_list.html +78 -120
- data/doc/top-level-namespace.html +4 -4
- data/lib/openpayu.rb +0 -1
- data/lib/openpayu/configuration.rb +1 -0
- data/lib/openpayu/connection.rb +28 -19
- data/lib/openpayu/document.rb +2 -38
- data/lib/openpayu/documents/response.rb +9 -20
- data/lib/openpayu/models/model.rb +4 -25
- data/lib/openpayu/models/order.rb +0 -1
- data/lib/openpayu/models/refund.rb +5 -27
- data/lib/openpayu/models/shipping_method.rb +2 -2
- data/lib/openpayu/order.rb +7 -25
- data/lib/openpayu/refund.rb +1 -7
- data/lib/openpayu/version.rb +1 -1
- data/openpayu_ruby.gemspec +0 -4
- data/spec/cassettes/cancel_order.yml +17 -26
- data/spec/cassettes/create_order.yml +19 -29
- data/spec/cassettes/retrieve_order.yml +18 -27
- data/spec/cassettes/update_order.yml +19 -28
- data/spec/integration/order_spec.rb +65 -78
- data/spec/openpayu.yml +2 -2
- data/spec/spec_helper.rb +5 -5
- data/spec/test_objects/order.rb +31 -56
- data/spec/unit/configuration_spec.rb +1 -1
- data/spec/unit/models/order_spec.rb +4 -34
- data/spec/unit/openpayu_spec.rb +2 -5
- metadata +55 -87
- data/lib/openpayu/xml_builder.rb +0 -23
- data/spec/cassettes/refund_order.yml +0 -100
data/doc/OpenPayU/Document.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: OpenPayU::Document
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.7.
|
9
|
+
— Documentation by YARD 0.8.7.4
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -17,7 +17,7 @@
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
18
18
|
hasFrames = window.top.frames.main ? true : false;
|
19
19
|
relpath = '../';
|
20
|
-
framesUrl = "../frames.html#!"
|
20
|
+
framesUrl = "../frames.html#!OpenPayU/Document.html";
|
21
21
|
</script>
|
22
22
|
|
23
23
|
|
@@ -179,50 +179,6 @@
|
|
179
179
|
|
180
180
|
|
181
181
|
|
182
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
183
|
-
|
184
|
-
</li>
|
185
|
-
|
186
|
-
|
187
|
-
<li class="public ">
|
188
|
-
<span class="summary_signature">
|
189
|
-
|
190
|
-
<a href="#get_signature-instance_method" title="#get_signature (instance method)">- (Object) <strong>get_signature</strong> </a>
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
</span>
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
205
|
-
|
206
|
-
</li>
|
207
|
-
|
208
|
-
|
209
|
-
<li class="public ">
|
210
|
-
<span class="summary_signature">
|
211
|
-
|
212
|
-
<a href="#parse_signature-instance_method" title="#parse_signature (instance method)">- (Object) <strong>parse_signature</strong> </a>
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
</span>
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
182
|
<span class="summary_desc"><div class='inline'></div></span>
|
227
183
|
|
228
184
|
</li>
|
@@ -267,28 +223,6 @@
|
|
267
223
|
|
268
224
|
|
269
225
|
|
270
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
271
|
-
|
272
|
-
</li>
|
273
|
-
|
274
|
-
|
275
|
-
<li class="public ">
|
276
|
-
<span class="summary_signature">
|
277
|
-
|
278
|
-
<a href="#verify_signature-instance_method" title="#verify_signature (instance method)">- (Object) <strong>verify_signature</strong>(message) </a>
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
</span>
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
226
|
<span class="summary_desc"><div class='inline'></div></span>
|
293
227
|
|
294
228
|
</li>
|
@@ -318,21 +252,21 @@
|
|
318
252
|
<pre class="lines">
|
319
253
|
|
320
254
|
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
255
|
+
54
|
256
|
+
55
|
257
|
+
56
|
258
|
+
57
|
259
|
+
58
|
260
|
+
59
|
261
|
+
60
|
262
|
+
61
|
263
|
+
62
|
264
|
+
63
|
265
|
+
64
|
266
|
+
65</pre>
|
333
267
|
</td>
|
334
268
|
<td>
|
335
|
-
<pre class="code"><span class="info file"># File 'lib/openpayu/document.rb', line
|
269
|
+
<pre class="code"><span class="info file"># File 'lib/openpayu/document.rb', line 54</span>
|
336
270
|
|
337
271
|
<span class='kw'>def</span> <span class='id identifier rubyid_deep_transform_keys'>deep_transform_keys</span><span class='lparen'>(</span><span class='id identifier rubyid_hash'>hash</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
338
272
|
<span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
@@ -469,84 +403,6 @@
|
|
469
403
|
</td>
|
470
404
|
</tr>
|
471
405
|
</table>
|
472
|
-
</div>
|
473
|
-
|
474
|
-
<div class="method_details ">
|
475
|
-
<h3 class="signature " id="get_signature-instance_method">
|
476
|
-
|
477
|
-
- (<tt>Object</tt>) <strong>get_signature</strong>
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
</h3><table class="source_code">
|
484
|
-
<tr>
|
485
|
-
<td>
|
486
|
-
<pre class="lines">
|
487
|
-
|
488
|
-
|
489
|
-
78
|
490
|
-
79
|
491
|
-
80
|
492
|
-
81
|
493
|
-
82
|
494
|
-
83
|
495
|
-
84</pre>
|
496
|
-
</td>
|
497
|
-
<td>
|
498
|
-
<pre class="code"><span class="info file"># File 'lib/openpayu/document.rb', line 78</span>
|
499
|
-
|
500
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_get_signature'>get_signature</span>
|
501
|
-
<span class='ivar'>@response</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>X-OpenPayU-Signature</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>||</span>
|
502
|
-
<span class='ivar'>@response</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>x-openpayu-signature</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>||</span>
|
503
|
-
<span class='ivar'>@response</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>openpayu-signature</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>||</span>
|
504
|
-
<span class='ivar'>@response</span><span class='period'>.</span><span class='id identifier rubyid_headers'>headers</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>x-openpayu-signature</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>||</span>
|
505
|
-
<span class='ivar'>@response</span><span class='period'>.</span><span class='id identifier rubyid_headers'>headers</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>openpayu-signature</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
|
506
|
-
<span class='kw'>end</span></pre>
|
507
|
-
</td>
|
508
|
-
</tr>
|
509
|
-
</table>
|
510
|
-
</div>
|
511
|
-
|
512
|
-
<div class="method_details ">
|
513
|
-
<h3 class="signature " id="parse_signature-instance_method">
|
514
|
-
|
515
|
-
- (<tt>Object</tt>) <strong>parse_signature</strong>
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
</h3><table class="source_code">
|
522
|
-
<tr>
|
523
|
-
<td>
|
524
|
-
<pre class="lines">
|
525
|
-
|
526
|
-
|
527
|
-
69
|
528
|
-
70
|
529
|
-
71
|
530
|
-
72
|
531
|
-
73
|
532
|
-
74
|
533
|
-
75
|
534
|
-
76</pre>
|
535
|
-
</td>
|
536
|
-
<td>
|
537
|
-
<pre class="code"><span class="info file"># File 'lib/openpayu/document.rb', line 69</span>
|
538
|
-
|
539
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_parse_signature'>parse_signature</span>
|
540
|
-
<span class='id identifier rubyid_parameters'>parameters</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
541
|
-
<span class='id identifier rubyid_get_signature'>get_signature</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>;</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_parameter'>parameter</span><span class='op'>|</span>
|
542
|
-
<span class='id identifier rubyid_k'>k</span><span class='comma'>,</span> <span class='id identifier rubyid_v'>v</span> <span class='op'>=</span> <span class='id identifier rubyid_parameter'>parameter</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>=</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
543
|
-
<span class='id identifier rubyid_parameters'>parameters</span><span class='lbracket'>[</span><span class='id identifier rubyid_k'>k</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_v'>v</span>
|
544
|
-
<span class='kw'>end</span>
|
545
|
-
<span class='id identifier rubyid_parameters'>parameters</span>
|
546
|
-
<span class='kw'>end</span></pre>
|
547
|
-
</td>
|
548
|
-
</tr>
|
549
|
-
</table>
|
550
406
|
</div>
|
551
407
|
|
552
408
|
<div class="method_details ">
|
@@ -564,12 +420,12 @@
|
|
564
420
|
<pre class="lines">
|
565
421
|
|
566
422
|
|
567
|
-
|
568
|
-
|
569
|
-
|
423
|
+
50
|
424
|
+
51
|
425
|
+
52</pre>
|
570
426
|
</td>
|
571
427
|
<td>
|
572
|
-
<pre class="code"><span class="info file"># File 'lib/openpayu/document.rb', line
|
428
|
+
<pre class="code"><span class="info file"># File 'lib/openpayu/document.rb', line 50</span>
|
573
429
|
|
574
430
|
<span class='kw'>def</span> <span class='id identifier rubyid_underscore_keys'>underscore_keys</span><span class='lparen'>(</span><span class='id identifier rubyid_hash'>hash</span><span class='rparen'>)</span>
|
575
431
|
<span class='id identifier rubyid_deep_transform_keys'>deep_transform_keys</span><span class='lparen'>(</span><span class='id identifier rubyid_hash'>hash</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_key'>key</span><span class='op'>|</span> <span class='id identifier rubyid_key'>key</span><span class='period'>.</span><span class='id identifier rubyid_underscore'>underscore</span> <span class='rbrace'>}</span>
|
@@ -607,8 +463,7 @@
|
|
607
463
|
45
|
608
464
|
46
|
609
465
|
47
|
610
|
-
48
|
611
|
-
49</pre>
|
466
|
+
48</pre>
|
612
467
|
</td>
|
613
468
|
<td>
|
614
469
|
<pre class="code"><span class="info file"># File 'lib/openpayu/document.rb', line 35</span>
|
@@ -618,9 +473,8 @@
|
|
618
473
|
<span class='id identifier rubyid_raise'>raise</span> <span class='const'>EmptyResponseError</span><span class='comma'>,</span>
|
619
474
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Got empty response from request: </span><span class='embexpr_beg'>#{</span><span class='ivar'>@request</span><span class='period'>.</span><span class='id identifier rubyid_try'>try</span><span class='lparen'>(</span><span class='symbol'>:body</span><span class='rparen'>)</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span>
|
620
475
|
<span class='kw'>end</span>
|
621
|
-
<span class='kw'>if</span> <span class='lparen'>(</span
|
622
|
-
|
623
|
-
<span class='id identifier rubyid_verify_signature'>verify_signature</span><span class='lparen'>(</span><span class='ivar'>@body</span><span class='rparen'>)</span>
|
476
|
+
<span class='kw'>if</span> <span class='lparen'>(</span> <span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>OpenPayU</span><span class='op'>::</span><span class='const'>Documents</span><span class='op'>::</span><span class='const'>Request</span><span class='rparen'>)</span> <span class='op'>||</span>
|
477
|
+
<span class='qwords_beg'>%w(</span><span class='tstring_content'>200</span><span class='words_sep'> </span><span class='tstring_content'>201</span><span class='words_sep'> </span><span class='tstring_content'>422</span><span class='words_sep'> </span><span class='tstring_content'>302</span><span class='words_sep'>)</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_code'>code</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
624
478
|
<span class='kw'>true</span>
|
625
479
|
<span class='kw'>else</span>
|
626
480
|
<span class='id identifier rubyid_raise'>raise</span> <span class='const'>HttpStatusException</span><span class='comma'>,</span>
|
@@ -631,64 +485,6 @@
|
|
631
485
|
</td>
|
632
486
|
</tr>
|
633
487
|
</table>
|
634
|
-
</div>
|
635
|
-
|
636
|
-
<div class="method_details ">
|
637
|
-
<h3 class="signature " id="verify_signature-instance_method">
|
638
|
-
|
639
|
-
- (<tt>Object</tt>) <strong>verify_signature</strong>(message)
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
</h3><table class="source_code">
|
646
|
-
<tr>
|
647
|
-
<td>
|
648
|
-
<pre class="lines">
|
649
|
-
|
650
|
-
|
651
|
-
51
|
652
|
-
52
|
653
|
-
53
|
654
|
-
54
|
655
|
-
55
|
656
|
-
56
|
657
|
-
57
|
658
|
-
58
|
659
|
-
59
|
660
|
-
60
|
661
|
-
61
|
662
|
-
62
|
663
|
-
63
|
664
|
-
64
|
665
|
-
65
|
666
|
-
66
|
667
|
-
67</pre>
|
668
|
-
</td>
|
669
|
-
<td>
|
670
|
-
<pre class="code"><span class="info file"># File 'lib/openpayu/document.rb', line 51</span>
|
671
|
-
|
672
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_verify_signature'>verify_signature</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='rparen'>)</span>
|
673
|
-
<span class='id identifier rubyid_signature'>signature</span> <span class='op'>=</span> <span class='id identifier rubyid_parse_signature'>parse_signature</span>
|
674
|
-
<span class='id identifier rubyid_generated_signature'>generated_signature</span> <span class='op'>=</span> <span class='id identifier rubyid_generate_signature'>generate_signature</span><span class='lparen'>(</span>
|
675
|
-
<span class='id identifier rubyid_message'>message</span><span class='comma'>,</span>
|
676
|
-
<span class='id identifier rubyid_signature'>signature</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>algorithm</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
|
677
|
-
<span class='const'>OpenPayU</span><span class='op'>::</span><span class='const'>Configuration</span><span class='period'>.</span><span class='id identifier rubyid_signature_key'>signature_key</span>
|
678
|
-
<span class='rparen'>)</span>
|
679
|
-
<span class='kw'>if</span> <span class='id identifier rubyid_generated_signature'>generated_signature</span> <span class='op'>==</span> <span class='id identifier rubyid_signature'>signature</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>signature</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
|
680
|
-
<span class='kw'>true</span>
|
681
|
-
<span class='kw'>else</span>
|
682
|
-
<span class='id identifier rubyid_raise'>raise</span> <span class='const'>WrongSignatureException</span><span class='comma'>,</span>
|
683
|
-
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Invalid signature: Got message signed with:
|
684
|
-
</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_signature'>signature</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>signature</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span><span class='rbrace'>}</span><span class='tstring_content'>. Generated signature:
|
685
|
-
</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_generated_signature'>generated_signature</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span>
|
686
|
-
<span class='kw'>end</span>
|
687
|
-
|
688
|
-
<span class='kw'>end</span></pre>
|
689
|
-
</td>
|
690
|
-
</tr>
|
691
|
-
</table>
|
692
488
|
</div>
|
693
489
|
|
694
490
|
</div>
|
@@ -696,9 +492,9 @@
|
|
696
492
|
</div>
|
697
493
|
|
698
494
|
<div id="footer">
|
699
|
-
Generated on
|
495
|
+
Generated on Thu May 29 15:13:58 2014 by
|
700
496
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
701
|
-
0.8.7.
|
497
|
+
0.8.7.4 (ruby-1.9.3).
|
702
498
|
</div>
|
703
499
|
|
704
500
|
</body>
|
data/doc/OpenPayU/Documents.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Module: OpenPayU::Documents
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.7.
|
9
|
+
— Documentation by YARD 0.8.7.4
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -17,7 +17,7 @@
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
18
18
|
hasFrames = window.top.frames.main ? true : false;
|
19
19
|
relpath = '../';
|
20
|
-
framesUrl = "../frames.html#!"
|
20
|
+
framesUrl = "../frames.html#!OpenPayU/Documents.html";
|
21
21
|
</script>
|
22
22
|
|
23
23
|
|
@@ -108,9 +108,9 @@
|
|
108
108
|
</div>
|
109
109
|
|
110
110
|
<div id="footer">
|
111
|
-
Generated on
|
111
|
+
Generated on Thu May 29 15:13:57 2014 by
|
112
112
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
113
|
-
0.8.7.
|
113
|
+
0.8.7.4 (ruby-1.9.3).
|
114
114
|
</div>
|
115
115
|
|
116
116
|
</body>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: OpenPayU::Documents::Request
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.7.
|
9
|
+
— Documentation by YARD 0.8.7.4
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -17,7 +17,7 @@
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
18
18
|
hasFrames = window.top.frames.main ? true : false;
|
19
19
|
relpath = '../../';
|
20
|
-
framesUrl = "../../frames.html#!"
|
20
|
+
framesUrl = "../../frames.html#!OpenPayU/Documents/Request.html";
|
21
21
|
</script>
|
22
22
|
|
23
23
|
|
@@ -258,7 +258,7 @@
|
|
258
258
|
|
259
259
|
|
260
260
|
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="../Document.html" title="OpenPayU::Document (class)">OpenPayU::Document</a></span></h3>
|
261
|
-
<p class="inherited"><span class='object_link'><a href="../Document.html#deep_transform_keys-instance_method" title="OpenPayU::Document#deep_transform_keys (method)">#deep_transform_keys</a></span>, <span class='object_link'><a href="../Document.html#generate_signature-instance_method" title="OpenPayU::Document#generate_signature (method)">#generate_signature</a></span>, <span class='object_link'><a href="../Document.html#generate_signature_structure-instance_method" title="OpenPayU::Document#generate_signature_structure (method)">#generate_signature_structure</a></span>, <span class='object_link'><a href="../Document.html#
|
261
|
+
<p class="inherited"><span class='object_link'><a href="../Document.html#deep_transform_keys-instance_method" title="OpenPayU::Document#deep_transform_keys (method)">#deep_transform_keys</a></span>, <span class='object_link'><a href="../Document.html#generate_signature-instance_method" title="OpenPayU::Document#generate_signature (method)">#generate_signature</a></span>, <span class='object_link'><a href="../Document.html#generate_signature_structure-instance_method" title="OpenPayU::Document#generate_signature_structure (method)">#generate_signature_structure</a></span>, <span class='object_link'><a href="../Document.html#underscore_keys-instance_method" title="OpenPayU::Document#underscore_keys (method)">#underscore_keys</a></span>, <span class='object_link'><a href="../Document.html#verify_response-instance_method" title="OpenPayU::Document#verify_response (method)">#verify_response</a></span></p>
|
262
262
|
<div id="constructor_details" class="method_details_list">
|
263
263
|
<h2>Constructor Details</h2>
|
264
264
|
|
@@ -494,9 +494,9 @@
|
|
494
494
|
</div>
|
495
495
|
|
496
496
|
<div id="footer">
|
497
|
-
Generated on
|
497
|
+
Generated on Thu May 29 15:14:00 2014 by
|
498
498
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
499
|
-
0.8.7.
|
499
|
+
0.8.7.4 (ruby-1.9.3).
|
500
500
|
</div>
|
501
501
|
|
502
502
|
</body>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: OpenPayU::Documents::Response
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.7.
|
9
|
+
— Documentation by YARD 0.8.7.4
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -17,7 +17,7 @@
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
18
18
|
hasFrames = window.top.frames.main ? true : false;
|
19
19
|
relpath = '../../';
|
20
|
-
framesUrl = "../../frames.html#!"
|
20
|
+
framesUrl = "../../frames.html#!OpenPayU/Documents/Response.html";
|
21
21
|
</script>
|
22
22
|
|
23
23
|
|
@@ -132,33 +132,6 @@
|
|
132
132
|
<p>Returns the value of attribute body.</p>
|
133
133
|
</div></span>
|
134
134
|
|
135
|
-
</li>
|
136
|
-
|
137
|
-
|
138
|
-
<li class="public ">
|
139
|
-
<span class="summary_signature">
|
140
|
-
|
141
|
-
<a href="#message_name-instance_method" title="#message_name (instance method)">- (Object) <strong>message_name</strong> </a>
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
</span>
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
<span class="summary_desc"><div class='inline'>
|
159
|
-
<p>Returns the value of attribute message_name.</p>
|
160
|
-
</div></span>
|
161
|
-
|
162
135
|
</li>
|
163
136
|
|
164
137
|
|
@@ -259,7 +232,7 @@
|
|
259
232
|
<li class="public ">
|
260
233
|
<span class="summary_signature">
|
261
234
|
|
262
|
-
<a href="#initialize-instance_method" title="#initialize (instance method)">- (Response) <strong>initialize</strong>(data
|
235
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (Response) <strong>initialize</strong>(data) </a>
|
263
236
|
|
264
237
|
|
265
238
|
|
@@ -343,6 +316,28 @@
|
|
343
316
|
|
344
317
|
|
345
318
|
|
319
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
320
|
+
|
321
|
+
</li>
|
322
|
+
|
323
|
+
|
324
|
+
<li class="public ">
|
325
|
+
<span class="summary_signature">
|
326
|
+
|
327
|
+
<a href="#status-instance_method" title="#status (instance method)">- (Object) <strong>status</strong> </a>
|
328
|
+
|
329
|
+
|
330
|
+
|
331
|
+
</span>
|
332
|
+
|
333
|
+
|
334
|
+
|
335
|
+
|
336
|
+
|
337
|
+
|
338
|
+
|
339
|
+
|
340
|
+
|
346
341
|
<span class="summary_desc"><div class='inline'></div></span>
|
347
342
|
|
348
343
|
</li>
|
@@ -361,14 +356,14 @@
|
|
361
356
|
|
362
357
|
|
363
358
|
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="../Document.html" title="OpenPayU::Document (class)">OpenPayU::Document</a></span></h3>
|
364
|
-
<p class="inherited"><span class='object_link'><a href="../Document.html#deep_transform_keys-instance_method" title="OpenPayU::Document#deep_transform_keys (method)">#deep_transform_keys</a></span>, <span class='object_link'><a href="../Document.html#generate_signature-instance_method" title="OpenPayU::Document#generate_signature (method)">#generate_signature</a></span>, <span class='object_link'><a href="../Document.html#generate_signature_structure-instance_method" title="OpenPayU::Document#generate_signature_structure (method)">#generate_signature_structure</a></span>, <span class='object_link'><a href="../Document.html#
|
359
|
+
<p class="inherited"><span class='object_link'><a href="../Document.html#deep_transform_keys-instance_method" title="OpenPayU::Document#deep_transform_keys (method)">#deep_transform_keys</a></span>, <span class='object_link'><a href="../Document.html#generate_signature-instance_method" title="OpenPayU::Document#generate_signature (method)">#generate_signature</a></span>, <span class='object_link'><a href="../Document.html#generate_signature_structure-instance_method" title="OpenPayU::Document#generate_signature_structure (method)">#generate_signature_structure</a></span>, <span class='object_link'><a href="../Document.html#underscore_keys-instance_method" title="OpenPayU::Document#underscore_keys (method)">#underscore_keys</a></span>, <span class='object_link'><a href="../Document.html#verify_response-instance_method" title="OpenPayU::Document#verify_response (method)">#verify_response</a></span></p>
|
365
360
|
<div id="constructor_details" class="method_details_list">
|
366
361
|
<h2>Constructor Details</h2>
|
367
362
|
|
368
363
|
<div class="method_details first">
|
369
364
|
<h3 class="signature first" id="initialize-instance_method">
|
370
365
|
|
371
|
-
- (<tt><span class='object_link'><a href="" title="OpenPayU::Documents::Response (class)">Response</a></span></tt>) <strong>initialize</strong>(data
|
366
|
+
- (<tt><span class='object_link'><a href="" title="OpenPayU::Documents::Response (class)">Response</a></span></tt>) <strong>initialize</strong>(data)
|
372
367
|
|
373
368
|
|
374
369
|
|
@@ -397,16 +392,14 @@
|
|
397
392
|
10
|
398
393
|
11
|
399
394
|
12
|
400
|
-
13
|
401
|
-
14</pre>
|
395
|
+
13</pre>
|
402
396
|
</td>
|
403
397
|
<td>
|
404
398
|
<pre class="code"><span class="info file"># File 'lib/openpayu/documents/response.rb', line 7</span>
|
405
399
|
|
406
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='
|
400
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span>
|
407
401
|
<span class='ivar'>@response</span> <span class='op'>=</span> <span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='symbol'>:response</span><span class='rbracket'>]</span>
|
408
402
|
<span class='ivar'>@request</span> <span class='op'>=</span> <span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='symbol'>:request</span><span class='rbracket'>]</span>
|
409
|
-
<span class='ivar'>@message_name</span> <span class='op'>=</span> <span class='id identifier rubyid_message_name'>message_name</span>
|
410
403
|
<span class='ivar'>@body</span> <span class='op'>=</span> <span class='ivar'>@response</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>StringIO</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='ivar'>@response</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span><span class='period'>.</span><span class='id identifier rubyid_string'>string</span> <span class='op'>:</span>
|
411
404
|
<span class='ivar'>@response</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span>
|
412
405
|
<span class='id identifier rubyid_parse_data'>parse_data</span> <span class='kw'>if</span> <span class='id identifier rubyid_verify_response'>verify_response</span>
|
@@ -439,12 +432,12 @@
|
|
439
432
|
<pre class="lines">
|
440
433
|
|
441
434
|
|
435
|
+
15
|
442
436
|
16
|
443
|
-
17
|
444
|
-
18</pre>
|
437
|
+
17</pre>
|
445
438
|
</td>
|
446
439
|
<td>
|
447
|
-
<pre class="code"><span class="info file"># File 'lib/openpayu/documents/response.rb', line
|
440
|
+
<pre class="code"><span class="info file"># File 'lib/openpayu/documents/response.rb', line 15</span>
|
448
441
|
|
449
442
|
<span class='kw'>def</span> <span class='id identifier rubyid_method_missing'>method_missing</span><span class='lparen'>(</span><span class='id identifier rubyid_method_name'>method_name</span><span class='rparen'>)</span>
|
450
443
|
<span class='ivar'>@parsed_data</span><span class='lbracket'>[</span><span class='id identifier rubyid_method_name'>method_name</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rbracket'>]</span>
|
@@ -503,49 +496,6 @@
|
|
503
496
|
</div>
|
504
497
|
|
505
498
|
|
506
|
-
<span id="message_name=-instance_method"></span>
|
507
|
-
<div class="method_details ">
|
508
|
-
<h3 class="signature " id="message_name-instance_method">
|
509
|
-
|
510
|
-
- (<tt>Object</tt>) <strong>message_name</strong>
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
</h3><div class="docstring">
|
517
|
-
<div class="discussion">
|
518
|
-
|
519
|
-
<p>Returns the value of attribute message_name</p>
|
520
|
-
|
521
|
-
|
522
|
-
</div>
|
523
|
-
</div>
|
524
|
-
<div class="tags">
|
525
|
-
|
526
|
-
|
527
|
-
</div><table class="source_code">
|
528
|
-
<tr>
|
529
|
-
<td>
|
530
|
-
<pre class="lines">
|
531
|
-
|
532
|
-
|
533
|
-
5
|
534
|
-
6
|
535
|
-
7</pre>
|
536
|
-
</td>
|
537
|
-
<td>
|
538
|
-
<pre class="code"><span class="info file"># File 'lib/openpayu/documents/response.rb', line 5</span>
|
539
|
-
|
540
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_message_name'>message_name</span>
|
541
|
-
<span class='ivar'>@message_name</span>
|
542
|
-
<span class='kw'>end</span></pre>
|
543
|
-
</td>
|
544
|
-
</tr>
|
545
|
-
</table>
|
546
|
-
</div>
|
547
|
-
|
548
|
-
|
549
499
|
<span id="parsed_data=-instance_method"></span>
|
550
500
|
<div class="method_details ">
|
551
501
|
<h3 class="signature " id="parsed_data-instance_method">
|
@@ -696,23 +646,15 @@
|
|
696
646
|
<pre class="lines">
|
697
647
|
|
698
648
|
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
37
|
703
|
-
38
|
704
|
-
39
|
705
|
-
40</pre>
|
649
|
+
27
|
650
|
+
28
|
651
|
+
29</pre>
|
706
652
|
</td>
|
707
653
|
<td>
|
708
|
-
<pre class="code"><span class="info file"># File 'lib/openpayu/documents/response.rb', line
|
654
|
+
<pre class="code"><span class="info file"># File 'lib/openpayu/documents/response.rb', line 27</span>
|
709
655
|
|
710
656
|
<span class='kw'>def</span> <span class='id identifier rubyid_order_status'>order_status</span>
|
711
|
-
<span class='
|
712
|
-
<span class='ivar'>@parsed_data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>orders</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>order</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>status</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
|
713
|
-
<span class='kw'>else</span>
|
714
|
-
<span class='ivar'>@parsed_data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>order</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>?</span> <span class='ivar'>@parsed_data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>order</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>status</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span>
|
715
|
-
<span class='kw'>end</span>
|
657
|
+
<span class='ivar'>@parsed_data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>orders</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>orders</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>status</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
|
716
658
|
<span class='kw'>end</span></pre>
|
717
659
|
</td>
|
718
660
|
</tr>
|
@@ -734,35 +676,45 @@
|
|
734
676
|
<pre class="lines">
|
735
677
|
|
736
678
|
|
679
|
+
19
|
737
680
|
20
|
738
|
-
21
|
739
|
-
|
681
|
+
21</pre>
|
682
|
+
</td>
|
683
|
+
<td>
|
684
|
+
<pre class="code"><span class="info file"># File 'lib/openpayu/documents/response.rb', line 19</span>
|
685
|
+
|
686
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_parse_data'>parse_data</span>
|
687
|
+
<span class='ivar'>@parsed_data</span> <span class='op'>=</span> <span class='id identifier rubyid_underscore_keys'>underscore_keys</span> <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='ivar'>@body</span><span class='rparen'>)</span>
|
688
|
+
<span class='kw'>end</span></pre>
|
689
|
+
</td>
|
690
|
+
</tr>
|
691
|
+
</table>
|
692
|
+
</div>
|
693
|
+
|
694
|
+
<div class="method_details ">
|
695
|
+
<h3 class="signature " id="status-instance_method">
|
696
|
+
|
697
|
+
- (<tt>Object</tt>) <strong>status</strong>
|
698
|
+
|
699
|
+
|
700
|
+
|
701
|
+
|
702
|
+
|
703
|
+
</h3><table class="source_code">
|
704
|
+
<tr>
|
705
|
+
<td>
|
706
|
+
<pre class="lines">
|
707
|
+
|
708
|
+
|
740
709
|
23
|
741
710
|
24
|
742
|
-
25
|
743
|
-
26
|
744
|
-
27
|
745
|
-
28
|
746
|
-
29
|
747
|
-
30
|
748
|
-
31
|
749
|
-
32</pre>
|
711
|
+
25</pre>
|
750
712
|
</td>
|
751
713
|
<td>
|
752
|
-
<pre class="code"><span class="info file"># File 'lib/openpayu/documents/response.rb', line
|
714
|
+
<pre class="code"><span class="info file"># File 'lib/openpayu/documents/response.rb', line 23</span>
|
753
715
|
|
754
|
-
<span class='kw'>def</span> <span class='id identifier
|
755
|
-
<span class='
|
756
|
-
<span class='ivar'>@parsed_data</span> <span class='op'>=</span> <span class='const'>Hash</span><span class='period'>.</span><span class='id identifier rubyid_from_xml'>from_xml</span><span class='lparen'>(</span><span class='ivar'>@body</span><span class='rparen'>)</span>
|
757
|
-
<span class='kw'>else</span>
|
758
|
-
<span class='ivar'>@parsed_data</span> <span class='op'>=</span> <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='ivar'>@body</span><span class='rparen'>)</span>
|
759
|
-
<span class='kw'>end</span>
|
760
|
-
<span class='kw'>if</span> <span class='ivar'>@parsed_data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>OpenPayU</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>&&</span> <span class='ivar'>@parsed_data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>OpenPayU</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='ivar'>@message_name</span><span class='rbracket'>]</span>
|
761
|
-
<span class='ivar'>@parsed_data</span> <span class='op'>=</span> <span class='id identifier rubyid_underscore_keys'>underscore_keys</span> <span class='ivar'>@parsed_data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>OpenPayU</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='ivar'>@message_name</span><span class='rbracket'>]</span>
|
762
|
-
<span class='kw'>elsif</span> <span class='ivar'>@parsed_data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>OpenPayU</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
|
763
|
-
<span class='ivar'>@parsed_data</span> <span class='op'>=</span> <span class='id identifier rubyid_underscore_keys'>underscore_keys</span> <span class='ivar'>@parsed_data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>OpenPayU</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
|
764
|
-
<span class='kw'>end</span>
|
765
|
-
<span class='ivar'>@parsed_data</span>
|
716
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_status'>status</span>
|
717
|
+
<span class='ivar'>@parsed_data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>status</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
|
766
718
|
<span class='kw'>end</span></pre>
|
767
719
|
</td>
|
768
720
|
</tr>
|
@@ -774,9 +726,9 @@
|
|
774
726
|
</div>
|
775
727
|
|
776
728
|
<div id="footer">
|
777
|
-
Generated on
|
729
|
+
Generated on Thu May 29 15:14:00 2014 by
|
778
730
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
779
|
-
0.8.7.
|
731
|
+
0.8.7.4 (ruby-1.9.3).
|
780
732
|
</div>
|
781
733
|
|
782
734
|
</body>
|