openpayu 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. checksums.yaml +15 -0
  2. data/.gitignore +18 -0
  3. data/.rspec +3 -0
  4. data/.rubocop.yml +45 -0
  5. data/.ruby-gemset +1 -0
  6. data/.ruby-version +1 -0
  7. data/.travis.yml +10 -0
  8. data/Gemfile +4 -0
  9. data/LICENSE.txt +22 -0
  10. data/README.md +193 -0
  11. data/Rakefile +1 -0
  12. data/doc/EmptyResponseError.html +123 -0
  13. data/doc/HttpStatusException.html +123 -0
  14. data/doc/NotImplementedException.html +123 -0
  15. data/doc/OpenPayU.html +436 -0
  16. data/doc/OpenPayU/Configuration.html +1530 -0
  17. data/doc/OpenPayU/Connection.html +381 -0
  18. data/doc/OpenPayU/Document.html +705 -0
  19. data/doc/OpenPayU/Documents.html +117 -0
  20. data/doc/OpenPayU/Documents/Request.html +503 -0
  21. data/doc/OpenPayU/Documents/Response.html +783 -0
  22. data/doc/OpenPayU/Models.html +117 -0
  23. data/doc/OpenPayU/Models/Address.html +861 -0
  24. data/doc/OpenPayU/Models/Buyer.html +587 -0
  25. data/doc/OpenPayU/Models/Buyer/Delivery.html +312 -0
  26. data/doc/OpenPayU/Models/Card.html +507 -0
  27. data/doc/OpenPayU/Models/Fee.html +367 -0
  28. data/doc/OpenPayU/Models/Model.html +1208 -0
  29. data/doc/OpenPayU/Models/NotifyResponse.html +297 -0
  30. data/doc/OpenPayU/Models/Order.html +1155 -0
  31. data/doc/OpenPayU/Models/PayMethod.html +507 -0
  32. data/doc/OpenPayU/Models/Product.html +787 -0
  33. data/doc/OpenPayU/Models/Refund.html +1020 -0
  34. data/doc/OpenPayU/Models/ShippingMethod.html +367 -0
  35. data/doc/OpenPayU/Models/StatusUpdate.html +647 -0
  36. data/doc/OpenPayU/Models/Token.html +507 -0
  37. data/doc/OpenPayU/Order.html +924 -0
  38. data/doc/OpenPayU/Refund.html +269 -0
  39. data/doc/OpenPayU/Token.html +288 -0
  40. data/doc/OpenPayU/XmlBuilder.html +277 -0
  41. data/doc/WrongConfigurationError.html +123 -0
  42. data/doc/WrongNotifyRequest.html +123 -0
  43. data/doc/WrongOrderParameters.html +267 -0
  44. data/doc/WrongSignatureException.html +123 -0
  45. data/doc/_index.html +446 -0
  46. data/doc/class_list.html +54 -0
  47. data/doc/css/common.css +1 -0
  48. data/doc/css/full_list.css +57 -0
  49. data/doc/css/style.css +338 -0
  50. data/doc/file.README.html +281 -0
  51. data/doc/file_list.html +56 -0
  52. data/doc/frames.html +26 -0
  53. data/doc/index.html +281 -0
  54. data/doc/js/app.js +214 -0
  55. data/doc/js/full_list.js +178 -0
  56. data/doc/js/jquery.js +4 -0
  57. data/doc/method_list.html +1007 -0
  58. data/doc/top-level-namespace.html +114 -0
  59. data/lib/openpayu.rb +66 -0
  60. data/lib/openpayu/configuration.rb +62 -0
  61. data/lib/openpayu/connection.rb +65 -0
  62. data/lib/openpayu/document.rb +105 -0
  63. data/lib/openpayu/documents/request.rb +34 -0
  64. data/lib/openpayu/documents/response.rb +48 -0
  65. data/lib/openpayu/exceptions.rb +19 -0
  66. data/lib/openpayu/models/address.rb +12 -0
  67. data/lib/openpayu/models/buyer.rb +11 -0
  68. data/lib/openpayu/models/buyer/delivery.rb +7 -0
  69. data/lib/openpayu/models/buyer/invoice.rb +8 -0
  70. data/lib/openpayu/models/card.rb +10 -0
  71. data/lib/openpayu/models/fee.rb +9 -0
  72. data/lib/openpayu/models/model.rb +151 -0
  73. data/lib/openpayu/models/notify_response.rb +9 -0
  74. data/lib/openpayu/models/order.rb +28 -0
  75. data/lib/openpayu/models/pay_method.rb +10 -0
  76. data/lib/openpayu/models/product.rb +10 -0
  77. data/lib/openpayu/models/refund.rb +41 -0
  78. data/lib/openpayu/models/shipping_method.rb +9 -0
  79. data/lib/openpayu/models/status_update.rb +14 -0
  80. data/lib/openpayu/models/token.rb +10 -0
  81. data/lib/openpayu/order.rb +119 -0
  82. data/lib/openpayu/refund.rb +26 -0
  83. data/lib/openpayu/token.rb +27 -0
  84. data/lib/openpayu/version.rb +4 -0
  85. data/lib/openpayu/xml_builder.rb +23 -0
  86. data/lib/openpayu_ruby.rb +2 -0
  87. data/openpayu_ruby.gemspec +40 -0
  88. data/spec/cassettes/cancel_order.yml +50 -0
  89. data/spec/cassettes/create_order.yml +51 -0
  90. data/spec/cassettes/refund_order.yml +100 -0
  91. data/spec/cassettes/retrieve_order.yml +51 -0
  92. data/spec/cassettes/update_order.yml +50 -0
  93. data/spec/integration/order_spec.rb +103 -0
  94. data/spec/openpayu.yml +11 -0
  95. data/spec/spec_helper.rb +27 -0
  96. data/spec/test_objects/order.rb +97 -0
  97. data/spec/unit/configuration_spec.rb +71 -0
  98. data/spec/unit/document_spec.rb +18 -0
  99. data/spec/unit/models/order_spec.rb +82 -0
  100. data/spec/unit/models/refund_spec.rb +24 -0
  101. data/spec/unit/openpayu_spec.rb +27 -0
  102. metadata +327 -0
@@ -0,0 +1,367 @@
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: OpenPayU::Models::Fee
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 (F)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../../OpenPayU.html" title="OpenPayU (module)">OpenPayU</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Models.html" title="OpenPayU::Models (module)">Models</a></span></span>
36
+ &raquo;
37
+ <span class="title">Fee</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: OpenPayU::Models::Fee
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"><span class='object_link'><a href="Model.html" title="OpenPayU::Models::Model (class)">Model</a></span></span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next"><span class='object_link'><a href="Model.html" title="OpenPayU::Models::Model (class)">Model</a></span></li>
82
+
83
+ <li class="next">OpenPayU::Models::Fee</li>
84
+
85
+ </ul>
86
+ <a href="#" class="inheritanceTree">show all</a>
87
+
88
+ </dd>
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+ <dt class="r2 last">Defined in:</dt>
99
+ <dd class="r2 last">lib/openpayu/models/fee.rb</dd>
100
+
101
+ </dl>
102
+ <div class="clear"></div>
103
+
104
+
105
+
106
+
107
+
108
+ <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
109
+ <ul class="summary">
110
+
111
+ <li class="public ">
112
+ <span class="summary_signature">
113
+
114
+ <a href="#amount-instance_method" title="#amount (instance method)">- (Object) <strong>amount</strong> </a>
115
+
116
+
117
+
118
+ </span>
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+ <span class="summary_desc"><div class='inline'>
132
+ <p>Returns the value of attribute amount.</p>
133
+ </div></span>
134
+
135
+ </li>
136
+
137
+
138
+ <li class="public ">
139
+ <span class="summary_signature">
140
+
141
+ <a href="#description-instance_method" title="#description (instance method)">- (Object) <strong>description</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 description.</p>
160
+ </div></span>
161
+
162
+ </li>
163
+
164
+
165
+ <li class="public ">
166
+ <span class="summary_signature">
167
+
168
+ <a href="#type-instance_method" title="#type (instance method)">- (Object) <strong>type</strong> </a>
169
+
170
+
171
+
172
+ </span>
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+
181
+
182
+
183
+
184
+
185
+ <span class="summary_desc"><div class='inline'>
186
+ <p>Returns the value of attribute type.</p>
187
+ </div></span>
188
+
189
+ </li>
190
+
191
+
192
+ </ul>
193
+
194
+
195
+
196
+
197
+
198
+ <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Model.html" title="OpenPayU::Models::Model (class)">Model</a></span></h3>
199
+ <p class="inherited"><span class='object_link'><a href="Model.html#all_errors-instance_method" title="OpenPayU::Models::Model#all_errors (method)">#all_errors</a></span></p>
200
+
201
+
202
+
203
+
204
+
205
+
206
+
207
+
208
+
209
+ <h2>Method Summary</h2>
210
+
211
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Model.html" title="OpenPayU::Models::Model (class)">Model</a></span></h3>
212
+ <p class="inherited"><span class='object_link'><a href="Model.html#after_initialize-instance_method" title="OpenPayU::Models::Model#after_initialize (method)">#after_initialize</a></span>, <span class='object_link'><a href="Model.html#all_objects_valid%3F-instance_method" title="OpenPayU::Models::Model#all_objects_valid? (method)">#all_objects_valid?</a></span>, <span class='object_link'><a href="Model.html#attributes-instance_method" title="OpenPayU::Models::Model#attributes (method)">#attributes</a></span>, <span class='object_link'><a href="Model.html#define_reader-class_method" title="OpenPayU::Models::Model.define_reader (method)">define_reader</a></span>, <span class='object_link'><a href="Model.html#define_writer-class_method" title="OpenPayU::Models::Model.define_writer (method)">define_writer</a></span>, <span class='object_link'><a href="Model.html#generate_xml-instance_method" title="OpenPayU::Models::Model#generate_xml (method)">#generate_xml</a></span>, <span class='object_link'><a href="Model.html#get_instance_values-instance_method" title="OpenPayU::Models::Model#get_instance_values (method)">#get_instance_values</a></span>, <span class='object_link'><a href="Model.html#has_many_objects-class_method" title="OpenPayU::Models::Model.has_many_objects (method)">has_many_objects</a></span>, <span class='object_link'><a href="Model.html#has_one_object-class_method" title="OpenPayU::Models::Model.has_one_object (method)">has_one_object</a></span>, <span class='object_link'><a href="Model.html#initialize-instance_method" title="OpenPayU::Models::Model#initialize (method)">#initialize</a></span>, <span class='object_link'><a href="Model.html#prepare_data-instance_method" title="OpenPayU::Models::Model#prepare_data (method)">#prepare_data</a></span>, <span class='object_link'><a href="Model.html#prepare_keys-instance_method" title="OpenPayU::Models::Model#prepare_keys (method)">#prepare_keys</a></span>, <span class='object_link'><a href="Model.html#to_flatten_hash-instance_method" title="OpenPayU::Models::Model#to_flatten_hash (method)">#to_flatten_hash</a></span>, <span class='object_link'><a href="Model.html#to_json-instance_method" title="OpenPayU::Models::Model#to_json (method)">#to_json</a></span>, <span class='object_link'><a href="Model.html#validate_all_objects-instance_method" title="OpenPayU::Models::Model#validate_all_objects (method)">#validate_all_objects</a></span></p>
213
+
214
+
215
+
216
+ <div id="constructor_details" class="method_details_list">
217
+ <h2>Constructor Details</h2>
218
+
219
+ <p class="notice">This class inherits a constructor from <span class='object_link'><a href="Model.html#initialize-instance_method" title="OpenPayU::Models::Model#initialize (method)">OpenPayU::Models::Model</a></span></p>
220
+
221
+ </div>
222
+
223
+ <div id="instance_attr_details" class="attr_details">
224
+ <h2>Instance Attribute Details</h2>
225
+
226
+
227
+ <span id="amount=-instance_method"></span>
228
+ <div class="method_details first">
229
+ <h3 class="signature first" id="amount-instance_method">
230
+
231
+ - (<tt>Object</tt>) <strong>amount</strong>
232
+
233
+
234
+
235
+
236
+
237
+ </h3><div class="docstring">
238
+ <div class="discussion">
239
+
240
+ <p>Returns the value of attribute amount</p>
241
+
242
+
243
+ </div>
244
+ </div>
245
+ <div class="tags">
246
+
247
+
248
+ </div><table class="source_code">
249
+ <tr>
250
+ <td>
251
+ <pre class="lines">
252
+
253
+
254
+ 5
255
+ 6
256
+ 7</pre>
257
+ </td>
258
+ <td>
259
+ <pre class="code"><span class="info file"># File 'lib/openpayu/models/fee.rb', line 5</span>
260
+
261
+ <span class='kw'>def</span> <span class='id identifier rubyid_amount'>amount</span>
262
+ <span class='ivar'>@amount</span>
263
+ <span class='kw'>end</span></pre>
264
+ </td>
265
+ </tr>
266
+ </table>
267
+ </div>
268
+
269
+
270
+ <span id="description=-instance_method"></span>
271
+ <div class="method_details ">
272
+ <h3 class="signature " id="description-instance_method">
273
+
274
+ - (<tt>Object</tt>) <strong>description</strong>
275
+
276
+
277
+
278
+
279
+
280
+ </h3><div class="docstring">
281
+ <div class="discussion">
282
+
283
+ <p>Returns the value of attribute description</p>
284
+
285
+
286
+ </div>
287
+ </div>
288
+ <div class="tags">
289
+
290
+
291
+ </div><table class="source_code">
292
+ <tr>
293
+ <td>
294
+ <pre class="lines">
295
+
296
+
297
+ 5
298
+ 6
299
+ 7</pre>
300
+ </td>
301
+ <td>
302
+ <pre class="code"><span class="info file"># File 'lib/openpayu/models/fee.rb', line 5</span>
303
+
304
+ <span class='kw'>def</span> <span class='id identifier rubyid_description'>description</span>
305
+ <span class='ivar'>@description</span>
306
+ <span class='kw'>end</span></pre>
307
+ </td>
308
+ </tr>
309
+ </table>
310
+ </div>
311
+
312
+
313
+ <span id="type=-instance_method"></span>
314
+ <div class="method_details ">
315
+ <h3 class="signature " id="type-instance_method">
316
+
317
+ - (<tt>Object</tt>) <strong>type</strong>
318
+
319
+
320
+
321
+
322
+
323
+ </h3><div class="docstring">
324
+ <div class="discussion">
325
+
326
+ <p>Returns the value of attribute type</p>
327
+
328
+
329
+ </div>
330
+ </div>
331
+ <div class="tags">
332
+
333
+
334
+ </div><table class="source_code">
335
+ <tr>
336
+ <td>
337
+ <pre class="lines">
338
+
339
+
340
+ 5
341
+ 6
342
+ 7</pre>
343
+ </td>
344
+ <td>
345
+ <pre class="code"><span class="info file"># File 'lib/openpayu/models/fee.rb', line 5</span>
346
+
347
+ <span class='kw'>def</span> <span class='id identifier rubyid_type'>type</span>
348
+ <span class='ivar'>@type</span>
349
+ <span class='kw'>end</span></pre>
350
+ </td>
351
+ </tr>
352
+ </table>
353
+ </div>
354
+
355
+ </div>
356
+
357
+
358
+ </div>
359
+
360
+ <div id="footer">
361
+ Generated on Tue Dec 17 15:20:59 2013 by
362
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
363
+ 0.8.7.2 (ruby-1.9.3).
364
+ </div>
365
+
366
+ </body>
367
+ </html>
@@ -0,0 +1,1208 @@
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: OpenPayU::Models::Model
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 (M)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../../OpenPayU.html" title="OpenPayU (module)">OpenPayU</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Models.html" title="OpenPayU::Models (module)">Models</a></span></span>
36
+ &raquo;
37
+ <span class="title">Model</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: OpenPayU::Models::Model
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">OpenPayU::Models::Model</li>
82
+
83
+ </ul>
84
+ <a href="#" class="inheritanceTree">show all</a>
85
+
86
+ </dd>
87
+
88
+
89
+
90
+
91
+
92
+
93
+ <dt class="r2">Includes:</dt>
94
+ <dd class="r2">ActiveModel::Serializers::JSON, ActiveModel::Serializers::Xml, ActiveModel::Validations</dd>
95
+
96
+
97
+
98
+
99
+
100
+ <dt class="r1 last">Defined in:</dt>
101
+ <dd class="r1 last">lib/openpayu/models/model.rb</dd>
102
+
103
+ </dl>
104
+ <div class="clear"></div>
105
+
106
+ <div id="subclasses">
107
+ <h2>Direct Known Subclasses</h2>
108
+ <p class="children"><span class='object_link'><a href="Address.html" title="OpenPayU::Models::Address (class)">Address</a></span>, <span class='object_link'><a href="Buyer.html" title="OpenPayU::Models::Buyer (class)">Buyer</a></span>, <span class='object_link'><a href="Card.html" title="OpenPayU::Models::Card (class)">Card</a></span>, <span class='object_link'><a href="Fee.html" title="OpenPayU::Models::Fee (class)">Fee</a></span>, <span class='object_link'><a href="NotifyResponse.html" title="OpenPayU::Models::NotifyResponse (class)">NotifyResponse</a></span>, <span class='object_link'><a href="Order.html" title="OpenPayU::Models::Order (class)">Order</a></span>, <span class='object_link'><a href="PayMethod.html" title="OpenPayU::Models::PayMethod (class)">PayMethod</a></span>, <span class='object_link'><a href="Product.html" title="OpenPayU::Models::Product (class)">Product</a></span>, <span class='object_link'><a href="Refund.html" title="OpenPayU::Models::Refund (class)">Refund</a></span>, <span class='object_link'><a href="ShippingMethod.html" title="OpenPayU::Models::ShippingMethod (class)">ShippingMethod</a></span>, <span class='object_link'><a href="StatusUpdate.html" title="OpenPayU::Models::StatusUpdate (class)">StatusUpdate</a></span>, <span class='object_link'><a href="Token.html" title="OpenPayU::Models::Token (class)">Token</a></span></p>
109
+ </div>
110
+
111
+
112
+
113
+
114
+ <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
115
+ <ul class="summary">
116
+
117
+ <li class="public ">
118
+ <span class="summary_signature">
119
+
120
+ <a href="#all_errors-instance_method" title="#all_errors (instance method)">- (Object) <strong>all_errors</strong> </a>
121
+
122
+
123
+
124
+ </span>
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+
137
+ <span class="summary_desc"><div class='inline'>
138
+ <p>Returns the value of attribute all_errors.</p>
139
+ </div></span>
140
+
141
+ </li>
142
+
143
+
144
+ </ul>
145
+
146
+
147
+
148
+
149
+
150
+ <h2>
151
+ Class Method Summary
152
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
153
+ </h2>
154
+
155
+ <ul class="summary">
156
+
157
+ <li class="public ">
158
+ <span class="summary_signature">
159
+
160
+ <a href="#define_reader-class_method" title="define_reader (class method)">+ (Object) <strong>define_reader</strong>(association) </a>
161
+
162
+
163
+
164
+ </span>
165
+
166
+
167
+
168
+
169
+
170
+
171
+
172
+
173
+
174
+ <span class="summary_desc"><div class='inline'></div></span>
175
+
176
+ </li>
177
+
178
+
179
+ <li class="public ">
180
+ <span class="summary_signature">
181
+
182
+ <a href="#define_writer-class_method" title="define_writer (class method)">+ (Object) <strong>define_writer</strong>(association, class_name) </a>
183
+
184
+
185
+
186
+ </span>
187
+
188
+
189
+
190
+
191
+
192
+
193
+
194
+
195
+
196
+ <span class="summary_desc"><div class='inline'></div></span>
197
+
198
+ </li>
199
+
200
+
201
+ <li class="public ">
202
+ <span class="summary_signature">
203
+
204
+ <a href="#has_many_objects-class_method" title="has_many_objects (class method)">+ (Object) <strong>has_many_objects</strong>(association, class_name) </a>
205
+
206
+
207
+
208
+ </span>
209
+
210
+
211
+
212
+
213
+
214
+
215
+
216
+
217
+
218
+ <span class="summary_desc"><div class='inline'></div></span>
219
+
220
+ </li>
221
+
222
+
223
+ <li class="public ">
224
+ <span class="summary_signature">
225
+
226
+ <a href="#has_one_object-class_method" title="has_one_object (class method)">+ (Object) <strong>has_one_object</strong>(association) </a>
227
+
228
+
229
+
230
+ </span>
231
+
232
+
233
+
234
+
235
+
236
+
237
+
238
+
239
+
240
+ <span class="summary_desc"><div class='inline'></div></span>
241
+
242
+ </li>
243
+
244
+
245
+ </ul>
246
+
247
+ <h2>
248
+ Instance Method Summary
249
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
250
+ </h2>
251
+
252
+ <ul class="summary">
253
+
254
+ <li class="public ">
255
+ <span class="summary_signature">
256
+
257
+ <a href="#after_initialize-instance_method" title="#after_initialize (instance method)">- (Object) <strong>after_initialize</strong> </a>
258
+
259
+
260
+
261
+ </span>
262
+
263
+
264
+
265
+
266
+
267
+
268
+
269
+
270
+
271
+ <span class="summary_desc"><div class='inline'></div></span>
272
+
273
+ </li>
274
+
275
+
276
+ <li class="public ">
277
+ <span class="summary_signature">
278
+
279
+ <a href="#all_objects_valid%3F-instance_method" title="#all_objects_valid? (instance method)">- (Boolean) <strong>all_objects_valid?</strong> </a>
280
+
281
+
282
+
283
+ </span>
284
+
285
+
286
+
287
+
288
+
289
+
290
+
291
+
292
+
293
+ <span class="summary_desc"><div class='inline'></div></span>
294
+
295
+ </li>
296
+
297
+
298
+ <li class="public ">
299
+ <span class="summary_signature">
300
+
301
+ <a href="#attributes-instance_method" title="#attributes (instance method)">- (Object) <strong>attributes</strong> </a>
302
+
303
+
304
+
305
+ </span>
306
+
307
+
308
+
309
+
310
+
311
+
312
+
313
+
314
+
315
+ <span class="summary_desc"><div class='inline'></div></span>
316
+
317
+ </li>
318
+
319
+
320
+ <li class="public ">
321
+ <span class="summary_signature">
322
+
323
+ <a href="#generate_xml-instance_method" title="#generate_xml (instance method)">- (Object) <strong>generate_xml</strong>(request_type) </a>
324
+
325
+
326
+
327
+ </span>
328
+
329
+
330
+
331
+
332
+
333
+
334
+
335
+
336
+
337
+ <span class="summary_desc"><div class='inline'></div></span>
338
+
339
+ </li>
340
+
341
+
342
+ <li class="public ">
343
+ <span class="summary_signature">
344
+
345
+ <a href="#get_instance_values-instance_method" title="#get_instance_values (instance method)">- (Object) <strong>get_instance_values</strong> </a>
346
+
347
+
348
+
349
+ </span>
350
+
351
+
352
+
353
+
354
+
355
+
356
+
357
+
358
+
359
+ <span class="summary_desc"><div class='inline'></div></span>
360
+
361
+ </li>
362
+
363
+
364
+ <li class="public ">
365
+ <span class="summary_signature">
366
+
367
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (Model) <strong>initialize</strong>(values) </a>
368
+
369
+
370
+
371
+ </span>
372
+
373
+
374
+ <span class="note title constructor">constructor</span>
375
+
376
+
377
+
378
+
379
+
380
+
381
+
382
+
383
+ <span class="summary_desc"><div class='inline'>
384
+ <p>A new instance of Model.</p>
385
+ </div></span>
386
+
387
+ </li>
388
+
389
+
390
+ <li class="public ">
391
+ <span class="summary_signature">
392
+
393
+ <a href="#prepare_data-instance_method" title="#prepare_data (instance method)">- (Object) <strong>prepare_data</strong>(request_type) </a>
394
+
395
+
396
+
397
+ </span>
398
+
399
+
400
+
401
+
402
+
403
+
404
+
405
+
406
+
407
+ <span class="summary_desc"><div class='inline'></div></span>
408
+
409
+ </li>
410
+
411
+
412
+ <li class="public ">
413
+ <span class="summary_signature">
414
+
415
+ <a href="#prepare_keys-instance_method" title="#prepare_keys (instance method)">- (Object) <strong>prepare_keys</strong>(attrs = {}, hash = get_instance_values) </a>
416
+
417
+
418
+
419
+ </span>
420
+
421
+
422
+
423
+
424
+
425
+
426
+
427
+
428
+
429
+ <span class="summary_desc"><div class='inline'></div></span>
430
+
431
+ </li>
432
+
433
+
434
+ <li class="public ">
435
+ <span class="summary_signature">
436
+
437
+ <a href="#to_flatten_hash-instance_method" title="#to_flatten_hash (instance method)">- (Object) <strong>to_flatten_hash</strong>(source = nil, target = {}, namespace = nil, index = nil) </a>
438
+
439
+
440
+
441
+ </span>
442
+
443
+
444
+
445
+
446
+
447
+
448
+
449
+
450
+
451
+ <span class="summary_desc"><div class='inline'></div></span>
452
+
453
+ </li>
454
+
455
+
456
+ <li class="public ">
457
+ <span class="summary_signature">
458
+
459
+ <a href="#to_json-instance_method" title="#to_json (instance method)">- (Object) <strong>to_json</strong> </a>
460
+
461
+
462
+
463
+ </span>
464
+
465
+
466
+
467
+
468
+
469
+
470
+
471
+
472
+
473
+ <span class="summary_desc"><div class='inline'></div></span>
474
+
475
+ </li>
476
+
477
+
478
+ <li class="public ">
479
+ <span class="summary_signature">
480
+
481
+ <a href="#validate_all_objects-instance_method" title="#validate_all_objects (instance method)">- (Object) <strong>validate_all_objects</strong> </a>
482
+
483
+
484
+
485
+ </span>
486
+
487
+
488
+
489
+
490
+
491
+
492
+
493
+
494
+
495
+ <span class="summary_desc"><div class='inline'></div></span>
496
+
497
+ </li>
498
+
499
+
500
+ </ul>
501
+
502
+
503
+
504
+
505
+
506
+ <div id="constructor_details" class="method_details_list">
507
+ <h2>Constructor Details</h2>
508
+
509
+ <div class="method_details first">
510
+ <h3 class="signature first" id="initialize-instance_method">
511
+
512
+ - (<tt><span class='object_link'><a href="" title="OpenPayU::Models::Model (class)">Model</a></span></tt>) <strong>initialize</strong>(values)
513
+
514
+
515
+
516
+
517
+
518
+ </h3><div class="docstring">
519
+ <div class="discussion">
520
+
521
+ <p>Returns a new instance of Model</p>
522
+
523
+
524
+ </div>
525
+ </div>
526
+ <div class="tags">
527
+
528
+
529
+ </div><table class="source_code">
530
+ <tr>
531
+ <td>
532
+ <pre class="lines">
533
+
534
+
535
+ 14
536
+ 15
537
+ 16
538
+ 17
539
+ 18
540
+ 19</pre>
541
+ </td>
542
+ <td>
543
+ <pre class="code"><span class="info file"># File 'lib/openpayu/models/model.rb', line 14</span>
544
+
545
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_values'>values</span><span class='rparen'>)</span>
546
+ <span class='id identifier rubyid_values'>values</span><span class='period'>.</span><span class='id identifier rubyid_each_pair'>each_pair</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='comma'>,</span> <span class='id identifier rubyid_v'>v</span><span class='op'>|</span>
547
+ <span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_k'>k</span><span class='rbrace'>}</span><span class='tstring_content'>=</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_v'>v</span><span class='rparen'>)</span>
548
+ <span class='kw'>end</span>
549
+ <span class='id identifier rubyid_after_initialize'>after_initialize</span>
550
+ <span class='kw'>end</span></pre>
551
+ </td>
552
+ </tr>
553
+ </table>
554
+ </div>
555
+
556
+ </div>
557
+
558
+ <div id="instance_attr_details" class="attr_details">
559
+ <h2>Instance Attribute Details</h2>
560
+
561
+
562
+ <span id="all_errors=-instance_method"></span>
563
+ <div class="method_details first">
564
+ <h3 class="signature first" id="all_errors-instance_method">
565
+
566
+ - (<tt>Object</tt>) <strong>all_errors</strong>
567
+
568
+
569
+
570
+
571
+
572
+ </h3><div class="docstring">
573
+ <div class="discussion">
574
+
575
+ <p>Returns the value of attribute all_errors</p>
576
+
577
+
578
+ </div>
579
+ </div>
580
+ <div class="tags">
581
+
582
+
583
+ </div><table class="source_code">
584
+ <tr>
585
+ <td>
586
+ <pre class="lines">
587
+
588
+
589
+ 12
590
+ 13
591
+ 14</pre>
592
+ </td>
593
+ <td>
594
+ <pre class="code"><span class="info file"># File 'lib/openpayu/models/model.rb', line 12</span>
595
+
596
+ <span class='kw'>def</span> <span class='id identifier rubyid_all_errors'>all_errors</span>
597
+ <span class='ivar'>@all_errors</span>
598
+ <span class='kw'>end</span></pre>
599
+ </td>
600
+ </tr>
601
+ </table>
602
+ </div>
603
+
604
+ </div>
605
+
606
+
607
+ <div id="class_method_details" class="method_details_list">
608
+ <h2>Class Method Details</h2>
609
+
610
+
611
+ <div class="method_details first">
612
+ <h3 class="signature first" id="define_reader-class_method">
613
+
614
+ + (<tt>Object</tt>) <strong>define_reader</strong>(association)
615
+
616
+
617
+
618
+
619
+
620
+ </h3><table class="source_code">
621
+ <tr>
622
+ <td>
623
+ <pre class="lines">
624
+
625
+
626
+ 144
627
+ 145
628
+ 146</pre>
629
+ </td>
630
+ <td>
631
+ <pre class="code"><span class="info file"># File 'lib/openpayu/models/model.rb', line 144</span>
632
+
633
+ <span class='kw'>def</span> <span class='id identifier rubyid_define_reader'>define_reader</span><span class='lparen'>(</span><span class='id identifier rubyid_association'>association</span><span class='rparen'>)</span>
634
+ <span class='id identifier rubyid_attr_reader'>attr_reader</span> <span class='id identifier rubyid_association'>association</span>
635
+ <span class='kw'>end</span></pre>
636
+ </td>
637
+ </tr>
638
+ </table>
639
+ </div>
640
+
641
+ <div class="method_details ">
642
+ <h3 class="signature " id="define_writer-class_method">
643
+
644
+ + (<tt>Object</tt>) <strong>define_writer</strong>(association, class_name)
645
+
646
+
647
+
648
+
649
+
650
+ </h3><table class="source_code">
651
+ <tr>
652
+ <td>
653
+ <pre class="lines">
654
+
655
+
656
+ 129
657
+ 130
658
+ 131
659
+ 132
660
+ 133
661
+ 134
662
+ 135
663
+ 136
664
+ 137
665
+ 138
666
+ 139
667
+ 140
668
+ 141
669
+ 142</pre>
670
+ </td>
671
+ <td>
672
+ <pre class="code"><span class="info file"># File 'lib/openpayu/models/model.rb', line 129</span>
673
+
674
+ <span class='kw'>def</span> <span class='id identifier rubyid_define_writer'>define_writer</span><span class='lparen'>(</span><span class='id identifier rubyid_association'>association</span><span class='comma'>,</span> <span class='id identifier rubyid_class_name'>class_name</span><span class='rparen'>)</span>
675
+ <span class='id identifier rubyid_class_eval'>class_eval</span> <span class='heredoc_beg'>&lt;&lt;-CODE</span>
676
+ <span class='tstring_content'> def </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_association'>association</span><span class='rbrace'>}</span><span class='tstring_content'>=(value)
677
+ </span><span class='embexpr_beg'> @#{</span><span class='id identifier rubyid_association'>association</span><span class='rbrace'>}</span><span class='tstring_content'> =
678
+ if value.class.name == &quot;Array&quot;
679
+ value.collect do |val|
680
+ </span><span class='embexpr_beg'> #{</span><span class='id identifier rubyid_class_name'>class_name</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_camelize'>camelize</span><span class='rbrace'>}</span><span class='tstring_content'>.new(val)
681
+ end
682
+ else
683
+ </span><span class='embexpr_beg'> #{</span><span class='id identifier rubyid_class_name'>class_name</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_camelize'>camelize</span><span class='rbrace'>}</span><span class='tstring_content'>.new(value)
684
+ end
685
+ end
686
+ </span><span class='heredoc_end'> CODE
687
+ </span><span class='kw'>end</span></pre>
688
+ </td>
689
+ </tr>
690
+ </table>
691
+ </div>
692
+
693
+ <div class="method_details ">
694
+ <h3 class="signature " id="has_many_objects-class_method">
695
+
696
+ + (<tt>Object</tt>) <strong>has_many_objects</strong>(association, class_name)
697
+
698
+
699
+
700
+
701
+
702
+ </h3><table class="source_code">
703
+ <tr>
704
+ <td>
705
+ <pre class="lines">
706
+
707
+
708
+ 119
709
+ 120
710
+ 121
711
+ 122</pre>
712
+ </td>
713
+ <td>
714
+ <pre class="code"><span class="info file"># File 'lib/openpayu/models/model.rb', line 119</span>
715
+
716
+ <span class='kw'>def</span> <span class='id identifier rubyid_has_many_objects'>has_many_objects</span><span class='lparen'>(</span><span class='id identifier rubyid_association'>association</span><span class='comma'>,</span> <span class='id identifier rubyid_class_name'>class_name</span><span class='rparen'>)</span>
717
+ <span class='id identifier rubyid_define_writer'>define_writer</span><span class='lparen'>(</span><span class='id identifier rubyid_association'>association</span><span class='comma'>,</span> <span class='id identifier rubyid_class_name'>class_name</span><span class='rparen'>)</span>
718
+ <span class='id identifier rubyid_define_reader'>define_reader</span><span class='lparen'>(</span><span class='id identifier rubyid_association'>association</span><span class='rparen'>)</span>
719
+ <span class='kw'>end</span></pre>
720
+ </td>
721
+ </tr>
722
+ </table>
723
+ </div>
724
+
725
+ <div class="method_details ">
726
+ <h3 class="signature " id="has_one_object-class_method">
727
+
728
+ + (<tt>Object</tt>) <strong>has_one_object</strong>(association)
729
+
730
+
731
+
732
+
733
+
734
+ </h3><table class="source_code">
735
+ <tr>
736
+ <td>
737
+ <pre class="lines">
738
+
739
+
740
+ 124
741
+ 125
742
+ 126
743
+ 127</pre>
744
+ </td>
745
+ <td>
746
+ <pre class="code"><span class="info file"># File 'lib/openpayu/models/model.rb', line 124</span>
747
+
748
+ <span class='kw'>def</span> <span class='id identifier rubyid_has_one_object'>has_one_object</span><span class='lparen'>(</span><span class='id identifier rubyid_association'>association</span><span class='rparen'>)</span>
749
+ <span class='id identifier rubyid_define_writer'>define_writer</span><span class='lparen'>(</span><span class='id identifier rubyid_association'>association</span><span class='comma'>,</span> <span class='id identifier rubyid_association'>association</span><span class='rparen'>)</span>
750
+ <span class='id identifier rubyid_define_reader'>define_reader</span><span class='lparen'>(</span><span class='id identifier rubyid_association'>association</span><span class='rparen'>)</span>
751
+ <span class='kw'>end</span></pre>
752
+ </td>
753
+ </tr>
754
+ </table>
755
+ </div>
756
+
757
+ </div>
758
+
759
+ <div id="instance_method_details" class="method_details_list">
760
+ <h2>Instance Method Details</h2>
761
+
762
+
763
+ <div class="method_details first">
764
+ <h3 class="signature first" id="after_initialize-instance_method">
765
+
766
+ - (<tt>Object</tt>) <strong>after_initialize</strong>
767
+
768
+
769
+
770
+
771
+
772
+ </h3><table class="source_code">
773
+ <tr>
774
+ <td>
775
+ <pre class="lines">
776
+
777
+
778
+ 21
779
+ 22</pre>
780
+ </td>
781
+ <td>
782
+ <pre class="code"><span class="info file"># File 'lib/openpayu/models/model.rb', line 21</span>
783
+
784
+ <span class='kw'>def</span> <span class='id identifier rubyid_after_initialize'>after_initialize</span>
785
+ <span class='kw'>end</span></pre>
786
+ </td>
787
+ </tr>
788
+ </table>
789
+ </div>
790
+
791
+ <div class="method_details ">
792
+ <h3 class="signature " id="all_objects_valid?-instance_method">
793
+
794
+ - (<tt>Boolean</tt>) <strong>all_objects_valid?</strong>
795
+
796
+
797
+
798
+
799
+
800
+ </h3><div class="docstring">
801
+ <div class="discussion">
802
+
803
+
804
+ </div>
805
+ </div>
806
+ <div class="tags">
807
+
808
+ <p class="tag_title">Returns:</p>
809
+ <ul class="return">
810
+
811
+ <li>
812
+
813
+
814
+ <span class='type'>(<tt>Boolean</tt>)</span>
815
+
816
+
817
+
818
+ </li>
819
+
820
+ </ul>
821
+
822
+ </div><table class="source_code">
823
+ <tr>
824
+ <td>
825
+ <pre class="lines">
826
+
827
+
828
+ 94
829
+ 95
830
+ 96</pre>
831
+ </td>
832
+ <td>
833
+ <pre class="code"><span class="info file"># File 'lib/openpayu/models/model.rb', line 94</span>
834
+
835
+ <span class='kw'>def</span> <span class='id identifier rubyid_all_objects_valid?'>all_objects_valid?</span>
836
+ <span class='op'>!</span><span class='id identifier rubyid_validate_all_objects'>validate_all_objects</span><span class='period'>.</span><span class='id identifier rubyid_any?'>any?</span>
837
+ <span class='kw'>end</span></pre>
838
+ </td>
839
+ </tr>
840
+ </table>
841
+ </div>
842
+
843
+ <div class="method_details ">
844
+ <h3 class="signature " id="attributes-instance_method">
845
+
846
+ - (<tt>Object</tt>) <strong>attributes</strong>
847
+
848
+
849
+
850
+
851
+
852
+ </h3><table class="source_code">
853
+ <tr>
854
+ <td>
855
+ <pre class="lines">
856
+
857
+
858
+ 24
859
+ 25
860
+ 26</pre>
861
+ </td>
862
+ <td>
863
+ <pre class="code"><span class="info file"># File 'lib/openpayu/models/model.rb', line 24</span>
864
+
865
+ <span class='kw'>def</span> <span class='id identifier rubyid_attributes'>attributes</span>
866
+ <span class='id identifier rubyid_instance_values'>instance_values</span>
867
+ <span class='kw'>end</span></pre>
868
+ </td>
869
+ </tr>
870
+ </table>
871
+ </div>
872
+
873
+ <div class="method_details ">
874
+ <h3 class="signature " id="generate_xml-instance_method">
875
+
876
+ - (<tt>Object</tt>) <strong>generate_xml</strong>(request_type)
877
+
878
+
879
+
880
+
881
+
882
+ </h3><table class="source_code">
883
+ <tr>
884
+ <td>
885
+ <pre class="lines">
886
+
887
+
888
+ 44
889
+ 45
890
+ 46
891
+ 47
892
+ 48
893
+ 49
894
+ 50
895
+ 51
896
+ 52</pre>
897
+ </td>
898
+ <td>
899
+ <pre class="code"><span class="info file"># File 'lib/openpayu/models/model.rb', line 44</span>
900
+
901
+ <span class='kw'>def</span> <span class='id identifier rubyid_generate_xml'>generate_xml</span><span class='lparen'>(</span><span class='id identifier rubyid_request_type'>request_type</span><span class='rparen'>)</span>
902
+ <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
903
+ &lt;OpenPayU xmlns=&quot;http://www.openpayu.com/20/openpayu.xsd&quot;&gt;</span><span class='tstring_end'>'</span></span> <span class='op'>+</span>
904
+ <span class='id identifier rubyid_prepare_keys'>prepare_keys</span><span class='lparen'>(</span><span class='id identifier rubyid_instance_values'>instance_values</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_xml'>to_xml</span><span class='lparen'>(</span>
905
+ <span class='label'>builder:</span> <span class='const'>OpenPayU</span><span class='op'>::</span><span class='const'>XmlBuilder</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_request_type'>request_type</span><span class='comma'>,</span> <span class='label'>indent:</span> <span class='int'>2</span><span class='rparen'>)</span><span class='comma'>,</span>
906
+ <span class='label'>root:</span> <span class='id identifier rubyid_request_type'>request_type</span><span class='comma'>,</span>
907
+ <span class='label'>skip_types:</span> <span class='kw'>true</span><span class='comma'>,</span>
908
+ <span class='label'>skip_instruct:</span> <span class='kw'>true</span><span class='rparen'>)</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>&lt;/OpenPayU&gt;</span><span class='tstring_end'>'</span></span>
909
+ <span class='kw'>end</span></pre>
910
+ </td>
911
+ </tr>
912
+ </table>
913
+ </div>
914
+
915
+ <div class="method_details ">
916
+ <h3 class="signature " id="get_instance_values-instance_method">
917
+
918
+ - (<tt>Object</tt>) <strong>get_instance_values</strong>
919
+
920
+
921
+
922
+
923
+
924
+ </h3><table class="source_code">
925
+ <tr>
926
+ <td>
927
+ <pre class="lines">
928
+
929
+
930
+ 54
931
+ 55
932
+ 56
933
+ 57
934
+ 58</pre>
935
+ </td>
936
+ <td>
937
+ <pre class="code"><span class="info file"># File 'lib/openpayu/models/model.rb', line 54</span>
938
+
939
+ <span class='kw'>def</span> <span class='id identifier rubyid_get_instance_values'>get_instance_values</span>
940
+ <span class='id identifier rubyid_instance_values'>instance_values</span><span class='period'>.</span><span class='id identifier rubyid_delete_if'>delete_if</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='comma'>,</span> <span class='id identifier rubyid_v'>v</span><span class='op'>|</span>
941
+ <span class='qwords_beg'>%w(</span><span class='tstring_content'>all_errors</span><span class='words_sep'> </span><span class='tstring_content'>errors</span><span class='words_sep'> </span><span class='tstring_content'>validation_context</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_k'>k</span><span class='rparen'>)</span>
942
+ <span class='kw'>end</span>
943
+ <span class='kw'>end</span></pre>
944
+ </td>
945
+ </tr>
946
+ </table>
947
+ </div>
948
+
949
+ <div class="method_details ">
950
+ <h3 class="signature " id="prepare_data-instance_method">
951
+
952
+ - (<tt>Object</tt>) <strong>prepare_data</strong>(request_type)
953
+
954
+
955
+
956
+
957
+
958
+ </h3><table class="source_code">
959
+ <tr>
960
+ <td>
961
+ <pre class="lines">
962
+
963
+
964
+ 32
965
+ 33
966
+ 34
967
+ 35
968
+ 36
969
+ 37
970
+ 38
971
+ 39
972
+ 40
973
+ 41
974
+ 42</pre>
975
+ </td>
976
+ <td>
977
+ <pre class="code"><span class="info file"># File 'lib/openpayu/models/model.rb', line 32</span>
978
+
979
+ <span class='kw'>def</span> <span class='id identifier rubyid_prepare_data'>prepare_data</span><span class='lparen'>(</span><span class='id identifier rubyid_request_type'>request_type</span><span class='rparen'>)</span>
980
+ <span class='kw'>if</span> <span class='const'>OpenPayU</span><span class='op'>::</span><span class='const'>Configuration</span><span class='period'>.</span><span class='id identifier rubyid_data_format'>data_format</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>xml</span><span class='tstring_end'>'</span></span>
981
+ <span class='id identifier rubyid_generate_xml'>generate_xml</span><span class='lparen'>(</span><span class='id identifier rubyid_request_type'>request_type</span><span class='rparen'>)</span>
982
+ <span class='kw'>else</span>
983
+ <span class='lbrace'>{</span>
984
+ <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>OpenPayU</span><span class='tstring_end'>'</span></span> <span class='op'>=&gt;</span> <span class='lbrace'>{</span>
985
+ <span class='id identifier rubyid_request_type'>request_type</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_prepare_keys'>prepare_keys</span><span class='lparen'>(</span><span class='id identifier rubyid_instance_values'>instance_values</span><span class='rparen'>)</span>
986
+ <span class='rbrace'>}</span>
987
+ <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_to_json'>to_json</span>
988
+ <span class='kw'>end</span>
989
+ <span class='kw'>end</span></pre>
990
+ </td>
991
+ </tr>
992
+ </table>
993
+ </div>
994
+
995
+ <div class="method_details ">
996
+ <h3 class="signature " id="prepare_keys-instance_method">
997
+
998
+ - (<tt>Object</tt>) <strong>prepare_keys</strong>(attrs = {}, hash = get_instance_values)
999
+
1000
+
1001
+
1002
+
1003
+
1004
+ </h3><table class="source_code">
1005
+ <tr>
1006
+ <td>
1007
+ <pre class="lines">
1008
+
1009
+
1010
+ 60
1011
+ 61
1012
+ 62
1013
+ 63
1014
+ 64
1015
+ 65
1016
+ 66
1017
+ 67
1018
+ 68
1019
+ 69
1020
+ 70
1021
+ 71
1022
+ 72
1023
+ 73
1024
+ 74</pre>
1025
+ </td>
1026
+ <td>
1027
+ <pre class="code"><span class="info file"># File 'lib/openpayu/models/model.rb', line 60</span>
1028
+
1029
+ <span class='kw'>def</span> <span class='id identifier rubyid_prepare_keys'>prepare_keys</span><span class='lparen'>(</span><span class='id identifier rubyid_attrs'>attrs</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='id identifier rubyid_hash'>hash</span> <span class='op'>=</span> <span class='id identifier rubyid_get_instance_values'>get_instance_values</span><span class='rparen'>)</span>
1030
+ <span class='id identifier rubyid_hash'>hash</span><span class='period'>.</span><span class='id identifier rubyid_each_pair'>each_pair</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='comma'>,</span> <span class='id identifier rubyid_v'>v</span><span class='op'>|</span>
1031
+ <span class='id identifier rubyid_attrs'>attrs</span><span class='lbracket'>[</span><span class='id identifier rubyid_k'>k</span><span class='period'>.</span><span class='id identifier rubyid_camelize'>camelize</span><span class='rbracket'>]</span> <span class='op'>=</span>
1032
+ <span class='kw'>if</span> <span class='id identifier rubyid_v'>v</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Array</span>
1033
+ <span class='id identifier rubyid_v'>v</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_element'>element</span><span class='op'>|</span>
1034
+ <span class='lbrace'>{</span> <span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='period'>.</span><span class='id identifier rubyid_demodulize'>demodulize</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_prepare_keys'>prepare_keys</span> <span class='rbrace'>}</span>
1035
+ <span class='kw'>end</span>
1036
+ <span class='kw'>elsif</span> <span class='id identifier rubyid_v'>v</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span> <span class='op'>=~</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>OpenPayU::Models</span><span class='regexp_end'>/</span></span>
1037
+ <span class='id identifier rubyid_v'>v</span><span class='period'>.</span><span class='id identifier rubyid_prepare_keys'>prepare_keys</span>
1038
+ <span class='kw'>else</span>
1039
+ <span class='id identifier rubyid_v'>v</span>
1040
+ <span class='kw'>end</span>
1041
+ <span class='kw'>end</span>
1042
+ <span class='id identifier rubyid_attrs'>attrs</span>
1043
+ <span class='kw'>end</span></pre>
1044
+ </td>
1045
+ </tr>
1046
+ </table>
1047
+ </div>
1048
+
1049
+ <div class="method_details ">
1050
+ <h3 class="signature " id="to_flatten_hash-instance_method">
1051
+
1052
+ - (<tt>Object</tt>) <strong>to_flatten_hash</strong>(source = nil, target = {}, namespace = nil, index = nil)
1053
+
1054
+
1055
+
1056
+
1057
+
1058
+ </h3><table class="source_code">
1059
+ <tr>
1060
+ <td>
1061
+ <pre class="lines">
1062
+
1063
+
1064
+ 98
1065
+ 99
1066
+ 100
1067
+ 101
1068
+ 102
1069
+ 103
1070
+ 104
1071
+ 105
1072
+ 106
1073
+ 107
1074
+ 108
1075
+ 109
1076
+ 110
1077
+ 111
1078
+ 112
1079
+ 113
1080
+ 114
1081
+ 115</pre>
1082
+ </td>
1083
+ <td>
1084
+ <pre class="code"><span class="info file"># File 'lib/openpayu/models/model.rb', line 98</span>
1085
+
1086
+ <span class='kw'>def</span> <span class='id identifier rubyid_to_flatten_hash'>to_flatten_hash</span><span class='lparen'>(</span><span class='id identifier rubyid_source'>source</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_target'>target</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='id identifier rubyid_namespace'>namespace</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_index'>index</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
1087
+ <span class='id identifier rubyid_source'>source</span> <span class='op'>||=</span> <span class='id identifier rubyid_prepare_keys'>prepare_keys</span><span class='lparen'>(</span><span class='id identifier rubyid_instance_values'>instance_values</span><span class='rparen'>)</span>
1088
+ <span class='id identifier rubyid_prefix'>prefix</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_namespace'>namespace</span><span class='rbrace'>}</span><span class='tstring_content'>.</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_namespace'>namespace</span>
1089
+ <span class='kw'>case</span> <span class='id identifier rubyid_source'>source</span>
1090
+ <span class='kw'>when</span> <span class='const'>Hash</span>
1091
+ <span class='id identifier rubyid_array_index'>array_index</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>[</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_index'>index</span><span class='rbrace'>}</span><span class='tstring_content'>]</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_index'>index</span>
1092
+ <span class='id identifier rubyid_source'>source</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_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='op'>|</span>
1093
+ <span class='id identifier rubyid_to_flatten_hash'>to_flatten_hash</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='comma'>,</span> <span class='id identifier rubyid_target'>target</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_prefix'>prefix</span><span class='rbrace'>}</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_key'>key</span><span class='rbrace'>}</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_array_index'>array_index</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1094
+ <span class='kw'>end</span>
1095
+ <span class='kw'>when</span> <span class='const'>Array</span>
1096
+ <span class='id identifier rubyid_source'>source</span><span class='period'>.</span><span class='id identifier rubyid_each_with_index'>each_with_index</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_value'>value</span><span class='comma'>,</span> <span class='id identifier rubyid_i'>i</span><span class='op'>|</span>
1097
+ <span class='id identifier rubyid_to_flatten_hash'>to_flatten_hash</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='comma'>,</span> <span class='id identifier rubyid_target'>target</span><span class='comma'>,</span> <span class='id identifier rubyid_namespace'>namespace</span><span class='comma'>,</span> <span class='id identifier rubyid_i'>i</span><span class='rparen'>)</span>
1098
+ <span class='kw'>end</span>
1099
+ <span class='kw'>else</span>
1100
+ <span class='id identifier rubyid_target'>target</span><span class='lbracket'>[</span><span class='id identifier rubyid_namespace'>namespace</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_source'>source</span>
1101
+ <span class='kw'>end</span>
1102
+ <span class='id identifier rubyid_target'>target</span>
1103
+ <span class='kw'>end</span></pre>
1104
+ </td>
1105
+ </tr>
1106
+ </table>
1107
+ </div>
1108
+
1109
+ <div class="method_details ">
1110
+ <h3 class="signature " id="to_json-instance_method">
1111
+
1112
+ - (<tt>Object</tt>) <strong>to_json</strong>
1113
+
1114
+
1115
+
1116
+
1117
+
1118
+ </h3><table class="source_code">
1119
+ <tr>
1120
+ <td>
1121
+ <pre class="lines">
1122
+
1123
+
1124
+ 28
1125
+ 29
1126
+ 30</pre>
1127
+ </td>
1128
+ <td>
1129
+ <pre class="code"><span class="info file"># File 'lib/openpayu/models/model.rb', line 28</span>
1130
+
1131
+ <span class='kw'>def</span> <span class='id identifier rubyid_to_json'>to_json</span>
1132
+ <span class='id identifier rubyid_prepare_keys'>prepare_keys</span><span class='period'>.</span><span class='id identifier rubyid_to_json'>to_json</span>
1133
+ <span class='kw'>end</span></pre>
1134
+ </td>
1135
+ </tr>
1136
+ </table>
1137
+ </div>
1138
+
1139
+ <div class="method_details ">
1140
+ <h3 class="signature " id="validate_all_objects-instance_method">
1141
+
1142
+ - (<tt>Object</tt>) <strong>validate_all_objects</strong>
1143
+
1144
+
1145
+
1146
+
1147
+
1148
+ </h3><table class="source_code">
1149
+ <tr>
1150
+ <td>
1151
+ <pre class="lines">
1152
+
1153
+
1154
+ 76
1155
+ 77
1156
+ 78
1157
+ 79
1158
+ 80
1159
+ 81
1160
+ 82
1161
+ 83
1162
+ 84
1163
+ 85
1164
+ 86
1165
+ 87
1166
+ 88
1167
+ 89
1168
+ 90
1169
+ 91
1170
+ 92</pre>
1171
+ </td>
1172
+ <td>
1173
+ <pre class="code"><span class="info file"># File 'lib/openpayu/models/model.rb', line 76</span>
1174
+
1175
+ <span class='kw'>def</span> <span class='id identifier rubyid_validate_all_objects'>validate_all_objects</span>
1176
+ <span class='ivar'>@all_errors</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
1177
+ <span class='id identifier rubyid_instance_values'>instance_values</span><span class='period'>.</span><span class='id identifier rubyid_each_pair'>each_pair</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='comma'>,</span> <span class='id identifier rubyid_v'>v</span><span class='op'>|</span>
1178
+ <span class='kw'>if</span> <span class='id identifier rubyid_v'>v</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Array</span>
1179
+ <span class='id identifier rubyid_v'>v</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_element'>element</span><span class='op'>|</span>
1180
+ <span class='kw'>if</span> <span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_validate_all_objects'>validate_all_objects</span><span class='period'>.</span><span class='id identifier rubyid_any?'>any?</span>
1181
+ <span class='ivar'>@all_errors</span><span class='lbracket'>[</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_errors'>errors</span>
1182
+ <span class='kw'>end</span>
1183
+ <span class='kw'>end</span>
1184
+ <span class='kw'>elsif</span> <span class='id identifier rubyid_v'>v</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span> <span class='op'>=~</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>OpenPayU::Models</span><span class='regexp_end'>/</span></span>
1185
+ <span class='ivar'>@all_errors</span><span class='lbracket'>[</span><span class='id identifier rubyid_v'>v</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_v'>v</span><span class='period'>.</span><span class='id identifier rubyid_errors'>errors</span> <span class='kw'>unless</span> <span class='id identifier rubyid_v'>v</span><span class='period'>.</span><span class='id identifier rubyid_valid?'>valid?</span>
1186
+ <span class='kw'>end</span>
1187
+ <span class='kw'>end</span>
1188
+ <span class='ivar'>@all_errors</span><span class='lbracket'>[</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_errors'>errors</span> <span class='kw'>unless</span> <span class='id identifier rubyid_valid?'>valid?</span>
1189
+
1190
+ <span class='ivar'>@all_errors</span>
1191
+ <span class='kw'>end</span></pre>
1192
+ </td>
1193
+ </tr>
1194
+ </table>
1195
+ </div>
1196
+
1197
+ </div>
1198
+
1199
+ </div>
1200
+
1201
+ <div id="footer">
1202
+ Generated on Tue Dec 17 15:21:00 2013 by
1203
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1204
+ 0.8.7.2 (ruby-1.9.3).
1205
+ </div>
1206
+
1207
+ </body>
1208
+ </html>