zendesk_api 0.3.14 → 0.4.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (141) hide show
  1. data/.yardopts +6 -2
  2. data/Gemfile +3 -2
  3. data/Gemfile.lock +4 -4
  4. data/Readme.md +3 -268
  5. data/lib/zendesk_api/actions.rb +51 -46
  6. data/lib/zendesk_api/association.rb +1 -1
  7. data/lib/zendesk_api/associations.rb +2 -6
  8. data/lib/zendesk_api/client.rb +8 -9
  9. data/lib/zendesk_api/collection.rb +84 -50
  10. data/lib/zendesk_api/configuration.rb +4 -0
  11. data/lib/zendesk_api/error.rb +22 -0
  12. data/lib/zendesk_api/middleware/request/etag_cache.rb +1 -7
  13. data/lib/zendesk_api/middleware/request/upload.rb +1 -2
  14. data/lib/zendesk_api/middleware/response/raise_error.rb +20 -0
  15. data/lib/zendesk_api/resource.rb +33 -5
  16. data/lib/zendesk_api/resources.rb +36 -11
  17. data/lib/zendesk_api/server/base.rb +1 -1
  18. data/lib/zendesk_api/server/helper.rb +3 -3
  19. data/lib/zendesk_api/server/models/zlib_json.rb +1 -1
  20. data/lib/zendesk_api/server/public/doc/ZendeskAPI.html +7 -7
  21. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Ability.html +415 -13
  22. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Activity.html +414 -51
  23. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Attachment.html +321 -25
  24. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Automation.html +413 -46
  25. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Bookmark.html +389 -26
  26. data/lib/zendesk_api/server/public/doc/ZendeskAPI/CRMData.html +415 -13
  27. data/lib/zendesk_api/server/public/doc/ZendeskAPI/CRMDataStatus.html +415 -13
  28. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Category.html +410 -47
  29. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Client.html +98 -362
  30. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Collection.html +457 -676
  31. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Configuration.html +110 -20
  32. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Create.html +264 -6
  33. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Create/ClassMethods.html +43 -82
  34. data/lib/zendesk_api/server/public/doc/ZendeskAPI/CreateResource.html +671 -15
  35. data/lib/zendesk_api/server/public/doc/ZendeskAPI/CustomRole.html +415 -13
  36. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Data.html +207 -233
  37. data/lib/zendesk_api/server/public/doc/ZendeskAPI/DataResource.html +499 -24
  38. data/lib/zendesk_api/server/public/doc/ZendeskAPI/DeleteResource.html +614 -15
  39. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Destroy.html +73 -23
  40. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Destroy/ClassMethod.html +68 -18
  41. data/lib/zendesk_api/server/public/doc/ZendeskAPI/{FormatError.html → Error.html} +19 -27
  42. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Error/ClientError.html +127 -0
  43. data/lib/zendesk_api/server/public/doc/ZendeskAPI/{Server/UserRequest.html → Error/NetworkError.html} +18 -16
  44. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Error/RecordInvalid.html +371 -0
  45. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Error/RecordNotFound.html +127 -0
  46. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Forum.html +426 -63
  47. data/lib/zendesk_api/server/public/doc/ZendeskAPI/ForumSubscription.html +414 -51
  48. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Group.html +389 -26
  49. data/lib/zendesk_api/server/public/doc/ZendeskAPI/GroupMembership.html +414 -51
  50. data/lib/zendesk_api/server/public/doc/ZendeskAPI/JobStatus.html +405 -16
  51. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Locale.html +405 -16
  52. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Macro.html +413 -46
  53. data/lib/zendesk_api/server/public/doc/ZendeskAPI/MobileDevice.html +404 -41
  54. data/lib/zendesk_api/server/public/doc/ZendeskAPI/OAuthClient.html +606 -0
  55. data/lib/zendesk_api/server/public/doc/ZendeskAPI/OAuthToken.html +810 -0
  56. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Organization.html +422 -59
  57. data/lib/zendesk_api/server/public/doc/ZendeskAPI/OrganizationField.html +606 -0
  58. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Read.html +75 -12
  59. data/lib/zendesk_api/server/public/doc/ZendeskAPI/ReadResource.html +593 -16
  60. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Request.html +418 -55
  61. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Request/Comment.html +420 -31
  62. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Resource.html +1025 -20
  63. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Role.html +415 -13
  64. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Rule.html +610 -0
  65. data/lib/zendesk_api/server/public/doc/ZendeskAPI/RuleExecution.html +317 -21
  66. data/lib/zendesk_api/server/public/doc/ZendeskAPI/SatisfactionRating.html +428 -39
  67. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Save.html +63 -79
  68. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Search.html +34 -26
  69. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Search/Result.html +305 -9
  70. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Setting.html +433 -41
  71. data/lib/zendesk_api/server/public/doc/ZendeskAPI/SharingAgreement.html +405 -16
  72. data/lib/zendesk_api/server/public/doc/ZendeskAPI/SingularResource.html +389 -26
  73. data/lib/zendesk_api/server/public/doc/ZendeskAPI/SuspendedTicket.html +600 -31
  74. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Ticket.html +464 -101
  75. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Ticket/Audit.html +427 -25
  76. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Ticket/Comment.html +435 -32
  77. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Ticket/Tag.html +389 -26
  78. data/lib/zendesk_api/server/public/doc/ZendeskAPI/TicketField.html +389 -26
  79. data/lib/zendesk_api/server/public/doc/ZendeskAPI/TicketMetric.html +592 -15
  80. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Topic.html +427 -64
  81. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Topic/TopicComment.html +907 -17
  82. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Topic/TopicVote.html +414 -55
  83. data/lib/zendesk_api/server/public/doc/ZendeskAPI/TopicComment.html +325 -29
  84. data/lib/zendesk_api/server/public/doc/ZendeskAPI/TopicSubscription.html +414 -51
  85. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Trigger.html +413 -46
  86. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Update.html +258 -6
  87. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Update/ClassMethod.html +62 -12
  88. data/lib/zendesk_api/server/public/doc/ZendeskAPI/UpdateResource.html +671 -15
  89. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Upload.html +800 -28
  90. data/lib/zendesk_api/server/public/doc/ZendeskAPI/User.html +505 -142
  91. data/lib/zendesk_api/server/public/doc/ZendeskAPI/User/Identity.html +412 -49
  92. data/lib/zendesk_api/server/public/doc/ZendeskAPI/User/TopicComment.html +475 -13
  93. data/lib/zendesk_api/server/public/doc/ZendeskAPI/UserField.html +606 -0
  94. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Verbs.html +9 -15
  95. data/lib/zendesk_api/server/public/doc/ZendeskAPI/View.html +433 -66
  96. data/lib/zendesk_api/server/public/doc/ZendeskAPI/ViewCount.html +415 -13
  97. data/lib/zendesk_api/server/public/doc/ZendeskAPI/ViewRow.html +451 -49
  98. data/lib/zendesk_api/server/public/doc/_index.html +72 -72
  99. data/lib/zendesk_api/server/public/doc/class_list.html +1 -1
  100. data/lib/zendesk_api/server/public/doc/css/style.css +10 -0
  101. data/lib/zendesk_api/server/public/doc/file.Readme.html +20 -260
  102. data/lib/zendesk_api/server/public/doc/file_list.html +1 -1
  103. data/lib/zendesk_api/server/public/doc/frames.html +1 -1
  104. data/lib/zendesk_api/server/public/doc/index.html +20 -260
  105. data/lib/zendesk_api/server/public/doc/method_list.html +309 -517
  106. data/lib/zendesk_api/server/public/doc/top-level-namespace.html +3 -35
  107. data/lib/zendesk_api/verbs.rb +0 -4
  108. data/lib/zendesk_api/version.rb +1 -1
  109. data/spec/core/client_spec.rb +53 -13
  110. data/spec/core/collection_spec.rb +32 -4
  111. data/spec/core/create_resource_spec.rb +1 -1
  112. data/spec/core/data_resource_spec.rb +2 -2
  113. data/spec/core/middleware/request/etag_cache_spec.rb +6 -7
  114. data/spec/core/middleware/request/upload_spec.rb +2 -10
  115. data/spec/core/middleware/response/callback_spec.rb +1 -1
  116. data/spec/core/middleware/response/raise_error_spec.rb +40 -0
  117. data/spec/core/read_resource_spec.rb +0 -2
  118. data/spec/core/resource_spec.rb +13 -5
  119. data/spec/core/search_spec.rb +1 -1
  120. data/spec/core/spec_helper.rb +3 -3
  121. data/spec/live/automation_spec.rb +23 -0
  122. data/spec/live/organization_field_spec.rb +12 -0
  123. data/spec/live/ticket_spec.rb +8 -2
  124. data/spec/live/trigger_spec.rb +23 -0
  125. data/spec/live/user_field_spec.rb +12 -0
  126. data/spec/live/user_spec.rb +0 -2
  127. data/spec/live/view_spec.rb +17 -1
  128. data/spec/server/spec_helper.rb +2 -2
  129. data/zendesk_api.gemspec +1 -1
  130. metadata +88 -51
  131. checksums.yaml +0 -7
  132. data/lib/zendesk_api/rescue.rb +0 -63
  133. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Console.html +0 -860
  134. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Console/Eval.html +0 -190
  135. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Server.html +0 -131
  136. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Server/App.html +0 -523
  137. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Server/Helper.html +0 -684
  138. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Server/HtmlRenderer.html +0 -303
  139. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Server/HtmlRenderer/RedcarpetRenderer.html +0 -508
  140. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Server/ZlibJSON.html +0 -244
  141. data/spec/core/rescue_spec.rb +0 -151
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: ZendeskAPI::Topic::TopicComment
8
8
 
9
- &mdash; Documentation by YARD 0.8.4.1
9
+ &mdash; Documentation by YARD 0.8.5.2
10
10
 
11
11
  </title>
12
12
 
@@ -115,33 +115,263 @@
115
115
 
116
116
 
117
117
 
118
+ <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
119
+ <ul class="summary">
120
+
121
+ <li class="public ">
122
+ <span class="summary_signature">
123
+
124
+ <a href="#association-instance_method" title="#association (instance method)">- (ZendeskAPI::Association) <strong>association</strong> </a>
125
+
118
126
 
127
+
128
+ </span>
129
+
130
+ <span class="note title not_defined_here">
131
+ inherited
132
+ from <span class='object_link'><a href="../Data.html#association-instance_method" title="ZendeskAPI::Data#association (method)">Data</a></span>
133
+ </span>
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+
119
144
 
120
- <h2>Instance Attribute Summary</h2>
121
145
 
122
- <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="../Data.html" title="ZendeskAPI::Data (class)">Data</a></span></h3>
123
- <p class="inherited"><span class='object_link'><a href="../Data.html#association-instance_method" title="ZendeskAPI::Data#association (method)">#association</a></span>, <span class='object_link'><a href="../Data.html#attributes-instance_method" title="ZendeskAPI::Data#attributes (method)">#attributes</a></span>, <span class='object_link'><a href="../Data.html#response-instance_method" title="ZendeskAPI::Data#response (method)">#response</a></span></p>
146
+ <span class="summary_desc"><div class='inline'>
147
+ <p>The association.</p>
148
+ </div></span>
149
+
150
+ </li>
124
151
 
152
+
153
+ <li class="public ">
154
+ <span class="summary_signature">
155
+
156
+ <a href="#attributes-instance_method" title="#attributes (instance method)">- (Hash) <strong>attributes</strong> </a>
157
+
125
158
 
159
+
160
+ (also: #to_param)
161
+
162
+ </span>
163
+
164
+ <span class="note title not_defined_here">
165
+ inherited
166
+ from <span class='object_link'><a href="../Data.html#attributes-instance_method" title="ZendeskAPI::Data#attributes (method)">Data</a></span>
167
+ </span>
168
+
169
+
170
+
171
+
172
+ <span class="note title readonly">readonly</span>
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+
181
+
182
+ <span class="summary_desc"><div class='inline'>
183
+ <p>The resource's attributes.</p>
184
+ </div></span>
185
+
186
+ </li>
126
187
 
188
+
189
+ <li class="public ">
190
+ <span class="summary_signature">
191
+
192
+ <a href="#errors-instance_method" title="#errors (instance method)">- (Array) <strong>errors</strong> </a>
193
+
194
+
195
+
196
+ </span>
197
+
198
+ <span class="note title not_defined_here">
199
+ inherited
200
+ from <span class='object_link'><a href="../Data.html#errors-instance_method" title="ZendeskAPI::Data#errors (method)">Data</a></span>
201
+ </span>
202
+
203
+
204
+
205
+
206
+
127
207
 
128
208
 
129
209
 
130
210
 
131
211
 
212
+
132
213
 
133
- <h2>Method Summary</h2>
214
+ <span class="summary_desc"><div class='inline'>
215
+ <p>The last received errors.</p>
216
+ </div></span>
134
217
 
135
- <h3 class="inherited">Methods included from <span class='object_link'><a href="../Read.html" title="ZendeskAPI::Read (module)">Read</a></span></h3>
136
- <p class="inherited"><span class='object_link'><a href="../Read.html#find-instance_method" title="ZendeskAPI::Read#find (method)">find</a></span></p>
218
+ </li>
219
+
220
+
221
+ <li class="public ">
222
+ <span class="summary_signature">
223
+
224
+ <a href="#response-instance_method" title="#response (instance method)">- (Object) <strong>response</strong> </a>
225
+
137
226
 
227
+
228
+ </span>
229
+
230
+ <span class="note title not_defined_here">
231
+ inherited
232
+ from <span class='object_link'><a href="../Data.html#response-instance_method" title="ZendeskAPI::Data#response (method)">Data</a></span>
233
+ </span>
234
+
235
+
236
+
237
+
238
+
239
+
240
+
241
+
242
+
243
+
244
+
245
+
246
+ <span class="summary_desc"><div class='inline'>
247
+ <p>Place to dump the last response.</p>
248
+ </div></span>
249
+
250
+ </li>
251
+
252
+
253
+ </ul>
254
+
255
+
256
+
257
+
258
+
259
+ <h2>
260
+ Class Method Summary
261
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
262
+ </h2>
263
+
264
+ <ul class="summary">
265
+
266
+ <li class="public ">
267
+ <span class="summary_signature">
268
+
269
+ <a href="#find-class_method" title="#find (class method)">+ (Object) <strong>find</strong>(client, options = {}) </a>
270
+
271
+
272
+
273
+ </span>
274
+
275
+ <span class="note title not_defined_here">
276
+ extended
277
+ from <span class='object_link'><a href="../Read.html#find-class_method" title="ZendeskAPI::Read#find (method)">Read</a></span>
278
+ </span>
279
+
280
+
281
+
282
+
283
+
284
+
285
+
286
+
287
+
288
+ <span class="summary_desc"><div class='inline'>
289
+ <p>Finds, returning nil if it fails.</p>
290
+ </div></span>
291
+
292
+ </li>
293
+
294
+
295
+ <li class="public ">
296
+ <span class="summary_signature">
297
+
298
+ <a href="#find%21-class_method" title="#find! (class method)">+ (Object) <strong>find!</strong>(client, options = {}) </a>
299
+
300
+
301
+
302
+ </span>
303
+
304
+ <span class="note title not_defined_here">
305
+ extended
306
+ from <span class='object_link'><a href="../Read.html#find%21-class_method" title="ZendeskAPI::Read#find! (method)">Read</a></span>
307
+ </span>
308
+
309
+
310
+
311
+
312
+
313
+
314
+
315
+
316
+
317
+ <span class="summary_desc"><div class='inline'>
318
+ <p>Finds a resource by an id and any options passed in.</p>
319
+ </div></span>
320
+
321
+ </li>
322
+
323
+
324
+ </ul>
325
+
326
+ <h2>
327
+ Instance Method Summary
328
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
329
+ </h2>
330
+
331
+ <ul class="summary">
332
+
333
+ <li class="public ">
334
+ <span class="summary_signature">
335
+
336
+ <a href="#clear_associations-instance_method" title="#clear_associations (instance method)">- (Object) <strong>clear_associations</strong> </a>
337
+
338
+
339
+
340
+ </span>
341
+
342
+ <span class="note title not_defined_here">
343
+ included
344
+ from <span class='object_link'><a href="../Save.html#clear_associations-instance_method" title="ZendeskAPI::Save#clear_associations (method)">Save</a></span>
345
+ </span>
346
+
347
+
348
+
138
349
 
139
350
 
140
351
 
141
352
 
353
+
142
354
 
355
+ <span class="summary_desc"><div class='inline'>
356
+ <p>Removes all cached associations.</p>
357
+ </div></span>
143
358
 
359
+ </li>
360
+
361
+
362
+ <li class="public ">
363
+ <span class="summary_signature">
364
+
365
+ <a href="#destroy-instance_method" title="#destroy (instance method)">- (Object) <strong>destroy</strong> </a>
366
+
367
+
368
+
369
+ </span>
144
370
 
371
+ <span class="note title not_defined_here">
372
+ included
373
+ from <span class='object_link'><a href="../Destroy.html#destroy-instance_method" title="ZendeskAPI::Destroy#destroy (method)">Destroy</a></span>
374
+ </span>
145
375
 
146
376
 
147
377
 
@@ -149,12 +379,26 @@
149
379
 
150
380
 
151
381
 
152
- <h3 class="inherited">Methods included from <span class='object_link'><a href="../Destroy.html" title="ZendeskAPI::Destroy (module)">Destroy</a></span></h3>
153
- <p class="inherited"><span class='object_link'><a href="../Destroy.html#destroy-instance_method" title="ZendeskAPI::Destroy#destroy (method)">#destroy</a></span>, <span class='object_link'><a href="../Destroy.html#destroyed%3F-instance_method" title="ZendeskAPI::Destroy#destroyed? (method)">#destroyed?</a></span></p>
154
382
 
155
383
 
384
+ <span class="summary_desc"><div class='inline'></div></span>
156
385
 
386
+ </li>
387
+
388
+
389
+ <li class="public ">
390
+ <span class="summary_signature">
391
+
392
+ <a href="#destroy%21-instance_method" title="#destroy! (instance method)">- (Boolean) <strong>destroy!</strong> </a>
393
+
394
+
395
+
396
+ </span>
157
397
 
398
+ <span class="note title not_defined_here">
399
+ included
400
+ from <span class='object_link'><a href="../Destroy.html#destroy%21-instance_method" title="ZendeskAPI::Destroy#destroy! (method)">Destroy</a></span>
401
+ </span>
158
402
 
159
403
 
160
404
 
@@ -162,31 +406,115 @@
162
406
 
163
407
 
164
408
 
409
+
410
+
411
+ <span class="summary_desc"><div class='inline'>
412
+ <p>If this resource hasn't already been deleted, then do so.</p>
413
+ </div></span>
414
+
415
+ </li>
416
+
417
+
418
+ <li class="public ">
419
+ <span class="summary_signature">
420
+
421
+ <a href="#destroyed%3F-instance_method" title="#destroyed? (instance method)">- (Boolean) <strong>destroyed?</strong> </a>
422
+
423
+
424
+
425
+ </span>
426
+
427
+ <span class="note title not_defined_here">
428
+ included
429
+ from <span class='object_link'><a href="../Destroy.html#destroyed%3F-instance_method" title="ZendeskAPI::Destroy#destroyed? (method)">Destroy</a></span>
430
+ </span>
431
+
432
+
433
+
165
434
 
166
435
 
167
436
 
168
437
 
169
- <h3 class="inherited">Methods included from <span class='object_link'><a href="../Save.html" title="ZendeskAPI::Save (module)">Save</a></span></h3>
170
- <p class="inherited"><span class='object_link'><a href="../Save.html#clear_associations-instance_method" title="ZendeskAPI::Save#clear_associations (method)">#clear_associations</a></span>, <span class='object_link'><a href="../Save.html#save-instance_method" title="ZendeskAPI::Save#save (method)">#save</a></span>, <span class='object_link'><a href="../Save.html#save%21-instance_method" title="ZendeskAPI::Save#save! (method)">#save!</a></span>, <span class='object_link'><a href="../Save.html#save_associations-instance_method" title="ZendeskAPI::Save#save_associations (method)">#save_associations</a></span></p>
171
438
 
172
439
 
440
+ <span class="summary_desc"><div class='inline'>
441
+ <p>Has this object been deleted?.</p>
442
+ </div></span>
443
+
444
+ </li>
445
+
446
+
447
+ <li class="public ">
448
+ <span class="summary_signature">
449
+
450
+ <a href="#save-instance_method" title="#save (instance method)">- (Object) <strong>save</strong>(options = {}) </a>
451
+
452
+
453
+
454
+ </span>
455
+
456
+ <span class="note title not_defined_here">
457
+ included
458
+ from <span class='object_link'><a href="../Save.html#save-instance_method" title="ZendeskAPI::Save#save (method)">Save</a></span>
459
+ </span>
460
+
173
461
 
174
462
 
175
463
 
176
464
 
177
465
 
178
466
 
467
+
468
+
469
+ <span class="summary_desc"><div class='inline'>
470
+ <p>Saves, returning false if it fails and attaching the errors.</p>
471
+ </div></span>
472
+
473
+ </li>
474
+
475
+
476
+ <li class="public ">
477
+ <span class="summary_signature">
478
+
479
+ <a href="#save%21-instance_method" title="#save! (instance method)">- (Boolean) <strong>save!</strong>(options = {}) </a>
480
+
481
+
482
+
483
+ </span>
484
+
485
+ <span class="note title not_defined_here">
486
+ included
487
+ from <span class='object_link'><a href="../Save.html#save%21-instance_method" title="ZendeskAPI::Save#save! (method)">Save</a></span>
488
+ </span>
489
+
490
+
179
491
 
180
492
 
181
493
 
182
494
 
183
495
 
496
+
184
497
 
498
+ <span class="summary_desc"><div class='inline'>
499
+ <p>If this resource hasn't been deleted, then create or save it.</p>
500
+ </div></span>
185
501
 
186
- <h3 class="inherited">Methods inherited from <span class='object_link'><a href="../TopicComment.html" title="ZendeskAPI::TopicComment (class)">ZendeskAPI::TopicComment</a></span></h3>
187
- <p class="inherited"><span class='object_link'><a href="../TopicComment.html#attachments-instance_method" title="ZendeskAPI::TopicComment#attachments (method)">#attachments</a></span>, <span class='object_link'><a href="../TopicComment.html#attachments%3D-instance_method" title="ZendeskAPI::TopicComment#attachments= (method)">#attachments=</a></span>, <span class='object_link'><a href="../TopicComment.html#topic-instance_method" title="ZendeskAPI::TopicComment#topic (method)">#topic</a></span>, <span class='object_link'><a href="../TopicComment.html#topic%3D-instance_method" title="ZendeskAPI::TopicComment#topic= (method)">#topic=</a></span>, <span class='object_link'><a href="../TopicComment.html#user-instance_method" title="ZendeskAPI::TopicComment#user (method)">#user</a></span>, <span class='object_link'><a href="../TopicComment.html#user%3D-instance_method" title="ZendeskAPI::TopicComment#user= (method)">#user=</a></span></p>
502
+ </li>
503
+
504
+
505
+ <li class="public ">
506
+ <span class="summary_signature">
507
+
508
+ <a href="#save_associations-instance_method" title="#save_associations (instance method)">- (Object) <strong>save_associations</strong> </a>
509
+
188
510
 
511
+
512
+ </span>
189
513
 
514
+ <span class="note title not_defined_here">
515
+ included
516
+ from <span class='object_link'><a href="../Save.html#save_associations-instance_method" title="ZendeskAPI::Save#save_associations (method)">Save</a></span>
517
+ </span>
190
518
 
191
519
 
192
520
 
@@ -194,10 +522,31 @@
194
522
 
195
523
 
196
524
 
197
- <h3 class="inherited">Methods inherited from <span class='object_link'><a href="../Data.html" title="ZendeskAPI::Data (class)">Data</a></span></h3>
198
- <p class="inherited"><span class='object_link'><a href="../Data.html#%2F-instance_method" title="ZendeskAPI::Data#/ (method)">#/</a></span>, <span class='object_link'><a href="../Data.html#%3D%3D-instance_method" title="ZendeskAPI::Data#== (method)">#==</a></span>, <span class='object_link'><a href="../Data.html#format-class_method" title="ZendeskAPI::Data.format (method)">format</a></span>, <span class='object_link'><a href="../Data.html#id-instance_method" title="ZendeskAPI::Data#id (method)">#id</a></span>, <span class='object_link'><a href="../Data.html#initialize-instance_method" title="ZendeskAPI::Data#initialize (method)">#initialize</a></span>, <span class='object_link'><a href="../Data.html#method_missing-instance_method" title="ZendeskAPI::Data#method_missing (method)">#method_missing</a></span>, <span class='object_link'><a href="../Data.html#new_record%3F-instance_method" title="ZendeskAPI::Data#new_record? (method)">#new_record?</a></span>, <span class='object_link'><a href="../Data.html#path-instance_method" title="ZendeskAPI::Data#path (method)">#path</a></span>, <span class='object_link'><a href="../Data.html#resource_name-class_method" title="ZendeskAPI::Data.resource_name (method)">resource_name</a></span>, <span class='object_link'><a href="../Data.html#singular_resource_name-class_method" title="ZendeskAPI::Data.singular_resource_name (method)">singular_resource_name</a></span>, <span class='object_link'><a href="../Data.html#subclasses-class_method" title="ZendeskAPI::Data.subclasses (method)">subclasses</a></span>, <span class='object_link'><a href="../Data.html#to_json-instance_method" title="ZendeskAPI::Data#to_json (method)">#to_json</a></span></p>
199
525
 
200
526
 
527
+ <span class="summary_desc"><div class='inline'>
528
+ <p>Saves associations Takes into account inlining, collections, and id setting
529
+ on the parent resource.</p>
530
+ </div></span>
531
+
532
+ </li>
533
+
534
+
535
+ </ul>
536
+
537
+
538
+
539
+
540
+
541
+
542
+
543
+
544
+
545
+
546
+
547
+
548
+
549
+
201
550
 
202
551
 
203
552
 
@@ -219,13 +568,554 @@
219
568
 
220
569
  </div>
221
570
 
571
+ <div id="instance_attr_details" class="attr_details">
572
+ <h2>Instance Attribute Details</h2>
573
+
574
+
575
+ <span id="association=-instance_method"></span>
576
+ <div class="method_details first">
577
+ <h3 class="signature first" id="association-instance_method">
578
+
579
+ - (<tt><span class='object_link'>ZendeskAPI::Association</span></tt>) <strong>association</strong>
580
+
581
+
582
+
583
+
584
+
585
+ <span class="not_defined_here">
586
+ Originally defined in class
587
+ <span class='object_link'><a href="../Data.html#association-instance_method" title="ZendeskAPI::Data#association (method)">Data</a></span>
588
+ </span>
589
+
590
+ </h3><div class="docstring">
591
+ <div class="discussion">
592
+
593
+ <p>The association</p>
594
+
595
+
596
+ </div>
597
+ </div>
598
+ <div class="tags">
599
+
600
+ <p class="tag_title">Returns:</p>
601
+ <ul class="return">
602
+
603
+ <li>
604
+
605
+
606
+ <span class='type'>(<tt><span class='object_link'>ZendeskAPI::Association</span></tt>)</span>
607
+
608
+
609
+
610
+ &mdash;
611
+ <div class='inline'>
612
+ <p>The association</p>
613
+ </div>
614
+
615
+ </li>
616
+
617
+ </ul>
618
+
619
+ </div>
620
+ </div>
621
+
622
+
623
+ <span id=""></span>
624
+ <div class="method_details ">
625
+ <h3 class="signature " id="attributes-instance_method">
626
+
627
+ - (<tt>Hash</tt>) <strong>attributes</strong> <span class="extras">(readonly)</span>
628
+
629
+
630
+
631
+ <span class="aliases">Also known as:
632
+ <span class="names"><span id='to_param-instance_method'>to_param</span></span>
633
+ </span>
634
+
635
+
636
+
637
+ <span class="not_defined_here">
638
+ Originally defined in class
639
+ <span class='object_link'><a href="../Data.html#attributes-instance_method" title="ZendeskAPI::Data#attributes (method)">Data</a></span>
640
+ </span>
641
+
642
+ </h3><div class="docstring">
643
+ <div class="discussion">
644
+
645
+ <p>The resource's attributes</p>
646
+
647
+
648
+ </div>
649
+ </div>
650
+ <div class="tags">
651
+
652
+ <p class="tag_title">Returns:</p>
653
+ <ul class="return">
654
+
655
+ <li>
656
+
657
+
658
+ <span class='type'>(<tt>Hash</tt>)</span>
659
+
660
+
661
+
662
+ &mdash;
663
+ <div class='inline'>
664
+ <p>The resource's attributes</p>
665
+ </div>
666
+
667
+ </li>
668
+
669
+ </ul>
670
+
671
+ </div>
672
+ </div>
673
+
674
+
675
+ <span id="errors=-instance_method"></span>
676
+ <div class="method_details ">
677
+ <h3 class="signature " id="errors-instance_method">
678
+
679
+ - (<tt>Array</tt>) <strong>errors</strong>
680
+
681
+
682
+
683
+
684
+
685
+ <span class="not_defined_here">
686
+ Originally defined in class
687
+ <span class='object_link'><a href="../Data.html#errors-instance_method" title="ZendeskAPI::Data#errors (method)">Data</a></span>
688
+ </span>
689
+
690
+ </h3><div class="docstring">
691
+ <div class="discussion">
692
+
693
+ <p>The last received errors</p>
694
+
695
+
696
+ </div>
697
+ </div>
698
+ <div class="tags">
699
+
700
+ <p class="tag_title">Returns:</p>
701
+ <ul class="return">
702
+
703
+ <li>
704
+
705
+
706
+ <span class='type'>(<tt>Array</tt>)</span>
707
+
708
+
709
+
710
+ &mdash;
711
+ <div class='inline'>
712
+ <p>The last received errors</p>
713
+ </div>
714
+
715
+ </li>
716
+
717
+ </ul>
718
+
719
+ </div>
720
+ </div>
721
+
722
+
723
+ <span id="response=-instance_method"></span>
724
+ <div class="method_details ">
725
+ <h3 class="signature " id="response-instance_method">
726
+
727
+ - (<tt>Object</tt>) <strong>response</strong>
728
+
729
+
730
+
731
+
732
+
733
+ <span class="not_defined_here">
734
+ Originally defined in class
735
+ <span class='object_link'><a href="../Data.html#response-instance_method" title="ZendeskAPI::Data#response (method)">Data</a></span>
736
+ </span>
737
+
738
+ </h3><div class="docstring">
739
+ <div class="discussion">
740
+
741
+ <p>Place to dump the last response</p>
742
+
743
+
744
+ </div>
745
+ </div>
746
+ <div class="tags">
747
+
748
+
749
+ </div>
750
+ </div>
751
+
752
+ </div>
753
+
754
+
755
+ <div id="class_method_details" class="method_details_list">
756
+ <h2>Class Method Details</h2>
757
+
758
+
759
+ <div class="method_details first">
760
+ <h3 class="signature first" id="find-class_method">
761
+
762
+ + (<tt>Object</tt>) <strong>find</strong>(client, options = {})
763
+
764
+
765
+
766
+
767
+
768
+ <span class="not_defined_here">
769
+ Originally defined in module
770
+ <span class='object_link'><a href="../Read.html#find-class_method" title="ZendeskAPI::Read#find (method)">Read</a></span>
771
+ </span>
772
+
773
+ </h3><div class="docstring">
774
+ <div class="discussion">
775
+
776
+ <p>Finds, returning nil if it fails</p>
777
+
778
+
779
+ </div>
780
+ </div>
781
+ <div class="tags">
782
+
783
+
784
+ </div>
785
+ </div>
786
+
787
+ <div class="method_details ">
788
+ <h3 class="signature " id="find!-class_method">
789
+
790
+ + (<tt>Object</tt>) <strong>find!</strong>(client, options = {})
791
+
792
+
793
+
794
+
795
+
796
+ <span class="not_defined_here">
797
+ Originally defined in module
798
+ <span class='object_link'><a href="../Read.html#find%21-class_method" title="ZendeskAPI::Read#find! (method)">Read</a></span>
799
+ </span>
800
+
801
+ </h3><div class="docstring">
802
+ <div class="discussion">
803
+
804
+ <p>Finds a resource by an id and any options passed in. A custom path to
805
+ search at can be passed into opts. It defaults to the <span class='object_link'><a href="../Data.html#resource_name-class_method" title="ZendeskAPI::Data.resource_name (method)">Data.resource_name</a></span>
806
+ of the class.</p>
807
+
808
+
809
+ </div>
810
+ </div>
811
+ <div class="tags">
812
+ <p class="tag_title">Parameters:</p>
813
+ <ul class="param">
814
+
815
+ <li>
816
+
817
+ <span class='name'>client</span>
818
+
819
+
820
+ <span class='type'>(<tt><span class='object_link'><a href="../Client.html" title="ZendeskAPI::Client (class)">Client</a></span></tt>)</span>
821
+
822
+
823
+
824
+ &mdash;
825
+ <div class='inline'>
826
+ <p>The <span class='object_link'><a href="../Client.html" title="ZendeskAPI::Client (class)">Client</a></span> object to be used</p>
827
+ </div>
828
+
829
+ </li>
830
+
831
+ <li>
832
+
833
+ <span class='name'>options</span>
834
+
835
+
836
+ <span class='type'>(<tt>Hash</tt>)</span>
837
+
838
+
839
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
840
+
841
+
842
+ &mdash;
843
+ <div class='inline'>
844
+ <p>Any additional GET parameters to be added</p>
845
+ </div>
846
+
847
+ </li>
848
+
849
+ </ul>
850
+
851
+ <p class="tag_title">Raises:</p>
852
+ <ul class="raise">
853
+
854
+ <li>
855
+
856
+
857
+ <span class='type'>(<tt>ArgumentError</tt>)</span>
858
+
859
+
860
+
861
+ </li>
862
+
863
+ </ul>
864
+
865
+ </div>
866
+ </div>
867
+
868
+ </div>
869
+
870
+ <div id="instance_method_details" class="method_details_list">
871
+ <h2>Instance Method Details</h2>
872
+
873
+
874
+ <div class="method_details first">
875
+ <h3 class="signature first" id="clear_associations-instance_method">
876
+
877
+ - (<tt>Object</tt>) <strong>clear_associations</strong>
878
+
879
+
880
+
881
+
882
+
883
+ <span class="not_defined_here">
884
+ Originally defined in module
885
+ <span class='object_link'><a href="../Save.html#clear_associations-instance_method" title="ZendeskAPI::Save#clear_associations (method)">Save</a></span>
886
+ </span>
887
+
888
+ </h3><div class="docstring">
889
+ <div class="discussion">
890
+
891
+ <p>Removes all cached associations</p>
892
+
893
+
894
+ </div>
895
+ </div>
896
+ <div class="tags">
897
+
898
+
899
+ </div>
900
+ </div>
901
+
902
+ <div class="method_details ">
903
+ <h3 class="signature " id="destroy-instance_method">
904
+
905
+ - (<tt>Object</tt>) <strong>destroy</strong>
906
+
907
+
908
+
909
+
910
+
911
+ <span class="not_defined_here">
912
+ Originally defined in module
913
+ <span class='object_link'><a href="../Destroy.html#destroy-instance_method" title="ZendeskAPI::Destroy#destroy (method)">Destroy</a></span>
914
+ </span>
915
+
916
+ </h3>
917
+ </div>
918
+
919
+ <div class="method_details ">
920
+ <h3 class="signature " id="destroy!-instance_method">
921
+
922
+ - (<tt>Boolean</tt>) <strong>destroy!</strong>
923
+
924
+
925
+
926
+
927
+
928
+ <span class="not_defined_here">
929
+ Originally defined in module
930
+ <span class='object_link'><a href="../Destroy.html#destroy%21-instance_method" title="ZendeskAPI::Destroy#destroy! (method)">Destroy</a></span>
931
+ </span>
932
+
933
+ </h3><div class="docstring">
934
+ <div class="discussion">
935
+
936
+ <p>If this resource hasn't already been deleted, then do so.</p>
937
+
938
+
939
+ </div>
940
+ </div>
941
+ <div class="tags">
942
+
943
+ <p class="tag_title">Returns:</p>
944
+ <ul class="return">
945
+
946
+ <li>
947
+
948
+
949
+ <span class='type'>(<tt>Boolean</tt>)</span>
950
+
951
+
952
+
953
+ &mdash;
954
+ <div class='inline'>
955
+ <p>Successful?</p>
956
+ </div>
957
+
958
+ </li>
959
+
960
+ </ul>
961
+
962
+ </div>
963
+ </div>
964
+
965
+ <div class="method_details ">
966
+ <h3 class="signature " id="destroyed?-instance_method">
967
+
968
+ - (<tt>Boolean</tt>) <strong>destroyed?</strong>
969
+
970
+
971
+
972
+
973
+
974
+ <span class="not_defined_here">
975
+ Originally defined in module
976
+ <span class='object_link'><a href="../Destroy.html#destroyed%3F-instance_method" title="ZendeskAPI::Destroy#destroyed? (method)">Destroy</a></span>
977
+ </span>
978
+
979
+ </h3><div class="docstring">
980
+ <div class="discussion">
981
+
982
+ <p>Has this object been deleted?</p>
983
+
984
+
985
+ </div>
986
+ </div>
987
+ <div class="tags">
988
+
989
+ <p class="tag_title">Returns:</p>
990
+ <ul class="return">
991
+
992
+ <li>
993
+
994
+
995
+ <span class='type'>(<tt>Boolean</tt>)</span>
996
+
997
+
998
+
999
+ </li>
1000
+
1001
+ </ul>
1002
+
1003
+ </div>
1004
+ </div>
1005
+
1006
+ <div class="method_details ">
1007
+ <h3 class="signature " id="save-instance_method">
1008
+
1009
+ - (<tt>Object</tt>) <strong>save</strong>(options = {})
1010
+
1011
+
1012
+
1013
+
1014
+
1015
+ <span class="not_defined_here">
1016
+ Originally defined in module
1017
+ <span class='object_link'><a href="../Save.html#save-instance_method" title="ZendeskAPI::Save#save (method)">Save</a></span>
1018
+ </span>
1019
+
1020
+ </h3><div class="docstring">
1021
+ <div class="discussion">
1022
+
1023
+ <p>Saves, returning false if it fails and attaching the errors</p>
1024
+
1025
+
1026
+ </div>
1027
+ </div>
1028
+ <div class="tags">
1029
+
1030
+
1031
+ </div>
1032
+ </div>
1033
+
1034
+ <div class="method_details ">
1035
+ <h3 class="signature " id="save!-instance_method">
1036
+
1037
+ - (<tt>Boolean</tt>) <strong>save!</strong>(options = {})
1038
+
1039
+
1040
+
1041
+
1042
+
1043
+ <span class="not_defined_here">
1044
+ Originally defined in module
1045
+ <span class='object_link'><a href="../Save.html#save%21-instance_method" title="ZendeskAPI::Save#save! (method)">Save</a></span>
1046
+ </span>
1047
+
1048
+ </h3><div class="docstring">
1049
+ <div class="discussion">
1050
+
1051
+ <p>If this resource hasn't been deleted, then create or save it. Executes a
1052
+ POST if it is a <span class='object_link'><a href="../Data.html#new_record%3F-instance_method" title="ZendeskAPI::Data#new_record? (method)">Data#new_record?</a></span>, otherwise a PUT. Merges returned
1053
+ attributes on success.</p>
1054
+
1055
+
1056
+ </div>
1057
+ </div>
1058
+ <div class="tags">
1059
+
1060
+ <p class="tag_title">Returns:</p>
1061
+ <ul class="return">
1062
+
1063
+ <li>
1064
+
1065
+
1066
+ <span class='type'>(<tt>Boolean</tt>)</span>
1067
+
1068
+
1069
+
1070
+ &mdash;
1071
+ <div class='inline'>
1072
+ <p>Success?</p>
1073
+ </div>
1074
+
1075
+ </li>
1076
+
1077
+ </ul>
1078
+
1079
+ </div>
1080
+ </div>
1081
+
1082
+ <div class="method_details ">
1083
+ <h3 class="signature " id="save_associations-instance_method">
1084
+
1085
+ - (<tt>Object</tt>) <strong>save_associations</strong>
1086
+
1087
+
1088
+
1089
+
1090
+
1091
+ <span class="not_defined_here">
1092
+ Originally defined in module
1093
+ <span class='object_link'><a href="../Save.html#save_associations-instance_method" title="ZendeskAPI::Save#save_associations (method)">Save</a></span>
1094
+ </span>
1095
+
1096
+ </h3><div class="docstring">
1097
+ <div class="discussion">
1098
+
1099
+ <p>Saves associations Takes into account inlining, collections, and id setting
1100
+ on the parent resource.</p>
1101
+
1102
+
1103
+ </div>
1104
+ </div>
1105
+ <div class="tags">
1106
+
1107
+
1108
+ </div>
1109
+ </div>
1110
+
1111
+ </div>
222
1112
 
223
1113
  </div>
224
1114
 
225
1115
  <div id="footer">
226
- Generated on Mon Feb 11 17:45:39 2013 by
1116
+ Generated on Wed May 15 18:59:32 2013 by
227
1117
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
228
- 0.8.4.1 (ruby-1.9.3).
1118
+ 0.8.5.2 (ruby-1.9.3).
229
1119
  </div>
230
1120
 
231
1121
  </body>