moxiworks_platform 0.13.7 → 0.13.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,2351 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Class: MoxiworksPlatform::Task
8
+
9
+ &mdash; Documentation by YARD 0.9.5
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ pathId = "MoxiworksPlatform::Task";
19
+ relpath = '../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../class_list.html"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../_index.html">Index (T)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../MoxiworksPlatform.html" title="MoxiworksPlatform (module)">MoxiworksPlatform</a></span></span>
41
+ &raquo;
42
+ <span class="title">Task</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <iframe id="search_frame" src="../class_list.html"></iframe>
63
+
64
+ <div id="content"><h1>Class: MoxiworksPlatform::Task
65
+
66
+
67
+
68
+ </h1>
69
+ <div class="box_info">
70
+
71
+ <dl>
72
+ <dt>Inherits:</dt>
73
+ <dd>
74
+ <span class="inheritName"><span class='object_link'><a href="Resource.html" title="MoxiworksPlatform::Resource (class)">Resource</a></span></span>
75
+
76
+ <ul class="fullTree">
77
+ <li>Object</li>
78
+
79
+ <li class="next"><span class='object_link'><a href="Resource.html" title="MoxiworksPlatform::Resource (class)">Resource</a></span></li>
80
+
81
+ <li class="next">MoxiworksPlatform::Task</li>
82
+
83
+ </ul>
84
+ <a href="#" class="inheritanceTree">show all</a>
85
+
86
+ </dd>
87
+ </dl>
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+ <dl>
100
+ <dt>Defined in:</dt>
101
+ <dd>lib/moxiworks_platform/task.rb</dd>
102
+ </dl>
103
+
104
+ </div>
105
+
106
+
107
+
108
+
109
+
110
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
111
+ <ul class="summary">
112
+
113
+ <li class="public ">
114
+ <span class="summary_signature">
115
+
116
+ <a href="#completed_at-instance_method" title="#completed_at (instance method)">#<strong>completed_at</strong> &#x21d2; Integer|nil </a>
117
+
118
+
119
+
120
+ </span>
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+ <span class="summary_desc"><div class='inline'>
134
+ <p>the Unix timestamp representing the Date/Time this task was completed.</p>
135
+ </div></span>
136
+
137
+ </li>
138
+
139
+
140
+ <li class="public ">
141
+ <span class="summary_signature">
142
+
143
+ <a href="#created_at-instance_method" title="#created_at (instance method)">#<strong>created_at</strong> &#x21d2; Object </a>
144
+
145
+
146
+
147
+ </span>
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+
160
+ <span class="summary_desc"><div class='inline'>
161
+ <p>the Unix timestamp representing the Date/Time this Task was created.</p>
162
+ </div></span>
163
+
164
+ </li>
165
+
166
+
167
+ <li class="public ">
168
+ <span class="summary_signature">
169
+
170
+ <a href="#description-instance_method" title="#description (instance method)">#<strong>description</strong> &#x21d2; String </a>
171
+
172
+
173
+
174
+ </span>
175
+
176
+
177
+
178
+
179
+
180
+
181
+
182
+
183
+
184
+
185
+
186
+
187
+ <span class="summary_desc"><div class='inline'>
188
+ <p>a detailed description to be displayed to the agent for this Task.</p>
189
+ </div></span>
190
+
191
+ </li>
192
+
193
+
194
+ <li class="public ">
195
+ <span class="summary_signature">
196
+
197
+ <a href="#due_at-instance_method" title="#due_at (instance method)">#<strong>due_at</strong> &#x21d2; Integer </a>
198
+
199
+
200
+
201
+ </span>
202
+
203
+
204
+
205
+
206
+
207
+
208
+
209
+
210
+
211
+
212
+
213
+
214
+ <span class="summary_desc"><div class='inline'>
215
+ <p>the Unix timestamp representing the due date of this Task.</p>
216
+ </div></span>
217
+
218
+ </li>
219
+
220
+
221
+ <li class="public ">
222
+ <span class="summary_signature">
223
+
224
+ <a href="#duration-instance_method" title="#duration (instance method)">#<strong>duration</strong> &#x21d2; Integer </a>
225
+
226
+
227
+
228
+ </span>
229
+
230
+
231
+
232
+
233
+
234
+
235
+
236
+
237
+
238
+
239
+
240
+
241
+ <span class="summary_desc"><div class='inline'>
242
+ <p>the length (in minutes) estimated to complete this Task.</p>
243
+ </div></span>
244
+
245
+ </li>
246
+
247
+
248
+ <li class="public ">
249
+ <span class="summary_signature">
250
+
251
+ <a href="#moxi_works_agent_id-instance_method" title="#moxi_works_agent_id (instance method)">#<strong>moxi_works_agent_id</strong> &#x21d2; String </a>
252
+
253
+
254
+
255
+ </span>
256
+
257
+
258
+
259
+
260
+
261
+
262
+
263
+
264
+
265
+
266
+
267
+
268
+ <span class="summary_desc"><div class='inline'>
269
+ <p>moxi_works_agent_id is the Moxi Works Platform ID of the agent which a Task
270
+ is or is to be associated with.</p>
271
+ </div></span>
272
+
273
+ </li>
274
+
275
+
276
+ <li class="public ">
277
+ <span class="summary_signature">
278
+
279
+ <a href="#name-instance_method" title="#name (instance method)">#<strong>name</strong> &#x21d2; String </a>
280
+
281
+
282
+
283
+ </span>
284
+
285
+
286
+
287
+
288
+
289
+
290
+
291
+
292
+
293
+
294
+
295
+
296
+ <span class="summary_desc"><div class='inline'>
297
+ <p>the title to be displayed to the agent for this Task.</p>
298
+ </div></span>
299
+
300
+ </li>
301
+
302
+
303
+ <li class="public ">
304
+ <span class="summary_signature">
305
+
306
+ <a href="#partner_contact_id-instance_method" title="#partner_contact_id (instance method)">#<strong>partner_contact_id</strong> &#x21d2; String </a>
307
+
308
+
309
+
310
+ </span>
311
+
312
+
313
+
314
+
315
+
316
+
317
+
318
+
319
+
320
+
321
+
322
+
323
+ <span class="summary_desc"><div class='inline'>
324
+ <p>*your system&#39;s* unique ID for the Contact.</p>
325
+ </div></span>
326
+
327
+ </li>
328
+
329
+
330
+ <li class="public ">
331
+ <span class="summary_signature">
332
+
333
+ <a href="#partner_task_id-instance_method" title="#partner_task_id (instance method)">#<strong>partner_task_id</strong> &#x21d2; String </a>
334
+
335
+
336
+
337
+ </span>
338
+
339
+
340
+
341
+
342
+
343
+
344
+
345
+
346
+
347
+
348
+
349
+
350
+ <span class="summary_desc"><div class='inline'>
351
+ <p>Your system&#39;s unique identifier for the Task.</p>
352
+ </div></span>
353
+
354
+ </li>
355
+
356
+
357
+ <li class="public ">
358
+ <span class="summary_signature">
359
+
360
+ <a href="#status-instance_method" title="#status (instance method)">#<strong>status</strong> &#x21d2; String, enumerated </a>
361
+
362
+
363
+
364
+ </span>
365
+
366
+
367
+
368
+
369
+
370
+
371
+
372
+
373
+
374
+
375
+
376
+
377
+ <span class="summary_desc"><div class='inline'>
378
+ <p>an enumerated string representing the state of this Task.</p>
379
+ </div></span>
380
+
381
+ </li>
382
+
383
+
384
+ </ul>
385
+
386
+
387
+
388
+
389
+
390
+ <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Resource.html" title="MoxiworksPlatform::Resource (class)">Resource</a></span></h3>
391
+ <p class="inherited"><span class='object_link'><a href="Resource.html#headers-instance_method" title="MoxiworksPlatform::Resource#headers (method)">#headers</a></span></p>
392
+
393
+
394
+
395
+ <h2>
396
+ Class Method Summary
397
+ <small><a href="#" class="summary_toggle">collapse</a></small>
398
+ </h2>
399
+
400
+ <ul class="summary">
401
+
402
+ <li class="public ">
403
+ <span class="summary_signature">
404
+
405
+ <a href="#create-class_method" title="create (class method)">.<strong>create</strong>(opts = {}) &#x21d2; MoxiworksPlatform::Task </a>
406
+
407
+
408
+
409
+ </span>
410
+
411
+
412
+
413
+
414
+
415
+
416
+
417
+
418
+
419
+ <span class="summary_desc"><div class='inline'>
420
+ <p>Creates a new Task in Moxi Works Platform.</p>
421
+ </div></span>
422
+
423
+ </li>
424
+
425
+
426
+ <li class="public ">
427
+ <span class="summary_signature">
428
+
429
+ <a href="#find-class_method" title="find (class method)">.<strong>find</strong>(opts = {}) &#x21d2; MoxiworksPlatform::Task </a>
430
+
431
+
432
+
433
+ </span>
434
+
435
+
436
+
437
+
438
+
439
+
440
+
441
+
442
+
443
+ <span class="summary_desc"><div class='inline'>
444
+ <p>Find an Task your system has previously created in Moxi Works Platform.</p>
445
+ </div></span>
446
+
447
+ </li>
448
+
449
+
450
+ <li class="public ">
451
+ <span class="summary_signature">
452
+
453
+ <a href="#search-class_method" title="search (class method)">.<strong>search</strong>(opts = {}) &#x21d2; Hash </a>
454
+
455
+
456
+
457
+ </span>
458
+
459
+
460
+
461
+
462
+
463
+
464
+
465
+
466
+
467
+ <span class="summary_desc"><div class='inline'>
468
+ <p>Search Agent&#39;s Tasks in Moxi Works Platform.</p>
469
+ </div></span>
470
+
471
+ </li>
472
+
473
+
474
+ <li class="public ">
475
+ <span class="summary_signature">
476
+
477
+ <a href="#send_request-class_method" title="send_request (class method)">.<strong>send_request</strong>(method, opts = {}, url = nil) &#x21d2; MoxiworksPlatform::Task </a>
478
+
479
+
480
+
481
+ </span>
482
+
483
+
484
+
485
+
486
+
487
+
488
+
489
+
490
+
491
+ <span class="summary_desc"><div class='inline'>
492
+ <p>Send our remote request to the Moxi Works Platform.</p>
493
+ </div></span>
494
+
495
+ </li>
496
+
497
+
498
+ <li class="public ">
499
+ <span class="summary_signature">
500
+
501
+ <a href="#update-class_method" title="update (class method)">.<strong>update</strong>(opts = {}) &#x21d2; MoxiworksPlatform::Task </a>
502
+
503
+
504
+
505
+ </span>
506
+
507
+
508
+
509
+
510
+
511
+
512
+
513
+
514
+
515
+ <span class="summary_desc"><div class='inline'>
516
+ <p>Updates an existing Task in Moxi Works Platform.</p>
517
+ </div></span>
518
+
519
+ </li>
520
+
521
+
522
+ </ul>
523
+
524
+ <h2>
525
+ Instance Method Summary
526
+ <small><a href="#" class="summary_toggle">collapse</a></small>
527
+ </h2>
528
+
529
+ <ul class="summary">
530
+
531
+ <li class="public ">
532
+ <span class="summary_signature">
533
+
534
+ <a href="#save-instance_method" title="#save (instance method)">#<strong>save</strong> &#x21d2; MoxiWorksPlatform:Task </a>
535
+
536
+
537
+
538
+ </span>
539
+
540
+
541
+
542
+
543
+
544
+
545
+
546
+
547
+
548
+ <span class="summary_desc"><div class='inline'>
549
+ <p>Save an instance of MoxiWorksPlatform::Task to Moxi Works Platform.</p>
550
+ </div></span>
551
+
552
+ </li>
553
+
554
+
555
+ </ul>
556
+
557
+
558
+
559
+
560
+
561
+
562
+
563
+
564
+
565
+
566
+
567
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Resource.html" title="MoxiworksPlatform::Resource (class)">Resource</a></span></h3>
568
+ <p class="inherited"><span class='object_link'><a href="Resource.html#accept_header-class_method" title="MoxiworksPlatform::Resource.accept_header (method)">accept_header</a></span>, <span class='object_link'><a href="Resource.html#attr_accessor-class_method" title="MoxiworksPlatform::Resource.attr_accessor (method)">attr_accessor</a></span>, <span class='object_link'><a href="Resource.html#attributes-class_method" title="MoxiworksPlatform::Resource.attributes (method)">attributes</a></span>, <span class='object_link'><a href="Resource.html#attributes-instance_method" title="MoxiworksPlatform::Resource#attributes (method)">#attributes</a></span>, <span class='object_link'><a href="Resource.html#auth_header-class_method" title="MoxiworksPlatform::Resource.auth_header (method)">auth_header</a></span>, <span class='object_link'><a href="Resource.html#check_for_error_in_response-class_method" title="MoxiworksPlatform::Resource.check_for_error_in_response (method)">check_for_error_in_response</a></span>, <span class='object_link'><a href="Resource.html#content_type_header-class_method" title="MoxiworksPlatform::Resource.content_type_header (method)">content_type_header</a></span>, <span class='object_link'><a href="Resource.html#float_attrs-instance_method" title="MoxiworksPlatform::Resource#float_attrs (method)">#float_attrs</a></span>, <span class='object_link'><a href="Resource.html#headers-class_method" title="MoxiworksPlatform::Resource.headers (method)">headers</a></span>, <span class='object_link'><a href="Resource.html#init_attrs_from_hash-instance_method" title="MoxiworksPlatform::Resource#init_attrs_from_hash (method)">#init_attrs_from_hash</a></span>, <span class='object_link'><a href="Resource.html#initialize-instance_method" title="MoxiworksPlatform::Resource#initialize (method)">#initialize</a></span>, <span class='object_link'><a href="Resource.html#method_missing-instance_method" title="MoxiworksPlatform::Resource#method_missing (method)">#method_missing</a></span>, <span class='object_link'><a href="Resource.html#numeric_attrs-instance_method" title="MoxiworksPlatform::Resource#numeric_attrs (method)">#numeric_attrs</a></span>, <span class='object_link'><a href="Resource.html#numeric_value_for-instance_method" title="MoxiworksPlatform::Resource#numeric_value_for (method)">#numeric_value_for</a></span>, <span class='object_link'><a href="Resource.html#to_hash-instance_method" title="MoxiworksPlatform::Resource#to_hash (method)">#to_hash</a></span>, <span class='object_link'><a href="Resource.html#underscore-class_method" title="MoxiworksPlatform::Resource.underscore (method)">underscore</a></span>, <span class='object_link'><a href="Resource.html#underscore_array-class_method" title="MoxiworksPlatform::Resource.underscore_array (method)">underscore_array</a></span>, <span class='object_link'><a href="Resource.html#underscore_attribute_names-class_method" title="MoxiworksPlatform::Resource.underscore_attribute_names (method)">underscore_attribute_names</a></span>, <span class='object_link'><a href="Resource.html#underscore_hash-class_method" title="MoxiworksPlatform::Resource.underscore_hash (method)">underscore_hash</a></span>, <span class='object_link'><a href="Resource.html#user_agent_header-class_method" title="MoxiworksPlatform::Resource.user_agent_header (method)">user_agent_header</a></span></p>
569
+ <div id="constructor_details" class="method_details_list">
570
+ <h2>Constructor Details</h2>
571
+
572
+ <p class="notice">This class inherits a constructor from <span class='object_link'><a href="Resource.html#initialize-instance_method" title="MoxiworksPlatform::Resource#initialize (method)">MoxiworksPlatform::Resource</a></span></p>
573
+
574
+ </div>
575
+ <div id="method_missing_details" class="method_details_list">
576
+ <h2>Dynamic Method Handling</h2>
577
+ <p class="notice super">
578
+ This class handles dynamic methods through the <tt>method_missing</tt> method
579
+
580
+ in the class <span class='object_link'><a href="Resource.html#method_missing-instance_method" title="MoxiworksPlatform::Resource#method_missing (method)">MoxiworksPlatform::Resource</a></span>
581
+
582
+ </p>
583
+
584
+ </div>
585
+
586
+ <div id="instance_attr_details" class="attr_details">
587
+ <h2>Instance Attribute Details</h2>
588
+
589
+
590
+ <span id="completed_at=-instance_method"></span>
591
+ <div class="method_details first">
592
+ <h3 class="signature first" id="completed_at-instance_method">
593
+
594
+ #<strong>completed_at</strong> &#x21d2; <tt>Integer|nil</tt>
595
+
596
+
597
+
598
+
599
+
600
+ </h3><div class="docstring">
601
+ <div class="discussion">
602
+
603
+ <p>the Unix timestamp representing the Date/Time this task was completed.</p>
604
+
605
+ <p>When the task is not in a &#39;completed&#39; state, this attribute will be
606
+ nil.</p>
607
+
608
+ <p>When updating the <strong>completed_at</strong> attribute, the
609
+ <strong>status</strong> attribute must be set to &#39;completed&#39;</p>
610
+
611
+
612
+ </div>
613
+ </div>
614
+ <div class="tags">
615
+
616
+ <p class="tag_title">Returns:</p>
617
+ <ul class="return">
618
+
619
+ <li>
620
+
621
+
622
+ <span class='type'>(<tt>Integer|nil</tt>)</span>
623
+
624
+
625
+
626
+ &mdash;
627
+ <div class='inline'>
628
+ <p>– Default nil</p>
629
+ </div>
630
+
631
+ </li>
632
+
633
+ </ul>
634
+
635
+ </div><table class="source_code">
636
+ <tr>
637
+ <td>
638
+ <pre class="lines">
639
+
640
+
641
+ 82</pre>
642
+ </td>
643
+ <td>
644
+ <pre class="code"><span class="info file"># File 'lib/moxiworks_platform/task.rb', line 82</span>
645
+
646
+ <span class='id identifier rubyid_attr_writer'>attr_writer</span> <span class='symbol'>:completed_at</span></pre>
647
+ </td>
648
+ </tr>
649
+ </table>
650
+ </div>
651
+
652
+
653
+ <span id="created_at=-instance_method"></span>
654
+ <div class="method_details ">
655
+ <h3 class="signature " id="created_at-instance_method">
656
+
657
+ #<strong>created_at</strong> &#x21d2; <tt>Object</tt>
658
+
659
+
660
+
661
+
662
+
663
+ </h3><div class="docstring">
664
+ <div class="discussion">
665
+
666
+ <p>the Unix timestamp representing the Date/Time this Task was created</p>
667
+
668
+
669
+ </div>
670
+ </div>
671
+ <div class="tags">
672
+
673
+
674
+ </div><table class="source_code">
675
+ <tr>
676
+ <td>
677
+ <pre class="lines">
678
+
679
+
680
+ 71</pre>
681
+ </td>
682
+ <td>
683
+ <pre class="code"><span class="info file"># File 'lib/moxiworks_platform/task.rb', line 71</span>
684
+
685
+ <span class='id identifier rubyid_attr_writer'>attr_writer</span> <span class='symbol'>:created_at</span></pre>
686
+ </td>
687
+ </tr>
688
+ </table>
689
+ </div>
690
+
691
+
692
+ <span id="description=-instance_method"></span>
693
+ <div class="method_details ">
694
+ <h3 class="signature " id="description-instance_method">
695
+
696
+ #<strong>description</strong> &#x21d2; <tt>String</tt>
697
+
698
+
699
+
700
+
701
+
702
+ </h3><div class="docstring">
703
+ <div class="discussion">
704
+
705
+ <p>a detailed description to be displayed to the agent for this Task</p>
706
+
707
+
708
+ </div>
709
+ </div>
710
+ <div class="tags">
711
+
712
+ <p class="tag_title">Returns:</p>
713
+ <ul class="return">
714
+
715
+ <li>
716
+
717
+
718
+ <span class='type'>(<tt>String</tt>)</span>
719
+
720
+
721
+
722
+ </li>
723
+
724
+ </ul>
725
+
726
+ </div><table class="source_code">
727
+ <tr>
728
+ <td>
729
+ <pre class="lines">
730
+
731
+
732
+ 35
733
+ 36
734
+ 37</pre>
735
+ </td>
736
+ <td>
737
+ <pre class="code"><span class="info file"># File 'lib/moxiworks_platform/task.rb', line 35</span>
738
+
739
+ <span class='kw'>def</span> <span class='id identifier rubyid_description'>description</span>
740
+ <span class='ivar'>@description</span>
741
+ <span class='kw'>end</span></pre>
742
+ </td>
743
+ </tr>
744
+ </table>
745
+ </div>
746
+
747
+
748
+ <span id="due_at=-instance_method"></span>
749
+ <div class="method_details ">
750
+ <h3 class="signature " id="due_at-instance_method">
751
+
752
+ #<strong>due_at</strong> &#x21d2; <tt>Integer</tt>
753
+
754
+
755
+
756
+
757
+
758
+ </h3><div class="docstring">
759
+ <div class="discussion">
760
+
761
+ <p>the Unix timestamp representing the due date of this Task</p>
762
+
763
+
764
+ </div>
765
+ </div>
766
+ <div class="tags">
767
+
768
+ <p class="tag_title">Returns:</p>
769
+ <ul class="return">
770
+
771
+ <li>
772
+
773
+
774
+ <span class='type'>(<tt>Integer</tt>)</span>
775
+
776
+
777
+
778
+ </li>
779
+
780
+ </ul>
781
+
782
+ </div><table class="source_code">
783
+ <tr>
784
+ <td>
785
+ <pre class="lines">
786
+
787
+
788
+ 41</pre>
789
+ </td>
790
+ <td>
791
+ <pre class="code"><span class="info file"># File 'lib/moxiworks_platform/task.rb', line 41</span>
792
+
793
+ <span class='id identifier rubyid_attr_writer'>attr_writer</span> <span class='symbol'>:due_at</span></pre>
794
+ </td>
795
+ </tr>
796
+ </table>
797
+ </div>
798
+
799
+
800
+ <span id="duration=-instance_method"></span>
801
+ <div class="method_details ">
802
+ <h3 class="signature " id="duration-instance_method">
803
+
804
+ #<strong>duration</strong> &#x21d2; <tt>Integer</tt>
805
+
806
+
807
+
808
+
809
+
810
+ </h3><div class="docstring">
811
+ <div class="discussion">
812
+
813
+ <p>the length (in minutes) estimated to complete this Task</p>
814
+
815
+
816
+ </div>
817
+ </div>
818
+ <div class="tags">
819
+
820
+ <p class="tag_title">Returns:</p>
821
+ <ul class="return">
822
+
823
+ <li>
824
+
825
+
826
+ <span class='type'>(<tt>Integer</tt>)</span>
827
+
828
+
829
+
830
+ </li>
831
+
832
+ </ul>
833
+
834
+ </div><table class="source_code">
835
+ <tr>
836
+ <td>
837
+ <pre class="lines">
838
+
839
+
840
+ 47</pre>
841
+ </td>
842
+ <td>
843
+ <pre class="code"><span class="info file"># File 'lib/moxiworks_platform/task.rb', line 47</span>
844
+
845
+ <span class='id identifier rubyid_attr_writer'>attr_writer</span> <span class='symbol'>:duration</span></pre>
846
+ </td>
847
+ </tr>
848
+ </table>
849
+ </div>
850
+
851
+
852
+ <span id="moxi_works_agent_id=-instance_method"></span>
853
+ <div class="method_details ">
854
+ <h3 class="signature " id="moxi_works_agent_id-instance_method">
855
+
856
+ #<strong>moxi_works_agent_id</strong> &#x21d2; <tt>String</tt>
857
+
858
+
859
+
860
+
861
+
862
+ </h3><div class="docstring">
863
+ <div class="discussion">
864
+
865
+ <p>moxi_works_agent_id is the Moxi Works Platform ID of the agent which a Task
866
+ is or is to be associated with.</p>
867
+
868
+ <p>this must be set for any Moxi Works Platform transaction</p>
869
+
870
+
871
+ </div>
872
+ </div>
873
+ <div class="tags">
874
+
875
+ <p class="tag_title">Returns:</p>
876
+ <ul class="return">
877
+
878
+ <li>
879
+
880
+
881
+ <span class='type'>(<tt>String</tt>)</span>
882
+
883
+
884
+
885
+ &mdash;
886
+ <div class='inline'>
887
+ <p>the Moxi Works Platform ID of the agent</p>
888
+ </div>
889
+
890
+ </li>
891
+
892
+ </ul>
893
+
894
+ </div><table class="source_code">
895
+ <tr>
896
+ <td>
897
+ <pre class="lines">
898
+
899
+
900
+ 10
901
+ 11
902
+ 12</pre>
903
+ </td>
904
+ <td>
905
+ <pre class="code"><span class="info file"># File 'lib/moxiworks_platform/task.rb', line 10</span>
906
+
907
+ <span class='kw'>def</span> <span class='id identifier rubyid_moxi_works_agent_id'>moxi_works_agent_id</span>
908
+ <span class='ivar'>@moxi_works_agent_id</span>
909
+ <span class='kw'>end</span></pre>
910
+ </td>
911
+ </tr>
912
+ </table>
913
+ </div>
914
+
915
+
916
+ <span id="name=-instance_method"></span>
917
+ <div class="method_details ">
918
+ <h3 class="signature " id="name-instance_method">
919
+
920
+ #<strong>name</strong> &#x21d2; <tt>String</tt>
921
+
922
+
923
+
924
+
925
+
926
+ </h3><div class="docstring">
927
+ <div class="discussion">
928
+
929
+ <p>the title to be displayed to the agent for this Task</p>
930
+
931
+
932
+ </div>
933
+ </div>
934
+ <div class="tags">
935
+
936
+ <p class="tag_title">Returns:</p>
937
+ <ul class="return">
938
+
939
+ <li>
940
+
941
+
942
+ <span class='type'>(<tt>String</tt>)</span>
943
+
944
+
945
+
946
+ </li>
947
+
948
+ </ul>
949
+
950
+ </div><table class="source_code">
951
+ <tr>
952
+ <td>
953
+ <pre class="lines">
954
+
955
+
956
+ 29
957
+ 30
958
+ 31</pre>
959
+ </td>
960
+ <td>
961
+ <pre class="code"><span class="info file"># File 'lib/moxiworks_platform/task.rb', line 29</span>
962
+
963
+ <span class='kw'>def</span> <span class='id identifier rubyid_name'>name</span>
964
+ <span class='ivar'>@name</span>
965
+ <span class='kw'>end</span></pre>
966
+ </td>
967
+ </tr>
968
+ </table>
969
+ </div>
970
+
971
+
972
+ <span id="partner_contact_id=-instance_method"></span>
973
+ <div class="method_details ">
974
+ <h3 class="signature " id="partner_contact_id-instance_method">
975
+
976
+ #<strong>partner_contact_id</strong> &#x21d2; <tt>String</tt>
977
+
978
+
979
+
980
+
981
+
982
+ </h3><div class="docstring">
983
+ <div class="discussion">
984
+
985
+ <p>*your system&#39;s* unique ID for the Contact</p>
986
+
987
+ <p>this must be set for any Moxi Works Platform transaction</p>
988
+
989
+
990
+ </div>
991
+ </div>
992
+ <div class="tags">
993
+
994
+ <p class="tag_title">Returns:</p>
995
+ <ul class="return">
996
+
997
+ <li>
998
+
999
+
1000
+ <span class='type'>(<tt>String</tt>)</span>
1001
+
1002
+
1003
+
1004
+ &mdash;
1005
+ <div class='inline'>
1006
+ <p>your system&#39;s unique ID for the contact</p>
1007
+ </div>
1008
+
1009
+ </li>
1010
+
1011
+ </ul>
1012
+
1013
+ </div><table class="source_code">
1014
+ <tr>
1015
+ <td>
1016
+ <pre class="lines">
1017
+
1018
+
1019
+ 18
1020
+ 19
1021
+ 20</pre>
1022
+ </td>
1023
+ <td>
1024
+ <pre class="code"><span class="info file"># File 'lib/moxiworks_platform/task.rb', line 18</span>
1025
+
1026
+ <span class='kw'>def</span> <span class='id identifier rubyid_partner_contact_id'>partner_contact_id</span>
1027
+ <span class='ivar'>@partner_contact_id</span>
1028
+ <span class='kw'>end</span></pre>
1029
+ </td>
1030
+ </tr>
1031
+ </table>
1032
+ </div>
1033
+
1034
+
1035
+ <span id="partner_task_id=-instance_method"></span>
1036
+ <div class="method_details ">
1037
+ <h3 class="signature " id="partner_task_id-instance_method">
1038
+
1039
+ #<strong>partner_task_id</strong> &#x21d2; <tt>String</tt>
1040
+
1041
+
1042
+
1043
+
1044
+
1045
+ </h3><div class="docstring">
1046
+ <div class="discussion">
1047
+
1048
+ <p>Returns your system&#39;s unique identifier for the Task</p>
1049
+
1050
+
1051
+ </div>
1052
+ </div>
1053
+ <div class="tags">
1054
+
1055
+ <p class="tag_title">Returns:</p>
1056
+ <ul class="return">
1057
+
1058
+ <li>
1059
+
1060
+
1061
+ <span class='type'>(<tt>String</tt>)</span>
1062
+
1063
+
1064
+
1065
+ &mdash;
1066
+ <div class='inline'>
1067
+ <p>your system&#39;s unique identifier for the Task</p>
1068
+ </div>
1069
+
1070
+ </li>
1071
+
1072
+ </ul>
1073
+
1074
+ </div><table class="source_code">
1075
+ <tr>
1076
+ <td>
1077
+ <pre class="lines">
1078
+
1079
+
1080
+ 23
1081
+ 24
1082
+ 25</pre>
1083
+ </td>
1084
+ <td>
1085
+ <pre class="code"><span class="info file"># File 'lib/moxiworks_platform/task.rb', line 23</span>
1086
+
1087
+ <span class='kw'>def</span> <span class='id identifier rubyid_partner_task_id'>partner_task_id</span>
1088
+ <span class='ivar'>@partner_task_id</span>
1089
+ <span class='kw'>end</span></pre>
1090
+ </td>
1091
+ </tr>
1092
+ </table>
1093
+ </div>
1094
+
1095
+
1096
+ <span id="status=-instance_method"></span>
1097
+ <div class="method_details ">
1098
+ <h3 class="signature " id="status-instance_method">
1099
+
1100
+ #<strong>status</strong> &#x21d2; <tt>String</tt>, <tt>enumerated</tt>
1101
+
1102
+
1103
+
1104
+
1105
+
1106
+ </h3><div class="docstring">
1107
+ <div class="discussion">
1108
+
1109
+ <p>an enumerated string representing the state of this Task</p>
1110
+
1111
+ <p>allowed values:</p>
1112
+
1113
+ <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_active'>active</span>
1114
+ <span class='id identifier rubyid_completed'>completed</span>
1115
+ <span class='lbracket'>[</span><span class='kw'>nil</span><span class='rbracket'>]</span>
1116
+ </code></pre>
1117
+
1118
+ <p>When creating a new task, the assumed state is &#39;active;&#39; this
1119
+ attribute does not need to be populated when creating or updating a Task
1120
+ unless the status is &#39;completed.&#39;</p>
1121
+
1122
+
1123
+ </div>
1124
+ </div>
1125
+ <div class="tags">
1126
+
1127
+ <p class="tag_title">Returns:</p>
1128
+ <ul class="return">
1129
+
1130
+ <li>
1131
+
1132
+
1133
+ <span class='type'>(<tt>String</tt>, <tt>enumerated</tt>)</span>
1134
+
1135
+
1136
+
1137
+ &mdash;
1138
+ <div class='inline'>
1139
+ <p>– Default: &#39;active&#39;</p>
1140
+ </div>
1141
+
1142
+ </li>
1143
+
1144
+ </ul>
1145
+
1146
+ </div><table class="source_code">
1147
+ <tr>
1148
+ <td>
1149
+ <pre class="lines">
1150
+
1151
+
1152
+ 63
1153
+ 64
1154
+ 65</pre>
1155
+ </td>
1156
+ <td>
1157
+ <pre class="code"><span class="info file"># File 'lib/moxiworks_platform/task.rb', line 63</span>
1158
+
1159
+ <span class='kw'>def</span> <span class='id identifier rubyid_status'>status</span>
1160
+ <span class='ivar'>@status</span>
1161
+ <span class='kw'>end</span></pre>
1162
+ </td>
1163
+ </tr>
1164
+ </table>
1165
+ </div>
1166
+
1167
+ </div>
1168
+
1169
+
1170
+ <div id="class_method_details" class="method_details_list">
1171
+ <h2>Class Method Details</h2>
1172
+
1173
+
1174
+ <div class="method_details first">
1175
+ <h3 class="signature first" id="create-class_method">
1176
+
1177
+ .<strong>create</strong>(opts = {}) &#x21d2; <tt><span class='object_link'><a href="" title="MoxiworksPlatform::Task (class)">MoxiworksPlatform::Task</a></span></tt>
1178
+
1179
+
1180
+
1181
+
1182
+
1183
+ </h3><div class="docstring">
1184
+ <div class="discussion">
1185
+
1186
+ <p>Creates a new Task in Moxi Works Platform</p>
1187
+
1188
+
1189
+ </div>
1190
+ </div>
1191
+ <div class="tags">
1192
+
1193
+ <div class="examples">
1194
+ <p class="tag_title">Examples:</p>
1195
+
1196
+
1197
+ <pre class="example code"><code><span class='const'>MoxiworksPlatform</span><span class='op'>::</span><span class='const'>Task</span><span class='period'>.</span><span class='id identifier rubyid_create'>create</span><span class='lparen'>(</span>
1198
+ <span class='label'>moxi_works_agent_id:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>123abc</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
1199
+ <span class='label'>partner_contact_id:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>1234</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
1200
+ <span class='label'>partner_task_id:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>mySystemsUniqueTaskID</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
1201
+ <span class='label'>name:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>pick up client keys</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
1202
+ <span class='label'>description:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>pick up client keys from1234 there ave</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
1203
+ <span class='label'>due_at:</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span> <span class='op'>+</span> <span class='int'>86400</span><span class='comma'>,</span>
1204
+ <span class='label'>duration:</span> <span class='int'>30</span>
1205
+ <span class='rparen'>)</span></code></pre>
1206
+
1207
+ </div>
1208
+ <p class="tag_title">Parameters:</p>
1209
+ <ul class="param">
1210
+
1211
+ <li>
1212
+
1213
+ <span class='name'>opts</span>
1214
+
1215
+
1216
+ <span class='type'>(<tt>Hash</tt>)</span>
1217
+
1218
+
1219
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
1220
+
1221
+
1222
+ &mdash;
1223
+ <div class='inline'>
1224
+ <p>named parameter Hash</p>
1225
+ </div>
1226
+
1227
+ </li>
1228
+
1229
+ </ul>
1230
+
1231
+
1232
+
1233
+
1234
+ <p class="tag_title">Options Hash (<tt>opts</tt>):</p>
1235
+ <ul class="option">
1236
+
1237
+ <li>
1238
+ <span class="name">:moxi_works_agent_id</span>
1239
+ <span class="type">(<tt>String</tt>)</span>
1240
+ <span class="default">
1241
+
1242
+ </span>
1243
+
1244
+ &mdash; <div class='inline'>
1245
+ <p><strong>REQUIRED</strong> The Moxi Works Agent ID for the agent to which
1246
+ this task is to be associated</p>
1247
+ </div>
1248
+
1249
+ </li>
1250
+
1251
+ <li>
1252
+ <span class="name">:partner_task_id</span>
1253
+ <span class="type">(<tt>String</tt>)</span>
1254
+ <span class="default">
1255
+
1256
+ </span>
1257
+
1258
+ &mdash; <div class='inline'>
1259
+ <p><strong>REQUIRED</strong> Your system&#39;s unique ID for this task.</p>
1260
+ </div>
1261
+
1262
+ </li>
1263
+
1264
+ <li>
1265
+ <span class="name">:partner_contact_id</span>
1266
+ <span class="type">(<tt>String</tt>)</span>
1267
+ <span class="default">
1268
+
1269
+ </span>
1270
+
1271
+ &mdash; <div class='inline'>
1272
+ <p><strong>REQUIRED</strong> Your system&#39;s unique ID for the Contact for
1273
+ whom this Task is to be associated.</p>
1274
+ </div>
1275
+
1276
+ </li>
1277
+
1278
+ <li>
1279
+ <span class="name">:due_at</span>
1280
+ <span class="type">(<tt>Integer</tt>)</span>
1281
+ <span class="default">
1282
+
1283
+ </span>
1284
+
1285
+ &mdash; <div class='inline'>
1286
+ <p><strong>REQUIRED</strong> Unix timestamp representing the due date</p>
1287
+
1288
+ <p>optional Task parameters</p>
1289
+ </div>
1290
+
1291
+ </li>
1292
+
1293
+ <li>
1294
+ <span class="name">:name</span>
1295
+ <span class="type">(<tt>String</tt>)</span>
1296
+ <span class="default">
1297
+
1298
+ </span>
1299
+
1300
+ &mdash; <div class='inline'>
1301
+ <p>short description of the task</p>
1302
+ </div>
1303
+
1304
+ </li>
1305
+
1306
+ <li>
1307
+ <span class="name">:description</span>
1308
+ <span class="type">(<tt>String</tt>)</span>
1309
+ <span class="default">
1310
+
1311
+ </span>
1312
+
1313
+ &mdash; <div class='inline'>
1314
+ <p>longer description of the task</p>
1315
+ </div>
1316
+
1317
+ </li>
1318
+
1319
+ <li>
1320
+ <span class="name">:duration</span>
1321
+ <span class="type">(<tt>Integer</tt>)</span>
1322
+ <span class="default">
1323
+
1324
+ </span>
1325
+
1326
+ &mdash; <div class='inline'>
1327
+ <p>Length of time in minutes that the task should take</p>
1328
+ </div>
1329
+
1330
+ </li>
1331
+
1332
+ </ul>
1333
+
1334
+
1335
+ <p class="tag_title">Returns:</p>
1336
+ <ul class="return">
1337
+
1338
+ <li>
1339
+
1340
+
1341
+ <span class='type'>(<tt><span class='object_link'><a href="" title="MoxiworksPlatform::Task (class)">MoxiworksPlatform::Task</a></span></tt>)</span>
1342
+
1343
+
1344
+
1345
+ </li>
1346
+
1347
+ </ul>
1348
+ <p class="tag_title">Raises:</p>
1349
+ <ul class="raise">
1350
+
1351
+ <li>
1352
+
1353
+
1354
+ <span class='type'></span>
1355
+
1356
+
1357
+
1358
+
1359
+ <div class='inline'>
1360
+ <p>::MoxiworksPlatform::Exception::ArgumentError if required named parameters
1361
+ aren&#39;t included</p>
1362
+ </div>
1363
+
1364
+ </li>
1365
+
1366
+ </ul>
1367
+
1368
+ </div><table class="source_code">
1369
+ <tr>
1370
+ <td>
1371
+ <pre class="lines">
1372
+
1373
+
1374
+ 113
1375
+ 114
1376
+ 115
1377
+ 116
1378
+ 117
1379
+ 118
1380
+ 119
1381
+ 120</pre>
1382
+ </td>
1383
+ <td>
1384
+ <pre class="code"><span class="info file"># File 'lib/moxiworks_platform/task.rb', line 113</span>
1385
+
1386
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_create'>create</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
1387
+ <span class='id identifier rubyid_required_opts'>required_opts</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='symbol'>:moxi_works_agent_id</span><span class='comma'>,</span> <span class='symbol'>:partner_task_id</span><span class='comma'>,</span> <span class='symbol'>:partner_contact_id</span><span class='rbracket'>]</span>
1388
+ <span class='id identifier rubyid_required_opts'>required_opts</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_opt'>opt</span><span class='op'>|</span>
1389
+ <span class='id identifier rubyid_raise'>raise</span> <span class='op'>::</span><span class='const'>MoxiworksPlatform</span><span class='op'>::</span><span class='const'>Exception</span><span class='op'>::</span><span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_opt'>opt</span><span class='embexpr_end'>}</span><span class='tstring_content'> required</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>if</span>
1390
+ <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='id identifier rubyid_opt'>opt</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='kw'>or</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='id identifier rubyid_opt'>opt</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
1391
+ <span class='kw'>end</span>
1392
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_send_request'>send_request</span><span class='lparen'>(</span><span class='symbol'>:post</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span>
1393
+ <span class='kw'>end</span></pre>
1394
+ </td>
1395
+ </tr>
1396
+ </table>
1397
+ </div>
1398
+
1399
+ <div class="method_details ">
1400
+ <h3 class="signature " id="find-class_method">
1401
+
1402
+ .<strong>find</strong>(opts = {}) &#x21d2; <tt><span class='object_link'><a href="" title="MoxiworksPlatform::Task (class)">MoxiworksPlatform::Task</a></span></tt>
1403
+
1404
+
1405
+
1406
+
1407
+
1408
+ </h3><div class="docstring">
1409
+ <div class="discussion">
1410
+
1411
+ <p>Find an Task your system has previously created in Moxi Works Platform</p>
1412
+
1413
+
1414
+ </div>
1415
+ </div>
1416
+ <div class="tags">
1417
+ <p class="tag_title">Parameters:</p>
1418
+ <ul class="param">
1419
+
1420
+ <li>
1421
+
1422
+ <span class='name'>opts</span>
1423
+
1424
+
1425
+ <span class='type'>(<tt>Hash</tt>)</span>
1426
+
1427
+
1428
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
1429
+
1430
+
1431
+ &mdash;
1432
+ <div class='inline'>
1433
+ <p>named parameter Hash</p>
1434
+ </div>
1435
+
1436
+ </li>
1437
+
1438
+ </ul>
1439
+
1440
+
1441
+
1442
+
1443
+ <p class="tag_title">Options Hash (<tt>opts</tt>):</p>
1444
+ <ul class="option">
1445
+
1446
+ <li>
1447
+ <span class="name">:moxi_works_agent_id</span>
1448
+ <span class="type">(<tt>String</tt>)</span>
1449
+ <span class="default">
1450
+
1451
+ </span>
1452
+
1453
+ &mdash; <div class='inline'>
1454
+ <p><strong>REQUIRED</strong> The Moxi Works Agent ID for the agent to which
1455
+ this task is associated</p>
1456
+ </div>
1457
+
1458
+ </li>
1459
+
1460
+ <li>
1461
+ <span class="name">:partner_task_id</span>
1462
+ <span class="type">(<tt>String</tt>)</span>
1463
+ <span class="default">
1464
+
1465
+ </span>
1466
+
1467
+ &mdash; <div class='inline'>
1468
+ <p><strong>REQUIRED</strong> Your system&#39;s unique ID for this task.</p>
1469
+ </div>
1470
+
1471
+ </li>
1472
+
1473
+ </ul>
1474
+
1475
+
1476
+ <p class="tag_title">Returns:</p>
1477
+ <ul class="return">
1478
+
1479
+ <li>
1480
+
1481
+
1482
+ <span class='type'>(<tt><span class='object_link'><a href="" title="MoxiworksPlatform::Task (class)">MoxiworksPlatform::Task</a></span></tt>)</span>
1483
+
1484
+
1485
+
1486
+ </li>
1487
+
1488
+ </ul>
1489
+ <p class="tag_title">Raises:</p>
1490
+ <ul class="raise">
1491
+
1492
+ <li>
1493
+
1494
+
1495
+ <span class='type'></span>
1496
+
1497
+
1498
+
1499
+
1500
+ <div class='inline'>
1501
+ <p>::MoxiworksPlatform::Exception::ArgumentError if required named parameters
1502
+ aren&#39;t included</p>
1503
+ </div>
1504
+
1505
+ </li>
1506
+
1507
+ </ul>
1508
+
1509
+ </div><table class="source_code">
1510
+ <tr>
1511
+ <td>
1512
+ <pre class="lines">
1513
+
1514
+
1515
+ 132
1516
+ 133
1517
+ 134
1518
+ 135
1519
+ 136
1520
+ 137
1521
+ 138
1522
+ 139
1523
+ 140</pre>
1524
+ </td>
1525
+ <td>
1526
+ <pre class="code"><span class="info file"># File 'lib/moxiworks_platform/task.rb', line 132</span>
1527
+
1528
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_find'>find</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
1529
+ <span class='id identifier rubyid_required_opts'>required_opts</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='symbol'>:moxi_works_agent_id</span><span class='comma'>,</span> <span class='symbol'>:partner_task_id</span><span class='rbracket'>]</span>
1530
+ <span class='id identifier rubyid_required_opts'>required_opts</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_opt'>opt</span><span class='op'>|</span>
1531
+ <span class='id identifier rubyid_raise'>raise</span> <span class='op'>::</span><span class='const'>MoxiworksPlatform</span><span class='op'>::</span><span class='const'>Exception</span><span class='op'>::</span><span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_opt'>opt</span><span class='embexpr_end'>}</span><span class='tstring_content'> required</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>if</span>
1532
+ <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='id identifier rubyid_opt'>opt</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='kw'>or</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='id identifier rubyid_opt'>opt</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
1533
+ <span class='kw'>end</span>
1534
+ <span class='id identifier rubyid_url'>url</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'>MoxiworksPlatform</span><span class='op'>::</span><span class='const'>Config</span><span class='period'>.</span><span class='id identifier rubyid_url'>url</span><span class='embexpr_end'>}</span><span class='tstring_content'>/api/tasks/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:partner_task_id</span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
1535
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_send_request'>send_request</span><span class='lparen'>(</span><span class='symbol'>:get</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='comma'>,</span> <span class='id identifier rubyid_url'>url</span><span class='rparen'>)</span>
1536
+ <span class='kw'>end</span></pre>
1537
+ </td>
1538
+ </tr>
1539
+ </table>
1540
+ </div>
1541
+
1542
+ <div class="method_details ">
1543
+ <h3 class="signature " id="search-class_method">
1544
+
1545
+ .<strong>search</strong>(opts = {}) &#x21d2; <tt>Hash</tt>
1546
+
1547
+
1548
+
1549
+
1550
+
1551
+ </h3><div class="docstring">
1552
+ <div class="discussion">
1553
+
1554
+ <p>Search Agent&#39;s Tasks in Moxi Works Platform</p>
1555
+
1556
+
1557
+ </div>
1558
+ </div>
1559
+ <div class="tags">
1560
+
1561
+ <div class="examples">
1562
+ <p class="tag_title">Examples:</p>
1563
+
1564
+
1565
+ <pre class="example code"><code><span class='id identifier rubyid_results'>results</span> <span class='op'>=</span> <span class='const'>MoxiworksPlatform</span><span class='op'>::</span><span class='const'>Task</span><span class='period'>.</span><span class='id identifier rubyid_search'>search</span><span class='lparen'>(</span>
1566
+ <span class='label'>moxi_works_agent_id:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>123abc</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
1567
+ <span class='label'>due_date_start:</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span> <span class='op'>-</span> <span class='int'>1296000</span><span class='comma'>,</span>
1568
+ <span class='label'>due_date_end:</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span><span class='comma'>,</span>
1569
+ <span class='label'>page_number:</span> <span class='int'>2</span>
1570
+ <span class='rparen'>)</span></code></pre>
1571
+
1572
+ </div>
1573
+ <p class="tag_title">Parameters:</p>
1574
+ <ul class="param">
1575
+
1576
+ <li>
1577
+
1578
+ <span class='name'>opts</span>
1579
+
1580
+
1581
+ <span class='type'>(<tt>Hash</tt>)</span>
1582
+
1583
+
1584
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
1585
+
1586
+
1587
+ &mdash;
1588
+ <div class='inline'>
1589
+ <p>named parameter Hash</p>
1590
+ </div>
1591
+
1592
+ </li>
1593
+
1594
+ </ul>
1595
+
1596
+
1597
+
1598
+
1599
+ <p class="tag_title">Options Hash (<tt>opts</tt>):</p>
1600
+ <ul class="option">
1601
+
1602
+ <li>
1603
+ <span class="name">:moxi_works_agent_id</span>
1604
+ <span class="type">(<tt>String</tt>)</span>
1605
+ <span class="default">
1606
+
1607
+ </span>
1608
+
1609
+ &mdash; <div class='inline'>
1610
+ <p><strong>REQUIRED</strong> The Moxi Works Agent ID for the agent to which
1611
+ this contact is associated</p>
1612
+ </div>
1613
+
1614
+ </li>
1615
+
1616
+ <li>
1617
+ <span class="name">:due_date_start</span>
1618
+ <span class="type">(<tt>Integer</tt>)</span>
1619
+ <span class="default">
1620
+
1621
+ </span>
1622
+
1623
+ &mdash; <div class='inline'>
1624
+ <p><strong>REQUIRED</strong> Tasks due after specified date</p>
1625
+ </div>
1626
+
1627
+ </li>
1628
+
1629
+ <li>
1630
+ <span class="name">:partner_contact_id</span>
1631
+ <span class="type">(<tt>String</tt>)</span>
1632
+ <span class="default">
1633
+
1634
+ </span>
1635
+
1636
+ &mdash; <div class='inline'>
1637
+ <p>The partner&#39;s ID for the contact whose tasks they are looking for</p>
1638
+ </div>
1639
+
1640
+ </li>
1641
+
1642
+ <li>
1643
+ <span class="name">:page_number</span>
1644
+ <span class="type">(<tt>Integer</tt>)</span>
1645
+ <span class="default">
1646
+
1647
+ </span>
1648
+
1649
+ &mdash; <div class='inline'>
1650
+ <p>the page of results to return</p>
1651
+ </div>
1652
+
1653
+ </li>
1654
+
1655
+ </ul>
1656
+
1657
+
1658
+ <p class="tag_title">Returns:</p>
1659
+ <ul class="return">
1660
+
1661
+ <li>
1662
+
1663
+
1664
+ <span class='type'>(<tt>Hash</tt>)</span>
1665
+
1666
+
1667
+
1668
+ &mdash;
1669
+ <div class='inline'>
1670
+ <p>with the format:
1671
+ <pre class="code ruby"><code class="ruby">page_number: [Integer],
1672
+ total_pages: [Integer],
1673
+ tasks: [Array] containing MoxiworkPlatform::Task objects</code></pre>
1674
+
1675
+ <p></p>
1676
+ </div>
1677
+
1678
+ </li>
1679
+
1680
+ </ul>
1681
+ <p class="tag_title">Raises:</p>
1682
+ <ul class="raise">
1683
+
1684
+ <li>
1685
+
1686
+
1687
+ <span class='type'></span>
1688
+
1689
+
1690
+
1691
+
1692
+ <div class='inline'>
1693
+ <p>::MoxiworksPlatform::Exception::ArgumentError if required named parameters
1694
+ aren&#39;t included</p>
1695
+ </div>
1696
+
1697
+ </li>
1698
+
1699
+ </ul>
1700
+
1701
+ </div><table class="source_code">
1702
+ <tr>
1703
+ <td>
1704
+ <pre class="lines">
1705
+
1706
+
1707
+ 174
1708
+ 175
1709
+ 176
1710
+ 177
1711
+ 178
1712
+ 179
1713
+ 180
1714
+ 181
1715
+ 182
1716
+ 183
1717
+ 184
1718
+ 185
1719
+ 186
1720
+ 187
1721
+ 188
1722
+ 189
1723
+ 190
1724
+ 191
1725
+ 192
1726
+ 193
1727
+ 194
1728
+ 195
1729
+ 196
1730
+ 197
1731
+ 198</pre>
1732
+ </td>
1733
+ <td>
1734
+ <pre class="code"><span class="info file"># File 'lib/moxiworks_platform/task.rb', line 174</span>
1735
+
1736
+ <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_opts'>opts</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
1737
+ <span class='id identifier rubyid_raise'>raise</span> <span class='op'>::</span><span class='const'>MoxiworksPlatform</span><span class='op'>::</span><span class='const'>Exception</span><span class='op'>::</span><span class='const'>ArgumentError</span><span class='comma'>,</span>
1738
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>arguments must be passed as named parameters</span><span class='tstring_end'>&#39;</span></span> <span class='kw'>unless</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Hash</span>
1739
+ <span class='id identifier rubyid_url'>url</span> <span class='op'>||=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'>MoxiworksPlatform</span><span class='op'>::</span><span class='const'>Config</span><span class='period'>.</span><span class='id identifier rubyid_url'>url</span><span class='embexpr_end'>}</span><span class='tstring_content'>/api/tasks</span><span class='tstring_end'>&quot;</span></span>
1740
+ <span class='id identifier rubyid_required_opts'>required_opts</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='symbol'>:moxi_works_agent_id</span><span class='comma'>,</span> <span class='symbol'>:due_date_start</span><span class='comma'>,</span> <span class='symbol'>:due_date_end</span><span class='rbracket'>]</span>
1741
+ <span class='id identifier rubyid_required_opts'>required_opts</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_opt'>opt</span><span class='op'>|</span>
1742
+ <span class='id identifier rubyid_raise'>raise</span> <span class='op'>::</span><span class='const'>MoxiworksPlatform</span><span class='op'>::</span><span class='const'>Exception</span><span class='op'>::</span><span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_opt'>opt</span><span class='embexpr_end'>}</span><span class='tstring_content'> required</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>if</span>
1743
+ <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='id identifier rubyid_opt'>opt</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='kw'>or</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='id identifier rubyid_opt'>opt</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
1744
+ <span class='kw'>end</span>
1745
+ <span class='id identifier rubyid_results'>results</span> <span class='op'>=</span> <span class='const'>MoxiResponseArray</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='rparen'>)</span>
1746
+ <span class='id identifier rubyid_json'>json</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>page_number</span><span class='label_end'>&#39;:</span> <span class='int'>1</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>total_pages</span><span class='label_end'>&#39;:</span> <span class='int'>0</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>tasks</span><span class='label_end'>&#39;:</span><span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rbrace'>}</span>
1747
+ <span class='const'>RestClient</span><span class='op'>::</span><span class='const'>Request</span><span class='period'>.</span><span class='id identifier rubyid_execute'>execute</span><span class='lparen'>(</span><span class='label'>method:</span> <span class='symbol'>:get</span><span class='comma'>,</span>
1748
+ <span class='label'>url:</span> <span class='id identifier rubyid_url'>url</span><span class='comma'>,</span>
1749
+ <span class='label'>payload:</span> <span class='id identifier rubyid_opts'>opts</span><span class='comma'>,</span> <span class='label'>headers:</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_headers'>headers</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_response'>response</span><span class='op'>|</span>
1750
+ <span class='id identifier rubyid_puts'>puts</span> <span class='id identifier rubyid_response'>response</span> <span class='kw'>if</span> <span class='const'>MoxiworksPlatform</span><span class='op'>::</span><span class='const'>Config</span><span class='period'>.</span><span class='id identifier rubyid_debug'>debug</span>
1751
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_check_for_error_in_response'>check_for_error_in_response</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='rparen'>)</span>
1752
+ <span class='id identifier rubyid_results'>results</span><span class='period'>.</span><span class='id identifier rubyid_headers'>headers</span> <span class='op'>=</span> <span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_headers'>headers</span>
1753
+ <span class='id identifier rubyid_json'>json</span> <span class='op'>=</span> <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='rparen'>)</span>
1754
+ <span class='id identifier rubyid_json'>json</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>tasks</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_r'>r</span><span class='op'>|</span>
1755
+ <span class='id identifier rubyid_results'>results</span> <span class='op'>&lt;&lt;</span> <span class='const'>MoxiworksPlatform</span><span class='op'>::</span><span class='const'>Task</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_r'>r</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='kw'>or</span> <span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
1756
+ <span class='kw'>end</span>
1757
+ <span class='id identifier rubyid_json'>json</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>tasks</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_results'>results</span>
1758
+ <span class='kw'>end</span>
1759
+ <span class='id identifier rubyid_json'>json</span>
1760
+ <span class='kw'>end</span></pre>
1761
+ </td>
1762
+ </tr>
1763
+ </table>
1764
+ </div>
1765
+
1766
+ <div class="method_details ">
1767
+ <h3 class="signature " id="send_request-class_method">
1768
+
1769
+ .<strong>send_request</strong>(method, opts = {}, url = nil) &#x21d2; <tt><span class='object_link'><a href="" title="MoxiworksPlatform::Task (class)">MoxiworksPlatform::Task</a></span></tt>
1770
+
1771
+
1772
+
1773
+
1774
+
1775
+ </h3><div class="docstring">
1776
+ <div class="discussion">
1777
+
1778
+ <p>Send our remote request to the Moxi Works Platform</p>
1779
+
1780
+
1781
+ </div>
1782
+ </div>
1783
+ <div class="tags">
1784
+ <p class="tag_title">Parameters:</p>
1785
+ <ul class="param">
1786
+
1787
+ <li>
1788
+
1789
+ <span class='name'>opts</span>
1790
+
1791
+
1792
+ <span class='type'>(<tt>Hash</tt>)</span>
1793
+
1794
+
1795
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
1796
+
1797
+
1798
+ &mdash;
1799
+ <div class='inline'>
1800
+ <p>named parameter Hash</p>
1801
+ </div>
1802
+
1803
+ </li>
1804
+
1805
+ </ul>
1806
+
1807
+
1808
+
1809
+
1810
+
1811
+
1812
+ <p class="tag_title">Options Hash (<tt>opts</tt>):</p>
1813
+ <ul class="option">
1814
+
1815
+ <li>
1816
+ <span class="name">:moxi_works_agent_id</span>
1817
+ <span class="type">(<tt>String</tt>)</span>
1818
+ <span class="default">
1819
+
1820
+ </span>
1821
+
1822
+ &mdash; <div class='inline'>
1823
+ <p><strong>REQUIRED</strong> The Moxi Works Agent ID for the agent to which
1824
+ this task is to be associated</p>
1825
+ </div>
1826
+
1827
+ </li>
1828
+
1829
+ <li>
1830
+ <span class="name">:partner_task_id</span>
1831
+ <span class="type">(<tt>String</tt>)</span>
1832
+ <span class="default">
1833
+
1834
+ </span>
1835
+
1836
+ &mdash; <div class='inline'>
1837
+ <p><strong>REQUIRED</strong> Your system&#39;s unique ID for this task.</p>
1838
+ </div>
1839
+
1840
+ </li>
1841
+
1842
+ <li>
1843
+ <span class="name">:partner_contact_id</span>
1844
+ <span class="type">(<tt>String</tt>)</span>
1845
+ <span class="default">
1846
+
1847
+ </span>
1848
+
1849
+ &mdash; <div class='inline'>
1850
+ <p><strong>REQUIRED</strong> Your system&#39;s unique ID for the Contact for
1851
+ whom this Task is to be associated.</p>
1852
+
1853
+ <p>optional Task parameters</p>
1854
+ </div>
1855
+
1856
+ </li>
1857
+
1858
+ <li>
1859
+ <span class="name">:name</span>
1860
+ <span class="type">(<tt>String</tt>)</span>
1861
+ <span class="default">
1862
+
1863
+ </span>
1864
+
1865
+ &mdash; <div class='inline'>
1866
+ <p>short description of the task</p>
1867
+ </div>
1868
+
1869
+ </li>
1870
+
1871
+ <li>
1872
+ <span class="name">:description</span>
1873
+ <span class="type">(<tt>String</tt>)</span>
1874
+ <span class="default">
1875
+
1876
+ </span>
1877
+
1878
+ &mdash; <div class='inline'>
1879
+ <p>longer description of the task</p>
1880
+ </div>
1881
+
1882
+ </li>
1883
+
1884
+ <li>
1885
+ <span class="name">:due_at</span>
1886
+ <span class="type">(<tt>Integer</tt>)</span>
1887
+ <span class="default">
1888
+
1889
+ </span>
1890
+
1891
+ &mdash; <div class='inline'>
1892
+ <p>Unix timestamp representing the due date</p>
1893
+ </div>
1894
+
1895
+ </li>
1896
+
1897
+ <li>
1898
+ <span class="name">:duration</span>
1899
+ <span class="type">(<tt>Integer</tt>)</span>
1900
+ <span class="default">
1901
+
1902
+ </span>
1903
+
1904
+ &mdash; <div class='inline'>
1905
+ <p>Length of time in minutes that the task should take</p>
1906
+ </div>
1907
+
1908
+ </li>
1909
+
1910
+ <li>
1911
+ <span class="name">:completed_at</span>
1912
+ <span class="type">(<tt>Integer</tt>)</span>
1913
+ <span class="default">
1914
+
1915
+ </span>
1916
+
1917
+ &mdash; <div class='inline'>
1918
+ <p>Unix timestamp representing the date the task was completed</p>
1919
+ </div>
1920
+
1921
+ </li>
1922
+
1923
+ <li>
1924
+ <span class="name">:status</span>
1925
+ <span class="type">(<tt>String</tt>)</span>
1926
+ <span class="default">
1927
+
1928
+ </span>
1929
+
1930
+ &mdash; <div class='inline'>
1931
+ <p>enumerated string representing task status</p>
1932
+ </div>
1933
+
1934
+ </li>
1935
+
1936
+ </ul>
1937
+
1938
+
1939
+
1940
+
1941
+ <p class="tag_title">Returns:</p>
1942
+ <ul class="return">
1943
+
1944
+ <li>
1945
+
1946
+
1947
+ <span class='type'>(<tt><span class='object_link'><a href="" title="MoxiworksPlatform::Task (class)">MoxiworksPlatform::Task</a></span></tt>)</span>
1948
+
1949
+
1950
+
1951
+ </li>
1952
+
1953
+ </ul>
1954
+ <p class="tag_title">Raises:</p>
1955
+ <ul class="raise">
1956
+
1957
+ <li>
1958
+
1959
+
1960
+ <span class='type'></span>
1961
+
1962
+
1963
+
1964
+
1965
+ <div class='inline'>
1966
+ <p>::MoxiworksPlatform::Exception::ArgumentError if required named parameters
1967
+ aren&#39;t included</p>
1968
+ </div>
1969
+
1970
+ </li>
1971
+
1972
+ </ul>
1973
+
1974
+ </div><table class="source_code">
1975
+ <tr>
1976
+ <td>
1977
+ <pre class="lines">
1978
+
1979
+
1980
+ 265
1981
+ 266
1982
+ 267
1983
+ 268
1984
+ 269
1985
+ 270
1986
+ 271
1987
+ 272
1988
+ 273
1989
+ 274
1990
+ 275</pre>
1991
+ </td>
1992
+ <td>
1993
+ <pre class="code"><span class="info file"># File 'lib/moxiworks_platform/task.rb', line 265</span>
1994
+
1995
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_send_request'>send_request</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='id identifier rubyid_url'>url</span><span class='op'>=</span><span class='kw'>nil</span><span class='rparen'>)</span>
1996
+ <span class='id identifier rubyid_raise'>raise</span> <span class='op'>::</span><span class='const'>MoxiworksPlatform</span><span class='op'>::</span><span class='const'>Exception</span><span class='op'>::</span><span class='const'>ArgumentError</span><span class='comma'>,</span>
1997
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>arguments must be passed as named parameters</span><span class='tstring_end'>&#39;</span></span> <span class='kw'>unless</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Hash</span>
1998
+ <span class='id identifier rubyid_url'>url</span> <span class='op'>||=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'>MoxiworksPlatform</span><span class='op'>::</span><span class='const'>Config</span><span class='period'>.</span><span class='id identifier rubyid_url'>url</span><span class='embexpr_end'>}</span><span class='tstring_content'>/api/tasks</span><span class='tstring_end'>&quot;</span></span>
1999
+ <span class='id identifier rubyid_required_opts'>required_opts</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='symbol'>:moxi_works_agent_id</span><span class='comma'>,</span> <span class='symbol'>:partner_task_id</span><span class='rbracket'>]</span>
2000
+ <span class='id identifier rubyid_required_opts'>required_opts</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_opt'>opt</span><span class='op'>|</span>
2001
+ <span class='id identifier rubyid_raise'>raise</span> <span class='op'>::</span><span class='const'>MoxiworksPlatform</span><span class='op'>::</span><span class='const'>Exception</span><span class='op'>::</span><span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_opt'>opt</span><span class='embexpr_end'>}</span><span class='tstring_content'> required</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>if</span>
2002
+ <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='id identifier rubyid_opt'>opt</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='kw'>or</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='id identifier rubyid_opt'>opt</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
2003
+ <span class='kw'>end</span>
2004
+ <span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='comma'>,</span> <span class='id identifier rubyid_url'>url</span><span class='rparen'>)</span>
2005
+ <span class='kw'>end</span></pre>
2006
+ </td>
2007
+ </tr>
2008
+ </table>
2009
+ </div>
2010
+
2011
+ <div class="method_details ">
2012
+ <h3 class="signature " id="update-class_method">
2013
+
2014
+ .<strong>update</strong>(opts = {}) &#x21d2; <tt><span class='object_link'><a href="" title="MoxiworksPlatform::Task (class)">MoxiworksPlatform::Task</a></span></tt>
2015
+
2016
+
2017
+
2018
+
2019
+
2020
+ </h3><div class="docstring">
2021
+ <div class="discussion">
2022
+
2023
+ <p>Updates an existing Task in Moxi Works Platform</p>
2024
+
2025
+
2026
+ </div>
2027
+ </div>
2028
+ <div class="tags">
2029
+
2030
+ <div class="examples">
2031
+ <p class="tag_title">Examples:</p>
2032
+
2033
+
2034
+ <pre class="example code"><code><span class='const'>MoxiworksPlatform</span><span class='op'>::</span><span class='const'>Task</span><span class='period'>.</span><span class='id identifier rubyid_create'>create</span><span class='lparen'>(</span>
2035
+ <span class='label'>moxi_works_agent_id:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>123abc</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
2036
+ <span class='label'>partner_contact_id:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>1234</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
2037
+ <span class='label'>partner_task_id:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>mySystemsUniqueTaskID</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
2038
+ <span class='label'>name:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>pick up client keys</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
2039
+ <span class='label'>description:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>pick up client keys from1234 there ave</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
2040
+ <span class='label'>due_at:</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span> <span class='op'>+</span> <span class='int'>86400</span><span class='comma'>,</span>
2041
+ <span class='label'>duration:</span> <span class='int'>30</span><span class='comma'>,</span>
2042
+ <span class='label'>status:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>completed</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
2043
+ <span class='label'>completed_at:</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span><span class='comma'>,</span>
2044
+ <span class='rparen'>)</span></code></pre>
2045
+
2046
+ </div>
2047
+ <p class="tag_title">Parameters:</p>
2048
+ <ul class="param">
2049
+
2050
+ <li>
2051
+
2052
+ <span class='name'>opts</span>
2053
+
2054
+
2055
+ <span class='type'>(<tt>Hash</tt>)</span>
2056
+
2057
+
2058
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
2059
+
2060
+
2061
+ &mdash;
2062
+ <div class='inline'>
2063
+ <p>named parameter Hash</p>
2064
+ </div>
2065
+
2066
+ </li>
2067
+
2068
+ </ul>
2069
+
2070
+
2071
+
2072
+
2073
+ <p class="tag_title">Options Hash (<tt>opts</tt>):</p>
2074
+ <ul class="option">
2075
+
2076
+ <li>
2077
+ <span class="name">:moxi_works_agent_id</span>
2078
+ <span class="type">(<tt>String</tt>)</span>
2079
+ <span class="default">
2080
+
2081
+ </span>
2082
+
2083
+ &mdash; <div class='inline'>
2084
+ <p><strong>REQUIRED</strong> The Moxi Works Agent ID for the agent to which
2085
+ this task is to be associated</p>
2086
+ </div>
2087
+
2088
+ </li>
2089
+
2090
+ <li>
2091
+ <span class="name">:partner_task_id</span>
2092
+ <span class="type">(<tt>String</tt>)</span>
2093
+ <span class="default">
2094
+
2095
+ </span>
2096
+
2097
+ &mdash; <div class='inline'>
2098
+ <p><strong>REQUIRED</strong> Your system&#39;s unique ID for this task.</p>
2099
+ </div>
2100
+
2101
+ </li>
2102
+
2103
+ <li>
2104
+ <span class="name">:partner_contact_id</span>
2105
+ <span class="type">(<tt>String</tt>)</span>
2106
+ <span class="default">
2107
+
2108
+ </span>
2109
+
2110
+ &mdash; <div class='inline'>
2111
+ <p><strong>REQUIRED</strong> Your system&#39;s unique ID for the Contact for
2112
+ whom this Task is to be associated.</p>
2113
+ </div>
2114
+
2115
+ </li>
2116
+
2117
+ <li>
2118
+ <span class="name">:due_at</span>
2119
+ <span class="type">(<tt>Integer</tt>)</span>
2120
+ <span class="default">
2121
+
2122
+ </span>
2123
+
2124
+ &mdash; <div class='inline'>
2125
+ <p>Unix timestamp representing the due date</p>
2126
+ </div>
2127
+
2128
+ </li>
2129
+
2130
+ <li>
2131
+ <span class="name">:duration</span>
2132
+ <span class="type">(<tt>Integer</tt>)</span>
2133
+ <span class="default">
2134
+
2135
+ </span>
2136
+
2137
+ &mdash; <div class='inline'>
2138
+ <p>Length of time in minutes that the task should take</p>
2139
+
2140
+ <p>optional Task parameters</p>
2141
+ </div>
2142
+
2143
+ </li>
2144
+
2145
+ <li>
2146
+ <span class="name">:name</span>
2147
+ <span class="type">(<tt>String</tt>)</span>
2148
+ <span class="default">
2149
+
2150
+ </span>
2151
+
2152
+ &mdash; <div class='inline'>
2153
+ <p>short description of the task</p>
2154
+ </div>
2155
+
2156
+ </li>
2157
+
2158
+ <li>
2159
+ <span class="name">:description</span>
2160
+ <span class="type">(<tt>String</tt>)</span>
2161
+ <span class="default">
2162
+
2163
+ </span>
2164
+
2165
+ &mdash; <div class='inline'>
2166
+ <p>longer description of the task</p>
2167
+ </div>
2168
+
2169
+ </li>
2170
+
2171
+ <li>
2172
+ <span class="name">:completed_at</span>
2173
+ <span class="type">(<tt>Integer</tt>)</span>
2174
+ <span class="default">
2175
+
2176
+ </span>
2177
+
2178
+ &mdash; <div class='inline'>
2179
+ <p>Unix timestamp representing the date the task was completed</p>
2180
+ </div>
2181
+
2182
+ </li>
2183
+
2184
+ <li>
2185
+ <span class="name">:status</span>
2186
+ <span class="type">(<tt>String</tt>)</span>
2187
+ <span class="default">
2188
+
2189
+ </span>
2190
+
2191
+ &mdash; <div class='inline'>
2192
+ <p>enumerated string representing task status</p>
2193
+ </div>
2194
+
2195
+ </li>
2196
+
2197
+ </ul>
2198
+
2199
+
2200
+ <p class="tag_title">Returns:</p>
2201
+ <ul class="return">
2202
+
2203
+ <li>
2204
+
2205
+
2206
+ <span class='type'>(<tt><span class='object_link'><a href="" title="MoxiworksPlatform::Task (class)">MoxiworksPlatform::Task</a></span></tt>)</span>
2207
+
2208
+
2209
+
2210
+ </li>
2211
+
2212
+ </ul>
2213
+ <p class="tag_title">Raises:</p>
2214
+ <ul class="raise">
2215
+
2216
+ <li>
2217
+
2218
+
2219
+ <span class='type'></span>
2220
+
2221
+
2222
+
2223
+
2224
+ <div class='inline'>
2225
+ <p>::MoxiworksPlatform::Exception::ArgumentError if required named parameters
2226
+ aren&#39;t included</p>
2227
+ </div>
2228
+
2229
+ </li>
2230
+
2231
+ </ul>
2232
+
2233
+ </div><table class="source_code">
2234
+ <tr>
2235
+ <td>
2236
+ <pre class="lines">
2237
+
2238
+
2239
+ 233
2240
+ 234
2241
+ 235
2242
+ 236
2243
+ 237
2244
+ 238
2245
+ 239
2246
+ 240
2247
+ 241</pre>
2248
+ </td>
2249
+ <td>
2250
+ <pre class="code"><span class="info file"># File 'lib/moxiworks_platform/task.rb', line 233</span>
2251
+
2252
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_update'>update</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
2253
+ <span class='id identifier rubyid_required_opts'>required_opts</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='symbol'>:moxi_works_agent_id</span><span class='comma'>,</span> <span class='symbol'>:partner_task_id</span><span class='comma'>,</span> <span class='symbol'>:partner_contact_id</span><span class='rbracket'>]</span>
2254
+ <span class='id identifier rubyid_required_opts'>required_opts</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_opt'>opt</span><span class='op'>|</span>
2255
+ <span class='id identifier rubyid_raise'>raise</span> <span class='op'>::</span><span class='const'>MoxiworksPlatform</span><span class='op'>::</span><span class='const'>Exception</span><span class='op'>::</span><span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_opt'>opt</span><span class='embexpr_end'>}</span><span class='tstring_content'> required</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>if</span>
2256
+ <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='id identifier rubyid_opt'>opt</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='kw'>or</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='id identifier rubyid_opt'>opt</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
2257
+ <span class='kw'>end</span>
2258
+ <span class='id identifier rubyid_url'>url</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'>MoxiworksPlatform</span><span class='op'>::</span><span class='const'>Config</span><span class='period'>.</span><span class='id identifier rubyid_url'>url</span><span class='embexpr_end'>}</span><span class='tstring_content'>/api/tasks/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:partner_task_id</span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
2259
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_send_request'>send_request</span><span class='lparen'>(</span><span class='symbol'>:put</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='comma'>,</span> <span class='id identifier rubyid_url'>url</span><span class='rparen'>)</span>
2260
+ <span class='kw'>end</span></pre>
2261
+ </td>
2262
+ </tr>
2263
+ </table>
2264
+ </div>
2265
+
2266
+ </div>
2267
+
2268
+ <div id="instance_method_details" class="method_details_list">
2269
+ <h2>Instance Method Details</h2>
2270
+
2271
+
2272
+ <div class="method_details first">
2273
+ <h3 class="signature first" id="save-instance_method">
2274
+
2275
+ #<strong>save</strong> &#x21d2; <tt>MoxiWorksPlatform:Task</tt>
2276
+
2277
+
2278
+
2279
+
2280
+
2281
+ </h3><div class="docstring">
2282
+ <div class="discussion">
2283
+
2284
+ <p>Save an instance of MoxiWorksPlatform::Task to Moxi Works Platform</p>
2285
+
2286
+
2287
+ </div>
2288
+ </div>
2289
+ <div class="tags">
2290
+
2291
+ <div class="examples">
2292
+ <p class="tag_title">Examples:</p>
2293
+
2294
+
2295
+ <pre class="example code"><code><span class='id identifier rubyid_task'>task</span> <span class='op'>=</span> <span class='const'>MoxiWorksPlatform</span><span class='op'>::</span><span class='const'>Task</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='rparen'>)</span>
2296
+ <span class='id identifier rubyid_task'>task</span><span class='period'>.</span><span class='id identifier rubyid_moxi_works_agent_id'>moxi_works_agent_id</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>123abcd</span><span class='tstring_end'>&#39;</span></span>
2297
+ <span class='id identifier rubyid_task'>task</span><span class='period'>.</span><span class='id identifier rubyid_partner_task_id'>partner_task_id</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>myUniqueTaskdentifier</span><span class='tstring_end'>&#39;</span></span>
2298
+ <span class='id identifier rubyid_task'>task</span><span class='period'>.</span><span class='id identifier rubyid_status'>status</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>completed</span><span class='tstring_end'>&#39;</span></span>
2299
+ <span class='id identifier rubyid_task'>task</span><span class='period'>.</span><span class='id identifier rubyid_completed_at'>completed_at</span> <span class='op'>=</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span>
2300
+ <span class='id identifier rubyid_task'>task</span><span class='period'>.</span><span class='id identifier rubyid_save'>save</span></code></pre>
2301
+
2302
+ </div>
2303
+
2304
+ <p class="tag_title">Returns:</p>
2305
+ <ul class="return">
2306
+
2307
+ <li>
2308
+
2309
+
2310
+ <span class='type'>(<tt>MoxiWorksPlatform:Task</tt>)</span>
2311
+
2312
+
2313
+
2314
+ </li>
2315
+
2316
+ </ul>
2317
+
2318
+ </div><table class="source_code">
2319
+ <tr>
2320
+ <td>
2321
+ <pre class="lines">
2322
+
2323
+
2324
+ 288
2325
+ 289
2326
+ 290</pre>
2327
+ </td>
2328
+ <td>
2329
+ <pre class="code"><span class="info file"># File 'lib/moxiworks_platform/task.rb', line 288</span>
2330
+
2331
+ <span class='kw'>def</span> <span class='id identifier rubyid_save'>save</span>
2332
+ <span class='const'>MoxiworksPlatform</span><span class='op'>::</span><span class='const'>Task</span><span class='period'>.</span><span class='id identifier rubyid_update'>update</span><span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_to_hash'>to_hash</span><span class='rparen'>)</span>
2333
+ <span class='kw'>end</span></pre>
2334
+ </td>
2335
+ </tr>
2336
+ </table>
2337
+ </div>
2338
+
2339
+ </div>
2340
+
2341
+ </div>
2342
+
2343
+ <div id="footer">
2344
+ Generated on Fri Apr 20 10:00:16 2018 by
2345
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
2346
+ 0.9.5 (ruby-2.2.4).
2347
+ </div>
2348
+
2349
+ </div>
2350
+ </body>
2351
+ </html>