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.
- data/.yardopts +6 -2
- data/Gemfile +3 -2
- data/Gemfile.lock +4 -4
- data/Readme.md +3 -268
- data/lib/zendesk_api/actions.rb +51 -46
- data/lib/zendesk_api/association.rb +1 -1
- data/lib/zendesk_api/associations.rb +2 -6
- data/lib/zendesk_api/client.rb +8 -9
- data/lib/zendesk_api/collection.rb +84 -50
- data/lib/zendesk_api/configuration.rb +4 -0
- data/lib/zendesk_api/error.rb +22 -0
- data/lib/zendesk_api/middleware/request/etag_cache.rb +1 -7
- data/lib/zendesk_api/middleware/request/upload.rb +1 -2
- data/lib/zendesk_api/middleware/response/raise_error.rb +20 -0
- data/lib/zendesk_api/resource.rb +33 -5
- data/lib/zendesk_api/resources.rb +36 -11
- data/lib/zendesk_api/server/base.rb +1 -1
- data/lib/zendesk_api/server/helper.rb +3 -3
- data/lib/zendesk_api/server/models/zlib_json.rb +1 -1
- data/lib/zendesk_api/server/public/doc/ZendeskAPI.html +7 -7
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Ability.html +415 -13
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Activity.html +414 -51
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Attachment.html +321 -25
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Automation.html +413 -46
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Bookmark.html +389 -26
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/CRMData.html +415 -13
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/CRMDataStatus.html +415 -13
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Category.html +410 -47
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Client.html +98 -362
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Collection.html +457 -676
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Configuration.html +110 -20
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Create.html +264 -6
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Create/ClassMethods.html +43 -82
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/CreateResource.html +671 -15
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/CustomRole.html +415 -13
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Data.html +207 -233
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/DataResource.html +499 -24
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/DeleteResource.html +614 -15
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Destroy.html +73 -23
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Destroy/ClassMethod.html +68 -18
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/{FormatError.html → Error.html} +19 -27
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Error/ClientError.html +127 -0
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/{Server/UserRequest.html → Error/NetworkError.html} +18 -16
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Error/RecordInvalid.html +371 -0
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Error/RecordNotFound.html +127 -0
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Forum.html +426 -63
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/ForumSubscription.html +414 -51
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Group.html +389 -26
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/GroupMembership.html +414 -51
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/JobStatus.html +405 -16
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Locale.html +405 -16
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Macro.html +413 -46
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/MobileDevice.html +404 -41
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/OAuthClient.html +606 -0
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/OAuthToken.html +810 -0
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Organization.html +422 -59
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/OrganizationField.html +606 -0
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Read.html +75 -12
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/ReadResource.html +593 -16
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Request.html +418 -55
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Request/Comment.html +420 -31
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Resource.html +1025 -20
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Role.html +415 -13
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Rule.html +610 -0
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/RuleExecution.html +317 -21
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/SatisfactionRating.html +428 -39
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Save.html +63 -79
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Search.html +34 -26
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Search/Result.html +305 -9
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Setting.html +433 -41
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/SharingAgreement.html +405 -16
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/SingularResource.html +389 -26
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/SuspendedTicket.html +600 -31
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Ticket.html +464 -101
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Ticket/Audit.html +427 -25
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Ticket/Comment.html +435 -32
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Ticket/Tag.html +389 -26
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/TicketField.html +389 -26
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/TicketMetric.html +592 -15
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Topic.html +427 -64
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Topic/TopicComment.html +907 -17
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Topic/TopicVote.html +414 -55
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/TopicComment.html +325 -29
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/TopicSubscription.html +414 -51
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Trigger.html +413 -46
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Update.html +258 -6
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Update/ClassMethod.html +62 -12
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/UpdateResource.html +671 -15
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Upload.html +800 -28
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/User.html +505 -142
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/User/Identity.html +412 -49
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/User/TopicComment.html +475 -13
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/UserField.html +606 -0
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Verbs.html +9 -15
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/View.html +433 -66
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/ViewCount.html +415 -13
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/ViewRow.html +451 -49
- data/lib/zendesk_api/server/public/doc/_index.html +72 -72
- data/lib/zendesk_api/server/public/doc/class_list.html +1 -1
- data/lib/zendesk_api/server/public/doc/css/style.css +10 -0
- data/lib/zendesk_api/server/public/doc/file.Readme.html +20 -260
- data/lib/zendesk_api/server/public/doc/file_list.html +1 -1
- data/lib/zendesk_api/server/public/doc/frames.html +1 -1
- data/lib/zendesk_api/server/public/doc/index.html +20 -260
- data/lib/zendesk_api/server/public/doc/method_list.html +309 -517
- data/lib/zendesk_api/server/public/doc/top-level-namespace.html +3 -35
- data/lib/zendesk_api/verbs.rb +0 -4
- data/lib/zendesk_api/version.rb +1 -1
- data/spec/core/client_spec.rb +53 -13
- data/spec/core/collection_spec.rb +32 -4
- data/spec/core/create_resource_spec.rb +1 -1
- data/spec/core/data_resource_spec.rb +2 -2
- data/spec/core/middleware/request/etag_cache_spec.rb +6 -7
- data/spec/core/middleware/request/upload_spec.rb +2 -10
- data/spec/core/middleware/response/callback_spec.rb +1 -1
- data/spec/core/middleware/response/raise_error_spec.rb +40 -0
- data/spec/core/read_resource_spec.rb +0 -2
- data/spec/core/resource_spec.rb +13 -5
- data/spec/core/search_spec.rb +1 -1
- data/spec/core/spec_helper.rb +3 -3
- data/spec/live/automation_spec.rb +23 -0
- data/spec/live/organization_field_spec.rb +12 -0
- data/spec/live/ticket_spec.rb +8 -2
- data/spec/live/trigger_spec.rb +23 -0
- data/spec/live/user_field_spec.rb +12 -0
- data/spec/live/user_spec.rb +0 -2
- data/spec/live/view_spec.rb +17 -1
- data/spec/server/spec_helper.rb +2 -2
- data/zendesk_api.gemspec +1 -1
- metadata +88 -51
- checksums.yaml +0 -7
- data/lib/zendesk_api/rescue.rb +0 -63
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Console.html +0 -860
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Console/Eval.html +0 -190
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Server.html +0 -131
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Server/App.html +0 -523
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Server/Helper.html +0 -684
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Server/HtmlRenderer.html +0 -303
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Server/HtmlRenderer/RedcarpetRenderer.html +0 -508
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Server/ZlibJSON.html +0 -244
- data/spec/core/rescue_spec.rb +0 -151
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: ZendeskAPI::Data
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.
|
9
|
+
— Documentation by YARD 0.8.5.2
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -94,9 +94,7 @@
|
|
94
94
|
|
95
95
|
|
96
96
|
<dt class="r2 last">Defined in:</dt>
|
97
|
-
<dd class="r2 last">lib/zendesk_api/resource.rb
|
98
|
-
lib/zendesk_api/console/extensions.rb</span>
|
99
|
-
</dd>
|
97
|
+
<dd class="r2 last">lib/zendesk_api/resource.rb</dd>
|
100
98
|
|
101
99
|
</dl>
|
102
100
|
<div class="clear"></div>
|
@@ -120,13 +118,13 @@
|
|
120
118
|
|
121
119
|
|
122
120
|
|
123
|
-
<h2>
|
121
|
+
<h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
|
124
122
|
<ul class="summary">
|
125
123
|
|
126
124
|
<li class="public ">
|
127
125
|
<span class="summary_signature">
|
128
126
|
|
129
|
-
<a href="#
|
127
|
+
<a href="#association-instance_method" title="#association (instance method)">- (ZendeskAPI::Association) <strong>association</strong> </a>
|
130
128
|
|
131
129
|
|
132
130
|
|
@@ -144,29 +142,28 @@
|
|
144
142
|
|
145
143
|
|
146
144
|
<span class="summary_desc"><div class='inline'>
|
147
|
-
<p>
|
145
|
+
<p>The association.</p>
|
148
146
|
</div></span>
|
149
147
|
|
150
148
|
</li>
|
151
149
|
|
152
150
|
|
153
|
-
</ul>
|
154
|
-
|
155
|
-
<h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
|
156
|
-
<ul class="summary">
|
157
|
-
|
158
151
|
<li class="public ">
|
159
152
|
<span class="summary_signature">
|
160
153
|
|
161
|
-
<a href="#
|
154
|
+
<a href="#attributes-instance_method" title="#attributes (instance method)">- (Hash) <strong>attributes</strong> </a>
|
162
155
|
|
163
156
|
|
164
157
|
|
158
|
+
(also: #to_param)
|
159
|
+
|
165
160
|
</span>
|
166
161
|
|
167
162
|
|
168
163
|
|
169
164
|
|
165
|
+
<span class="note title readonly">readonly</span>
|
166
|
+
|
170
167
|
|
171
168
|
|
172
169
|
|
@@ -176,7 +173,7 @@
|
|
176
173
|
|
177
174
|
|
178
175
|
<span class="summary_desc"><div class='inline'>
|
179
|
-
<p>The
|
176
|
+
<p>The resource's attributes.</p>
|
180
177
|
</div></span>
|
181
178
|
|
182
179
|
</li>
|
@@ -185,19 +182,15 @@
|
|
185
182
|
<li class="public ">
|
186
183
|
<span class="summary_signature">
|
187
184
|
|
188
|
-
<a href="#
|
185
|
+
<a href="#errors-instance_method" title="#errors (instance method)">- (Array) <strong>errors</strong> </a>
|
189
186
|
|
190
187
|
|
191
188
|
|
192
|
-
(also: #to_param)
|
193
|
-
|
194
189
|
</span>
|
195
190
|
|
196
191
|
|
197
192
|
|
198
193
|
|
199
|
-
<span class="note title readonly">readonly</span>
|
200
|
-
|
201
194
|
|
202
195
|
|
203
196
|
|
@@ -207,7 +200,7 @@
|
|
207
200
|
|
208
201
|
|
209
202
|
<span class="summary_desc"><div class='inline'>
|
210
|
-
<p>The
|
203
|
+
<p>The last received errors.</p>
|
211
204
|
</div></span>
|
212
205
|
|
213
206
|
</li>
|
@@ -256,7 +249,7 @@
|
|
256
249
|
<li class="public ">
|
257
250
|
<span class="summary_signature">
|
258
251
|
|
259
|
-
<a href="#
|
252
|
+
<a href="#namespace-class_method" title="namespace (class method)">+ (Object) <strong>namespace</strong>(namespace) </a>
|
260
253
|
|
261
254
|
|
262
255
|
|
@@ -305,7 +298,7 @@ tickets).</p>
|
|
305
298
|
<li class="public ">
|
306
299
|
<span class="summary_signature">
|
307
300
|
|
308
|
-
<a href="#
|
301
|
+
<a href="#resource_path-class_method" title="resource_path (class method)">+ (Object) <strong>resource_path</strong> </a>
|
309
302
|
|
310
303
|
|
311
304
|
|
@@ -319,10 +312,7 @@ tickets).</p>
|
|
319
312
|
|
320
313
|
|
321
314
|
|
322
|
-
<span class="summary_desc"><div class='inline'>
|
323
|
-
<p>The singular resource name taken from the class name (e.g.
|
324
|
-
ZendeskAPI::Ticket -> ticket).</p>
|
325
|
-
</div></span>
|
315
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
326
316
|
|
327
317
|
</li>
|
328
318
|
|
@@ -330,7 +320,7 @@ ZendeskAPI::Ticket -> ticket).</p>
|
|
330
320
|
<li class="public ">
|
331
321
|
<span class="summary_signature">
|
332
322
|
|
333
|
-
<a href="#
|
323
|
+
<a href="#singular_resource_name-class_method" title="singular_resource_name (class method)">+ (Object) <strong>singular_resource_name</strong> </a>
|
334
324
|
|
335
325
|
|
336
326
|
|
@@ -344,24 +334,18 @@ ZendeskAPI::Ticket -> ticket).</p>
|
|
344
334
|
|
345
335
|
|
346
336
|
|
347
|
-
<span class="summary_desc"><div class='inline'
|
337
|
+
<span class="summary_desc"><div class='inline'>
|
338
|
+
<p>The singular resource name taken from the class name (e.g.
|
339
|
+
ZendeskAPI::Ticket -> ticket).</p>
|
340
|
+
</div></span>
|
348
341
|
|
349
342
|
</li>
|
350
343
|
|
351
344
|
|
352
|
-
</ul>
|
353
|
-
|
354
|
-
<h2>
|
355
|
-
Instance Method Summary
|
356
|
-
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
357
|
-
</h2>
|
358
|
-
|
359
|
-
<ul class="summary">
|
360
|
-
|
361
345
|
<li class="public ">
|
362
346
|
<span class="summary_signature">
|
363
347
|
|
364
|
-
<a href="
|
348
|
+
<a href="#subclasses-class_method" title="subclasses (class method)">+ (Object) <strong>subclasses</strong> </a>
|
365
349
|
|
366
350
|
|
367
351
|
|
@@ -380,6 +364,15 @@ ZendeskAPI::Ticket -> ticket).</p>
|
|
380
364
|
</li>
|
381
365
|
|
382
366
|
|
367
|
+
</ul>
|
368
|
+
|
369
|
+
<h2>
|
370
|
+
Instance Method Summary
|
371
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
372
|
+
</h2>
|
373
|
+
|
374
|
+
<ul class="summary">
|
375
|
+
|
383
376
|
<li class="public ">
|
384
377
|
<span class="summary_signature">
|
385
378
|
|
@@ -413,8 +406,6 @@ ZendeskAPI::Ticket -> ticket).</p>
|
|
413
406
|
|
414
407
|
|
415
408
|
|
416
|
-
(also: #hash)
|
417
|
-
|
418
409
|
</span>
|
419
410
|
|
420
411
|
|
@@ -560,16 +551,6 @@ id.</p>
|
|
560
551
|
|
561
552
|
|
562
553
|
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
554
|
<div id="constructor_details" class="method_details_list">
|
574
555
|
<h2>Constructor Details</h2>
|
575
556
|
|
@@ -637,25 +618,27 @@ id.</p>
|
|
637
618
|
<pre class="lines">
|
638
619
|
|
639
620
|
|
640
|
-
57
|
641
|
-
58
|
642
|
-
59
|
643
|
-
60
|
644
|
-
61
|
645
|
-
62
|
646
|
-
63
|
647
|
-
64
|
648
621
|
65
|
649
622
|
66
|
650
623
|
67
|
651
|
-
68
|
624
|
+
68
|
625
|
+
69
|
626
|
+
70
|
627
|
+
71
|
628
|
+
72
|
629
|
+
73
|
630
|
+
74
|
631
|
+
75
|
632
|
+
76
|
633
|
+
77</pre>
|
652
634
|
</td>
|
653
635
|
<td>
|
654
|
-
<pre class="code"><span class="info file"># File 'lib/zendesk_api/resource.rb', line
|
636
|
+
<pre class="code"><span class="info file"># File 'lib/zendesk_api/resource.rb', line 65</span>
|
655
637
|
|
656
638
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</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='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
657
639
|
<span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Expected a Hash for attributes, got </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_attributes'>attributes</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span> <span class='kw'>unless</span> <span class='id identifier rubyid_attributes'>attributes</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Hash</span><span class='rparen'>)</span>
|
658
640
|
<span class='ivar'>@association</span> <span class='op'>=</span> <span class='id identifier rubyid_attributes'>attributes</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='symbol'>:association</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='const'>Association</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='symbol'>:class</span> <span class='op'>=></span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='rparen'>)</span>
|
641
|
+
<span class='ivar'>@global_params</span> <span class='op'>=</span> <span class='id identifier rubyid_attributes'>attributes</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='symbol'>:global</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
659
642
|
<span class='ivar'>@client</span> <span class='op'>=</span> <span class='id identifier rubyid_client'>client</span>
|
660
643
|
<span class='ivar'>@attributes</span> <span class='op'>=</span> <span class='const'>ZendeskAPI</span><span class='op'>::</span><span class='const'>Trackie</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_attributes'>attributes</span><span class='rparen'>)</span>
|
661
644
|
|
@@ -719,13 +702,13 @@ nested hash.</p>
|
|
719
702
|
<pre class="lines">
|
720
703
|
|
721
704
|
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
705
|
+
81
|
706
|
+
82
|
707
|
+
83
|
708
|
+
84</pre>
|
726
709
|
</td>
|
727
710
|
<td>
|
728
|
-
<pre class="code"><span class="info file"># File 'lib/zendesk_api/resource.rb', line
|
711
|
+
<pre class="code"><span class="info file"># File 'lib/zendesk_api/resource.rb', line 81</span>
|
729
712
|
|
730
713
|
<span class='kw'>def</span> <span class='id identifier rubyid_method_missing'>method_missing</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
731
714
|
<span class='id identifier rubyid_raise'>raise</span> <span class='const'>NoMethodError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>:save is not defined</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span> <span class='op'>==</span> <span class='symbol'>:save</span>
|
@@ -738,15 +721,15 @@ nested hash.</p>
|
|
738
721
|
|
739
722
|
</div>
|
740
723
|
|
741
|
-
<div id="
|
742
|
-
<h2>
|
724
|
+
<div id="instance_attr_details" class="attr_details">
|
725
|
+
<h2>Instance Attribute Details</h2>
|
743
726
|
|
744
727
|
|
745
|
-
<span id="
|
728
|
+
<span id="association=-instance_method"></span>
|
746
729
|
<div class="method_details first">
|
747
|
-
<h3 class="signature first" id="
|
730
|
+
<h3 class="signature first" id="association-instance_method">
|
748
731
|
|
749
|
-
|
732
|
+
- (<tt><span class='object_link'>ZendeskAPI::Association</span></tt>) <strong>association</strong>
|
750
733
|
|
751
734
|
|
752
735
|
|
@@ -755,13 +738,31 @@ nested hash.</p>
|
|
755
738
|
</h3><div class="docstring">
|
756
739
|
<div class="discussion">
|
757
740
|
|
758
|
-
<p>
|
741
|
+
<p>The association</p>
|
759
742
|
|
760
743
|
|
761
744
|
</div>
|
762
745
|
</div>
|
763
746
|
<div class="tags">
|
764
747
|
|
748
|
+
<p class="tag_title">Returns:</p>
|
749
|
+
<ul class="return">
|
750
|
+
|
751
|
+
<li>
|
752
|
+
|
753
|
+
|
754
|
+
<span class='type'>(<tt><span class='object_link'>ZendeskAPI::Association</span></tt>)</span>
|
755
|
+
|
756
|
+
|
757
|
+
|
758
|
+
—
|
759
|
+
<div class='inline'>
|
760
|
+
<p>The association</p>
|
761
|
+
</div>
|
762
|
+
|
763
|
+
</li>
|
764
|
+
|
765
|
+
</ul>
|
765
766
|
|
766
767
|
</div><table class="source_code">
|
767
768
|
<tr>
|
@@ -769,41 +770,40 @@ nested hash.</p>
|
|
769
770
|
<pre class="lines">
|
770
771
|
|
771
772
|
|
772
|
-
|
773
|
-
|
774
|
-
|
773
|
+
56
|
774
|
+
57
|
775
|
+
58</pre>
|
775
776
|
</td>
|
776
777
|
<td>
|
777
|
-
<pre class="code"><span class="info file"># File 'lib/zendesk_api/
|
778
|
+
<pre class="code"><span class="info file"># File 'lib/zendesk_api/resource.rb', line 56</span>
|
778
779
|
|
779
|
-
<span class='kw'>def</span> <span class='id identifier
|
780
|
-
<span class='ivar'>@
|
780
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_association'>association</span>
|
781
|
+
<span class='ivar'>@association</span>
|
781
782
|
<span class='kw'>end</span></pre>
|
782
783
|
</td>
|
783
784
|
</tr>
|
784
785
|
</table>
|
785
786
|
</div>
|
786
787
|
|
787
|
-
</div>
|
788
|
-
|
789
|
-
<div id="instance_attr_details" class="attr_details">
|
790
|
-
<h2>Instance Attribute Details</h2>
|
791
|
-
|
792
788
|
|
793
|
-
<span id="
|
794
|
-
<div class="method_details
|
795
|
-
<h3 class="signature
|
789
|
+
<span id=""></span>
|
790
|
+
<div class="method_details ">
|
791
|
+
<h3 class="signature " id="attributes-instance_method">
|
796
792
|
|
797
|
-
- (<tt
|
793
|
+
- (<tt>Hash</tt>) <strong>attributes</strong> <span class="extras">(readonly)</span>
|
798
794
|
|
799
795
|
|
800
796
|
|
797
|
+
<span class="aliases">Also known as:
|
798
|
+
<span class="names"><span id='to_param-instance_method'>to_param</span></span>
|
799
|
+
</span>
|
800
|
+
|
801
801
|
|
802
802
|
|
803
803
|
</h3><div class="docstring">
|
804
804
|
<div class="discussion">
|
805
805
|
|
806
|
-
<p>The
|
806
|
+
<p>The resource's attributes</p>
|
807
807
|
|
808
808
|
|
809
809
|
</div>
|
@@ -816,13 +816,13 @@ nested hash.</p>
|
|
816
816
|
<li>
|
817
817
|
|
818
818
|
|
819
|
-
<span class='type'>(<tt
|
819
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
820
820
|
|
821
821
|
|
822
822
|
|
823
823
|
—
|
824
824
|
<div class='inline'>
|
825
|
-
<p>The
|
825
|
+
<p>The resource's attributes</p>
|
826
826
|
</div>
|
827
827
|
|
828
828
|
</li>
|
@@ -835,15 +835,15 @@ nested hash.</p>
|
|
835
835
|
<pre class="lines">
|
836
836
|
|
837
837
|
|
838
|
-
|
839
|
-
|
840
|
-
|
838
|
+
54
|
839
|
+
55
|
840
|
+
56</pre>
|
841
841
|
</td>
|
842
842
|
<td>
|
843
|
-
<pre class="code"><span class="info file"># File 'lib/zendesk_api/resource.rb', line
|
843
|
+
<pre class="code"><span class="info file"># File 'lib/zendesk_api/resource.rb', line 54</span>
|
844
844
|
|
845
|
-
<span class='kw'>def</span> <span class='id identifier
|
846
|
-
<span class='ivar'>@
|
845
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_attributes'>attributes</span>
|
846
|
+
<span class='ivar'>@attributes</span>
|
847
847
|
<span class='kw'>end</span></pre>
|
848
848
|
</td>
|
849
849
|
</tr>
|
@@ -851,24 +851,20 @@ nested hash.</p>
|
|
851
851
|
</div>
|
852
852
|
|
853
853
|
|
854
|
-
<span id=""></span>
|
854
|
+
<span id="errors=-instance_method"></span>
|
855
855
|
<div class="method_details ">
|
856
|
-
<h3 class="signature " id="
|
856
|
+
<h3 class="signature " id="errors-instance_method">
|
857
857
|
|
858
|
-
- (<tt>
|
858
|
+
- (<tt>Array</tt>) <strong>errors</strong>
|
859
859
|
|
860
860
|
|
861
861
|
|
862
|
-
<span class="aliases">Also known as:
|
863
|
-
<span class="names"><span id='to_param-instance_method'>to_param</span></span>
|
864
|
-
</span>
|
865
|
-
|
866
862
|
|
867
863
|
|
868
864
|
</h3><div class="docstring">
|
869
865
|
<div class="discussion">
|
870
866
|
|
871
|
-
<p>The
|
867
|
+
<p>The last received errors</p>
|
872
868
|
|
873
869
|
|
874
870
|
</div>
|
@@ -881,13 +877,13 @@ nested hash.</p>
|
|
881
877
|
<li>
|
882
878
|
|
883
879
|
|
884
|
-
<span class='type'>(<tt>
|
880
|
+
<span class='type'>(<tt>Array</tt>)</span>
|
885
881
|
|
886
882
|
|
887
883
|
|
888
884
|
—
|
889
885
|
<div class='inline'>
|
890
|
-
<p>The
|
886
|
+
<p>The last received errors</p>
|
891
887
|
</div>
|
892
888
|
|
893
889
|
</li>
|
@@ -900,15 +896,15 @@ nested hash.</p>
|
|
900
896
|
<pre class="lines">
|
901
897
|
|
902
898
|
|
903
|
-
|
904
|
-
|
905
|
-
|
899
|
+
58
|
900
|
+
59
|
901
|
+
60</pre>
|
906
902
|
</td>
|
907
903
|
<td>
|
908
|
-
<pre class="code"><span class="info file"># File 'lib/zendesk_api/resource.rb', line
|
904
|
+
<pre class="code"><span class="info file"># File 'lib/zendesk_api/resource.rb', line 58</span>
|
909
905
|
|
910
|
-
<span class='kw'>def</span> <span class='id identifier
|
911
|
-
<span class='ivar'>@
|
906
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_errors'>errors</span>
|
907
|
+
<span class='ivar'>@errors</span>
|
912
908
|
<span class='kw'>end</span></pre>
|
913
909
|
</td>
|
914
910
|
</tr>
|
@@ -943,12 +939,12 @@ nested hash.</p>
|
|
943
939
|
<pre class="lines">
|
944
940
|
|
945
941
|
|
946
|
-
|
947
|
-
|
948
|
-
|
942
|
+
60
|
943
|
+
61
|
944
|
+
62</pre>
|
949
945
|
</td>
|
950
946
|
<td>
|
951
|
-
<pre class="code"><span class="info file"># File 'lib/zendesk_api/resource.rb', line
|
947
|
+
<pre class="code"><span class="info file"># File 'lib/zendesk_api/resource.rb', line 60</span>
|
952
948
|
|
953
949
|
<span class='kw'>def</span> <span class='id identifier rubyid_response'>response</span>
|
954
950
|
<span class='ivar'>@response</span>
|
@@ -966,9 +962,9 @@ nested hash.</p>
|
|
966
962
|
|
967
963
|
|
968
964
|
<div class="method_details first">
|
969
|
-
<h3 class="signature first" id="
|
965
|
+
<h3 class="signature first" id="namespace-class_method">
|
970
966
|
|
971
|
-
+ (<tt>Object</tt>) <strong>
|
967
|
+
+ (<tt>Object</tt>) <strong>namespace</strong>(namespace)
|
972
968
|
|
973
969
|
|
974
970
|
|
@@ -980,35 +976,15 @@ nested hash.</p>
|
|
980
976
|
<pre class="lines">
|
981
977
|
|
982
978
|
|
983
|
-
|
984
|
-
|
985
|
-
|
986
|
-
99
|
987
|
-
100
|
988
|
-
101
|
989
|
-
102
|
990
|
-
103
|
991
|
-
104
|
992
|
-
105
|
993
|
-
106
|
994
|
-
107
|
995
|
-
108</pre>
|
979
|
+
48
|
980
|
+
49
|
981
|
+
50</pre>
|
996
982
|
</td>
|
997
983
|
<td>
|
998
|
-
<pre class="code"><span class="info file"># File 'lib/zendesk_api/
|
999
|
-
|
1000
|
-
<span class='kw'>def</span> <span class='id identifier
|
1001
|
-
<span class='
|
1002
|
-
<span class='id identifier rubyid_class_eval'>class_eval</span> <span class='kw'>do</span>
|
1003
|
-
<span class='id identifier rubyid_define_method'>define_method</span> <span class='symbol'>:format</span> <span class='kw'>do</span>
|
1004
|
-
<span class='id identifier rubyid_instance_eval'>instance_eval</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span>
|
1005
|
-
<span class='kw'>end</span>
|
1006
|
-
<span class='kw'>end</span>
|
1007
|
-
<span class='kw'>elsif</span> <span class='id identifier rubyid_client'>client</span> <span class='op'>&&</span> <span class='id identifier rubyid_client'>client</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_resource_name'>resource_name</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_loaded?'>loaded?</span>
|
1008
|
-
<span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>@</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_resource_name'>resource_name</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span>
|
1009
|
-
<span class='kw'>else</span>
|
1010
|
-
<span class='lbracket'>[</span><span class='id identifier rubyid_resource_name'>resource_name</span><span class='rbracket'>]</span>
|
1011
|
-
<span class='kw'>end</span>
|
984
|
+
<pre class="code"><span class="info file"># File 'lib/zendesk_api/resource.rb', line 48</span>
|
985
|
+
|
986
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_namespace'>namespace</span><span class='lparen'>(</span><span class='id identifier rubyid_namespace'>namespace</span><span class='rparen'>)</span>
|
987
|
+
<span class='ivar'>@namespace</span> <span class='op'>=</span> <span class='id identifier rubyid_namespace'>namespace</span>
|
1012
988
|
<span class='kw'>end</span></pre>
|
1013
989
|
</td>
|
1014
990
|
</tr>
|
@@ -1046,12 +1022,12 @@ tickets)</p>
|
|
1046
1022
|
<pre class="lines">
|
1047
1023
|
|
1048
1024
|
|
1025
|
+
28
|
1049
1026
|
29
|
1050
|
-
30
|
1051
|
-
31</pre>
|
1027
|
+
30</pre>
|
1052
1028
|
</td>
|
1053
1029
|
<td>
|
1054
|
-
<pre class="code"><span class="info file"># File 'lib/zendesk_api/resource.rb', line
|
1030
|
+
<pre class="code"><span class="info file"># File 'lib/zendesk_api/resource.rb', line 28</span>
|
1055
1031
|
|
1056
1032
|
<span class='kw'>def</span> <span class='id identifier rubyid_resource_name'>resource_name</span>
|
1057
1033
|
<span class='ivar'>@resource_name</span> <span class='op'>||=</span> <span class='const'>Inflection</span><span class='period'>.</span><span class='id identifier rubyid_plural'>plural</span><span class='lparen'>(</span><span class='id identifier rubyid_singular_resource_name'>singular_resource_name</span><span class='rparen'>)</span>
|
@@ -1059,6 +1035,36 @@ tickets)</p>
|
|
1059
1035
|
</td>
|
1060
1036
|
</tr>
|
1061
1037
|
</table>
|
1038
|
+
</div>
|
1039
|
+
|
1040
|
+
<div class="method_details ">
|
1041
|
+
<h3 class="signature " id="resource_path-class_method">
|
1042
|
+
|
1043
|
+
+ (<tt>Object</tt>) <strong>resource_path</strong>
|
1044
|
+
|
1045
|
+
|
1046
|
+
|
1047
|
+
|
1048
|
+
|
1049
|
+
</h3><table class="source_code">
|
1050
|
+
<tr>
|
1051
|
+
<td>
|
1052
|
+
<pre class="lines">
|
1053
|
+
|
1054
|
+
|
1055
|
+
32
|
1056
|
+
33
|
1057
|
+
34</pre>
|
1058
|
+
</td>
|
1059
|
+
<td>
|
1060
|
+
<pre class="code"><span class="info file"># File 'lib/zendesk_api/resource.rb', line 32</span>
|
1061
|
+
|
1062
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_resource_path'>resource_path</span>
|
1063
|
+
<span class='lbracket'>[</span><span class='ivar'>@namespace</span><span class='comma'>,</span> <span class='id identifier rubyid_resource_name'>resource_name</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_compact'>compact</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
1064
|
+
<span class='kw'>end</span></pre>
|
1065
|
+
</td>
|
1066
|
+
</tr>
|
1067
|
+
</table>
|
1062
1068
|
</div>
|
1063
1069
|
|
1064
1070
|
<div class="method_details ">
|
@@ -1088,12 +1094,12 @@ ZendeskAPI::Ticket -> ticket)</p>
|
|
1088
1094
|
<pre class="lines">
|
1089
1095
|
|
1090
1096
|
|
1097
|
+
23
|
1091
1098
|
24
|
1092
|
-
25
|
1093
|
-
26</pre>
|
1099
|
+
25</pre>
|
1094
1100
|
</td>
|
1095
1101
|
<td>
|
1096
|
-
<pre class="code"><span class="info file"># File 'lib/zendesk_api/resource.rb', line
|
1102
|
+
<pre class="code"><span class="info file"># File 'lib/zendesk_api/resource.rb', line 23</span>
|
1097
1103
|
|
1098
1104
|
<span class='kw'>def</span> <span class='id identifier rubyid_singular_resource_name'>singular_resource_name</span>
|
1099
1105
|
<span class='ivar'>@singular_resource_name</span> <span class='op'>||=</span> <span class='const'>ZendeskAPI</span><span class='op'>::</span><span class='const'>Helpers</span><span class='period'>.</span><span class='id identifier rubyid_snakecase_string'>snakecase_string</span><span class='lparen'>(</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>::</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_last'>last</span><span class='rparen'>)</span>
|
@@ -1118,12 +1124,12 @@ ZendeskAPI::Ticket -> ticket)</p>
|
|
1118
1124
|
<pre class="lines">
|
1119
1125
|
|
1120
1126
|
|
1127
|
+
18
|
1121
1128
|
19
|
1122
|
-
20
|
1123
|
-
21</pre>
|
1129
|
+
20</pre>
|
1124
1130
|
</td>
|
1125
1131
|
<td>
|
1126
|
-
<pre class="code"><span class="info file"># File 'lib/zendesk_api/resource.rb', line
|
1132
|
+
<pre class="code"><span class="info file"># File 'lib/zendesk_api/resource.rb', line 18</span>
|
1127
1133
|
|
1128
1134
|
<span class='kw'>def</span> <span class='id identifier rubyid_subclasses'>subclasses</span>
|
1129
1135
|
<span class='ivar'>@subclasses</span> <span class='op'>||=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
@@ -1140,57 +1146,7 @@ ZendeskAPI::Ticket -> ticket)</p>
|
|
1140
1146
|
|
1141
1147
|
|
1142
1148
|
<div class="method_details first">
|
1143
|
-
<h3 class="signature first" id="
|
1144
|
-
|
1145
|
-
- (<tt>Object</tt>) <strong>/</strong>(method)
|
1146
|
-
|
1147
|
-
|
1148
|
-
|
1149
|
-
|
1150
|
-
|
1151
|
-
</h3><table class="source_code">
|
1152
|
-
<tr>
|
1153
|
-
<td>
|
1154
|
-
<pre class="lines">
|
1155
|
-
|
1156
|
-
|
1157
|
-
79
|
1158
|
-
80
|
1159
|
-
81
|
1160
|
-
82
|
1161
|
-
83
|
1162
|
-
84
|
1163
|
-
85
|
1164
|
-
86
|
1165
|
-
87
|
1166
|
-
88
|
1167
|
-
89
|
1168
|
-
90
|
1169
|
-
91</pre>
|
1170
|
-
</td>
|
1171
|
-
<td>
|
1172
|
-
<pre class="code"><span class="info file"># File 'lib/zendesk_api/console/extensions.rb', line 79</span>
|
1173
|
-
|
1174
|
-
<span class='kw'>def</span> <span class='op'>/</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='rparen'>)</span>
|
1175
|
-
<span class='kw'>if</span> <span class='id identifier rubyid_method'>method</span> <span class='op'>==</span> <span class='const'>ZendeskAPI</span><span class='op'>::</span><span class='const'>Console</span><span class='op'>::</span><span class='const'>ZD_DIRUP</span>
|
1176
|
-
<span class='kw'>if</span> <span class='id identifier rubyid_association'>association</span><span class='period'>.</span><span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_parent'>parent</span>
|
1177
|
-
<span class='id identifier rubyid_association'>association</span><span class='period'>.</span><span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_parent'>parent</span>
|
1178
|
-
<span class='kw'>elsif</span> <span class='lparen'>(</span><span class='id identifier rubyid_res'>res</span> <span class='op'>=</span> <span class='ivar'>@client</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</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_resource_name'>resource_name</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_loaded?'>loaded?</span>
|
1179
|
-
<span class='id identifier rubyid_res'>res</span>
|
1180
|
-
<span class='kw'>else</span>
|
1181
|
-
<span class='const'>ZendeskAPI</span><span class='op'>::</span><span class='const'>Collection</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='ivar'>@client</span><span class='comma'>,</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='rparen'>)</span>
|
1182
|
-
<span class='kw'>end</span>
|
1183
|
-
<span class='kw'>else</span>
|
1184
|
-
<span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='rparen'>)</span>
|
1185
|
-
<span class='kw'>end</span>
|
1186
|
-
<span class='kw'>end</span></pre>
|
1187
|
-
</td>
|
1188
|
-
</tr>
|
1189
|
-
</table>
|
1190
|
-
</div>
|
1191
|
-
|
1192
|
-
<div class="method_details ">
|
1193
|
-
<h3 class="signature " id="==-instance_method">
|
1149
|
+
<h3 class="signature first" id="==-instance_method">
|
1194
1150
|
|
1195
1151
|
- (<tt>Object</tt>) <strong>==</strong>(other)
|
1196
1152
|
|
@@ -1219,17 +1175,39 @@ ZendeskAPI::Ticket -> ticket)</p>
|
|
1219
1175
|
<pre class="lines">
|
1220
1176
|
|
1221
1177
|
|
1222
|
-
|
1223
|
-
|
1224
|
-
|
1225
|
-
|
1178
|
+
121
|
1179
|
+
122
|
1180
|
+
123
|
1181
|
+
124
|
1182
|
+
125
|
1183
|
+
126
|
1184
|
+
127
|
1185
|
+
128
|
1186
|
+
129
|
1187
|
+
130
|
1188
|
+
131
|
1189
|
+
132
|
1190
|
+
133
|
1191
|
+
134
|
1192
|
+
135</pre>
|
1226
1193
|
</td>
|
1227
1194
|
<td>
|
1228
|
-
<pre class="code"><span class="info file"># File 'lib/zendesk_api/resource.rb', line
|
1195
|
+
<pre class="code"><span class="info file"># File 'lib/zendesk_api/resource.rb', line 121</span>
|
1229
1196
|
|
1230
1197
|
<span class='kw'>def</span> <span class='op'>==</span><span class='lparen'>(</span><span class='id identifier rubyid_other'>other</span><span class='rparen'>)</span>
|
1231
|
-
<span class='
|
1232
|
-
|
1198
|
+
<span class='kw'>return</span> <span class='kw'>true</span> <span class='kw'>if</span> <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_object_id'>object_id</span> <span class='op'>==</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_object_id'>object_id</span>
|
1199
|
+
|
1200
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_other'>other</span> <span class='op'>&&</span> <span class='op'>!</span><span class='lparen'>(</span><span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Data</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Integer</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
1201
|
+
<span class='id identifier rubyid_warn'>warn</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Trying to compare </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='rbrace'>}</span><span class='tstring_content'> to a Resource from </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_caller'>caller</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span>
|
1202
|
+
<span class='kw'>end</span>
|
1203
|
+
|
1204
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Data</span><span class='rparen'>)</span>
|
1205
|
+
<span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span> <span class='op'>&&</span> <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span> <span class='op'>==</span> <span class='id identifier rubyid_id'>id</span>
|
1206
|
+
<span class='kw'>elsif</span> <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Integer</span><span class='rparen'>)</span>
|
1207
|
+
<span class='id identifier rubyid_id'>id</span> <span class='op'>==</span> <span class='id identifier rubyid_other'>other</span>
|
1208
|
+
<span class='kw'>else</span>
|
1209
|
+
<span class='kw'>false</span>
|
1210
|
+
<span class='kw'>end</span>
|
1233
1211
|
<span class='kw'>end</span></pre>
|
1234
1212
|
</td>
|
1235
1213
|
</tr>
|
@@ -1243,10 +1221,6 @@ ZendeskAPI::Ticket -> ticket)</p>
|
|
1243
1221
|
|
1244
1222
|
|
1245
1223
|
|
1246
|
-
<span class="aliases">Also known as:
|
1247
|
-
<span class="names"><span id='hash-instance_method'>hash</span></span>
|
1248
|
-
</span>
|
1249
|
-
|
1250
1224
|
|
1251
1225
|
|
1252
1226
|
</h3><div class="docstring">
|
@@ -1266,12 +1240,12 @@ ZendeskAPI::Ticket -> ticket)</p>
|
|
1266
1240
|
<pre class="lines">
|
1267
1241
|
|
1268
1242
|
|
1269
|
-
|
1270
|
-
|
1271
|
-
|
1243
|
+
87
|
1244
|
+
88
|
1245
|
+
89</pre>
|
1272
1246
|
</td>
|
1273
1247
|
<td>
|
1274
|
-
<pre class="code"><span class="info file"># File 'lib/zendesk_api/resource.rb', line
|
1248
|
+
<pre class="code"><span class="info file"># File 'lib/zendesk_api/resource.rb', line 87</span>
|
1275
1249
|
|
1276
1250
|
<span class='kw'>def</span> <span class='id identifier rubyid_id'>id</span>
|
1277
1251
|
<span class='id identifier rubyid_key?'>key?</span><span class='lparen'>(</span><span class='symbol'>:id</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_method_missing'>method_missing</span><span class='lparen'>(</span><span class='symbol'>:id</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='kw'>nil</span>
|
@@ -1321,12 +1295,12 @@ id.</p>
|
|
1321
1295
|
<pre class="lines">
|
1322
1296
|
|
1323
1297
|
|
1324
|
-
|
1325
|
-
|
1326
|
-
|
1298
|
+
92
|
1299
|
+
93
|
1300
|
+
94</pre>
|
1327
1301
|
</td>
|
1328
1302
|
<td>
|
1329
|
-
<pre class="code"><span class="info file"># File 'lib/zendesk_api/resource.rb', line
|
1303
|
+
<pre class="code"><span class="info file"># File 'lib/zendesk_api/resource.rb', line 92</span>
|
1330
1304
|
|
1331
1305
|
<span class='kw'>def</span> <span class='id identifier rubyid_new_record?'>new_record?</span>
|
1332
1306
|
<span class='id identifier rubyid_id'>id</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
@@ -1362,12 +1336,12 @@ id.</p>
|
|
1362
1336
|
<pre class="lines">
|
1363
1337
|
|
1364
1338
|
|
1365
|
-
|
1366
|
-
|
1367
|
-
|
1339
|
+
105
|
1340
|
+
106
|
1341
|
+
107</pre>
|
1368
1342
|
</td>
|
1369
1343
|
<td>
|
1370
|
-
<pre class="code"><span class="info file"># File 'lib/zendesk_api/resource.rb', line
|
1344
|
+
<pre class="code"><span class="info file"># File 'lib/zendesk_api/resource.rb', line 105</span>
|
1371
1345
|
|
1372
1346
|
<span class='kw'>def</span> <span class='id identifier rubyid_path'>path</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
|
1373
1347
|
<span class='ivar'>@association</span><span class='period'>.</span><span class='id identifier rubyid_generate_path'>generate_path</span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
|
@@ -1403,12 +1377,12 @@ id.</p>
|
|
1403
1377
|
<pre class="lines">
|
1404
1378
|
|
1405
1379
|
|
1406
|
-
|
1407
|
-
|
1408
|
-
|
1380
|
+
110
|
1381
|
+
111
|
1382
|
+
112</pre>
|
1409
1383
|
</td>
|
1410
1384
|
<td>
|
1411
|
-
<pre class="code"><span class="info file"># File 'lib/zendesk_api/resource.rb', line
|
1385
|
+
<pre class="code"><span class="info file"># File 'lib/zendesk_api/resource.rb', line 110</span>
|
1412
1386
|
|
1413
1387
|
<span class='kw'>def</span> <span class='id identifier rubyid_to_json'>to_json</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
|
1414
1388
|
<span class='id identifier rubyid_method_missing'>method_missing</span><span class='lparen'>(</span><span class='symbol'>:to_json</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
|
@@ -1423,9 +1397,9 @@ id.</p>
|
|
1423
1397
|
</div>
|
1424
1398
|
|
1425
1399
|
<div id="footer">
|
1426
|
-
Generated on
|
1400
|
+
Generated on Wed May 15 18:59:28 2013 by
|
1427
1401
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1428
|
-
0.8.
|
1402
|
+
0.8.5.2 (ruby-1.9.3).
|
1429
1403
|
</div>
|
1430
1404
|
|
1431
1405
|
</body>
|