sms77 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +6 -4
  3. data/.idea/.gitignore +8 -0
  4. data/.idea/inspectionProfiles/Project_Default.xml +6 -0
  5. data/.idea/modules.xml +8 -0
  6. data/.idea/ruby-client.iml +18 -0
  7. data/.idea/vcs.xml +6 -0
  8. data/Gemfile +2 -2
  9. data/LICENSE +20 -20
  10. data/README.md +41 -35
  11. data/Rakefile +5 -5
  12. data/doc/Sms77/Client.html +230 -0
  13. data/doc/Sms77/Contacts/Action.html +131 -0
  14. data/doc/Sms77/Contacts.html +126 -0
  15. data/doc/Sms77/Endpoint.html +187 -0
  16. data/doc/Sms77/Hooks/Action.html +131 -0
  17. data/doc/Sms77/Hooks/EventType.html +146 -0
  18. data/doc/Sms77/Hooks/RequestMethod.html +131 -0
  19. data/doc/Sms77/Hooks/Validator.html +598 -0
  20. data/doc/Sms77/Hooks.html +126 -0
  21. data/doc/Sms77/Journal/Type.html +136 -0
  22. data/doc/Sms77/Journal/Validator.html +394 -0
  23. data/doc/Sms77/Journal.html +126 -0
  24. data/doc/Sms77/Lookup/Type.html +136 -0
  25. data/doc/Sms77/Lookup.html +126 -0
  26. data/doc/Sms77/Resource.html +870 -0
  27. data/doc/Sms77/Resources/Analytics.html +263 -0
  28. data/doc/Sms77/Resources/Balance.html +246 -0
  29. data/doc/Sms77/Resources/Contacts.html +449 -0
  30. data/doc/Sms77/Resources/Hooks.html +457 -0
  31. data/doc/Sms77/Resources/Journal.html +261 -0
  32. data/doc/Sms77/Resources/Lookup.html +540 -0
  33. data/doc/Sms77/Resources/Pricing.html +263 -0
  34. data/doc/Sms77/Resources/Sms.html +261 -0
  35. data/doc/Sms77/Resources/Status.html +261 -0
  36. data/doc/Sms77/Resources/Subaccounts.html +651 -0
  37. data/doc/Sms77/Resources/ValidateForVoice.html +261 -0
  38. data/doc/Sms77/Resources/Voice.html +261 -0
  39. data/doc/Sms77/Resources.html +128 -0
  40. data/doc/Sms77/Sms/Type.html +126 -0
  41. data/doc/Sms77/Sms.html +126 -0
  42. data/doc/Sms77/Subaccounts/Action.html +141 -0
  43. data/doc/Sms77/Subaccounts/Validator.html +490 -0
  44. data/doc/Sms77/Subaccounts.html +126 -0
  45. data/doc/Sms77/Util.html +1033 -0
  46. data/doc/Sms77.html +146 -0
  47. data/doc/_index.html +444 -0
  48. data/doc/class_list.html +51 -0
  49. data/doc/css/common.css +1 -0
  50. data/doc/css/full_list.css +58 -0
  51. data/doc/css/style.css +497 -0
  52. data/doc/file.README.html +112 -0
  53. data/doc/file_list.html +56 -0
  54. data/doc/frames.html +17 -0
  55. data/doc/index.html +112 -0
  56. data/doc/js/app.js +314 -0
  57. data/doc/js/full_list.js +216 -0
  58. data/doc/js/jquery.js +4 -0
  59. data/doc/method_list.html +563 -0
  60. data/doc/top-level-namespace.html +110 -0
  61. data/lib/sms77/client.rb +30 -29
  62. data/lib/sms77/contacts.rb +10 -9
  63. data/lib/sms77/endpoint.rb +17 -15
  64. data/lib/sms77/hooks.rb +67 -64
  65. data/lib/sms77/journal.rb +39 -38
  66. data/lib/sms77/lookup.rb +11 -10
  67. data/lib/sms77/resource.rb +94 -93
  68. data/lib/sms77/resources/analytics.rb +21 -16
  69. data/lib/sms77/resources/balance.rb +19 -15
  70. data/lib/sms77/resources/contacts.rb +38 -25
  71. data/lib/sms77/resources/hooks.rb +40 -29
  72. data/lib/sms77/resources/journal.rb +20 -15
  73. data/lib/sms77/resources/lookup.rb +47 -29
  74. data/lib/sms77/resources/pricing.rb +20 -15
  75. data/lib/sms77/resources/sms.rb +20 -15
  76. data/lib/sms77/resources/status.rb +20 -15
  77. data/lib/sms77/resources/subaccounts.rb +66 -0
  78. data/lib/sms77/resources/validate_for_voice.rb +20 -15
  79. data/lib/sms77/resources/voice.rb +20 -15
  80. data/lib/sms77/sms.rb +9 -8
  81. data/lib/sms77/subaccounts.rb +55 -0
  82. data/lib/sms77/util.rb +68 -67
  83. data/lib/sms77/version.rb +5 -5
  84. data/lib/sms77.rb +6 -6
  85. data/release.sh +4 -7
  86. data/sms77.gemspec +21 -21
  87. data/spec/EnvKeyStore.rb +14 -14
  88. data/spec/matchers.rb +22 -22
  89. data/spec/sms77/balance_spec.rb +12 -12
  90. data/spec/sms77/client_spec.rb +15 -15
  91. data/spec/sms77/contacts_spec.rb +129 -116
  92. data/spec/sms77/hooks_spec.rb +108 -105
  93. data/spec/sms77/instance_spec.rb +22 -20
  94. data/spec/sms77/journal_spec.rb +86 -86
  95. data/spec/sms77/lookup_spec.rb +179 -179
  96. data/spec/sms77/pricing_spec.rb +76 -76
  97. data/spec/sms77/sms_spec.rb +103 -103
  98. data/spec/sms77/subaccounts_spec.rb +121 -0
  99. data/spec/sms77/validate_for_voice_spec.rb +19 -19
  100. data/spec/sms77/voice_spec.rb +51 -51
  101. data/spec/sms77_spec.rb +9 -7
  102. data/spec/spec_helper.rb +53 -53
  103. metadata +75 -17
@@ -0,0 +1,490 @@
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
+ Module: Sms77::Subaccounts::Validator
8
+
9
+ &mdash; Documentation by YARD 0.9.27
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 = "Sms77::Subaccounts::Validator";
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="../../Sms77.html" title="Sms77 (module)">Sms77</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Subaccounts.html" title="Sms77::Subaccounts (module)">Subaccounts</a></span></span>
41
+ &raquo;
42
+ <span class="title">Validator</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>Module: Sms77::Subaccounts::Validator
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+ <dl>
80
+ <dt>Defined in:</dt>
81
+ <dd>lib/sms77/subaccounts.rb</dd>
82
+ </dl>
83
+
84
+ </div>
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+ <h2>
95
+ Class Method Summary
96
+ <small><a href="#" class="summary_toggle">collapse</a></small>
97
+ </h2>
98
+
99
+ <ul class="summary">
100
+
101
+ <li class="public ">
102
+ <span class="summary_signature">
103
+
104
+ <a href="#create-class_method" title="create (class method)">.<strong>create</strong>(params) &#x21d2; Object </a>
105
+
106
+
107
+
108
+ </span>
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+
118
+ <span class="summary_desc"><div class='inline'></div></span>
119
+
120
+ </li>
121
+
122
+
123
+ <li class="public ">
124
+ <span class="summary_signature">
125
+
126
+ <a href="#delete-class_method" title="delete (class method)">.<strong>delete</strong>(params) &#x21d2; Object </a>
127
+
128
+
129
+
130
+ </span>
131
+
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+ <span class="summary_desc"><div class='inline'></div></span>
141
+
142
+ </li>
143
+
144
+
145
+ <li class="public ">
146
+ <span class="summary_signature">
147
+
148
+ <a href="#is_action%3F-class_method" title="is_action? (class method)">.<strong>is_action?</strong>(str) &#x21d2; Boolean </a>
149
+
150
+
151
+
152
+ </span>
153
+
154
+
155
+
156
+
157
+
158
+
159
+
160
+
161
+
162
+ <span class="summary_desc"><div class='inline'></div></span>
163
+
164
+ </li>
165
+
166
+
167
+ <li class="public ">
168
+ <span class="summary_signature">
169
+
170
+ <a href="#transfer_credits-class_method" title="transfer_credits (class method)">.<strong>transfer_credits</strong>(params) &#x21d2; Object </a>
171
+
172
+
173
+
174
+ </span>
175
+
176
+
177
+
178
+
179
+
180
+
181
+
182
+
183
+
184
+ <span class="summary_desc"><div class='inline'></div></span>
185
+
186
+ </li>
187
+
188
+
189
+ <li class="public ">
190
+ <span class="summary_signature">
191
+
192
+ <a href="#update-class_method" title="update (class method)">.<strong>update</strong>(params) &#x21d2; Object </a>
193
+
194
+
195
+
196
+ </span>
197
+
198
+
199
+
200
+
201
+
202
+
203
+
204
+
205
+
206
+ <span class="summary_desc"><div class='inline'></div></span>
207
+
208
+ </li>
209
+
210
+
211
+ <li class="public ">
212
+ <span class="summary_signature">
213
+
214
+ <a href="#validate-class_method" title="validate (class method)">.<strong>validate</strong>(params) &#x21d2; Object </a>
215
+
216
+
217
+
218
+ </span>
219
+
220
+
221
+
222
+
223
+
224
+
225
+
226
+
227
+
228
+ <span class="summary_desc"><div class='inline'></div></span>
229
+
230
+ </li>
231
+
232
+
233
+ </ul>
234
+
235
+
236
+
237
+
238
+ <div id="class_method_details" class="method_details_list">
239
+ <h2>Class Method Details</h2>
240
+
241
+
242
+ <div class="method_details first">
243
+ <h3 class="signature first" id="create-class_method">
244
+
245
+ .<strong>create</strong>(params) &#x21d2; <tt>Object</tt>
246
+
247
+
248
+
249
+
250
+
251
+ </h3><table class="source_code">
252
+ <tr>
253
+ <td>
254
+ <pre class="lines">
255
+
256
+
257
+ 35
258
+ 36
259
+ 37
260
+ 38</pre>
261
+ </td>
262
+ <td>
263
+ <pre class="code"><span class="info file"># File 'lib/sms77/subaccounts.rb', line 35</span>
264
+
265
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_create'>create</span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span>
266
+ <span class='const'><span class='object_link'><a href="../../Sms77.html" title="Sms77 (module)">Sms77</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Util.html" title="Sms77::Util (module)">Util</a></span></span><span class='op'>::</span><span class='id identifier rubyid_lengthy_string?'><span class='object_link'><a href="../Util.html#lengthy_string%3F-class_method" title="Sms77::Util.lengthy_string? (method)">lengthy_string?</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='symbol'>:email</span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='op'>&amp;&amp;</span>
267
+ <span class='const'><span class='object_link'><a href="../../Sms77.html" title="Sms77 (module)">Sms77</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Util.html" title="Sms77::Util (module)">Util</a></span></span><span class='op'>::</span><span class='id identifier rubyid_lengthy_string?'><span class='object_link'><a href="../Util.html#lengthy_string%3F-class_method" title="Sms77::Util.lengthy_string? (method)">lengthy_string?</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='symbol'>:name</span><span class='rbracket'>]</span><span class='rparen'>)</span>
268
+ <span class='kw'>end</span></pre>
269
+ </td>
270
+ </tr>
271
+ </table>
272
+ </div>
273
+
274
+ <div class="method_details ">
275
+ <h3 class="signature " id="delete-class_method">
276
+
277
+ .<strong>delete</strong>(params) &#x21d2; <tt>Object</tt>
278
+
279
+
280
+
281
+
282
+
283
+ </h3><table class="source_code">
284
+ <tr>
285
+ <td>
286
+ <pre class="lines">
287
+
288
+
289
+ 40
290
+ 41
291
+ 42</pre>
292
+ </td>
293
+ <td>
294
+ <pre class="code"><span class="info file"># File 'lib/sms77/subaccounts.rb', line 40</span>
295
+
296
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span>
297
+ <span class='const'><span class='object_link'><a href="../../Sms77.html" title="Sms77 (module)">Sms77</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Util.html" title="Sms77::Util (module)">Util</a></span></span><span class='op'>::</span><span class='id identifier rubyid_is_positive_integer?'><span class='object_link'><a href="../Util.html#is_positive_integer%3F-class_method" title="Sms77::Util.is_positive_integer? (method)">is_positive_integer?</a></span></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>
298
+ <span class='kw'>end</span></pre>
299
+ </td>
300
+ </tr>
301
+ </table>
302
+ </div>
303
+
304
+ <div class="method_details ">
305
+ <h3 class="signature " id="is_action?-class_method">
306
+
307
+ .<strong>is_action?</strong>(str) &#x21d2; <tt>Boolean</tt>
308
+
309
+
310
+
311
+
312
+
313
+ </h3><div class="docstring">
314
+ <div class="discussion">
315
+
316
+
317
+ </div>
318
+ </div>
319
+ <div class="tags">
320
+
321
+ <p class="tag_title">Returns:</p>
322
+ <ul class="return">
323
+
324
+ <li>
325
+
326
+
327
+ <span class='type'>(<tt>Boolean</tt>)</span>
328
+
329
+
330
+
331
+ </li>
332
+
333
+ </ul>
334
+
335
+ </div><table class="source_code">
336
+ <tr>
337
+ <td>
338
+ <pre class="lines">
339
+
340
+
341
+ 14
342
+ 15
343
+ 16</pre>
344
+ </td>
345
+ <td>
346
+ <pre class="code"><span class="info file"># File 'lib/sms77/subaccounts.rb', line 14</span>
347
+
348
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_is_action?'>is_action?</span><span class='lparen'>(</span><span class='id identifier rubyid_str'>str</span><span class='rparen'>)</span>
349
+ <span class='const'><span class='object_link'><a href="../../Sms77.html" title="Sms77 (module)">Sms77</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Util.html" title="Sms77::Util (module)">Util</a></span></span><span class='op'>::</span><span class='id identifier rubyid_in_module_constants?'><span class='object_link'><a href="../Util.html#in_module_constants%3F-class_method" title="Sms77::Util.in_module_constants? (method)">in_module_constants?</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_str'>str</span><span class='comma'>,</span> <span class='const'><span class='object_link'><a href="../../Sms77.html" title="Sms77 (module)">Sms77</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Subaccounts.html" title="Sms77::Subaccounts (module)">Subaccounts</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Action.html" title="Sms77::Subaccounts::Action (module)">Action</a></span></span><span class='rparen'>)</span>
350
+ <span class='kw'>end</span></pre>
351
+ </td>
352
+ </tr>
353
+ </table>
354
+ </div>
355
+
356
+ <div class="method_details ">
357
+ <h3 class="signature " id="transfer_credits-class_method">
358
+
359
+ .<strong>transfer_credits</strong>(params) &#x21d2; <tt>Object</tt>
360
+
361
+
362
+
363
+
364
+
365
+ </h3><table class="source_code">
366
+ <tr>
367
+ <td>
368
+ <pre class="lines">
369
+
370
+
371
+ 44
372
+ 45
373
+ 46
374
+ 47</pre>
375
+ </td>
376
+ <td>
377
+ <pre class="code"><span class="info file"># File 'lib/sms77/subaccounts.rb', line 44</span>
378
+
379
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_transfer_credits'>transfer_credits</span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span>
380
+ <span class='const'><span class='object_link'><a href="../../Sms77.html" title="Sms77 (module)">Sms77</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Util.html" title="Sms77::Util (module)">Util</a></span></span><span class='op'>::</span><span class='id identifier rubyid_is_positive_integer?'><span class='object_link'><a href="../Util.html#is_positive_integer%3F-class_method" title="Sms77::Util.is_positive_integer? (method)">is_positive_integer?</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='symbol'>:amount</span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='op'>&amp;&amp;</span>
381
+ <span class='const'><span class='object_link'><a href="../../Sms77.html" title="Sms77 (module)">Sms77</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Util.html" title="Sms77::Util (module)">Util</a></span></span><span class='op'>::</span><span class='id identifier rubyid_is_positive_integer?'><span class='object_link'><a href="../Util.html#is_positive_integer%3F-class_method" title="Sms77::Util.is_positive_integer? (method)">is_positive_integer?</a></span></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>
382
+ <span class='kw'>end</span></pre>
383
+ </td>
384
+ </tr>
385
+ </table>
386
+ </div>
387
+
388
+ <div class="method_details ">
389
+ <h3 class="signature " id="update-class_method">
390
+
391
+ .<strong>update</strong>(params) &#x21d2; <tt>Object</tt>
392
+
393
+
394
+
395
+
396
+
397
+ </h3><table class="source_code">
398
+ <tr>
399
+ <td>
400
+ <pre class="lines">
401
+
402
+
403
+ 49
404
+ 50
405
+ 51
406
+ 52
407
+ 53</pre>
408
+ </td>
409
+ <td>
410
+ <pre class="code"><span class="info file"># File 'lib/sms77/subaccounts.rb', line 49</span>
411
+
412
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_update'>update</span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span>
413
+ <span class='const'><span class='object_link'><a href="../../Sms77.html" title="Sms77 (module)">Sms77</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Util.html" title="Sms77::Util (module)">Util</a></span></span><span class='op'>::</span><span class='id identifier rubyid_is_positive_integer?'><span class='object_link'><a href="../Util.html#is_positive_integer%3F-class_method" title="Sms77::Util.is_positive_integer? (method)">is_positive_integer?</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='symbol'>:amount</span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='op'>&amp;&amp;</span>
414
+ <span class='const'><span class='object_link'><a href="../../Sms77.html" title="Sms77 (module)">Sms77</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Util.html" title="Sms77::Util (module)">Util</a></span></span><span class='op'>::</span><span class='id identifier rubyid_is_positive_integer?'><span class='object_link'><a href="../Util.html#is_positive_integer%3F-class_method" title="Sms77::Util.is_positive_integer? (method)">is_positive_integer?</a></span></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> <span class='op'>&amp;&amp;</span>
415
+ <span class='const'><span class='object_link'><a href="../../Sms77.html" title="Sms77 (module)">Sms77</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Util.html" title="Sms77::Util (module)">Util</a></span></span><span class='op'>::</span><span class='id identifier rubyid_is_positive_integer?'><span class='object_link'><a href="../Util.html#is_positive_integer%3F-class_method" title="Sms77::Util.is_positive_integer? (method)">is_positive_integer?</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='symbol'>:threshold</span><span class='rbracket'>]</span><span class='rparen'>)</span>
416
+ <span class='kw'>end</span></pre>
417
+ </td>
418
+ </tr>
419
+ </table>
420
+ </div>
421
+
422
+ <div class="method_details ">
423
+ <h3 class="signature " id="validate-class_method">
424
+
425
+ .<strong>validate</strong>(params) &#x21d2; <tt>Object</tt>
426
+
427
+
428
+
429
+
430
+
431
+ </h3><table class="source_code">
432
+ <tr>
433
+ <td>
434
+ <pre class="lines">
435
+
436
+
437
+ 18
438
+ 19
439
+ 20
440
+ 21
441
+ 22
442
+ 23
443
+ 24
444
+ 25
445
+ 26
446
+ 27
447
+ 28
448
+ 29
449
+ 30
450
+ 31
451
+ 32
452
+ 33</pre>
453
+ </td>
454
+ <td>
455
+ <pre class="code"><span class="info file"># File 'lib/sms77/subaccounts.rb', line 18</span>
456
+
457
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_validate'>validate</span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span>
458
+ <span class='id identifier rubyid_action'>action</span> <span class='op'>=</span> <span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='symbol'>:action</span><span class='rbracket'>]</span>
459
+
460
+ <span class='kw'>case</span> <span class='id identifier rubyid_action'>action</span>
461
+ <span class='kw'>when</span> <span class='const'><span class='object_link'><a href="../../Sms77.html" title="Sms77 (module)">Sms77</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Subaccounts.html" title="Sms77::Subaccounts (module)">Subaccounts</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Action.html" title="Sms77::Subaccounts::Action (module)">Action</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Action.html#CREATE-constant" title="Sms77::Subaccounts::Action::CREATE (constant)">CREATE</a></span></span>
462
+ <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Parameter validation failed</span><span class='tstring_end'>&#39;</span></span> <span class='kw'>unless</span> <span class='const'><span class='object_link'><a href="../../Sms77.html" title="Sms77 (module)">Sms77</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Subaccounts.html" title="Sms77::Subaccounts (module)">Subaccounts</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="Sms77::Subaccounts::Validator (module)">Validator</a></span></span><span class='op'>::</span><span class='id identifier rubyid_create'><span class='object_link'><a href="#create-class_method" title="Sms77::Subaccounts::Validator.create (method)">create</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span>
463
+ <span class='kw'>when</span> <span class='const'><span class='object_link'><a href="../../Sms77.html" title="Sms77 (module)">Sms77</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Subaccounts.html" title="Sms77::Subaccounts (module)">Subaccounts</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Action.html" title="Sms77::Subaccounts::Action (module)">Action</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Action.html#DELETE-constant" title="Sms77::Subaccounts::Action::DELETE (constant)">DELETE</a></span></span>
464
+ <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Parameter validation failed</span><span class='tstring_end'>&#39;</span></span> <span class='kw'>unless</span> <span class='const'><span class='object_link'><a href="../../Sms77.html" title="Sms77 (module)">Sms77</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Subaccounts.html" title="Sms77::Subaccounts (module)">Subaccounts</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="Sms77::Subaccounts::Validator (module)">Validator</a></span></span><span class='op'>::</span><span class='id identifier rubyid_delete'><span class='object_link'><a href="#delete-class_method" title="Sms77::Subaccounts::Validator.delete (method)">delete</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span>
465
+ <span class='kw'>when</span> <span class='const'><span class='object_link'><a href="../../Sms77.html" title="Sms77 (module)">Sms77</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Subaccounts.html" title="Sms77::Subaccounts (module)">Subaccounts</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Action.html" title="Sms77::Subaccounts::Action (module)">Action</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Action.html#TRANSFER_CREDITS-constant" title="Sms77::Subaccounts::Action::TRANSFER_CREDITS (constant)">TRANSFER_CREDITS</a></span></span>
466
+ <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Parameter validation failed</span><span class='tstring_end'>&#39;</span></span> <span class='kw'>unless</span> <span class='const'><span class='object_link'><a href="../../Sms77.html" title="Sms77 (module)">Sms77</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Subaccounts.html" title="Sms77::Subaccounts (module)">Subaccounts</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="Sms77::Subaccounts::Validator (module)">Validator</a></span></span><span class='op'>::</span><span class='id identifier rubyid_transfer_credits'><span class='object_link'><a href="#transfer_credits-class_method" title="Sms77::Subaccounts::Validator.transfer_credits (method)">transfer_credits</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span>
467
+ <span class='kw'>when</span> <span class='const'><span class='object_link'><a href="../../Sms77.html" title="Sms77 (module)">Sms77</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Subaccounts.html" title="Sms77::Subaccounts (module)">Subaccounts</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Action.html" title="Sms77::Subaccounts::Action (module)">Action</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Action.html#UPDATE-constant" title="Sms77::Subaccounts::Action::UPDATE (constant)">UPDATE</a></span></span>
468
+ <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Parameter validation failed</span><span class='tstring_end'>&#39;</span></span> <span class='kw'>unless</span> <span class='const'><span class='object_link'><a href="../../Sms77.html" title="Sms77 (module)">Sms77</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Subaccounts.html" title="Sms77::Subaccounts (module)">Subaccounts</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="Sms77::Subaccounts::Validator (module)">Validator</a></span></span><span class='op'>::</span><span class='id identifier rubyid_update'><span class='object_link'><a href="#update-class_method" title="Sms77::Subaccounts::Validator.update (method)">update</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span>
469
+ <span class='kw'>else</span>
470
+ <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Unknown action </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_action'>action</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>unless</span> <span class='const'><span class='object_link'><a href="../../Sms77.html" title="Sms77 (module)">Sms77</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Subaccounts.html" title="Sms77::Subaccounts (module)">Subaccounts</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="Sms77::Subaccounts::Validator (module)">Validator</a></span></span><span class='op'>::</span><span class='id identifier rubyid_is_action?'><span class='object_link'><a href="#is_action%3F-class_method" title="Sms77::Subaccounts::Validator.is_action? (method)">is_action?</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_action'>action</span><span class='rparen'>)</span>
471
+ <span class='kw'>end</span>
472
+ <span class='kw'>end</span></pre>
473
+ </td>
474
+ </tr>
475
+ </table>
476
+ </div>
477
+
478
+ </div>
479
+
480
+ </div>
481
+
482
+ <div id="footer">
483
+ Generated on Wed Mar 30 13:55:36 2022 by
484
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
485
+ 0.9.27 (ruby-2.7.4).
486
+ </div>
487
+
488
+ </div>
489
+ </body>
490
+ </html>
@@ -0,0 +1,126 @@
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
+ Module: Sms77::Subaccounts
8
+
9
+ &mdash; Documentation by YARD 0.9.27
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 = "Sms77::Subaccounts";
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 (S)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../Sms77.html" title="Sms77 (module)">Sms77</a></span></span>
41
+ &raquo;
42
+ <span class="title">Subaccounts</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>Module: Sms77::Subaccounts
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+ <dl>
80
+ <dt>Defined in:</dt>
81
+ <dd>lib/sms77/subaccounts.rb</dd>
82
+ </dl>
83
+
84
+ </div>
85
+
86
+ <h2>Overview</h2><div class="docstring">
87
+ <div class="discussion">
88
+
89
+ <p>This module holds all utilities related to the /subaccounts endpoint.</p>
90
+
91
+
92
+ </div>
93
+ </div>
94
+ <div class="tags">
95
+
96
+
97
+ </div><h2>Defined Under Namespace</h2>
98
+ <p class="children">
99
+
100
+
101
+ <strong class="modules">Modules:</strong> <span class='object_link'><a href="Subaccounts/Action.html" title="Sms77::Subaccounts::Action (module)">Action</a></span>, <span class='object_link'><a href="Subaccounts/Validator.html" title="Sms77::Subaccounts::Validator (module)">Validator</a></span>
102
+
103
+
104
+
105
+
106
+ </p>
107
+
108
+
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+ </div>
117
+
118
+ <div id="footer">
119
+ Generated on Wed Mar 30 13:55:36 2022 by
120
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
121
+ 0.9.27 (ruby-2.7.4).
122
+ </div>
123
+
124
+ </div>
125
+ </body>
126
+ </html>