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
  Module: ZendeskAPI::Save
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
 
@@ -130,7 +130,7 @@
130
130
  <li class="public ">
131
131
  <span class="summary_signature">
132
132
 
133
- <a href="#save-instance_method" title="#save (instance method)">- (Boolean) <strong>save</strong>(options = {}) </a>
133
+ <a href="#save-instance_method" title="#save (instance method)">- (Object) <strong>save</strong>(options = {}) </a>
134
134
 
135
135
 
136
136
 
@@ -145,7 +145,7 @@
145
145
 
146
146
 
147
147
  <span class="summary_desc"><div class='inline'>
148
- <p>If this resource hasn't been deleted, then create or save it.</p>
148
+ <p>Saves, returning false if it fails and attaching the errors.</p>
149
149
  </div></span>
150
150
 
151
151
  </li>
@@ -154,7 +154,7 @@
154
154
  <li class="public ">
155
155
  <span class="summary_signature">
156
156
 
157
- <a href="#save%21-instance_method" title="#save! (instance method)">- (Object) <strong>save!</strong>(options = {}) </a>
157
+ <a href="#save%21-instance_method" title="#save! (instance method)">- (Boolean) <strong>save!</strong>(options = {}) </a>
158
158
 
159
159
 
160
160
 
@@ -169,7 +169,7 @@
169
169
 
170
170
 
171
171
  <span class="summary_desc"><div class='inline'>
172
- <p>Saves, raising an Argument error if it fails.</p>
172
+ <p>If this resource hasn't been deleted, then create or save it.</p>
173
173
  </div></span>
174
174
 
175
175
  </li>
@@ -259,7 +259,58 @@ on the parent resource.</p>
259
259
  <div class="method_details ">
260
260
  <h3 class="signature " id="save-instance_method">
261
261
 
262
- - (<tt>Boolean</tt>) <strong>save</strong>(options = {})
262
+ - (<tt>Object</tt>) <strong>save</strong>(options = {})
263
+
264
+
265
+
266
+
267
+
268
+ </h3><div class="docstring">
269
+ <div class="discussion">
270
+
271
+ <p>Saves, returning false if it fails and attaching the errors</p>
272
+
273
+
274
+ </div>
275
+ </div>
276
+ <div class="tags">
277
+
278
+
279
+ </div><table class="source_code">
280
+ <tr>
281
+ <td>
282
+ <pre class="lines">
283
+
284
+
285
+ 33
286
+ 34
287
+ 35
288
+ 36
289
+ 37
290
+ 38
291
+ 39
292
+ 40</pre>
293
+ </td>
294
+ <td>
295
+ <pre class="code"><span class="info file"># File 'lib/zendesk_api/actions.rb', line 33</span>
296
+
297
+ <span class='kw'>def</span> <span class='id identifier rubyid_save'>save</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
298
+ <span class='id identifier rubyid_save!'>save!</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
299
+ <span class='kw'>rescue</span> <span class='const'>ZendeskAPI</span><span class='op'>::</span><span class='const'>Error</span><span class='op'>::</span><span class='const'>RecordInvalid</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_e'>e</span>
300
+ <span class='ivar'>@errors</span> <span class='op'>=</span> <span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_errors'>errors</span>
301
+ <span class='kw'>false</span>
302
+ <span class='kw'>rescue</span> <span class='const'>ZendeskAPI</span><span class='op'>::</span><span class='const'>Error</span><span class='op'>::</span><span class='const'>ClientError</span>
303
+ <span class='kw'>false</span>
304
+ <span class='kw'>end</span></pre>
305
+ </td>
306
+ </tr>
307
+ </table>
308
+ </div>
309
+
310
+ <div class="method_details ">
311
+ <h3 class="signature " id="save!-instance_method">
312
+
313
+ - (<tt>Boolean</tt>) <strong>save!</strong>(options = {})
263
314
 
264
315
 
265
316
 
@@ -325,16 +376,12 @@ attributes on success.</p>
325
376
  27
326
377
  28
327
378
  29
328
- 30
329
- 31
330
- 32
331
- 33
332
- 34</pre>
379
+ 30</pre>
333
380
  </td>
334
381
  <td>
335
382
  <pre class="code"><span class="info file"># File 'lib/zendesk_api/actions.rb', line 7</span>
336
383
 
337
- <span class='kw'>def</span> <span class='id identifier rubyid_save'>save</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
384
+ <span class='kw'>def</span> <span class='id identifier rubyid_save!'>save!</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
338
385
  <span class='kw'>return</span> <span class='kw'>false</span> <span class='kw'>if</span> <span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:destroyed?</span><span class='rparen'>)</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_destroyed?'>destroyed?</span>
339
386
 
340
387
  <span class='kw'>if</span> <span class='id identifier rubyid_new_record?'>new_record?</span>
@@ -350,11 +397,7 @@ attributes on success.</p>
350
397
  <span class='id identifier rubyid_save_associations'>save_associations</span>
351
398
 
352
399
  <span class='ivar'>@response</span> <span class='op'>=</span> <span class='ivar'>@client</span><span class='period'>.</span><span class='id identifier rubyid_connection'>connection</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='comma'>,</span> <span class='id identifier rubyid_req_path'>req_path</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_req'>req</span><span class='op'>|</span>
353
- <span class='id identifier rubyid_req'>req</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span> <span class='op'>=</span> <span class='kw'>if</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_unnested_params'>unnested_params</span>
354
- <span class='id identifier rubyid_attributes'>attributes</span><span class='period'>.</span><span class='id identifier rubyid_changes'>changes</span>
355
- <span class='kw'>else</span>
356
- <span class='lbrace'>{</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_singular_resource_name'>singular_resource_name</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_attributes'>attributes</span><span class='period'>.</span><span class='id identifier rubyid_changes'>changes</span><span class='rbrace'>}</span>
357
- <span class='kw'>end</span>
400
+ <span class='id identifier rubyid_req'>req</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span> <span class='op'>=</span> <span class='id identifier rubyid_attributes_for_save'>attributes_for_save</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='ivar'>@global_params</span><span class='rparen'>)</span>
358
401
  <span class='kw'>end</span>
359
402
 
360
403
  <span class='ivar'>@attributes</span><span class='period'>.</span><span class='id identifier rubyid_replace'>replace</span> <span class='ivar'>@attributes</span><span class='period'>.</span><span class='id identifier rubyid_deep_merge'>deep_merge</span><span class='lparen'>(</span><span class='ivar'>@response</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span><span class='lbracket'>[</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_singular_resource_name'>singular_resource_name</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
@@ -365,65 +408,6 @@ attributes on success.</p>
365
408
  </td>
366
409
  </tr>
367
410
  </table>
368
- </div>
369
-
370
- <div class="method_details ">
371
- <h3 class="signature " id="save!-instance_method">
372
-
373
- - (<tt>Object</tt>) <strong>save!</strong>(options = {})
374
-
375
-
376
-
377
-
378
-
379
- </h3><div class="docstring">
380
- <div class="discussion">
381
-
382
- <p>Saves, raising an Argument error if it fails</p>
383
-
384
-
385
- </div>
386
- </div>
387
- <div class="tags">
388
-
389
- <p class="tag_title">Raises:</p>
390
- <ul class="raise">
391
-
392
- <li>
393
-
394
-
395
- <span class='type'>(<tt>ArgumentError</tt>)</span>
396
-
397
-
398
-
399
- &mdash;
400
- <div class='inline'>
401
- <p>if saving failed</p>
402
- </div>
403
-
404
- </li>
405
-
406
- </ul>
407
-
408
- </div><table class="source_code">
409
- <tr>
410
- <td>
411
- <pre class="lines">
412
-
413
-
414
- 38
415
- 39
416
- 40</pre>
417
- </td>
418
- <td>
419
- <pre class="code"><span class="info file"># File 'lib/zendesk_api/actions.rb', line 38</span>
420
-
421
- <span class='kw'>def</span> <span class='id identifier rubyid_save!'>save!</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
422
- <span class='id identifier rubyid_save'>save</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='id identifier rubyid_raise'>raise</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Save failed</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
423
- <span class='kw'>end</span></pre>
424
- </td>
425
- </tr>
426
- </table>
427
411
  </div>
428
412
 
429
413
  <div class="method_details ">
@@ -486,7 +470,7 @@ on the parent resource.</p>
486
470
  <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_association_name'>association_name</span><span class='rbrace'>}</span><span class='tstring_content'>=</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_association'>association</span><span class='rparen'>)</span> <span class='comment'># set id/ids columns
487
471
  </span> <span class='kw'>end</span>
488
472
 
489
- <span class='kw'>if</span> <span class='id identifier rubyid_association_data'>association_data</span><span class='lbracket'>[</span><span class='symbol'>:inline</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='kw'>true</span> <span class='op'>||</span> <span class='id identifier rubyid_inline_creation'>inline_creation</span>
473
+ <span class='kw'>if</span> <span class='lparen'>(</span><span class='id identifier rubyid_association_data'>association_data</span><span class='lbracket'>[</span><span class='symbol'>:inline</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='kw'>true</span> <span class='op'>||</span> <span class='id identifier rubyid_inline_creation'>inline_creation</span><span class='rparen'>)</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_association'>association</span><span class='period'>.</span><span class='id identifier rubyid_changed?'>changed?</span>
490
474
  <span class='id identifier rubyid_attributes'>attributes</span><span class='lbracket'>[</span><span class='id identifier rubyid_association_name'>association_name</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='id identifier rubyid_association'>association</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Collection</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_association'>association</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='symbol'>:to_param</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='id identifier rubyid_association'>association</span><span class='period'>.</span><span class='id identifier rubyid_to_param'>to_param</span><span class='rparen'>)</span>
491
475
  <span class='kw'>end</span>
492
476
  <span class='kw'>end</span>
@@ -501,9 +485,9 @@ on the parent resource.</p>
501
485
  </div>
502
486
 
503
487
  <div id="footer">
504
- Generated on Mon Feb 11 17:45:36 2013 by
488
+ Generated on Wed May 15 18:59:28 2013 by
505
489
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
506
- 0.8.4.1 (ruby-1.9.3).
490
+ 0.8.5.2 (ruby-1.9.3).
507
491
  </div>
508
492
 
509
493
  </body>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: ZendeskAPI::Search
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
 
@@ -164,7 +164,8 @@
164
164
 
165
165
 
166
166
  <span class="summary_desc"><div class='inline'>
167
- <p>Creates the correct resource class from the result_type passed in.</p>
167
+ <p>Quack like a Resource Creates the correct resource class from the
168
+ result_type passed in.</p>
168
169
  </div></span>
169
170
 
170
171
  </li>
@@ -177,6 +178,8 @@
177
178
 
178
179
 
179
180
 
181
+ (also: resource_path)
182
+
180
183
  </span>
181
184
 
182
185
 
@@ -240,14 +243,14 @@
240
243
  <pre class="lines">
241
244
 
242
245
 
243
- 178
244
- 179
245
- 180</pre>
246
+ 185
247
+ 186
248
+ 187</pre>
246
249
  </td>
247
250
  <td>
248
- <pre class="code"><span class="info file"># File 'lib/zendesk_api/resources.rb', line 178</span>
251
+ <pre class="code"><span class="info file"># File 'lib/zendesk_api/resources.rb', line 185</span>
249
252
 
250
- <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_model_key'>model_key</span>
253
+ <span class='kw'>def</span> <span class='id identifier rubyid_model_key'>model_key</span>
251
254
  <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>results</span><span class='tstring_end'>&quot;</span></span>
252
255
  <span class='kw'>end</span></pre>
253
256
  </td>
@@ -267,7 +270,8 @@
267
270
  </h3><div class="docstring">
268
271
  <div class="discussion">
269
272
 
270
- <p>Creates the correct resource class from the result_type passed in</p>
273
+ <p>Quack like a Resource Creates the correct resource class from the
274
+ result_type passed in</p>
271
275
 
272
276
 
273
277
  </div>
@@ -281,19 +285,19 @@
281
285
  <pre class="lines">
282
286
 
283
287
 
284
- 163
285
- 164
286
- 165
287
- 166
288
288
  167
289
289
  168
290
290
  169
291
291
  170
292
292
  171
293
- 172</pre>
293
+ 172
294
+ 173
295
+ 174
296
+ 175
297
+ 176</pre>
294
298
  </td>
295
299
  <td>
296
- <pre class="code"><span class="info file"># File 'lib/zendesk_api/resources.rb', line 163</span>
300
+ <pre class="code"><span class="info file"># File 'lib/zendesk_api/resources.rb', line 167</span>
297
301
 
298
302
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_client'>client</span><span class='comma'>,</span> <span class='id identifier rubyid_attributes'>attributes</span><span class='rparen'>)</span>
299
303
  <span class='id identifier rubyid_result_type'>result_type</span> <span class='op'>=</span> <span class='id identifier rubyid_attributes'>attributes</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>result_type</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span>
@@ -317,6 +321,10 @@
317
321
 
318
322
 
319
323
 
324
+ <span class="aliases">Also known as:
325
+ <span class="names"><span id='resource_path-class_method'>resource_path</span></span>
326
+ </span>
327
+
320
328
 
321
329
 
322
330
  </h3><table class="source_code">
@@ -325,14 +333,14 @@
325
333
  <pre class="lines">
326
334
 
327
335
 
328
- 174
329
- 175
330
- 176</pre>
336
+ 179
337
+ 180
338
+ 181</pre>
331
339
  </td>
332
340
  <td>
333
- <pre class="code"><span class="info file"># File 'lib/zendesk_api/resources.rb', line 174</span>
341
+ <pre class="code"><span class="info file"># File 'lib/zendesk_api/resources.rb', line 179</span>
334
342
 
335
- <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_resource_name'>resource_name</span>
343
+ <span class='kw'>def</span> <span class='id identifier rubyid_resource_name'>resource_name</span>
336
344
  <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>search</span><span class='tstring_end'>&quot;</span></span>
337
345
  <span class='kw'>end</span></pre>
338
346
  </td>
@@ -366,16 +374,16 @@
366
374
  <pre class="lines">
367
375
 
368
376
 
369
- 154
370
- 155
371
- 156
372
377
  157
373
378
  158
374
379
  159
375
- 160</pre>
380
+ 160
381
+ 161
382
+ 162
383
+ 163</pre>
376
384
  </td>
377
385
  <td>
378
- <pre class="code"><span class="info file"># File 'lib/zendesk_api/resources.rb', line 154</span>
386
+ <pre class="code"><span class="info file"># File 'lib/zendesk_api/resources.rb', line 157</span>
379
387
 
380
388
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_search'>search</span><span class='lparen'>(</span><span class='id identifier rubyid_client'>client</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
381
389
  <span class='kw'>unless</span> <span class='lparen'>(</span><span class='qwords_beg'>%w{</span><span class='tstring_content'>query</span><span class='words_sep'> </span><span class='tstring_content'>external_id</span><span class='words_sep'>}</span> <span class='op'>&amp;</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_keys'>keys</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='symbol'>:to_s</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_any?'>any?</span>
@@ -394,9 +402,9 @@
394
402
  </div>
395
403
 
396
404
  <div id="footer">
397
- Generated on Mon Feb 11 17:45:39 2013 by
405
+ Generated on Wed May 15 18:59:33 2013 by
398
406
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
399
- 0.8.4.1 (ruby-1.9.3).
407
+ 0.8.5.2 (ruby-1.9.3).
400
408
  </div>
401
409
 
402
410
  </body>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: ZendeskAPI::Search::Result
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
 
@@ -105,36 +105,149 @@
105
105
 
106
106
 
107
107
 
108
+ <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
109
+ <ul class="summary">
110
+
111
+ <li class="public ">
112
+ <span class="summary_signature">
113
+
114
+ <a href="#association-instance_method" title="#association (instance method)">- (ZendeskAPI::Association) <strong>association</strong> </a>
115
+
108
116
 
117
+
118
+ </span>
119
+
120
+ <span class="note title not_defined_here">
121
+ inherited
122
+ from <span class='object_link'><a href="../Data.html#association-instance_method" title="ZendeskAPI::Data#association (method)">Data</a></span>
123
+ </span>
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+
109
134
 
110
- <h2>Instance Attribute Summary</h2>
111
135
 
112
- <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="../Data.html" title="ZendeskAPI::Data (class)">Data</a></span></h3>
113
- <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>
136
+ <span class="summary_desc"><div class='inline'>
137
+ <p>The association.</p>
138
+ </div></span>
139
+
140
+ </li>
114
141
 
142
+
143
+ <li class="public ">
144
+ <span class="summary_signature">
145
+
146
+ <a href="#attributes-instance_method" title="#attributes (instance method)">- (Hash) <strong>attributes</strong> </a>
147
+
115
148
 
149
+
150
+ (also: #to_param)
151
+
152
+ </span>
153
+
154
+ <span class="note title not_defined_here">
155
+ inherited
156
+ from <span class='object_link'><a href="../Data.html#attributes-instance_method" title="ZendeskAPI::Data#attributes (method)">Data</a></span>
157
+ </span>
158
+
159
+
160
+
161
+
162
+ <span class="note title readonly">readonly</span>
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+
172
+ <span class="summary_desc"><div class='inline'>
173
+ <p>The resource's attributes.</p>
174
+ </div></span>
175
+
176
+ </li>
116
177
 
178
+
179
+ <li class="public ">
180
+ <span class="summary_signature">
181
+
182
+ <a href="#errors-instance_method" title="#errors (instance method)">- (Array) <strong>errors</strong> </a>
183
+
184
+
185
+
186
+ </span>
117
187
 
188
+ <span class="note title not_defined_here">
189
+ inherited
190
+ from <span class='object_link'><a href="../Data.html#errors-instance_method" title="ZendeskAPI::Data#errors (method)">Data</a></span>
191
+ </span>
118
192
 
119
193
 
120
194
 
195
+
196
+
197
+
198
+
121
199
 
122
200
 
123
- <h2>Method Summary</h2>
124
201
 
125
- <h3 class="inherited">Methods inherited from <span class='object_link'><a href="../Data.html" title="ZendeskAPI::Data (class)">Data</a></span></h3>
126
- <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>
127
202
 
128
203
 
204
+ <span class="summary_desc"><div class='inline'>
205
+ <p>The last received errors.</p>
206
+ </div></span>
129
207
 
208
+ </li>
209
+
210
+
211
+ <li class="public ">
212
+ <span class="summary_signature">
213
+
214
+ <a href="#response-instance_method" title="#response (instance method)">- (Object) <strong>response</strong> </a>
215
+
216
+
217
+
218
+ </span>
130
219
 
220
+ <span class="note title not_defined_here">
221
+ inherited
222
+ from <span class='object_link'><a href="../Data.html#response-instance_method" title="ZendeskAPI::Data#response (method)">Data</a></span>
223
+ </span>
131
224
 
132
225
 
133
226
 
227
+
228
+
229
+
134
230
 
135
231
 
136
232
 
137
233
 
234
+
235
+
236
+ <span class="summary_desc"><div class='inline'>
237
+ <p>Place to dump the last response.</p>
238
+ </div></span>
239
+
240
+ </li>
241
+
242
+
243
+ </ul>
244
+
245
+
246
+
247
+
248
+
249
+
250
+
138
251
 
139
252
  <div id="constructor_details" class="method_details_list">
140
253
  <h2>Constructor Details</h2>
@@ -153,13 +266,196 @@
153
266
 
154
267
  </div>
155
268
 
269
+ <div id="instance_attr_details" class="attr_details">
270
+ <h2>Instance Attribute Details</h2>
271
+
272
+
273
+ <span id="association=-instance_method"></span>
274
+ <div class="method_details first">
275
+ <h3 class="signature first" id="association-instance_method">
276
+
277
+ - (<tt><span class='object_link'>ZendeskAPI::Association</span></tt>) <strong>association</strong>
278
+
279
+
280
+
281
+
282
+
283
+ <span class="not_defined_here">
284
+ Originally defined in class
285
+ <span class='object_link'><a href="../Data.html#association-instance_method" title="ZendeskAPI::Data#association (method)">Data</a></span>
286
+ </span>
287
+
288
+ </h3><div class="docstring">
289
+ <div class="discussion">
290
+
291
+ <p>The association</p>
292
+
293
+
294
+ </div>
295
+ </div>
296
+ <div class="tags">
297
+
298
+ <p class="tag_title">Returns:</p>
299
+ <ul class="return">
300
+
301
+ <li>
302
+
303
+
304
+ <span class='type'>(<tt><span class='object_link'>ZendeskAPI::Association</span></tt>)</span>
305
+
306
+
307
+
308
+ &mdash;
309
+ <div class='inline'>
310
+ <p>The association</p>
311
+ </div>
312
+
313
+ </li>
314
+
315
+ </ul>
316
+
317
+ </div>
318
+ </div>
319
+
320
+
321
+ <span id=""></span>
322
+ <div class="method_details ">
323
+ <h3 class="signature " id="attributes-instance_method">
324
+
325
+ - (<tt>Hash</tt>) <strong>attributes</strong> <span class="extras">(readonly)</span>
326
+
327
+
328
+
329
+ <span class="aliases">Also known as:
330
+ <span class="names"><span id='to_param-instance_method'>to_param</span></span>
331
+ </span>
332
+
333
+
334
+
335
+ <span class="not_defined_here">
336
+ Originally defined in class
337
+ <span class='object_link'><a href="../Data.html#attributes-instance_method" title="ZendeskAPI::Data#attributes (method)">Data</a></span>
338
+ </span>
339
+
340
+ </h3><div class="docstring">
341
+ <div class="discussion">
342
+
343
+ <p>The resource's attributes</p>
344
+
345
+
346
+ </div>
347
+ </div>
348
+ <div class="tags">
349
+
350
+ <p class="tag_title">Returns:</p>
351
+ <ul class="return">
352
+
353
+ <li>
354
+
355
+
356
+ <span class='type'>(<tt>Hash</tt>)</span>
357
+
358
+
359
+
360
+ &mdash;
361
+ <div class='inline'>
362
+ <p>The resource's attributes</p>
363
+ </div>
364
+
365
+ </li>
366
+
367
+ </ul>
368
+
369
+ </div>
370
+ </div>
371
+
372
+
373
+ <span id="errors=-instance_method"></span>
374
+ <div class="method_details ">
375
+ <h3 class="signature " id="errors-instance_method">
376
+
377
+ - (<tt>Array</tt>) <strong>errors</strong>
378
+
379
+
380
+
381
+
382
+
383
+ <span class="not_defined_here">
384
+ Originally defined in class
385
+ <span class='object_link'><a href="../Data.html#errors-instance_method" title="ZendeskAPI::Data#errors (method)">Data</a></span>
386
+ </span>
387
+
388
+ </h3><div class="docstring">
389
+ <div class="discussion">
390
+
391
+ <p>The last received errors</p>
392
+
393
+
394
+ </div>
395
+ </div>
396
+ <div class="tags">
397
+
398
+ <p class="tag_title">Returns:</p>
399
+ <ul class="return">
400
+
401
+ <li>
402
+
403
+
404
+ <span class='type'>(<tt>Array</tt>)</span>
405
+
406
+
407
+
408
+ &mdash;
409
+ <div class='inline'>
410
+ <p>The last received errors</p>
411
+ </div>
412
+
413
+ </li>
414
+
415
+ </ul>
416
+
417
+ </div>
418
+ </div>
419
+
420
+
421
+ <span id="response=-instance_method"></span>
422
+ <div class="method_details ">
423
+ <h3 class="signature " id="response-instance_method">
424
+
425
+ - (<tt>Object</tt>) <strong>response</strong>
426
+
427
+
428
+
429
+
430
+
431
+ <span class="not_defined_here">
432
+ Originally defined in class
433
+ <span class='object_link'><a href="../Data.html#response-instance_method" title="ZendeskAPI::Data#response (method)">Data</a></span>
434
+ </span>
435
+
436
+ </h3><div class="docstring">
437
+ <div class="discussion">
438
+
439
+ <p>Place to dump the last response</p>
440
+
441
+
442
+ </div>
443
+ </div>
444
+ <div class="tags">
445
+
446
+
447
+ </div>
448
+ </div>
449
+
450
+ </div>
451
+
156
452
 
157
453
  </div>
158
454
 
159
455
  <div id="footer">
160
- Generated on Mon Feb 11 17:45:39 2013 by
456
+ Generated on Wed May 15 18:59:33 2013 by
161
457
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
162
- 0.8.4.1 (ruby-1.9.3).
458
+ 0.8.5.2 (ruby-1.9.3).
163
459
  </div>
164
460
 
165
461
  </body>