esp_sdk 1.1.0 → 2.0.0.rc1

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