esp_sdk 2.0.0 → 2.1.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/.travis.yml +1 -0
- data/CHANGELOG.md +6 -1
- data/Gemfile.lock +11 -1
- data/README.md +287 -28
- data/bin/esp +15 -0
- data/esp_sdk.gemspec +2 -0
- data/lib/esp/aws_clients.rb +60 -0
- data/lib/esp/commands/add_external_account.rb +57 -0
- data/lib/esp/commands/commands_tasks.rb +106 -0
- data/lib/esp/commands/console.rb +68 -0
- data/lib/esp/extensions/active_resource/formats/json_api_format.rb +12 -4
- data/lib/esp/extensions/active_resource/paginated_collection.rb +5 -5
- data/lib/esp/extensions/active_resource/validations.rb +1 -1
- data/lib/esp/external_account_creator.rb +77 -0
- data/lib/esp/resources/alert.rb +30 -34
- data/lib/esp/resources/cloud_trail_event.rb +5 -0
- data/lib/esp/resources/contact_request.rb +6 -5
- data/lib/esp/resources/custom_signature.rb +32 -56
- data/lib/esp/resources/dashboard.rb +8 -1
- data/lib/esp/resources/external_account.rb +27 -19
- data/lib/esp/resources/organization.rb +27 -3
- data/lib/esp/resources/region.rb +15 -3
- data/lib/esp/resources/report.rb +28 -24
- data/lib/esp/resources/resource.rb +26 -10
- data/lib/esp/resources/service.rb +5 -0
- data/lib/esp/resources/signature.rb +28 -12
- data/lib/esp/resources/stat.rb +21 -2
- data/lib/esp/resources/stat_custom_signature.rb +30 -4
- data/lib/esp/resources/stat_region.rb +29 -3
- data/lib/esp/resources/stat_service.rb +29 -3
- data/lib/esp/resources/stat_signature.rb +29 -3
- data/lib/esp/resources/sub_organization.rb +27 -3
- data/lib/esp/resources/suppression/region.rb +14 -32
- data/lib/esp/resources/suppression/signature.rb +14 -40
- data/lib/esp/resources/suppression/unique_identifier.rb +8 -6
- data/lib/esp/resources/suppression.rb +43 -5
- data/lib/esp/resources/tag.rb +5 -0
- data/lib/esp/resources/team.rb +33 -9
- data/lib/esp/resources/user.rb +29 -3
- data/lib/esp/version.rb +1 -1
- data/lib/esp.rb +25 -5
- data/test/esp/aws_clients_test.rb +101 -0
- data/test/esp/extensions/active_resource/formats/json_api_format_test.rb +26 -12
- data/test/esp/extensions/active_resource/paginated_collection_test.rb +93 -72
- data/test/esp/extensions/active_resource/validations_test.rb +2 -12
- data/test/esp/external_account_creator_test.rb +153 -0
- data/test/esp/resources/alert_test.rb +71 -33
- data/test/esp/resources/cloud_trail_event_test.rb +9 -1
- data/test/esp/resources/contact_request_test.rb +8 -0
- data/test/esp/resources/custom_signature_test.rb +8 -0
- data/test/esp/resources/dashboard_test.rb +8 -0
- data/test/esp/resources/external_account_test.rb +8 -0
- data/test/esp/resources/metadata_test.rb +1 -1
- data/test/esp/resources/organization_test.rb +8 -0
- data/test/esp/resources/region_test.rb +12 -4
- data/test/esp/resources/report_test.rb +13 -4
- data/test/esp/resources/resource_test.rb +208 -64
- data/test/esp/resources/service_test.rb +8 -0
- data/test/esp/resources/signature_test.rb +15 -9
- data/test/esp/resources/stat_custom_signature_test.rb +9 -1
- data/test/esp/resources/stat_region_test.rb +23 -1
- data/test/esp/resources/stat_service_test.rb +23 -1
- data/test/esp/resources/stat_signature_test.rb +23 -1
- data/test/esp/resources/stat_test.rb +52 -8
- data/test/esp/resources/sub_organization_test.rb +8 -0
- data/test/esp/resources/suppression/region_test.rb +10 -2
- data/test/esp/resources/suppression/signature_test.rb +10 -2
- data/test/esp/resources/suppression/unique_identifier_test.rb +10 -2
- data/test/esp/resources/suppression_test.rb +74 -14
- data/test/esp/resources/tag_test.rb +9 -1
- data/test/esp/resources/team_test.rb +8 -0
- data/test/esp/resources/user_test.rb +49 -19
- data/test/esp_test.rb +19 -1
- data/test/factories/alerts.rb +70 -0
- data/test/factories/organizations.rb +2 -2
- data/test/factories/regions.rb +1 -1
- data/test/factories/sub_organizations.rb +1 -1
- data/test/factories/suppressions.rb +109 -3
- data/test/factories/users.rb +65 -2
- data/test/test_helper.rb +9 -8
- metadata +41 -69
- data/bin/esp_console +0 -67
- data/rdoc/ActiveResource/Formats.html +0 -178
- data/rdoc/ActiveResource/PaginatedCollection.html +0 -912
- data/rdoc/ActiveResource.html +0 -182
- data/rdoc/ESP/Alert.html +0 -808
- data/rdoc/ESP/CloudTrailEvent.html +0 -377
- data/rdoc/ESP/ContactRequest.html +0 -368
- data/rdoc/ESP/CustomSignature.html +0 -748
- data/rdoc/ESP/Dashboard.html +0 -357
- data/rdoc/ESP/ExternalAccount.html +0 -567
- data/rdoc/ESP/Metadata.html +0 -411
- data/rdoc/ESP/Organization.html +0 -592
- data/rdoc/ESP/Region.html +0 -401
- data/rdoc/ESP/Report.html +0 -624
- data/rdoc/ESP/Service.html +0 -382
- data/rdoc/ESP/Signature.html +0 -557
- data/rdoc/ESP/Stat.html +0 -1780
- data/rdoc/ESP/StatCustomSignature.html +0 -1601
- data/rdoc/ESP/StatRegion.html +0 -1600
- data/rdoc/ESP/StatService.html +0 -1600
- data/rdoc/ESP/StatSignature.html +0 -1600
- data/rdoc/ESP/SubOrganization.html +0 -542
- data/rdoc/ESP/Suppression/Region.html +0 -456
- data/rdoc/ESP/Suppression/Signature.html +0 -472
- data/rdoc/ESP/Suppression/UniqueIdentifier.html +0 -419
- data/rdoc/ESP/Suppression.html +0 -651
- data/rdoc/ESP/Tag.html +0 -373
- data/rdoc/ESP/Team.html +0 -586
- data/rdoc/ESP/User.html +0 -485
- data/rdoc/ESP.html +0 -549
- data/rdoc/README_md.html +0 -503
- data/rdoc/created.rid +0 -31
- data/rdoc/images/add.png +0 -0
- data/rdoc/images/arrow_up.png +0 -0
- data/rdoc/images/brick.png +0 -0
- data/rdoc/images/brick_link.png +0 -0
- data/rdoc/images/bug.png +0 -0
- data/rdoc/images/bullet_black.png +0 -0
- data/rdoc/images/bullet_toggle_minus.png +0 -0
- data/rdoc/images/bullet_toggle_plus.png +0 -0
- data/rdoc/images/date.png +0 -0
- data/rdoc/images/delete.png +0 -0
- data/rdoc/images/find.png +0 -0
- data/rdoc/images/loadingAnimation.gif +0 -0
- data/rdoc/images/macFFBgHack.png +0 -0
- data/rdoc/images/package.png +0 -0
- data/rdoc/images/page_green.png +0 -0
- data/rdoc/images/page_white_text.png +0 -0
- data/rdoc/images/page_white_width.png +0 -0
- data/rdoc/images/plugin.png +0 -0
- data/rdoc/images/ruby.png +0 -0
- data/rdoc/images/tag_blue.png +0 -0
- data/rdoc/images/tag_green.png +0 -0
- data/rdoc/images/transparent.png +0 -0
- data/rdoc/images/wrench.png +0 -0
- data/rdoc/images/wrench_orange.png +0 -0
- data/rdoc/images/zoom.png +0 -0
- data/rdoc/index.html +0 -136
- data/rdoc/js/darkfish.js +0 -155
- data/rdoc/js/jquery.js +0 -4
- data/rdoc/js/navigation.js +0 -142
- data/rdoc/js/search.js +0 -94
- data/rdoc/js/search_index.js +0 -1
- data/rdoc/js/searcher.js +0 -228
- data/rdoc/rdoc.css +0 -595
- data/rdoc/table_of_contents.html +0 -942
data/rdoc/ESP/Team.html
DELETED
|
@@ -1,586 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
|
|
3
|
-
<html>
|
|
4
|
-
<head>
|
|
5
|
-
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
|
6
|
-
|
|
7
|
-
<title>class ESP::Team - ESPSDK</title>
|
|
8
|
-
|
|
9
|
-
<link type="text/css" media="screen" href="../rdoc.css" rel="stylesheet">
|
|
10
|
-
|
|
11
|
-
<script type="text/javascript">
|
|
12
|
-
var rdoc_rel_prefix = "../";
|
|
13
|
-
</script>
|
|
14
|
-
|
|
15
|
-
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
|
16
|
-
<script type="text/javascript" charset="utf-8" src="../js/navigation.js"></script>
|
|
17
|
-
<script type="text/javascript" charset="utf-8" src="../js/search_index.js"></script>
|
|
18
|
-
<script type="text/javascript" charset="utf-8" src="../js/search.js"></script>
|
|
19
|
-
<script type="text/javascript" charset="utf-8" src="../js/searcher.js"></script>
|
|
20
|
-
<script type="text/javascript" charset="utf-8" src="../js/darkfish.js"></script>
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
<body id="top" class="class">
|
|
24
|
-
<nav id="metadata">
|
|
25
|
-
<nav id="home-section" class="section">
|
|
26
|
-
<h3 class="section-header">
|
|
27
|
-
<a href="../index.html">Home</a>
|
|
28
|
-
<a href="../table_of_contents.html#classes">Classes</a>
|
|
29
|
-
<a href="../table_of_contents.html#methods">Methods</a>
|
|
30
|
-
</h3>
|
|
31
|
-
</nav>
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
<nav id="search-section" class="section project-section" class="initially-hidden">
|
|
35
|
-
<form action="#" method="get" accept-charset="utf-8">
|
|
36
|
-
<h3 class="section-header">
|
|
37
|
-
<input type="text" name="search" placeholder="Search" id="search-field"
|
|
38
|
-
title="Type to search, Up and Down to navigate, Enter to load">
|
|
39
|
-
</h3>
|
|
40
|
-
</form>
|
|
41
|
-
|
|
42
|
-
<ul id="search-results" class="initially-hidden"></ul>
|
|
43
|
-
</nav>
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
<div id="file-metadata">
|
|
49
|
-
<nav id="file-list-section" class="section">
|
|
50
|
-
<h3 class="section-header">Defined In</h3>
|
|
51
|
-
<ul>
|
|
52
|
-
<li>lib/esp/resources/team.rb
|
|
53
|
-
</ul>
|
|
54
|
-
</nav>
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
</div>
|
|
58
|
-
|
|
59
|
-
<div id="class-metadata">
|
|
60
|
-
|
|
61
|
-
<nav id="parent-class-section" class="section">
|
|
62
|
-
<h3 class="section-header">Parent</h3>
|
|
63
|
-
|
|
64
|
-
<p class="link">ESP::Resource
|
|
65
|
-
|
|
66
|
-
</nav>
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
<!-- Method Quickref -->
|
|
71
|
-
<nav id="method-list-section" class="section">
|
|
72
|
-
<h3 class="section-header">Methods</h3>
|
|
73
|
-
|
|
74
|
-
<ul class="link-list">
|
|
75
|
-
|
|
76
|
-
<li ><a href="#method-c-all">::all</a>
|
|
77
|
-
|
|
78
|
-
<li ><a href="#method-c-create">::create</a>
|
|
79
|
-
|
|
80
|
-
<li ><a href="#method-c-find">::find</a>
|
|
81
|
-
|
|
82
|
-
<li ><a href="#method-i-create_report">#create_report</a>
|
|
83
|
-
|
|
84
|
-
<li ><a href="#method-i-destroy">#destroy</a>
|
|
85
|
-
|
|
86
|
-
<li ><a href="#method-i-external_accounts">#external_accounts</a>
|
|
87
|
-
|
|
88
|
-
<li ><a href="#method-i-organization">#organization</a>
|
|
89
|
-
|
|
90
|
-
<li ><a href="#method-i-reports">#reports</a>
|
|
91
|
-
|
|
92
|
-
<li ><a href="#method-i-save">#save</a>
|
|
93
|
-
|
|
94
|
-
<li ><a href="#method-i-sub_organization">#sub_organization</a>
|
|
95
|
-
|
|
96
|
-
</ul>
|
|
97
|
-
</nav>
|
|
98
|
-
|
|
99
|
-
</div>
|
|
100
|
-
|
|
101
|
-
<div id="project-metadata">
|
|
102
|
-
<nav id="fileindex-section" class="section project-section">
|
|
103
|
-
<h3 class="section-header">Pages</h3>
|
|
104
|
-
|
|
105
|
-
<ul>
|
|
106
|
-
|
|
107
|
-
<li class="file"><a href="../README_md.html">README</a>
|
|
108
|
-
|
|
109
|
-
</ul>
|
|
110
|
-
</nav>
|
|
111
|
-
|
|
112
|
-
<nav id="classindex-section" class="section project-section">
|
|
113
|
-
<h3 class="section-header">Class and Module Index</h3>
|
|
114
|
-
|
|
115
|
-
<ul class="link-list">
|
|
116
|
-
|
|
117
|
-
<li><a href="../ActiveResource.html">ActiveResource</a>
|
|
118
|
-
|
|
119
|
-
<li><a href="../ActiveResource/Formats.html">ActiveResource::Formats</a>
|
|
120
|
-
|
|
121
|
-
<li><a href="../ActiveResource/PaginatedCollection.html">ActiveResource::PaginatedCollection</a>
|
|
122
|
-
|
|
123
|
-
<li><a href="../ESP.html">ESP</a>
|
|
124
|
-
|
|
125
|
-
<li><a href="../ESP/Alert.html">ESP::Alert</a>
|
|
126
|
-
|
|
127
|
-
<li><a href="../ESP/CloudTrailEvent.html">ESP::CloudTrailEvent</a>
|
|
128
|
-
|
|
129
|
-
<li><a href="../ESP/ContactRequest.html">ESP::ContactRequest</a>
|
|
130
|
-
|
|
131
|
-
<li><a href="../ESP/CustomSignature.html">ESP::CustomSignature</a>
|
|
132
|
-
|
|
133
|
-
<li><a href="../ESP/Dashboard.html">ESP::Dashboard</a>
|
|
134
|
-
|
|
135
|
-
<li><a href="../ESP/ExternalAccount.html">ESP::ExternalAccount</a>
|
|
136
|
-
|
|
137
|
-
<li><a href="../ESP/Metadata.html">ESP::Metadata</a>
|
|
138
|
-
|
|
139
|
-
<li><a href="../ESP/Organization.html">ESP::Organization</a>
|
|
140
|
-
|
|
141
|
-
<li><a href="../ESP/Region.html">ESP::Region</a>
|
|
142
|
-
|
|
143
|
-
<li><a href="../ESP/Report.html">ESP::Report</a>
|
|
144
|
-
|
|
145
|
-
<li><a href="../ESP/Service.html">ESP::Service</a>
|
|
146
|
-
|
|
147
|
-
<li><a href="../ESP/Signature.html">ESP::Signature</a>
|
|
148
|
-
|
|
149
|
-
<li><a href="../ESP/Stat.html">ESP::Stat</a>
|
|
150
|
-
|
|
151
|
-
<li><a href="../ESP/StatCustomSignature.html">ESP::StatCustomSignature</a>
|
|
152
|
-
|
|
153
|
-
<li><a href="../ESP/StatRegion.html">ESP::StatRegion</a>
|
|
154
|
-
|
|
155
|
-
<li><a href="../ESP/StatService.html">ESP::StatService</a>
|
|
156
|
-
|
|
157
|
-
<li><a href="../ESP/StatSignature.html">ESP::StatSignature</a>
|
|
158
|
-
|
|
159
|
-
<li><a href="../ESP/SubOrganization.html">ESP::SubOrganization</a>
|
|
160
|
-
|
|
161
|
-
<li><a href="../ESP/Suppression.html">ESP::Suppression</a>
|
|
162
|
-
|
|
163
|
-
<li><a href="../ESP/Suppression/Region.html">ESP::Suppression::Region</a>
|
|
164
|
-
|
|
165
|
-
<li><a href="../ESP/Suppression/Signature.html">ESP::Suppression::Signature</a>
|
|
166
|
-
|
|
167
|
-
<li><a href="../ESP/Suppression/UniqueIdentifier.html">ESP::Suppression::UniqueIdentifier</a>
|
|
168
|
-
|
|
169
|
-
<li><a href="../ESP/Tag.html">ESP::Tag</a>
|
|
170
|
-
|
|
171
|
-
<li><a href="../ESP/Team.html">ESP::Team</a>
|
|
172
|
-
|
|
173
|
-
<li><a href="../ESP/User.html">ESP::User</a>
|
|
174
|
-
|
|
175
|
-
</ul>
|
|
176
|
-
</nav>
|
|
177
|
-
|
|
178
|
-
</div>
|
|
179
|
-
</nav>
|
|
180
|
-
|
|
181
|
-
<div id="documentation">
|
|
182
|
-
<h1 class="class">class ESP::Team</h1>
|
|
183
|
-
|
|
184
|
-
<div id="description" class="description">
|
|
185
|
-
|
|
186
|
-
</div><!-- description -->
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
<section id="5Buntitled-5D" class="documentation-section">
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
<!-- Methods -->
|
|
201
|
-
|
|
202
|
-
<section id="public-class-5Buntitled-5D-method-details" class="method-section section">
|
|
203
|
-
<h3 class="section-header">Public Class Methods</h3>
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
<div id="method-c-all" class="method-detail ">
|
|
207
|
-
|
|
208
|
-
<div class="method-heading">
|
|
209
|
-
<span class="method-name">all</span><span
|
|
210
|
-
class="method-args">()</span>
|
|
211
|
-
|
|
212
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
213
|
-
|
|
214
|
-
</div>
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
<div class="method-description">
|
|
218
|
-
|
|
219
|
-
<p>Return a paginated <a href="Team.html">Team</a> list</p>
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
<div class="method-source-code" id="all-source">
|
|
225
|
-
<pre><span class="ruby-comment"># File lib/esp/resources/team.rb, line 43</span>
|
|
226
|
-
</pre>
|
|
227
|
-
</div><!-- all-source -->
|
|
228
|
-
|
|
229
|
-
</div>
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
</div><!-- all-method -->
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
<div id="method-c-create" class="method-detail ">
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
<div class="method-heading">
|
|
241
|
-
<span class="method-callseq">
|
|
242
|
-
create(attributes={})
|
|
243
|
-
</span>
|
|
244
|
-
|
|
245
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
246
|
-
|
|
247
|
-
</div>
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
<div class="method-description">
|
|
252
|
-
|
|
253
|
-
<p>Create a <a href="Team.html">Team</a>.</p>
|
|
254
|
-
|
|
255
|
-
<h4 id="method-c-create-label-Parameter">Parameter<span><a href="#method-c-create-label-Parameter">¶</a> <a href="#documentation">↑</a></span></h4>
|
|
256
|
-
|
|
257
|
-
<p><code>attributes</code> | Required | A hash of team attributes</p>
|
|
258
|
-
|
|
259
|
-
<h4 id="method-c-create-label-Valid+Attributes">Valid Attributes<span><a href="#method-c-create-label-Valid+Attributes">¶</a> <a href="#documentation">↑</a></span></h4>
|
|
260
|
-
|
|
261
|
-
<p><code>sub_organization_id</code> | Required | The ID of the sub
|
|
262
|
-
organization to attach this team to</p>
|
|
263
|
-
|
|
264
|
-
<p><code>name</code> | Required | The name of the team</p>
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
<div class="method-source-code" id="create-source">
|
|
270
|
-
<pre><span class="ruby-comment"># File lib/esp/resources/team.rb, line 58</span>
|
|
271
|
-
</pre>
|
|
272
|
-
</div><!-- create-source -->
|
|
273
|
-
|
|
274
|
-
</div>
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
</div><!-- create-method -->
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
<div id="method-c-find" class="method-detail ">
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
<div class="method-heading">
|
|
286
|
-
<span class="method-callseq">
|
|
287
|
-
find(id)
|
|
288
|
-
</span>
|
|
289
|
-
|
|
290
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
291
|
-
|
|
292
|
-
</div>
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
<div class="method-description">
|
|
297
|
-
|
|
298
|
-
<p>Find a <a href="Team.html">Team</a> by id</p>
|
|
299
|
-
|
|
300
|
-
<h4 id="method-c-find-label-Parameter">Parameter<span><a href="#method-c-find-label-Parameter">¶</a> <a href="#documentation">↑</a></span></h4>
|
|
301
|
-
|
|
302
|
-
<p><code>id</code> | Required | The ID of the team to retrieve</p>
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
<div class="method-source-code" id="find-source">
|
|
308
|
-
<pre><span class="ruby-comment"># File lib/esp/resources/team.rb, line 40</span>
|
|
309
|
-
</pre>
|
|
310
|
-
</div><!-- find-source -->
|
|
311
|
-
|
|
312
|
-
</div>
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
</div><!-- find-method -->
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
</section><!-- public-class-method-details -->
|
|
321
|
-
|
|
322
|
-
<section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
|
|
323
|
-
<h3 class="section-header">Public Instance Methods</h3>
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
<div id="method-i-create_report" class="method-detail ">
|
|
327
|
-
|
|
328
|
-
<div class="method-heading">
|
|
329
|
-
<span class="method-name">create_report</span><span
|
|
330
|
-
class="method-args">()</span>
|
|
331
|
-
|
|
332
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
333
|
-
|
|
334
|
-
</div>
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
<div class="method-description">
|
|
338
|
-
|
|
339
|
-
<p>Enqueue a report to be run for this team. Returns a <a
|
|
340
|
-
href="Report.html">Report</a> object with a status of 'queued' and
|
|
341
|
-
an id Periodically check the API</p>
|
|
342
|
-
|
|
343
|
-
<pre>ESP::Report.find(<id>)</pre>
|
|
344
|
-
|
|
345
|
-
<p>until status is 'complete'. If not successful, returns a <a
|
|
346
|
-
href="Report.html">Report</a> object with the errors object populated.</p>
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
<div class="method-source-code" id="create_report-source">
|
|
352
|
-
<pre><span class="ruby-comment"># File lib/esp/resources/team.rb, line 25</span>
|
|
353
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">create_report</span>
|
|
354
|
-
<span class="ruby-constant">Report</span>.<span class="ruby-identifier">create_for_team</span>(<span class="ruby-identifier">id</span>)
|
|
355
|
-
<span class="ruby-keyword">end</span></pre>
|
|
356
|
-
</div><!-- create_report-source -->
|
|
357
|
-
|
|
358
|
-
</div>
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
</div><!-- create_report-method -->
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
<div id="method-i-destroy" class="method-detail ">
|
|
367
|
-
|
|
368
|
-
<div class="method-heading">
|
|
369
|
-
<span class="method-name">destroy</span><span
|
|
370
|
-
class="method-args">()</span>
|
|
371
|
-
|
|
372
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
373
|
-
|
|
374
|
-
</div>
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
<div class="method-description">
|
|
378
|
-
|
|
379
|
-
<p>Delete a <a href="Team.html">Team</a>.</p>
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
<div class="method-source-code" id="destroy-source">
|
|
385
|
-
<pre><span class="ruby-comment"># File lib/esp/resources/team.rb, line 78</span>
|
|
386
|
-
</pre>
|
|
387
|
-
</div><!-- destroy-source -->
|
|
388
|
-
|
|
389
|
-
</div>
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
</div><!-- destroy-method -->
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
<div id="method-i-external_accounts" class="method-detail ">
|
|
398
|
-
|
|
399
|
-
<div class="method-heading">
|
|
400
|
-
<span class="method-name">external_accounts</span><span
|
|
401
|
-
class="method-args">()</span>
|
|
402
|
-
|
|
403
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
404
|
-
|
|
405
|
-
</div>
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
<div class="method-description">
|
|
409
|
-
|
|
410
|
-
<p>The collection of <a
|
|
411
|
-
href="Team.html#method-i-external_accounts">#external_accounts</a> that
|
|
412
|
-
belong to the team.</p>
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
<div class="method-source-code" id="external_accounts-source">
|
|
418
|
-
<pre><span class="ruby-comment"># File lib/esp/resources/team.rb, line 13</span>
|
|
419
|
-
<span class="ruby-identifier">has_many</span> <span class="ruby-value">:external_accounts</span>, <span class="ruby-identifier">class_name</span><span class="ruby-operator">:</span> <span class="ruby-string">'ESP::ExternalAccount'</span>
|
|
420
|
-
</pre>
|
|
421
|
-
</div><!-- external_accounts-source -->
|
|
422
|
-
|
|
423
|
-
</div>
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
</div><!-- external_accounts-method -->
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
<div id="method-i-organization" class="method-detail ">
|
|
432
|
-
|
|
433
|
-
<div class="method-heading">
|
|
434
|
-
<span class="method-name">organization</span><span
|
|
435
|
-
class="method-args">()</span>
|
|
436
|
-
|
|
437
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
438
|
-
|
|
439
|
-
</div>
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
<div class="method-description">
|
|
443
|
-
|
|
444
|
-
<p>The organization this team belongs to.</p>
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
<div class="method-source-code" id="organization-source">
|
|
450
|
-
<pre><span class="ruby-comment"># File lib/esp/resources/team.rb, line 5</span>
|
|
451
|
-
<span class="ruby-identifier">belongs_to</span> <span class="ruby-value">:organization</span>, <span class="ruby-identifier">class_name</span><span class="ruby-operator">:</span> <span class="ruby-string">'ESP::Organization'</span>
|
|
452
|
-
</pre>
|
|
453
|
-
</div><!-- organization-source -->
|
|
454
|
-
|
|
455
|
-
</div>
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
</div><!-- organization-method -->
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
<div id="method-i-reports" class="method-detail ">
|
|
464
|
-
|
|
465
|
-
<div class="method-heading">
|
|
466
|
-
<span class="method-name">reports</span><span
|
|
467
|
-
class="method-args">()</span>
|
|
468
|
-
|
|
469
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
470
|
-
|
|
471
|
-
</div>
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
<div class="method-description">
|
|
475
|
-
|
|
476
|
-
<p>The collection of reports that belong to the team.</p>
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
<div class="method-source-code" id="reports-source">
|
|
482
|
-
<pre><span class="ruby-comment"># File lib/esp/resources/team.rb, line 17</span>
|
|
483
|
-
<span class="ruby-identifier">has_many</span> <span class="ruby-value">:reports</span>, <span class="ruby-identifier">class_name</span><span class="ruby-operator">:</span> <span class="ruby-string">'ESP::Report'</span>
|
|
484
|
-
</pre>
|
|
485
|
-
</div><!-- reports-source -->
|
|
486
|
-
|
|
487
|
-
</div>
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
</div><!-- reports-method -->
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
<div id="method-i-save" class="method-detail ">
|
|
496
|
-
|
|
497
|
-
<div class="method-heading">
|
|
498
|
-
<span class="method-name">save</span><span
|
|
499
|
-
class="method-args">()</span>
|
|
500
|
-
|
|
501
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
502
|
-
|
|
503
|
-
</div>
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
<div class="method-description">
|
|
507
|
-
|
|
508
|
-
<p>Create and update a <a href="Team.html">Team</a>.</p>
|
|
509
|
-
|
|
510
|
-
<h4 id="method-i-save-label-Valid+Attributes+when+updating">Valid Attributes when updating<span><a href="#method-i-save-label-Valid+Attributes+when+updating">¶</a> <a href="#documentation">↑</a></span></h4>
|
|
511
|
-
|
|
512
|
-
<p><code>name</code> | Required | The new name of the team</p>
|
|
513
|
-
|
|
514
|
-
<h4 id="method-i-save-label-Valid+Attributes+when+creating">Valid Attributes when creating<span><a href="#method-i-save-label-Valid+Attributes+when+creating">¶</a> <a href="#documentation">↑</a></span></h4>
|
|
515
|
-
|
|
516
|
-
<p><code>sub_organization_id</code> | Required | The ID of the sub
|
|
517
|
-
organization to attach this team to</p>
|
|
518
|
-
|
|
519
|
-
<p><code>name</code> | Required | The name of the team</p>
|
|
520
|
-
|
|
521
|
-
<h4 id="method-i-save-label-Example">Example<span><a href="#method-i-save-label-Example">¶</a> <a href="#documentation">↑</a></span></h4>
|
|
522
|
-
|
|
523
|
-
<pre>team = ESP::Team.new(name: "Team Name", sub_organization_id: 9)
|
|
524
|
-
team.save</pre>
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
<div class="method-source-code" id="save-source">
|
|
530
|
-
<pre><span class="ruby-comment"># File lib/esp/resources/team.rb, line 76</span>
|
|
531
|
-
</pre>
|
|
532
|
-
</div><!-- save-source -->
|
|
533
|
-
|
|
534
|
-
</div>
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
</div><!-- save-method -->
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
<div id="method-i-sub_organization" class="method-detail ">
|
|
543
|
-
|
|
544
|
-
<div class="method-heading">
|
|
545
|
-
<span class="method-name">sub_organization</span><span
|
|
546
|
-
class="method-args">()</span>
|
|
547
|
-
|
|
548
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
549
|
-
|
|
550
|
-
</div>
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
<div class="method-description">
|
|
554
|
-
|
|
555
|
-
<p>The sub organization this team belongs to.</p>
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
<div class="method-source-code" id="sub_organization-source">
|
|
561
|
-
<pre><span class="ruby-comment"># File lib/esp/resources/team.rb, line 9</span>
|
|
562
|
-
<span class="ruby-identifier">belongs_to</span> <span class="ruby-value">:sub_organization</span>, <span class="ruby-identifier">class_name</span><span class="ruby-operator">:</span> <span class="ruby-string">'ESP::SubOrganization'</span>
|
|
563
|
-
</pre>
|
|
564
|
-
</div><!-- sub_organization-source -->
|
|
565
|
-
|
|
566
|
-
</div>
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
</div><!-- sub_organization-method -->
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
</section><!-- public-instance-method-details -->
|
|
575
|
-
|
|
576
|
-
</section><!-- 5Buntitled-5D -->
|
|
577
|
-
|
|
578
|
-
</div><!-- documentation -->
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
<footer id="validator-badges">
|
|
582
|
-
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
|
583
|
-
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 4.0.0.
|
|
584
|
-
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
|
585
|
-
</footer>
|
|
586
|
-
|