direct7 0.0.1 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,493 @@
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: Direct7::VERIFY
8
+
9
+ &mdash; Documentation by YARD 0.9.34
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" />
16
+
17
+ <script type="text/javascript">
18
+ pathId = "Direct7::VERIFY";
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 (V)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../Direct7.html" title="Direct7 (module)">Direct7</a></span></span>
41
+ &raquo;
42
+ <span class="title">VERIFY</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: Direct7::VERIFY
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName">Object</span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next">Direct7::VERIFY</li>
78
+
79
+ </ul>
80
+ <a href="#" class="inheritanceTree">show all</a>
81
+
82
+ </dd>
83
+ </dl>
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+ <dl>
96
+ <dt>Defined in:</dt>
97
+ <dd>lib/direct7/verify.rb</dd>
98
+ </dl>
99
+
100
+ </div>
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+ <h2>
111
+ Instance Method Summary
112
+ <small><a href="#" class="summary_toggle">collapse</a></small>
113
+ </h2>
114
+
115
+ <ul class="summary">
116
+
117
+ <li class="public ">
118
+ <span class="summary_signature">
119
+
120
+ <a href="#get_status-instance_method" title="#get_status (instance method)">#<strong>get_status</strong>(otp_id) &#x21d2; Object </a>
121
+
122
+
123
+
124
+ </span>
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+ <span class="summary_desc"><div class='inline'></div></span>
135
+
136
+ </li>
137
+
138
+
139
+ <li class="public ">
140
+ <span class="summary_signature">
141
+
142
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(client) &#x21d2; VERIFY </a>
143
+
144
+
145
+
146
+ </span>
147
+
148
+
149
+ <span class="note title constructor">constructor</span>
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+ <span class="summary_desc"><div class='inline'>
159
+ <p>A new instance of VERIFY.</p>
160
+ </div></span>
161
+
162
+ </li>
163
+
164
+
165
+ <li class="public ">
166
+ <span class="summary_signature">
167
+
168
+ <a href="#resend_otp-instance_method" title="#resend_otp (instance method)">#<strong>resend_otp</strong>(otp_id) &#x21d2; Object </a>
169
+
170
+
171
+
172
+ </span>
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+
181
+
182
+ <span class="summary_desc"><div class='inline'></div></span>
183
+
184
+ </li>
185
+
186
+
187
+ <li class="public ">
188
+ <span class="summary_signature">
189
+
190
+ <a href="#send_otp-instance_method" title="#send_otp (instance method)">#<strong>send_otp</strong>(originator, recipient, content = nil, data_coding = nil, expiry = nil, template_id = nil) &#x21d2; Object </a>
191
+
192
+
193
+
194
+ </span>
195
+
196
+
197
+
198
+
199
+
200
+
201
+
202
+
203
+
204
+ <span class="summary_desc"><div class='inline'></div></span>
205
+
206
+ </li>
207
+
208
+
209
+ <li class="public ">
210
+ <span class="summary_signature">
211
+
212
+ <a href="#verify_otp-instance_method" title="#verify_otp (instance method)">#<strong>verify_otp</strong>(otp_id, otp_code) &#x21d2; Object </a>
213
+
214
+
215
+
216
+ </span>
217
+
218
+
219
+
220
+
221
+
222
+
223
+
224
+
225
+
226
+ <span class="summary_desc"><div class='inline'></div></span>
227
+
228
+ </li>
229
+
230
+
231
+ </ul>
232
+
233
+
234
+ <div id="constructor_details" class="method_details_list">
235
+ <h2>Constructor Details</h2>
236
+
237
+ <div class="method_details first">
238
+ <h3 class="signature first" id="initialize-instance_method">
239
+
240
+ #<strong>initialize</strong>(client) &#x21d2; <tt><span class='object_link'><a href="" title="Direct7::VERIFY (class)">VERIFY</a></span></tt>
241
+
242
+
243
+
244
+
245
+
246
+ </h3><div class="docstring">
247
+ <div class="discussion">
248
+
249
+ <p>Returns a new instance of VERIFY.</p>
250
+
251
+
252
+ </div>
253
+ </div>
254
+ <div class="tags">
255
+
256
+
257
+ </div><table class="source_code">
258
+ <tr>
259
+ <td>
260
+ <pre class="lines">
261
+
262
+
263
+ 8
264
+ 9
265
+ 10
266
+ 11</pre>
267
+ </td>
268
+ <td>
269
+ <pre class="code"><span class="info file"># File 'lib/direct7/verify.rb', line 8</span>
270
+
271
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_client'>client</span><span class='rparen'>)</span>
272
+ <span class='ivar'>@client</span> <span class='op'>=</span> <span class='id identifier rubyid_client'>client</span>
273
+ <span class='ivar'>@log</span> <span class='op'>=</span> <span class='const'>Logger</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='const'>STDOUT</span><span class='rparen'>)</span> <span class='comment'># You can customize the log destination as needed
274
+ </span><span class='kw'>end</span></pre>
275
+ </td>
276
+ </tr>
277
+ </table>
278
+ </div>
279
+
280
+ </div>
281
+
282
+
283
+ <div id="instance_method_details" class="method_details_list">
284
+ <h2>Instance Method Details</h2>
285
+
286
+
287
+ <div class="method_details first">
288
+ <h3 class="signature first" id="get_status-instance_method">
289
+
290
+ #<strong>get_status</strong>(otp_id) &#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
+ 57
303
+ 58
304
+ 59
305
+ 60
306
+ 61
307
+ 62
308
+ 63
309
+ 64</pre>
310
+ </td>
311
+ <td>
312
+ <pre class="code"><span class="info file"># File 'lib/direct7/verify.rb', line 57</span>
313
+
314
+ <span class='kw'>def</span> <span class='id identifier rubyid_get_status'>get_status</span><span class='lparen'>(</span><span class='id identifier rubyid_otp_id'>otp_id</span><span class='rparen'>)</span>
315
+ <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_get'>get</span><span class='lparen'>(</span>
316
+ <span class='ivar'>@client</span><span class='period'>.</span><span class='id identifier rubyid_host'>host</span><span class='comma'>,</span>
317
+ <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/verify/v1/report/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_otp_id'>otp_id</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
318
+ <span class='rparen'>)</span>
319
+ <span class='ivar'>@log</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>OTP Message status retrieved successfully.</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
320
+ <span class='id identifier rubyid_response'>response</span>
321
+ <span class='kw'>end</span></pre>
322
+ </td>
323
+ </tr>
324
+ </table>
325
+ </div>
326
+
327
+ <div class="method_details ">
328
+ <h3 class="signature " id="resend_otp-instance_method">
329
+
330
+ #<strong>resend_otp</strong>(otp_id) &#x21d2; <tt>Object</tt>
331
+
332
+
333
+
334
+
335
+
336
+ </h3><table class="source_code">
337
+ <tr>
338
+ <td>
339
+ <pre class="lines">
340
+
341
+
342
+ 34
343
+ 35
344
+ 36
345
+ 37
346
+ 38
347
+ 39
348
+ 40
349
+ 41
350
+ 42
351
+ 43
352
+ 44
353
+ 45</pre>
354
+ </td>
355
+ <td>
356
+ <pre class="code"><span class="info file"># File 'lib/direct7/verify.rb', line 34</span>
357
+
358
+ <span class='kw'>def</span> <span class='id identifier rubyid_resend_otp'>resend_otp</span><span class='lparen'>(</span><span class='id identifier rubyid_otp_id'>otp_id</span><span class='rparen'>)</span>
359
+ <span class='id identifier rubyid_params'>params</span> <span class='op'>=</span> <span class='lbrace'>{</span>
360
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>otp_id</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_otp_id'>otp_id</span>
361
+ <span class='rbrace'>}</span>
362
+ <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_post'>post</span><span class='lparen'>(</span>
363
+ <span class='ivar'>@client</span><span class='period'>.</span><span class='id identifier rubyid_host'>host</span><span class='comma'>,</span>
364
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>/verify/v1/otp/resend-otp</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='kw'>true</span><span class='comma'>,</span>
365
+ <span class='id identifier rubyid_params'>params</span><span class='op'>=</span> <span class='id identifier rubyid_params'>params</span>
366
+ <span class='rparen'>)</span>
367
+ <span class='ivar'>@log</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>OTP Message Re-sent successfully.</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
368
+ <span class='id identifier rubyid_response'>response</span>
369
+ <span class='kw'>end</span></pre>
370
+ </td>
371
+ </tr>
372
+ </table>
373
+ </div>
374
+
375
+ <div class="method_details ">
376
+ <h3 class="signature " id="send_otp-instance_method">
377
+
378
+ #<strong>send_otp</strong>(originator, recipient, content = nil, data_coding = nil, expiry = nil, template_id = nil) &#x21d2; <tt>Object</tt>
379
+
380
+
381
+
382
+
383
+
384
+ </h3><table class="source_code">
385
+ <tr>
386
+ <td>
387
+ <pre class="lines">
388
+
389
+
390
+ 13
391
+ 14
392
+ 15
393
+ 16
394
+ 17
395
+ 18
396
+ 19
397
+ 20
398
+ 21
399
+ 22
400
+ 23
401
+ 24
402
+ 25
403
+ 26
404
+ 27
405
+ 28
406
+ 29
407
+ 30
408
+ 31
409
+ 32</pre>
410
+ </td>
411
+ <td>
412
+ <pre class="code"><span class="info file"># File 'lib/direct7/verify.rb', line 13</span>
413
+
414
+ <span class='kw'>def</span> <span class='id identifier rubyid_send_otp'>send_otp</span><span class='lparen'>(</span><span class='id identifier rubyid_originator'>originator</span><span class='comma'>,</span> <span class='id identifier rubyid_recipient'>recipient</span><span class='comma'>,</span> <span class='id identifier rubyid_content'>content</span><span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_data_coding'>data_coding</span><span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_expiry'>expiry</span><span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_template_id'>template_id</span><span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
415
+ <span class='kw'>if</span> <span class='id identifier rubyid_template_id'>template_id</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
416
+ <span class='id identifier rubyid_params'>params</span> <span class='op'>=</span> <span class='lbrace'>{</span>
417
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>originator</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_originator'>originator</span><span class='comma'>,</span>
418
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>recipient</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_recipient'>recipient</span><span class='comma'>,</span>
419
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>content</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_content'>content</span><span class='comma'>,</span>
420
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>expiry</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_expiry'>expiry</span><span class='comma'>,</span>
421
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>data_coding</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_data_coding'>data_coding</span>
422
+ <span class='rbrace'>}</span>
423
+ <span class='kw'>else</span>
424
+ <span class='id identifier rubyid_params'>params</span> <span class='op'>=</span> <span class='lbrace'>{</span>
425
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>originator</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_originator'>originator</span><span class='comma'>,</span>
426
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>recipient</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_recipient'>recipient</span><span class='comma'>,</span>
427
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>template_id</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_template_id'>template_id</span>
428
+ <span class='rbrace'>}</span>
429
+ <span class='kw'>end</span>
430
+ <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_post'>post</span><span class='lparen'>(</span><span class='ivar'>@client</span><span class='period'>.</span><span class='id identifier rubyid_host'>host</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>/verify/v1/otp/send-otp</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='id identifier rubyid_params'>params</span><span class='op'>=</span> <span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span>
431
+ <span class='ivar'>@log</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>OTP Message sent successfully.</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
432
+ <span class='id identifier rubyid_response'>response</span>
433
+ <span class='kw'>end</span></pre>
434
+ </td>
435
+ </tr>
436
+ </table>
437
+ </div>
438
+
439
+ <div class="method_details ">
440
+ <h3 class="signature " id="verify_otp-instance_method">
441
+
442
+ #<strong>verify_otp</strong>(otp_id, otp_code) &#x21d2; <tt>Object</tt>
443
+
444
+
445
+
446
+
447
+
448
+ </h3><table class="source_code">
449
+ <tr>
450
+ <td>
451
+ <pre class="lines">
452
+
453
+
454
+ 47
455
+ 48
456
+ 49
457
+ 50
458
+ 51
459
+ 52
460
+ 53
461
+ 54
462
+ 55</pre>
463
+ </td>
464
+ <td>
465
+ <pre class="code"><span class="info file"># File 'lib/direct7/verify.rb', line 47</span>
466
+
467
+ <span class='kw'>def</span> <span class='id identifier rubyid_verify_otp'>verify_otp</span><span class='lparen'>(</span><span class='id identifier rubyid_otp_id'>otp_id</span><span class='comma'>,</span> <span class='id identifier rubyid_otp_code'>otp_code</span><span class='rparen'>)</span>
468
+ <span class='id identifier rubyid_params'>params</span> <span class='op'>=</span> <span class='lbrace'>{</span>
469
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>otp_id</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_otp_id'>otp_id</span><span class='comma'>,</span>
470
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>otp_code</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_otp_code'>otp_code</span>
471
+ <span class='rbrace'>}</span>
472
+ <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_post'>post</span><span class='lparen'>(</span><span class='ivar'>@client</span><span class='period'>.</span><span class='id identifier rubyid_host'>host</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>/verify/v1/otp/verify-otp</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='id identifier rubyid_params'>params</span><span class='op'>=</span> <span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span>
473
+ <span class='ivar'>@log</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>OTP Message verified successfully.</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
474
+ <span class='id identifier rubyid_response'>response</span>
475
+ <span class='kw'>end</span></pre>
476
+ </td>
477
+ </tr>
478
+ </table>
479
+ </div>
480
+
481
+ </div>
482
+
483
+ </div>
484
+
485
+ <div id="footer">
486
+ Generated on Fri Nov 3 09:22:45 2023 by
487
+ <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
488
+ 0.9.34 (ruby-2.7.4).
489
+ </div>
490
+
491
+ </div>
492
+ </body>
493
+ </html>