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.
- checksums.yaml +4 -4
- data/.gitignore +6 -4
- data/.idea/.gitignore +8 -0
- data/.idea/inspectionProfiles/Project_Default.xml +6 -0
- data/.idea/modules.xml +8 -0
- data/.idea/ruby-client.iml +18 -0
- data/.idea/vcs.xml +6 -0
- data/Gemfile +2 -2
- data/LICENSE +20 -20
- data/README.md +41 -35
- data/Rakefile +5 -5
- data/doc/Sms77/Client.html +230 -0
- data/doc/Sms77/Contacts/Action.html +131 -0
- data/doc/Sms77/Contacts.html +126 -0
- data/doc/Sms77/Endpoint.html +187 -0
- data/doc/Sms77/Hooks/Action.html +131 -0
- data/doc/Sms77/Hooks/EventType.html +146 -0
- data/doc/Sms77/Hooks/RequestMethod.html +131 -0
- data/doc/Sms77/Hooks/Validator.html +598 -0
- data/doc/Sms77/Hooks.html +126 -0
- data/doc/Sms77/Journal/Type.html +136 -0
- data/doc/Sms77/Journal/Validator.html +394 -0
- data/doc/Sms77/Journal.html +126 -0
- data/doc/Sms77/Lookup/Type.html +136 -0
- data/doc/Sms77/Lookup.html +126 -0
- data/doc/Sms77/Resource.html +870 -0
- data/doc/Sms77/Resources/Analytics.html +263 -0
- data/doc/Sms77/Resources/Balance.html +246 -0
- data/doc/Sms77/Resources/Contacts.html +449 -0
- data/doc/Sms77/Resources/Hooks.html +457 -0
- data/doc/Sms77/Resources/Journal.html +261 -0
- data/doc/Sms77/Resources/Lookup.html +540 -0
- data/doc/Sms77/Resources/Pricing.html +263 -0
- data/doc/Sms77/Resources/Sms.html +261 -0
- data/doc/Sms77/Resources/Status.html +261 -0
- data/doc/Sms77/Resources/Subaccounts.html +651 -0
- data/doc/Sms77/Resources/ValidateForVoice.html +261 -0
- data/doc/Sms77/Resources/Voice.html +261 -0
- data/doc/Sms77/Resources.html +128 -0
- data/doc/Sms77/Sms/Type.html +126 -0
- data/doc/Sms77/Sms.html +126 -0
- data/doc/Sms77/Subaccounts/Action.html +141 -0
- data/doc/Sms77/Subaccounts/Validator.html +490 -0
- data/doc/Sms77/Subaccounts.html +126 -0
- data/doc/Sms77/Util.html +1033 -0
- data/doc/Sms77.html +146 -0
- data/doc/_index.html +444 -0
- data/doc/class_list.html +51 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +58 -0
- data/doc/css/style.css +497 -0
- data/doc/file.README.html +112 -0
- data/doc/file_list.html +56 -0
- data/doc/frames.html +17 -0
- data/doc/index.html +112 -0
- data/doc/js/app.js +314 -0
- data/doc/js/full_list.js +216 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +563 -0
- data/doc/top-level-namespace.html +110 -0
- data/lib/sms77/client.rb +30 -29
- data/lib/sms77/contacts.rb +10 -9
- data/lib/sms77/endpoint.rb +17 -15
- data/lib/sms77/hooks.rb +67 -64
- data/lib/sms77/journal.rb +39 -38
- data/lib/sms77/lookup.rb +11 -10
- data/lib/sms77/resource.rb +94 -93
- data/lib/sms77/resources/analytics.rb +21 -16
- data/lib/sms77/resources/balance.rb +19 -15
- data/lib/sms77/resources/contacts.rb +38 -25
- data/lib/sms77/resources/hooks.rb +40 -29
- data/lib/sms77/resources/journal.rb +20 -15
- data/lib/sms77/resources/lookup.rb +47 -29
- data/lib/sms77/resources/pricing.rb +20 -15
- data/lib/sms77/resources/sms.rb +20 -15
- data/lib/sms77/resources/status.rb +20 -15
- data/lib/sms77/resources/subaccounts.rb +66 -0
- data/lib/sms77/resources/validate_for_voice.rb +20 -15
- data/lib/sms77/resources/voice.rb +20 -15
- data/lib/sms77/sms.rb +9 -8
- data/lib/sms77/subaccounts.rb +55 -0
- data/lib/sms77/util.rb +68 -67
- data/lib/sms77/version.rb +5 -5
- data/lib/sms77.rb +6 -6
- data/release.sh +4 -7
- data/sms77.gemspec +21 -21
- data/spec/EnvKeyStore.rb +14 -14
- data/spec/matchers.rb +22 -22
- data/spec/sms77/balance_spec.rb +12 -12
- data/spec/sms77/client_spec.rb +15 -15
- data/spec/sms77/contacts_spec.rb +129 -116
- data/spec/sms77/hooks_spec.rb +108 -105
- data/spec/sms77/instance_spec.rb +22 -20
- data/spec/sms77/journal_spec.rb +86 -86
- data/spec/sms77/lookup_spec.rb +179 -179
- data/spec/sms77/pricing_spec.rb +76 -76
- data/spec/sms77/sms_spec.rb +103 -103
- data/spec/sms77/subaccounts_spec.rb +121 -0
- data/spec/sms77/validate_for_voice_spec.rb +19 -19
- data/spec/sms77/voice_spec.rb +51 -51
- data/spec/sms77_spec.rb +9 -7
- data/spec/spec_helper.rb +53 -53
- metadata +75 -17
@@ -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::Hooks
|
8
|
+
|
9
|
+
— 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::Hooks";
|
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 (H)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../Sms77.html" title="Sms77 (module)">Sms77</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">Hooks</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::Hooks
|
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/hooks.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 /hooks 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="Hooks/Action.html" title="Sms77::Hooks::Action (module)">Action</a></span>, <span class='object_link'><a href="Hooks/EventType.html" title="Sms77::Hooks::EventType (module)">EventType</a></span>, <span class='object_link'><a href="Hooks/RequestMethod.html" title="Sms77::Hooks::RequestMethod (module)">RequestMethod</a></span>, <span class='object_link'><a href="Hooks/Validator.html" title="Sms77::Hooks::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>
|
@@ -0,0 +1,136 @@
|
|
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::Journal::Type
|
8
|
+
|
9
|
+
— 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::Journal::Type";
|
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 (T)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../../Sms77.html" title="Sms77 (module)">Sms77</a></span></span> » <span class='title'><span class='object_link'><a href="../Journal.html" title="Sms77::Journal (module)">Journal</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">Type</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::Journal::Type
|
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/journal.rb</dd>
|
82
|
+
</dl>
|
83
|
+
|
84
|
+
</div>
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
<h2>
|
89
|
+
Constant Summary
|
90
|
+
<small><a href="#" class="constants_summary_toggle">collapse</a></small>
|
91
|
+
</h2>
|
92
|
+
|
93
|
+
<dl class="constants">
|
94
|
+
|
95
|
+
<dt id="INBOUND-constant" class="">INBOUND =
|
96
|
+
|
97
|
+
</dt>
|
98
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>inbound</span><span class='tstring_end'>'</span></span></pre></dd>
|
99
|
+
|
100
|
+
<dt id="OUTBOUND-constant" class="">OUTBOUND =
|
101
|
+
|
102
|
+
</dt>
|
103
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>outbound</span><span class='tstring_end'>'</span></span></pre></dd>
|
104
|
+
|
105
|
+
<dt id="REPLIES-constant" class="">REPLIES =
|
106
|
+
|
107
|
+
</dt>
|
108
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>replies</span><span class='tstring_end'>'</span></span></pre></dd>
|
109
|
+
|
110
|
+
<dt id="VOICE-constant" class="">VOICE =
|
111
|
+
|
112
|
+
</dt>
|
113
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>voice</span><span class='tstring_end'>'</span></span></pre></dd>
|
114
|
+
|
115
|
+
</dl>
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
</div>
|
127
|
+
|
128
|
+
<div id="footer">
|
129
|
+
Generated on Wed Mar 30 13:55:36 2022 by
|
130
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
131
|
+
0.9.27 (ruby-2.7.4).
|
132
|
+
</div>
|
133
|
+
|
134
|
+
</div>
|
135
|
+
</body>
|
136
|
+
</html>
|
@@ -0,0 +1,394 @@
|
|
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::Journal::Validator
|
8
|
+
|
9
|
+
— 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::Journal::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> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../../Sms77.html" title="Sms77 (module)">Sms77</a></span></span> » <span class='title'><span class='object_link'><a href="../Journal.html" title="Sms77::Journal (module)">Journal</a></span></span>
|
41
|
+
»
|
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::Journal::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/journal.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="#is_date%3F-class_method" title="is_date? (class method)">.<strong>is_date?</strong>(date) ⇒ Boolean </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="#is_type%3F-class_method" title="is_type? (class method)">.<strong>is_type?</strong>(str) ⇒ Boolean </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="#subscribe-class_method" title="subscribe (class method)">.<strong>subscribe</strong>(params) ⇒ Object </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="#validate-class_method" title="validate (class method)">.<strong>validate</strong>(params) ⇒ 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
|
+
</ul>
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
<div id="class_method_details" class="method_details_list">
|
195
|
+
<h2>Class Method Details</h2>
|
196
|
+
|
197
|
+
|
198
|
+
<div class="method_details first">
|
199
|
+
<h3 class="signature first" id="is_date?-class_method">
|
200
|
+
|
201
|
+
.<strong>is_date?</strong>(date) ⇒ <tt>Boolean</tt>
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
</h3><div class="docstring">
|
208
|
+
<div class="discussion">
|
209
|
+
|
210
|
+
|
211
|
+
</div>
|
212
|
+
</div>
|
213
|
+
<div class="tags">
|
214
|
+
|
215
|
+
<p class="tag_title">Returns:</p>
|
216
|
+
<ul class="return">
|
217
|
+
|
218
|
+
<li>
|
219
|
+
|
220
|
+
|
221
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
</li>
|
226
|
+
|
227
|
+
</ul>
|
228
|
+
|
229
|
+
</div><table class="source_code">
|
230
|
+
<tr>
|
231
|
+
<td>
|
232
|
+
<pre class="lines">
|
233
|
+
|
234
|
+
|
235
|
+
35
|
236
|
+
36
|
237
|
+
37</pre>
|
238
|
+
</td>
|
239
|
+
<td>
|
240
|
+
<pre class="code"><span class="info file"># File 'lib/sms77/journal.rb', line 35</span>
|
241
|
+
|
242
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_is_date?'>is_date?</span><span class='lparen'>(</span><span class='id identifier rubyid_date'>date</span><span class='rparen'>)</span>
|
243
|
+
<span class='id identifier rubyid_date'>date</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>NilClass</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='id identifier rubyid_date'>date</span><span class='period'>.</span><span class='id identifier rubyid_match'>match</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>[\d]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][\d]|3[0-1])</span><span class='regexp_end'>/</span></span><span class='rparen'>)</span>
|
244
|
+
<span class='kw'>end</span></pre>
|
245
|
+
</td>
|
246
|
+
</tr>
|
247
|
+
</table>
|
248
|
+
</div>
|
249
|
+
|
250
|
+
<div class="method_details ">
|
251
|
+
<h3 class="signature " id="is_type?-class_method">
|
252
|
+
|
253
|
+
.<strong>is_type?</strong>(str) ⇒ <tt>Boolean</tt>
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
|
258
|
+
|
259
|
+
</h3><div class="docstring">
|
260
|
+
<div class="discussion">
|
261
|
+
|
262
|
+
|
263
|
+
</div>
|
264
|
+
</div>
|
265
|
+
<div class="tags">
|
266
|
+
|
267
|
+
<p class="tag_title">Returns:</p>
|
268
|
+
<ul class="return">
|
269
|
+
|
270
|
+
<li>
|
271
|
+
|
272
|
+
|
273
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
</li>
|
278
|
+
|
279
|
+
</ul>
|
280
|
+
|
281
|
+
</div><table class="source_code">
|
282
|
+
<tr>
|
283
|
+
<td>
|
284
|
+
<pre class="lines">
|
285
|
+
|
286
|
+
|
287
|
+
31
|
288
|
+
32
|
289
|
+
33</pre>
|
290
|
+
</td>
|
291
|
+
<td>
|
292
|
+
<pre class="code"><span class="info file"># File 'lib/sms77/journal.rb', line 31</span>
|
293
|
+
|
294
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_is_type?'>is_type?</span><span class='lparen'>(</span><span class='id identifier rubyid_str'>str</span><span class='rparen'>)</span>
|
295
|
+
<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="../Journal.html" title="Sms77::Journal (module)">Journal</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Type.html" title="Sms77::Journal::Type (module)">Type</a></span></span><span class='rparen'>)</span>
|
296
|
+
<span class='kw'>end</span></pre>
|
297
|
+
</td>
|
298
|
+
</tr>
|
299
|
+
</table>
|
300
|
+
</div>
|
301
|
+
|
302
|
+
<div class="method_details ">
|
303
|
+
<h3 class="signature " id="subscribe-class_method">
|
304
|
+
|
305
|
+
.<strong>subscribe</strong>(params) ⇒ <tt>Object</tt>
|
306
|
+
|
307
|
+
|
308
|
+
|
309
|
+
|
310
|
+
|
311
|
+
</h3><table class="source_code">
|
312
|
+
<tr>
|
313
|
+
<td>
|
314
|
+
<pre class="lines">
|
315
|
+
|
316
|
+
|
317
|
+
23
|
318
|
+
24
|
319
|
+
25
|
320
|
+
26
|
321
|
+
27
|
322
|
+
28
|
323
|
+
29</pre>
|
324
|
+
</td>
|
325
|
+
<td>
|
326
|
+
<pre class="code"><span class="info file"># File 'lib/sms77/journal.rb', line 23</span>
|
327
|
+
|
328
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_subscribe'>subscribe</span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span>
|
329
|
+
<span class='lbrace'>{</span> <span class='symbol'>:request_method</span> <span class='op'>=></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="../Hooks.html" title="Sms77::Hooks (module)">Hooks</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Hooks/RequestMethod.html" title="Sms77::Hooks::RequestMethod (module)">RequestMethod</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Hooks/RequestMethod.html#POST-constant" title="Sms77::Hooks::RequestMethod::POST (constant)">POST</a></span></span> <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span>
|
330
|
+
|
331
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_event_type?'>event_type?</span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='symbol'>:event_type</span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='op'>&&</span>
|
332
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_request_method?'>request_method?</span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='symbol'>:request_method</span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='op'>&&</span>
|
333
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_target_url?'>target_url?</span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='symbol'>:target_url</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
334
|
+
<span class='kw'>end</span></pre>
|
335
|
+
</td>
|
336
|
+
</tr>
|
337
|
+
</table>
|
338
|
+
</div>
|
339
|
+
|
340
|
+
<div class="method_details ">
|
341
|
+
<h3 class="signature " id="validate-class_method">
|
342
|
+
|
343
|
+
.<strong>validate</strong>(params) ⇒ <tt>Object</tt>
|
344
|
+
|
345
|
+
|
346
|
+
|
347
|
+
|
348
|
+
|
349
|
+
</h3><table class="source_code">
|
350
|
+
<tr>
|
351
|
+
<td>
|
352
|
+
<pre class="lines">
|
353
|
+
|
354
|
+
|
355
|
+
13
|
356
|
+
14
|
357
|
+
15
|
358
|
+
16
|
359
|
+
17
|
360
|
+
18
|
361
|
+
19
|
362
|
+
20
|
363
|
+
21</pre>
|
364
|
+
</td>
|
365
|
+
<td>
|
366
|
+
<pre class="code"><span class="info file"># File 'lib/sms77/journal.rb', line 13</span>
|
367
|
+
|
368
|
+
<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>
|
369
|
+
<span class='id identifier rubyid_type'>type</span> <span class='op'>=</span> <span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='symbol'>:type</span><span class='rbracket'>]</span>
|
370
|
+
<span class='id identifier rubyid_date_from'>date_from</span> <span class='op'>=</span> <span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='symbol'>:date_from</span><span class='rbracket'>]</span>
|
371
|
+
<span class='id identifier rubyid_date_to'>date_to</span> <span class='op'>=</span> <span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='symbol'>:date_to</span><span class='rbracket'>]</span>
|
372
|
+
|
373
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Unknown type </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</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="../Journal.html" title="Sms77::Journal (module)">Journal</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="Sms77::Journal::Validator (module)">Validator</a></span></span><span class='op'>::</span><span class='id identifier rubyid_is_type?'><span class='object_link'><a href="#is_type%3F-class_method" title="Sms77::Journal::Validator.is_type? (method)">is_type?</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span><span class='rparen'>)</span>
|
374
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Wrong date_from </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_date_from'>date_from</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</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="../Journal.html" title="Sms77::Journal (module)">Journal</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="Sms77::Journal::Validator (module)">Validator</a></span></span><span class='op'>::</span><span class='id identifier rubyid_is_date?'><span class='object_link'><a href="#is_date%3F-class_method" title="Sms77::Journal::Validator.is_date? (method)">is_date?</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_date_from'>date_from</span><span class='rparen'>)</span>
|
375
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Wrong date_to </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_date_to'>date_to</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</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="../Journal.html" title="Sms77::Journal (module)">Journal</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="Sms77::Journal::Validator (module)">Validator</a></span></span><span class='op'>::</span><span class='id identifier rubyid_is_date?'><span class='object_link'><a href="#is_date%3F-class_method" title="Sms77::Journal::Validator.is_date? (method)">is_date?</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_date_to'>date_to</span><span class='rparen'>)</span>
|
376
|
+
<span class='kw'>end</span></pre>
|
377
|
+
</td>
|
378
|
+
</tr>
|
379
|
+
</table>
|
380
|
+
</div>
|
381
|
+
|
382
|
+
</div>
|
383
|
+
|
384
|
+
</div>
|
385
|
+
|
386
|
+
<div id="footer">
|
387
|
+
Generated on Wed Mar 30 13:55:36 2022 by
|
388
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
389
|
+
0.9.27 (ruby-2.7.4).
|
390
|
+
</div>
|
391
|
+
|
392
|
+
</div>
|
393
|
+
</body>
|
394
|
+
</html>
|