seven_api 0.5.0 → 0.6.1

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 (112) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +7 -6
  3. data/.idea/inspectionProfiles/Project_Default.xml +5 -5
  4. data/.idea/ruby-client.iml +51 -4
  5. data/Gemfile +2 -2
  6. data/LICENSE +21 -21
  7. data/README.md +3 -3
  8. data/Rakefile +5 -5
  9. data/doc/{Sms77 → SevenApi}/Client.html +229 -229
  10. data/doc/{Sms77 → SevenApi}/Contacts/Action.html +130 -130
  11. data/doc/{Sms77 → SevenApi}/Contacts.html +125 -125
  12. data/doc/{Sms77 → SevenApi}/Endpoint.html +186 -186
  13. data/doc/{Sms77 → SevenApi}/Hooks/Action.html +130 -130
  14. data/doc/{Sms77 → SevenApi}/Hooks/EventType.html +145 -145
  15. data/doc/{Sms77 → SevenApi}/Hooks/RequestMethod.html +130 -130
  16. data/doc/{Sms77 → SevenApi}/Hooks/Validator.html +597 -597
  17. data/doc/{Sms77 → SevenApi}/Hooks.html +125 -125
  18. data/doc/{Sms77 → SevenApi}/Journal/Type.html +135 -135
  19. data/doc/{Sms77 → SevenApi}/Journal/Validator.html +393 -393
  20. data/doc/{Sms77 → SevenApi}/Journal.html +125 -125
  21. data/doc/{Sms77 → SevenApi}/Lookup/Type.html +135 -135
  22. data/doc/{Sms77 → SevenApi}/Lookup.html +125 -125
  23. data/doc/{Sms77 → SevenApi}/Resource.html +869 -869
  24. data/doc/{Sms77 → SevenApi}/Resources/Analytics.html +262 -262
  25. data/doc/{Sms77 → SevenApi}/Resources/Balance.html +245 -245
  26. data/doc/{Sms77 → SevenApi}/Resources/Contacts.html +448 -448
  27. data/doc/{Sms77 → SevenApi}/Resources/Hooks.html +456 -456
  28. data/doc/{Sms77 → SevenApi}/Resources/Journal.html +260 -260
  29. data/doc/{Sms77 → SevenApi}/Resources/Lookup.html +539 -539
  30. data/doc/{Sms77 → SevenApi}/Resources/Pricing.html +262 -262
  31. data/doc/{Sms77 → SevenApi}/Resources/Sms.html +260 -260
  32. data/doc/{Sms77 → SevenApi}/Resources/Status.html +260 -260
  33. data/doc/{Sms77 → SevenApi}/Resources/Subaccounts.html +650 -650
  34. data/doc/{Sms77 → SevenApi}/Resources/ValidateForVoice.html +260 -260
  35. data/doc/{Sms77 → SevenApi}/Resources/Voice.html +260 -260
  36. data/doc/SevenApi/Resources.html +128 -0
  37. data/doc/{Sms77 → SevenApi}/Sms/Type.html +125 -125
  38. data/doc/{Sms77 → SevenApi}/Sms.html +125 -125
  39. data/doc/{Sms77 → SevenApi}/Subaccounts/Action.html +140 -140
  40. data/doc/SevenApi/Subaccounts/Validator.html +490 -0
  41. data/doc/{Sms77 → SevenApi}/Subaccounts.html +125 -125
  42. data/doc/{Sms77 → SevenApi}/Util.html +1032 -1032
  43. data/doc/{Sms77.html → SevenApi.html} +145 -145
  44. data/doc/_index.html +443 -443
  45. data/doc/class_list.html +51 -51
  46. data/doc/css/full_list.css +58 -58
  47. data/doc/css/style.css +497 -497
  48. data/doc/file.README.html +110 -111
  49. data/doc/file_list.html +56 -56
  50. data/doc/frames.html +17 -17
  51. data/doc/index.html +110 -111
  52. data/doc/js/app.js +314 -314
  53. data/doc/js/full_list.js +216 -216
  54. data/doc/js/jquery.js +3 -3
  55. data/doc/method_list.html +563 -563
  56. data/doc/top-level-namespace.html +109 -109
  57. data/document.sh +3 -0
  58. data/lib/seven_api/client.rb +32 -30
  59. data/lib/seven_api/contacts.rb +5 -10
  60. data/lib/seven_api/endpoint.rb +5 -0
  61. data/lib/seven_api/hooks.rb +69 -67
  62. data/lib/seven_api/journal.rb +39 -39
  63. data/lib/seven_api/lookup.rb +12 -11
  64. data/lib/seven_api/numbers.rb +9 -0
  65. data/lib/seven_api/paginated.rb +10 -0
  66. data/lib/seven_api/rcs.rb +9 -0
  67. data/lib/seven_api/resource.rb +8 -4
  68. data/lib/seven_api/resources/analytics.rb +54 -21
  69. data/lib/seven_api/resources/balance.rb +19 -19
  70. data/lib/seven_api/resources/contacts.rb +56 -38
  71. data/lib/seven_api/resources/groups.rb +57 -0
  72. data/lib/seven_api/resources/hooks.rb +40 -40
  73. data/lib/seven_api/resources/journal.rb +20 -20
  74. data/lib/seven_api/resources/lookup.rb +63 -47
  75. data/lib/seven_api/resources/numbers.rb +71 -0
  76. data/lib/seven_api/resources/pricing.rb +20 -20
  77. data/lib/seven_api/resources/rcs.rb +39 -0
  78. data/lib/seven_api/resources/sms.rb +29 -20
  79. data/lib/seven_api/resources/status.rb +20 -20
  80. data/lib/seven_api/resources/subaccounts.rb +65 -65
  81. data/lib/seven_api/resources/validate_for_voice.rb +20 -20
  82. data/lib/seven_api/resources/voice.rb +29 -20
  83. data/lib/seven_api/sms.rb +9 -9
  84. data/lib/seven_api/subaccounts.rb +55 -55
  85. data/lib/seven_api/util.rb +68 -68
  86. data/lib/seven_api/version.rb +5 -5
  87. data/lib/seven_api.rb +6 -6
  88. data/release.sh +4 -4
  89. data/seven_api.gemspec +5 -5
  90. data/spec/EnvKeyStore.rb +14 -14
  91. data/spec/matchers.rb +22 -22
  92. data/spec/seven_api/analytics_spec.rb +49 -0
  93. data/spec/seven_api/balance_spec.rb +18 -12
  94. data/spec/seven_api/client_spec.rb +15 -15
  95. data/spec/seven_api/contacts_spec.rb +100 -129
  96. data/spec/seven_api/groups_spec.rb +74 -0
  97. data/spec/seven_api/hooks_spec.rb +108 -108
  98. data/spec/seven_api/instance_spec.rb +22 -22
  99. data/spec/seven_api/journal_spec.rb +86 -86
  100. data/spec/seven_api/lookup_spec.rb +197 -179
  101. data/spec/seven_api/numbers_spec.rb +135 -0
  102. data/spec/seven_api/pricing_spec.rb +76 -76
  103. data/spec/seven_api/rcs_spec.rb +99 -0
  104. data/spec/seven_api/sms_spec.rb +103 -103
  105. data/spec/seven_api/subaccounts_spec.rb +121 -121
  106. data/spec/seven_api/validate_for_voice_spec.rb +19 -19
  107. data/spec/seven_api/voice_spec.rb +51 -51
  108. data/spec/seven_api_spec.rb +9 -9
  109. data/spec/spec_helper.rb +8 -17
  110. metadata +62 -50
  111. data/doc/Sms77/Resources.html +0 -128
  112. data/doc/Sms77/Subaccounts/Validator.html +0 -490
@@ -1,490 +0,0 @@
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>