zarinpal 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +16 -0
  3. data/.rspec +2 -0
  4. data/Gemfile +4 -0
  5. data/Guardfile +24 -0
  6. data/LICENSE.txt +22 -0
  7. data/README.md +29 -0
  8. data/Rakefile +1 -0
  9. data/doc/Zarinpal.html +338 -0
  10. data/doc/Zarinpal/Configuration.html +445 -0
  11. data/doc/Zarinpal/Errors.html +149 -0
  12. data/doc/Zarinpal/PaymentRequest.html +805 -0
  13. data/doc/Zarinpal/PaymentVerification.html +540 -0
  14. data/doc/Zarinpal/Response.html +669 -0
  15. data/doc/Zarinpal/Response/ResponseError.html +123 -0
  16. data/doc/_index.html +184 -0
  17. data/doc/class_list.html +54 -0
  18. data/doc/css/common.css +1 -0
  19. data/doc/css/full_list.css +57 -0
  20. data/doc/css/style.css +338 -0
  21. data/doc/doc/_index.html +88 -0
  22. data/doc/doc/class_list.html +54 -0
  23. data/doc/doc/css/common.css +1 -0
  24. data/doc/doc/css/full_list.css +57 -0
  25. data/doc/doc/css/style.css +338 -0
  26. data/doc/doc/file_list.html +53 -0
  27. data/doc/doc/frames.html +26 -0
  28. data/doc/doc/index.html +88 -0
  29. data/doc/doc/js/app.js +214 -0
  30. data/doc/doc/js/full_list.js +178 -0
  31. data/doc/doc/js/jquery.js +4 -0
  32. data/doc/doc/method_list.html +53 -0
  33. data/doc/doc/top-level-namespace.html +102 -0
  34. data/doc/file.README.html +105 -0
  35. data/doc/file_list.html +56 -0
  36. data/doc/frames.html +26 -0
  37. data/doc/index.html +105 -0
  38. data/doc/js/app.js +214 -0
  39. data/doc/js/full_list.js +178 -0
  40. data/doc/js/jquery.js +4 -0
  41. data/doc/method_list.html +191 -0
  42. data/doc/top-level-namespace.html +112 -0
  43. data/lib/zarinpal.rb +37 -0
  44. data/lib/zarinpal/errors.rb +17 -0
  45. data/lib/zarinpal/payment_request.rb +44 -0
  46. data/lib/zarinpal/payment_verification.rb +34 -0
  47. data/lib/zarinpal/response.rb +50 -0
  48. data/lib/zarinpal/version.rb +3 -0
  49. data/spec/lib/configuration_spec.rb +18 -0
  50. data/spec/lib/errors_spec.rb +7 -0
  51. data/spec/lib/payment_request_spec.rb +40 -0
  52. data/spec/lib/payment_verification_spec.rb +41 -0
  53. data/spec/lib/response_spec.rb +46 -0
  54. data/spec/lib/version_spec.rb +7 -0
  55. data/spec/spec_helper.rb +20 -0
  56. data/zarinpal.gemspec +29 -0
  57. metadata +206 -0
@@ -0,0 +1,805 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Class: Zarinpal::PaymentRequest
8
+
9
+ &mdash; Documentation by YARD 0.8.7.2
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '../';
20
+ framesUrl = "../frames.html#!" + escape(window.location.href);
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="../_index.html">Index (P)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../Zarinpal.html" title="Zarinpal (module)">Zarinpal</a></span></span>
36
+ &raquo;
37
+ <span class="title">PaymentRequest</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="../class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="../method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="../file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Class: Zarinpal::PaymentRequest
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+ <dt class="r1">Inherits:</dt>
75
+ <dd class="r1">
76
+ <span class="inheritName">Object</span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next">Zarinpal::PaymentRequest</li>
82
+
83
+ </ul>
84
+ <a href="#" class="inheritanceTree">show all</a>
85
+
86
+ </dd>
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+ <dt class="r2 last">Defined in:</dt>
97
+ <dd class="r2 last">lib/zarinpal/payment_request.rb</dd>
98
+
99
+ </dl>
100
+ <div class="clear"></div>
101
+
102
+ <h2>Overview</h2><div class="docstring">
103
+ <div class="discussion">
104
+
105
+ <p>Sends a payment request to zarinpal</p>
106
+
107
+
108
+ </div>
109
+ </div>
110
+ <div class="tags">
111
+
112
+ <p class="tag_title">Returns:</p>
113
+ <ul class="return">
114
+
115
+ <li>
116
+
117
+
118
+ <span class='type'>(<tt><span class='object_link'><a href="Response.html" title="Zarinpal::Response (class)">Zarinpal::Response</a></span></tt>)</span>
119
+
120
+
121
+
122
+ </li>
123
+
124
+ </ul>
125
+
126
+ </div>
127
+
128
+
129
+
130
+ <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
131
+ <ul class="summary">
132
+
133
+ <li class="public ">
134
+ <span class="summary_signature">
135
+
136
+ <a href="#amount-instance_method" title="#amount (instance method)">- (Object) <strong>amount</strong> </a>
137
+
138
+
139
+
140
+ </span>
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+
153
+ <span class="summary_desc"><div class='inline'>
154
+ <p>Returns the value of attribute amount.</p>
155
+ </div></span>
156
+
157
+ </li>
158
+
159
+
160
+ <li class="public ">
161
+ <span class="summary_signature">
162
+
163
+ <a href="#description-instance_method" title="#description (instance method)">- (Object) <strong>description</strong> </a>
164
+
165
+
166
+
167
+ </span>
168
+
169
+
170
+
171
+
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+ <span class="summary_desc"><div class='inline'>
181
+ <p>Returns the value of attribute description.</p>
182
+ </div></span>
183
+
184
+ </li>
185
+
186
+
187
+ <li class="public ">
188
+ <span class="summary_signature">
189
+
190
+ <a href="#email-instance_method" title="#email (instance method)">- (Object) <strong>email</strong> </a>
191
+
192
+
193
+
194
+ </span>
195
+
196
+
197
+
198
+
199
+
200
+
201
+
202
+
203
+
204
+
205
+
206
+
207
+ <span class="summary_desc"><div class='inline'>
208
+ <p>Returns the value of attribute email.</p>
209
+ </div></span>
210
+
211
+ </li>
212
+
213
+
214
+ <li class="public ">
215
+ <span class="summary_signature">
216
+
217
+ <a href="#mobile-instance_method" title="#mobile (instance method)">- (Object) <strong>mobile</strong> </a>
218
+
219
+
220
+
221
+ </span>
222
+
223
+
224
+
225
+
226
+
227
+
228
+
229
+
230
+
231
+
232
+
233
+
234
+ <span class="summary_desc"><div class='inline'>
235
+ <p>Returns the value of attribute mobile.</p>
236
+ </div></span>
237
+
238
+ </li>
239
+
240
+
241
+ <li class="public ">
242
+ <span class="summary_signature">
243
+
244
+ <a href="#response-instance_method" title="#response (instance method)">- (Object) <strong>response</strong> </a>
245
+
246
+
247
+
248
+ </span>
249
+
250
+
251
+
252
+
253
+ <span class="note title readonly">readonly</span>
254
+
255
+
256
+
257
+
258
+
259
+
260
+
261
+
262
+
263
+ <span class="summary_desc"><div class='inline'>
264
+ <p>Returns the value of attribute response.</p>
265
+ </div></span>
266
+
267
+ </li>
268
+
269
+
270
+ </ul>
271
+
272
+
273
+
274
+
275
+
276
+ <h2>
277
+ Instance Method Summary
278
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
279
+ </h2>
280
+
281
+ <ul class="summary">
282
+
283
+ <li class="public ">
284
+ <span class="summary_signature">
285
+
286
+ <a href="#call-instance_method" title="#call (instance method)">- (Zarinpal::Response) <strong>call</strong> </a>
287
+
288
+
289
+
290
+ </span>
291
+
292
+
293
+
294
+
295
+
296
+
297
+
298
+
299
+
300
+ <span class="summary_desc"><div class='inline'>
301
+ <p>Sends the payment request to Zarinpal.</p>
302
+ </div></span>
303
+
304
+ </li>
305
+
306
+
307
+ <li class="public ">
308
+ <span class="summary_signature">
309
+
310
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (PaymentRequest) <strong>initialize</strong>(args = {}) </a>
311
+
312
+
313
+
314
+ </span>
315
+
316
+
317
+ <span class="note title constructor">constructor</span>
318
+
319
+
320
+
321
+
322
+
323
+
324
+
325
+
326
+ <span class="summary_desc"><div class='inline'>
327
+ <p>A new instance of PaymentRequest.</p>
328
+ </div></span>
329
+
330
+ </li>
331
+
332
+
333
+ </ul>
334
+
335
+
336
+ <div id="constructor_details" class="method_details_list">
337
+ <h2>Constructor Details</h2>
338
+
339
+ <div class="method_details first">
340
+ <h3 class="signature first" id="initialize-instance_method">
341
+
342
+ - (<tt><span class='object_link'><a href="" title="Zarinpal::PaymentRequest (class)">PaymentRequest</a></span></tt>) <strong>initialize</strong>(args = {})
343
+
344
+
345
+
346
+
347
+
348
+ </h3><div class="docstring">
349
+ <div class="discussion">
350
+
351
+ <div class="note notetag">
352
+ <strong>Note:</strong>
353
+ <div class='inline'>
354
+ <p>A hash of parameters should be send to this class</p>
355
+ </div>
356
+ </div>
357
+
358
+
359
+ <p>Returns a new instance of PaymentRequest</p>
360
+
361
+
362
+ </div>
363
+ </div>
364
+ <div class="tags">
365
+
366
+ <div class="examples">
367
+ <p class="tag_title">Examples:</p>
368
+
369
+
370
+ <pre class="example code"><code><span class='const'>PaymentRequest</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='label'>amount:</span> <span class='int'>10000</span><span class='comma'>,</span> <span class='label'>description:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>sth...</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='label'>email:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>example@example.com</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span></code></pre>
371
+
372
+ </div>
373
+ <p class="tag_title">Parameters:</p>
374
+ <ul class="param">
375
+
376
+ <li>
377
+
378
+ <span class='name'>args</span>
379
+
380
+
381
+ <span class='type'>(<tt>Hash</tt>)</span>
382
+
383
+
384
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
385
+
386
+
387
+ &mdash;
388
+ <div class='inline'>
389
+ <p>hash of params to send requests</p>
390
+ </div>
391
+
392
+ </li>
393
+
394
+ </ul>
395
+
396
+
397
+
398
+
399
+ <p class="tag_title">Options Hash (<tt>args</tt>):</p>
400
+ <ul class="option">
401
+
402
+ <li>
403
+ <span class="name">:amount</span>
404
+ <span class="type">(<tt>Integer</tt>)</span>
405
+ <span class="default">
406
+
407
+ </span>
408
+
409
+ &mdash; <div class='inline'>
410
+ <p>price of the request</p>
411
+ </div>
412
+
413
+ </li>
414
+
415
+ <li>
416
+ <span class="name">:description</span>
417
+ <span class="type">(<tt>Integer</tt>)</span>
418
+ <span class="default">
419
+
420
+ </span>
421
+
422
+ &mdash; <div class='inline'>
423
+ <p>description of transaction</p>
424
+ </div>
425
+
426
+ </li>
427
+
428
+ <li>
429
+ <span class="name">:email</span>
430
+ <span class="type">(<tt>String</tt>)</span>
431
+ <span class="default">
432
+
433
+ &mdash; default:
434
+ <tt>&#39;&#39;</tt>
435
+
436
+ </span>
437
+
438
+ &mdash; <div class='inline'>
439
+ <p>email of buyer</p>
440
+ </div>
441
+
442
+ </li>
443
+
444
+ <li>
445
+ <span class="name">:mobile</span>
446
+ <span class="type">(<tt>String</tt>)</span>
447
+ <span class="default">
448
+
449
+ &mdash; default:
450
+ <tt>&#39;&#39;</tt>
451
+
452
+ </span>
453
+
454
+ &mdash; <div class='inline'>
455
+ <p>mobile number of buyer</p>
456
+ </div>
457
+
458
+ </li>
459
+
460
+ </ul>
461
+
462
+
463
+
464
+ </div><table class="source_code">
465
+ <tr>
466
+ <td>
467
+ <pre class="lines">
468
+
469
+
470
+ 19
471
+ 20
472
+ 21
473
+ 22
474
+ 23
475
+ 24
476
+ 25
477
+ 26</pre>
478
+ </td>
479
+ <td>
480
+ <pre class="code"><span class="info file"># File 'lib/zarinpal/payment_request.rb', line 19</span>
481
+
482
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_args'>args</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
483
+ <span class='ivar'>@amount</span> <span class='op'>=</span> <span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:amount</span><span class='rparen'>)</span>
484
+ <span class='ivar'>@description</span> <span class='op'>=</span> <span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:description</span><span class='rparen'>)</span>
485
+ <span class='ivar'>@email</span> <span class='op'>=</span> <span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:email</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
486
+ <span class='ivar'>@mobile</span> <span class='op'>=</span> <span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:mobile</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
487
+ <span class='ivar'>@client</span> <span class='op'>=</span> <span class='const'>Savon</span><span class='period'>.</span><span class='id identifier rubyid_client'>client</span><span class='lparen'>(</span><span class='label'>wsdl:</span> <span class='const'>Zarinpal</span><span class='period'>.</span><span class='id identifier rubyid_configuration'>configuration</span><span class='period'>.</span><span class='id identifier rubyid_client'>client</span><span class='comma'>,</span> <span class='label'>pretty_print_xml:</span> <span class='kw'>true</span><span class='rparen'>)</span>
488
+ <span class='ivar'>@response</span> <span class='op'>=</span> <span class='const'>Response</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
489
+ <span class='kw'>end</span></pre>
490
+ </td>
491
+ </tr>
492
+ </table>
493
+ </div>
494
+
495
+ </div>
496
+
497
+ <div id="instance_attr_details" class="attr_details">
498
+ <h2>Instance Attribute Details</h2>
499
+
500
+
501
+ <span id="amount=-instance_method"></span>
502
+ <div class="method_details first">
503
+ <h3 class="signature first" id="amount-instance_method">
504
+
505
+ - (<tt>Object</tt>) <strong>amount</strong>
506
+
507
+
508
+
509
+
510
+
511
+ </h3><div class="docstring">
512
+ <div class="discussion">
513
+
514
+ <p>Returns the value of attribute amount</p>
515
+
516
+
517
+ </div>
518
+ </div>
519
+ <div class="tags">
520
+
521
+
522
+ </div><table class="source_code">
523
+ <tr>
524
+ <td>
525
+ <pre class="lines">
526
+
527
+
528
+ 7
529
+ 8
530
+ 9</pre>
531
+ </td>
532
+ <td>
533
+ <pre class="code"><span class="info file"># File 'lib/zarinpal/payment_request.rb', line 7</span>
534
+
535
+ <span class='kw'>def</span> <span class='id identifier rubyid_amount'>amount</span>
536
+ <span class='ivar'>@amount</span>
537
+ <span class='kw'>end</span></pre>
538
+ </td>
539
+ </tr>
540
+ </table>
541
+ </div>
542
+
543
+
544
+ <span id="description=-instance_method"></span>
545
+ <div class="method_details ">
546
+ <h3 class="signature " id="description-instance_method">
547
+
548
+ - (<tt>Object</tt>) <strong>description</strong>
549
+
550
+
551
+
552
+
553
+
554
+ </h3><div class="docstring">
555
+ <div class="discussion">
556
+
557
+ <p>Returns the value of attribute description</p>
558
+
559
+
560
+ </div>
561
+ </div>
562
+ <div class="tags">
563
+
564
+
565
+ </div><table class="source_code">
566
+ <tr>
567
+ <td>
568
+ <pre class="lines">
569
+
570
+
571
+ 7
572
+ 8
573
+ 9</pre>
574
+ </td>
575
+ <td>
576
+ <pre class="code"><span class="info file"># File 'lib/zarinpal/payment_request.rb', line 7</span>
577
+
578
+ <span class='kw'>def</span> <span class='id identifier rubyid_description'>description</span>
579
+ <span class='ivar'>@description</span>
580
+ <span class='kw'>end</span></pre>
581
+ </td>
582
+ </tr>
583
+ </table>
584
+ </div>
585
+
586
+
587
+ <span id="email=-instance_method"></span>
588
+ <div class="method_details ">
589
+ <h3 class="signature " id="email-instance_method">
590
+
591
+ - (<tt>Object</tt>) <strong>email</strong>
592
+
593
+
594
+
595
+
596
+
597
+ </h3><div class="docstring">
598
+ <div class="discussion">
599
+
600
+ <p>Returns the value of attribute email</p>
601
+
602
+
603
+ </div>
604
+ </div>
605
+ <div class="tags">
606
+
607
+
608
+ </div><table class="source_code">
609
+ <tr>
610
+ <td>
611
+ <pre class="lines">
612
+
613
+
614
+ 7
615
+ 8
616
+ 9</pre>
617
+ </td>
618
+ <td>
619
+ <pre class="code"><span class="info file"># File 'lib/zarinpal/payment_request.rb', line 7</span>
620
+
621
+ <span class='kw'>def</span> <span class='id identifier rubyid_email'>email</span>
622
+ <span class='ivar'>@email</span>
623
+ <span class='kw'>end</span></pre>
624
+ </td>
625
+ </tr>
626
+ </table>
627
+ </div>
628
+
629
+
630
+ <span id="mobile=-instance_method"></span>
631
+ <div class="method_details ">
632
+ <h3 class="signature " id="mobile-instance_method">
633
+
634
+ - (<tt>Object</tt>) <strong>mobile</strong>
635
+
636
+
637
+
638
+
639
+
640
+ </h3><div class="docstring">
641
+ <div class="discussion">
642
+
643
+ <p>Returns the value of attribute mobile</p>
644
+
645
+
646
+ </div>
647
+ </div>
648
+ <div class="tags">
649
+
650
+
651
+ </div><table class="source_code">
652
+ <tr>
653
+ <td>
654
+ <pre class="lines">
655
+
656
+
657
+ 7
658
+ 8
659
+ 9</pre>
660
+ </td>
661
+ <td>
662
+ <pre class="code"><span class="info file"># File 'lib/zarinpal/payment_request.rb', line 7</span>
663
+
664
+ <span class='kw'>def</span> <span class='id identifier rubyid_mobile'>mobile</span>
665
+ <span class='ivar'>@mobile</span>
666
+ <span class='kw'>end</span></pre>
667
+ </td>
668
+ </tr>
669
+ </table>
670
+ </div>
671
+
672
+
673
+ <span id=""></span>
674
+ <div class="method_details ">
675
+ <h3 class="signature " id="response-instance_method">
676
+
677
+ - (<tt>Object</tt>) <strong>response</strong> <span class="extras">(readonly)</span>
678
+
679
+
680
+
681
+
682
+
683
+ </h3><div class="docstring">
684
+ <div class="discussion">
685
+
686
+ <p>Returns the value of attribute response</p>
687
+
688
+
689
+ </div>
690
+ </div>
691
+ <div class="tags">
692
+
693
+
694
+ </div><table class="source_code">
695
+ <tr>
696
+ <td>
697
+ <pre class="lines">
698
+
699
+
700
+ 8
701
+ 9
702
+ 10</pre>
703
+ </td>
704
+ <td>
705
+ <pre class="code"><span class="info file"># File 'lib/zarinpal/payment_request.rb', line 8</span>
706
+
707
+ <span class='kw'>def</span> <span class='id identifier rubyid_response'>response</span>
708
+ <span class='ivar'>@response</span>
709
+ <span class='kw'>end</span></pre>
710
+ </td>
711
+ </tr>
712
+ </table>
713
+ </div>
714
+
715
+ </div>
716
+
717
+
718
+ <div id="instance_method_details" class="method_details_list">
719
+ <h2>Instance Method Details</h2>
720
+
721
+
722
+ <div class="method_details first">
723
+ <h3 class="signature first" id="call-instance_method">
724
+
725
+ - (<tt><span class='object_link'><a href="Response.html" title="Zarinpal::Response (class)">Zarinpal::Response</a></span></tt>) <strong>call</strong>
726
+
727
+
728
+
729
+
730
+
731
+ </h3><div class="docstring">
732
+ <div class="discussion">
733
+
734
+ <p>Sends the payment request to Zarinpal</p>
735
+
736
+
737
+ </div>
738
+ </div>
739
+ <div class="tags">
740
+
741
+ <p class="tag_title">Returns:</p>
742
+ <ul class="return">
743
+
744
+ <li>
745
+
746
+
747
+ <span class='type'>(<tt><span class='object_link'><a href="Response.html" title="Zarinpal::Response (class)">Zarinpal::Response</a></span></tt>)</span>
748
+
749
+
750
+
751
+ </li>
752
+
753
+ </ul>
754
+
755
+ </div><table class="source_code">
756
+ <tr>
757
+ <td>
758
+ <pre class="lines">
759
+
760
+
761
+ 31
762
+ 32
763
+ 33
764
+ 34
765
+ 35
766
+ 36
767
+ 37
768
+ 38
769
+ 39
770
+ 40
771
+ 41
772
+ 42</pre>
773
+ </td>
774
+ <td>
775
+ <pre class="code"><span class="info file"># File 'lib/zarinpal/payment_request.rb', line 31</span>
776
+
777
+ <span class='kw'>def</span> <span class='id identifier rubyid_call'>call</span>
778
+ <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='ivar'>@client</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span> <span class='symbol'>:payment_request</span><span class='comma'>,</span> <span class='label'>message:</span> <span class='lbrace'>{</span>
779
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>MerchantID</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='const'>Zarinpal</span><span class='period'>.</span><span class='id identifier rubyid_configuration'>configuration</span><span class='period'>.</span><span class='id identifier rubyid_merchant_id'>merchant_id</span><span class='comma'>,</span>
780
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Amount</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='ivar'>@amount</span><span class='comma'>,</span>
781
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Description</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='ivar'>@description</span><span class='comma'>,</span>
782
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Email</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='ivar'>@email</span><span class='comma'>,</span>
783
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Mobile</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='ivar'>@mobile</span><span class='comma'>,</span>
784
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>CallbackURL</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='const'>Zarinpal</span><span class='period'>.</span><span class='id identifier rubyid_configuration'>configuration</span><span class='period'>.</span><span class='id identifier rubyid_callback_url'>callback_url</span>
785
+ <span class='rbrace'>}</span>
786
+
787
+ <span class='ivar'>@response</span><span class='period'>.</span><span class='id identifier rubyid_validate'>validate</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span><span class='rparen'>)</span>
788
+ <span class='kw'>end</span></pre>
789
+ </td>
790
+ </tr>
791
+ </table>
792
+ </div>
793
+
794
+ </div>
795
+
796
+ </div>
797
+
798
+ <div id="footer">
799
+ Generated on Sat Mar 1 21:03:59 2014 by
800
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
801
+ 0.8.7.2 (ruby-2.1.0).
802
+ </div>
803
+
804
+ </body>
805
+ </html>