t2_airtime 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,491 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Class: T2Airtime::AirtimeController
8
+
9
+ &mdash; Documentation by YARD 0.9.9
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
+ pathId = "T2Airtime::AirtimeController";
19
+ relpath = '../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../_index.html">Index (A)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../T2Airtime.html" title="T2Airtime (module)">T2Airtime</a></span></span>
41
+ &raquo;
42
+ <span class="title">AirtimeController</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Class: T2Airtime::AirtimeController
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName">ActionController::API</span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next">ActionController::API</li>
78
+
79
+ <li class="next">T2Airtime::AirtimeController</li>
80
+
81
+ </ul>
82
+ <a href="#" class="inheritanceTree">show all</a>
83
+
84
+ </dd>
85
+ </dl>
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+ <dl>
98
+ <dt>Defined in:</dt>
99
+ <dd>app/controllers/t2_airtime/airtime_controller.rb</dd>
100
+ </dl>
101
+
102
+ </div>
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+ <h2>
113
+ Instance Method Summary
114
+ <small><a href="#" class="summary_toggle">collapse</a></small>
115
+ </h2>
116
+
117
+ <ul class="summary">
118
+
119
+ <li class="public ">
120
+ <span class="summary_signature">
121
+
122
+ <a href="#countries-instance_method" title="#countries (instance method)">#<strong>countries</strong> &#x21d2; Object </a>
123
+
124
+
125
+
126
+ </span>
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+ <span class="summary_desc"><div class='inline'></div></span>
137
+
138
+ </li>
139
+
140
+
141
+ <li class="public ">
142
+ <span class="summary_signature">
143
+
144
+ <a href="#operators-instance_method" title="#operators (instance method)">#<strong>operators</strong> &#x21d2; Object </a>
145
+
146
+
147
+
148
+ </span>
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+ <span class="summary_desc"><div class='inline'></div></span>
159
+
160
+ </li>
161
+
162
+
163
+ <li class="public ">
164
+ <span class="summary_signature">
165
+
166
+ <a href="#products-instance_method" title="#products (instance method)">#<strong>products</strong> &#x21d2; Object </a>
167
+
168
+
169
+
170
+ </span>
171
+
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+ <span class="summary_desc"><div class='inline'></div></span>
181
+
182
+ </li>
183
+
184
+
185
+ <li class="public ">
186
+ <span class="summary_signature">
187
+
188
+ <a href="#transaction-instance_method" title="#transaction (instance method)">#<strong>transaction</strong> &#x21d2; Object </a>
189
+
190
+
191
+
192
+ </span>
193
+
194
+
195
+
196
+
197
+
198
+
199
+
200
+
201
+
202
+ <span class="summary_desc"><div class='inline'></div></span>
203
+
204
+ </li>
205
+
206
+
207
+ <li class="public ">
208
+ <span class="summary_signature">
209
+
210
+ <a href="#transactions-instance_method" title="#transactions (instance method)">#<strong>transactions</strong> &#x21d2; Object </a>
211
+
212
+
213
+
214
+ </span>
215
+
216
+
217
+
218
+
219
+
220
+
221
+
222
+
223
+
224
+ <span class="summary_desc"><div class='inline'></div></span>
225
+
226
+ </li>
227
+
228
+
229
+ </ul>
230
+
231
+
232
+
233
+
234
+
235
+ <div id="instance_method_details" class="method_details_list">
236
+ <h2>Instance Method Details</h2>
237
+
238
+
239
+ <div class="method_details first">
240
+ <h3 class="signature first" id="countries-instance_method">
241
+
242
+ #<strong>countries</strong> &#x21d2; <tt>Object</tt>
243
+
244
+
245
+
246
+
247
+
248
+ </h3><table class="source_code">
249
+ <tr>
250
+ <td>
251
+ <pre class="lines">
252
+
253
+
254
+ 4
255
+ 5
256
+ 6
257
+ 7
258
+ 8
259
+ 9
260
+ 10
261
+ 11
262
+ 12
263
+ 13
264
+ 14
265
+ 15</pre>
266
+ </td>
267
+ <td>
268
+ <pre class="code"><span class="info file"># File 'app/controllers/t2_airtime/airtime_controller.rb', line 4</span>
269
+
270
+ <span class='kw'>def</span> <span class='id identifier rubyid_countries'>countries</span>
271
+ <span class='id identifier rubyid_reply'>reply</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../T2Airtime.html" title="T2Airtime (module)">T2Airtime</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="API.html" title="T2Airtime::API (class)">API</a></span></span><span class='period'>.</span><span class='id identifier rubyid_api'><span class='object_link'><a href="Base.html#api-class_method" title="T2Airtime::Base.api (method)">api</a></span></span><span class='period'>.</span><span class='id identifier rubyid_country_list'>country_list</span>
272
+ <span class='kw'>if</span> <span class='id identifier rubyid_reply'>reply</span><span class='period'>.</span><span class='id identifier rubyid_success?'>success?</span>
273
+ <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../T2Airtime.html" title="T2Airtime (module)">T2Airtime</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Country.html" title="T2Airtime::Country (class)">Country</a></span></span><span class='period'>.</span><span class='id identifier rubyid_serialize'><span class='object_link'><a href="Country.html#serialize-class_method" title="T2Airtime::Country.serialize (method)">serialize</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_reply'>reply</span><span class='period'>.</span><span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span>
274
+ <span class='id identifier rubyid_render'>render</span> <span class='label'>json:</span> <span class='lbrace'>{</span>
275
+ <span class='label'>countries:</span> <span class='id identifier rubyid_data'>data</span><span class='comma'>,</span>
276
+ <span class='label'>status:</span> <span class='symbol'>:ok</span>
277
+ <span class='rbrace'>}</span>
278
+ <span class='kw'>else</span>
279
+ <span class='id identifier rubyid_render_error'>render_error</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="../T2Airtime.html" title="T2Airtime (module)">T2Airtime</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Error.html" title="T2Airtime::Error (class)">Error</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Error.html#initialize-instance_method" title="T2Airtime::Error#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_reply'>reply</span><span class='period'>.</span><span class='id identifier rubyid_error_code'>error_code</span><span class='comma'>,</span> <span class='id identifier rubyid_reply'>reply</span><span class='period'>.</span><span class='id identifier rubyid_error_message'>error_message</span><span class='rparen'>)</span><span class='rparen'>)</span>
280
+ <span class='kw'>end</span>
281
+ <span class='kw'>end</span></pre>
282
+ </td>
283
+ </tr>
284
+ </table>
285
+ </div>
286
+
287
+ <div class="method_details ">
288
+ <h3 class="signature " id="operators-instance_method">
289
+
290
+ #<strong>operators</strong> &#x21d2; <tt>Object</tt>
291
+
292
+
293
+
294
+
295
+
296
+ </h3><table class="source_code">
297
+ <tr>
298
+ <td>
299
+ <pre class="lines">
300
+
301
+
302
+ 17
303
+ 18
304
+ 19
305
+ 20
306
+ 21
307
+ 22
308
+ 23
309
+ 24
310
+ 25
311
+ 26
312
+ 27
313
+ 28</pre>
314
+ </td>
315
+ <td>
316
+ <pre class="code"><span class="info file"># File 'app/controllers/t2_airtime/airtime_controller.rb', line 17</span>
317
+
318
+ <span class='kw'>def</span> <span class='id identifier rubyid_operators'>operators</span>
319
+ <span class='id identifier rubyid_reply'>reply</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../T2Airtime.html" title="T2Airtime (module)">T2Airtime</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="API.html" title="T2Airtime::API (class)">API</a></span></span><span class='period'>.</span><span class='id identifier rubyid_api'><span class='object_link'><a href="Base.html#api-class_method" title="T2Airtime::Base.api (method)">api</a></span></span><span class='period'>.</span><span class='id identifier rubyid_operator_list'>operator_list</span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='symbol'>:country_aid</span><span class='rbracket'>]</span><span class='rparen'>)</span>
320
+ <span class='kw'>if</span> <span class='id identifier rubyid_reply'>reply</span><span class='period'>.</span><span class='id identifier rubyid_success?'>success?</span>
321
+ <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../T2Airtime.html" title="T2Airtime (module)">T2Airtime</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Operator.html" title="T2Airtime::Operator (class)">Operator</a></span></span><span class='period'>.</span><span class='id identifier rubyid_serialize'><span class='object_link'><a href="Operator.html#serialize-class_method" title="T2Airtime::Operator.serialize (method)">serialize</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_reply'>reply</span><span class='period'>.</span><span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span>
322
+ <span class='id identifier rubyid_render'>render</span> <span class='label'>json:</span> <span class='lbrace'>{</span>
323
+ <span class='label'>operators:</span> <span class='id identifier rubyid_data'>data</span><span class='comma'>,</span>
324
+ <span class='label'>status:</span> <span class='symbol'>:ok</span>
325
+ <span class='rbrace'>}</span>
326
+ <span class='kw'>else</span>
327
+ <span class='id identifier rubyid_render_error'>render_error</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="../T2Airtime.html" title="T2Airtime (module)">T2Airtime</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Error.html" title="T2Airtime::Error (class)">Error</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Error.html#initialize-instance_method" title="T2Airtime::Error#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_reply'>reply</span><span class='period'>.</span><span class='id identifier rubyid_error_code'>error_code</span><span class='comma'>,</span> <span class='id identifier rubyid_reply'>reply</span><span class='period'>.</span><span class='id identifier rubyid_error_message'>error_message</span><span class='rparen'>)</span><span class='rparen'>)</span>
328
+ <span class='kw'>end</span>
329
+ <span class='kw'>end</span></pre>
330
+ </td>
331
+ </tr>
332
+ </table>
333
+ </div>
334
+
335
+ <div class="method_details ">
336
+ <h3 class="signature " id="products-instance_method">
337
+
338
+ #<strong>products</strong> &#x21d2; <tt>Object</tt>
339
+
340
+
341
+
342
+
343
+
344
+ </h3><table class="source_code">
345
+ <tr>
346
+ <td>
347
+ <pre class="lines">
348
+
349
+
350
+ 30
351
+ 31
352
+ 32
353
+ 33
354
+ 34
355
+ 35
356
+ 36
357
+ 37
358
+ 38
359
+ 39
360
+ 40
361
+ 41</pre>
362
+ </td>
363
+ <td>
364
+ <pre class="code"><span class="info file"># File 'app/controllers/t2_airtime/airtime_controller.rb', line 30</span>
365
+
366
+ <span class='kw'>def</span> <span class='id identifier rubyid_products'>products</span>
367
+ <span class='id identifier rubyid_reply'>reply</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../T2Airtime.html" title="T2Airtime (module)">T2Airtime</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="API.html" title="T2Airtime::API (class)">API</a></span></span><span class='period'>.</span><span class='id identifier rubyid_api'><span class='object_link'><a href="Base.html#api-class_method" title="T2Airtime::Base.api (method)">api</a></span></span><span class='period'>.</span><span class='id identifier rubyid_product_list'>product_list</span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='symbol'>:operator_aid</span><span class='rbracket'>]</span><span class='rparen'>)</span>
368
+ <span class='kw'>if</span> <span class='id identifier rubyid_reply'>reply</span><span class='period'>.</span><span class='id identifier rubyid_success?'>success?</span>
369
+ <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../T2Airtime.html" title="T2Airtime (module)">T2Airtime</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Product.html" title="T2Airtime::Product (class)">Product</a></span></span><span class='period'>.</span><span class='id identifier rubyid_serialize'><span class='object_link'><a href="Product.html#serialize-class_method" title="T2Airtime::Product.serialize (method)">serialize</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_reply'>reply</span><span class='period'>.</span><span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span>
370
+ <span class='id identifier rubyid_render'>render</span> <span class='label'>json:</span> <span class='lbrace'>{</span>
371
+ <span class='label'>products:</span> <span class='id identifier rubyid_data'>data</span><span class='comma'>,</span>
372
+ <span class='label'>status:</span> <span class='symbol'>:ok</span>
373
+ <span class='rbrace'>}</span>
374
+ <span class='kw'>else</span>
375
+ <span class='id identifier rubyid_render_error'>render_error</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="../T2Airtime.html" title="T2Airtime (module)">T2Airtime</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Error.html" title="T2Airtime::Error (class)">Error</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Error.html#initialize-instance_method" title="T2Airtime::Error#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_reply'>reply</span><span class='period'>.</span><span class='id identifier rubyid_error_code'>error_code</span><span class='comma'>,</span> <span class='id identifier rubyid_reply'>reply</span><span class='period'>.</span><span class='id identifier rubyid_error_message'>error_message</span><span class='rparen'>)</span><span class='rparen'>)</span>
376
+ <span class='kw'>end</span>
377
+ <span class='kw'>end</span></pre>
378
+ </td>
379
+ </tr>
380
+ </table>
381
+ </div>
382
+
383
+ <div class="method_details ">
384
+ <h3 class="signature " id="transaction-instance_method">
385
+
386
+ #<strong>transaction</strong> &#x21d2; <tt>Object</tt>
387
+
388
+
389
+
390
+
391
+
392
+ </h3><table class="source_code">
393
+ <tr>
394
+ <td>
395
+ <pre class="lines">
396
+
397
+
398
+ 56
399
+ 57
400
+ 58
401
+ 59
402
+ 60
403
+ 61
404
+ 62
405
+ 63
406
+ 64
407
+ 65
408
+ 66
409
+ 67</pre>
410
+ </td>
411
+ <td>
412
+ <pre class="code"><span class="info file"># File 'app/controllers/t2_airtime/airtime_controller.rb', line 56</span>
413
+
414
+ <span class='kw'>def</span> <span class='id identifier rubyid_transaction'>transaction</span>
415
+ <span class='id identifier rubyid_reply'>reply</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../T2Airtime.html" title="T2Airtime (module)">T2Airtime</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="API.html" title="T2Airtime::API (class)">API</a></span></span><span class='period'>.</span><span class='id identifier rubyid_api'><span class='object_link'><a href="Base.html#api-class_method" title="T2Airtime::Base.api (method)">api</a></span></span><span class='period'>.</span><span class='id identifier rubyid_trans_info'>trans_info</span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='symbol'>:id</span><span class='rbracket'>]</span><span class='rparen'>)</span>
416
+ <span class='kw'>if</span> <span class='id identifier rubyid_reply'>reply</span><span class='period'>.</span><span class='id identifier rubyid_success?'>success?</span>
417
+ <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../T2Airtime.html" title="T2Airtime (module)">T2Airtime</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Transaction.html" title="T2Airtime::Transaction (class)">Transaction</a></span></span><span class='period'>.</span><span class='id identifier rubyid_serialize_one'><span class='object_link'><a href="Transaction.html#serialize_one-class_method" title="T2Airtime::Transaction.serialize_one (method)">serialize_one</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_reply'>reply</span><span class='period'>.</span><span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span>
418
+ <span class='id identifier rubyid_render'>render</span> <span class='label'>json:</span> <span class='lbrace'>{</span>
419
+ <span class='label'>transaction:</span> <span class='id identifier rubyid_data'>data</span><span class='comma'>,</span>
420
+ <span class='label'>status:</span> <span class='symbol'>:ok</span>
421
+ <span class='rbrace'>}</span>
422
+ <span class='kw'>else</span>
423
+ <span class='id identifier rubyid_render_error'>render_error</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="../T2Airtime.html" title="T2Airtime (module)">T2Airtime</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Error.html" title="T2Airtime::Error (class)">Error</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Error.html#initialize-instance_method" title="T2Airtime::Error#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_reply'>reply</span><span class='period'>.</span><span class='id identifier rubyid_error_code'>error_code</span><span class='comma'>,</span> <span class='id identifier rubyid_reply'>reply</span><span class='period'>.</span><span class='id identifier rubyid_error_message'>error_message</span><span class='rparen'>)</span><span class='rparen'>)</span>
424
+ <span class='kw'>end</span>
425
+ <span class='kw'>end</span></pre>
426
+ </td>
427
+ </tr>
428
+ </table>
429
+ </div>
430
+
431
+ <div class="method_details ">
432
+ <h3 class="signature " id="transactions-instance_method">
433
+
434
+ #<strong>transactions</strong> &#x21d2; <tt>Object</tt>
435
+
436
+
437
+
438
+
439
+
440
+ </h3><table class="source_code">
441
+ <tr>
442
+ <td>
443
+ <pre class="lines">
444
+
445
+
446
+ 43
447
+ 44
448
+ 45
449
+ 46
450
+ 47
451
+ 48
452
+ 49
453
+ 50
454
+ 51
455
+ 52
456
+ 53
457
+ 54</pre>
458
+ </td>
459
+ <td>
460
+ <pre class="code"><span class="info file"># File 'app/controllers/t2_airtime/airtime_controller.rb', line 43</span>
461
+
462
+ <span class='kw'>def</span> <span class='id identifier rubyid_transactions'>transactions</span>
463
+ <span class='id identifier rubyid_reply'>reply</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../T2Airtime.html" title="T2Airtime (module)">T2Airtime</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="API.html" title="T2Airtime::API (class)">API</a></span></span><span class='period'>.</span><span class='id identifier rubyid_api'><span class='object_link'><a href="Base.html#api-class_method" title="T2Airtime::Base.api (method)">api</a></span></span><span class='period'>.</span><span class='id identifier rubyid_trans_list'>trans_list</span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='symbol'>:start</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='symbol'>:stop</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='symbol'>:msisdn</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='symbol'>:destination</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='symbol'>:code</span><span class='rbracket'>]</span><span class='rparen'>)</span>
464
+ <span class='kw'>if</span> <span class='id identifier rubyid_reply'>reply</span><span class='period'>.</span><span class='id identifier rubyid_success?'>success?</span>
465
+ <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../T2Airtime.html" title="T2Airtime (module)">T2Airtime</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Transaction.html" title="T2Airtime::Transaction (class)">Transaction</a></span></span><span class='period'>.</span><span class='id identifier rubyid_serialize'><span class='object_link'><a href="Transaction.html#serialize-class_method" title="T2Airtime::Transaction.serialize (method)">serialize</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_reply'>reply</span><span class='period'>.</span><span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span>
466
+ <span class='id identifier rubyid_render'>render</span> <span class='label'>json:</span> <span class='lbrace'>{</span>
467
+ <span class='label'>transactions:</span> <span class='id identifier rubyid_data'>data</span><span class='comma'>,</span>
468
+ <span class='label'>status:</span> <span class='symbol'>:ok</span>
469
+ <span class='rbrace'>}</span>
470
+ <span class='kw'>else</span>
471
+ <span class='id identifier rubyid_render_error'>render_error</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="../T2Airtime.html" title="T2Airtime (module)">T2Airtime</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Error.html" title="T2Airtime::Error (class)">Error</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Error.html#initialize-instance_method" title="T2Airtime::Error#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_reply'>reply</span><span class='period'>.</span><span class='id identifier rubyid_error_code'>error_code</span><span class='comma'>,</span> <span class='id identifier rubyid_reply'>reply</span><span class='period'>.</span><span class='id identifier rubyid_error_message'>error_message</span><span class='rparen'>)</span><span class='rparen'>)</span>
472
+ <span class='kw'>end</span>
473
+ <span class='kw'>end</span></pre>
474
+ </td>
475
+ </tr>
476
+ </table>
477
+ </div>
478
+
479
+ </div>
480
+
481
+ </div>
482
+
483
+ <div id="footer">
484
+ Generated on Sun Aug 27 17:54:08 2017 by
485
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
486
+ 0.9.9 (ruby-2.3.3).
487
+ </div>
488
+
489
+ </div>
490
+ </body>
491
+ </html>