aceroute 0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +8 -0
- data/.rspec +2 -0
- data/.travis.yml +3 -0
- data/Gemfile +6 -0
- data/LICENSE +22 -0
- data/LICENSE.txt +21 -0
- data/README.md +63 -0
- data/Rakefile +3 -0
- data/aceroute.gemspec +34 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/doc/.yardoc/checksums +3 -0
- data/doc/.yardoc/object_types +0 -0
- data/doc/.yardoc/objects/root.dat +0 -0
- data/doc/.yardoc/proxy_types +0 -0
- data/doc/AceRoute_API.pdf +0 -0
- data/doc/Aceroute/Base.html +135 -0
- data/doc/Aceroute/Customer.html +949 -0
- data/doc/Aceroute/Location.html +1111 -0
- data/doc/Aceroute/Order.html +1458 -0
- data/doc/Aceroute.html +1401 -0
- data/doc/Hashit.html +212 -0
- data/doc/_index.html +183 -0
- data/doc/class_list.html +58 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +57 -0
- data/doc/css/style.css +339 -0
- data/doc/file.README.html +156 -0
- data/doc/file_list.html +60 -0
- data/doc/frames.html +26 -0
- data/doc/index.html +156 -0
- data/doc/js/app.js +219 -0
- data/doc/js/full_list.js +181 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +345 -0
- data/doc/top-level-namespace.html +114 -0
- data/lib/aceroute/base.rb +20 -0
- data/lib/aceroute/core.rb +192 -0
- data/lib/aceroute/customer.rb +69 -0
- data/lib/aceroute/hashit.rb +12 -0
- data/lib/aceroute/location.rb +62 -0
- data/lib/aceroute/order.rb +81 -0
- data/lib/aceroute/version.rb +3 -0
- data/lib/aceroute.rb +5 -0
- metadata +146 -0
@@ -0,0 +1,1458 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<title>
|
7
|
+
Class: Aceroute::Order
|
8
|
+
|
9
|
+
— Documentation by YARD 0.8.7.6
|
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
|
+
hasFrames = window.top.frames.main ? true : false;
|
19
|
+
relpath = '../';
|
20
|
+
framesUrl = "../frames.html#!Aceroute/Order.html";
|
21
|
+
</script>
|
22
|
+
|
23
|
+
|
24
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
25
|
+
|
26
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
27
|
+
|
28
|
+
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
<div id="header">
|
32
|
+
<div id="menu">
|
33
|
+
|
34
|
+
<a href="../_index.html">Index (O)</a> »
|
35
|
+
<span class='title'><span class='object_link'><a href="../Aceroute.html" title="Aceroute (module)">Aceroute</a></span></span>
|
36
|
+
»
|
37
|
+
<span class="title">Order</span>
|
38
|
+
|
39
|
+
|
40
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<div id="search">
|
44
|
+
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
46
|
+
href="../class_list.html">
|
47
|
+
Class List
|
48
|
+
</a>
|
49
|
+
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
51
|
+
href="../method_list.html">
|
52
|
+
Method List
|
53
|
+
</a>
|
54
|
+
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
56
|
+
href="../file_list.html">
|
57
|
+
File List
|
58
|
+
</a>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
<div class="clear"></div>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
<iframe id="search_frame"></iframe>
|
65
|
+
|
66
|
+
<div id="content"><h1>Class: Aceroute::Order
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</h1>
|
71
|
+
|
72
|
+
<dl class="box">
|
73
|
+
|
74
|
+
<dt class="r1">Inherits:</dt>
|
75
|
+
<dd class="r1">
|
76
|
+
<span class="inheritName"><span class='object_link'><a href="Base.html" title="Aceroute::Base (class)">Base</a></span></span>
|
77
|
+
|
78
|
+
<ul class="fullTree">
|
79
|
+
<li>Object</li>
|
80
|
+
|
81
|
+
<li class="next"><span class='object_link'><a href="Base.html" title="Aceroute::Base (class)">Base</a></span></li>
|
82
|
+
|
83
|
+
<li class="next">Aceroute::Order</li>
|
84
|
+
|
85
|
+
</ul>
|
86
|
+
<a href="#" class="inheritanceTree">show all</a>
|
87
|
+
|
88
|
+
</dd>
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
<dt class="r2 last">Defined in:</dt>
|
99
|
+
<dd class="r2 last">lib/aceroute/order.rb</dd>
|
100
|
+
|
101
|
+
</dl>
|
102
|
+
<div class="clear"></div>
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
<h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
|
109
|
+
<ul class="summary">
|
110
|
+
|
111
|
+
<li class="public ">
|
112
|
+
<span class="summary_signature">
|
113
|
+
|
114
|
+
<a href="#cid-instance_method" title="#cid (instance method)">- (Object) <strong>cid</strong> </a>
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
</span>
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
<span class="summary_desc"><div class='inline'>
|
132
|
+
<p>Returns the value of attribute cid.</p>
|
133
|
+
</div></span>
|
134
|
+
|
135
|
+
</li>
|
136
|
+
|
137
|
+
|
138
|
+
<li class="public ">
|
139
|
+
<span class="summary_signature">
|
140
|
+
|
141
|
+
<a href="#customer-instance_method" title="#customer (instance method)">- (Object) <strong>customer</strong> </a>
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
</span>
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
<span class="summary_desc"><div class='inline'>
|
159
|
+
<p>in msec (not sec) since epoch.</p>
|
160
|
+
</div></span>
|
161
|
+
|
162
|
+
</li>
|
163
|
+
|
164
|
+
|
165
|
+
<li class="public ">
|
166
|
+
<span class="summary_signature">
|
167
|
+
|
168
|
+
<a href="#description-instance_method" title="#description (instance method)">- (Object) <strong>description</strong> </a>
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
</span>
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
<span class="summary_desc"><div class='inline'>
|
186
|
+
<p>any freeform text here.</p>
|
187
|
+
</div></span>
|
188
|
+
|
189
|
+
</li>
|
190
|
+
|
191
|
+
|
192
|
+
<li class="public ">
|
193
|
+
<span class="summary_signature">
|
194
|
+
|
195
|
+
<a href="#duration-instance_method" title="#duration (instance method)">- (Object) <strong>duration</strong> </a>
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
</span>
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
<span class="summary_desc"><div class='inline'>
|
213
|
+
<p>any freeform text here.</p>
|
214
|
+
</div></span>
|
215
|
+
|
216
|
+
</li>
|
217
|
+
|
218
|
+
|
219
|
+
<li class="public ">
|
220
|
+
<span class="summary_signature">
|
221
|
+
|
222
|
+
<a href="#id-instance_method" title="#id (instance method)">- (Object) <strong>id</strong> </a>
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
</span>
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
|
238
|
+
|
239
|
+
<span class="summary_desc"><div class='inline'>
|
240
|
+
<p>Returns the value of attribute id.</p>
|
241
|
+
</div></span>
|
242
|
+
|
243
|
+
</li>
|
244
|
+
|
245
|
+
|
246
|
+
<li class="public ">
|
247
|
+
<span class="summary_signature">
|
248
|
+
|
249
|
+
<a href="#location-instance_method" title="#location (instance method)">- (Object) <strong>location</strong> </a>
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
</span>
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
|
264
|
+
|
265
|
+
|
266
|
+
<span class="summary_desc"><div class='inline'>
|
267
|
+
<p>in msec (not sec) since epoch.</p>
|
268
|
+
</div></span>
|
269
|
+
|
270
|
+
</li>
|
271
|
+
|
272
|
+
|
273
|
+
<li class="public ">
|
274
|
+
<span class="summary_signature">
|
275
|
+
|
276
|
+
<a href="#purchase_order-instance_method" title="#purchase_order (instance method)">- (Object) <strong>purchase_order</strong> </a>
|
277
|
+
|
278
|
+
|
279
|
+
|
280
|
+
</span>
|
281
|
+
|
282
|
+
|
283
|
+
|
284
|
+
|
285
|
+
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
|
290
|
+
|
291
|
+
|
292
|
+
|
293
|
+
<span class="summary_desc"><div class='inline'>
|
294
|
+
<p>any freeform text here.</p>
|
295
|
+
</div></span>
|
296
|
+
|
297
|
+
</li>
|
298
|
+
|
299
|
+
|
300
|
+
<li class="public ">
|
301
|
+
<span class="summary_signature">
|
302
|
+
|
303
|
+
<a href="#scheduled-instance_method" title="#scheduled (instance method)">- (Object) <strong>scheduled</strong> </a>
|
304
|
+
|
305
|
+
|
306
|
+
|
307
|
+
</span>
|
308
|
+
|
309
|
+
|
310
|
+
|
311
|
+
|
312
|
+
|
313
|
+
|
314
|
+
|
315
|
+
|
316
|
+
|
317
|
+
|
318
|
+
|
319
|
+
|
320
|
+
<span class="summary_desc"><div class='inline'>
|
321
|
+
<p>any freeform text here.</p>
|
322
|
+
</div></span>
|
323
|
+
|
324
|
+
</li>
|
325
|
+
|
326
|
+
|
327
|
+
<li class="public ">
|
328
|
+
<span class="summary_signature">
|
329
|
+
|
330
|
+
<a href="#start_time-instance_method" title="#start_time (instance method)">- (Object) <strong>start_time</strong> </a>
|
331
|
+
|
332
|
+
|
333
|
+
|
334
|
+
</span>
|
335
|
+
|
336
|
+
|
337
|
+
|
338
|
+
|
339
|
+
|
340
|
+
|
341
|
+
|
342
|
+
|
343
|
+
|
344
|
+
|
345
|
+
|
346
|
+
|
347
|
+
<span class="summary_desc"><div class='inline'>
|
348
|
+
<p>in msec (not sec) since epoch.</p>
|
349
|
+
</div></span>
|
350
|
+
|
351
|
+
</li>
|
352
|
+
|
353
|
+
|
354
|
+
<li class="public ">
|
355
|
+
<span class="summary_signature">
|
356
|
+
|
357
|
+
<a href="#summary-instance_method" title="#summary (instance method)">- (Object) <strong>summary</strong> </a>
|
358
|
+
|
359
|
+
|
360
|
+
|
361
|
+
</span>
|
362
|
+
|
363
|
+
|
364
|
+
|
365
|
+
|
366
|
+
|
367
|
+
|
368
|
+
|
369
|
+
|
370
|
+
|
371
|
+
|
372
|
+
|
373
|
+
|
374
|
+
<span class="summary_desc"><div class='inline'>
|
375
|
+
<p>any freeform text here.</p>
|
376
|
+
</div></span>
|
377
|
+
|
378
|
+
</li>
|
379
|
+
|
380
|
+
|
381
|
+
<li class="public ">
|
382
|
+
<span class="summary_signature">
|
383
|
+
|
384
|
+
<a href="#worker-instance_method" title="#worker (instance method)">- (Object) <strong>worker</strong> </a>
|
385
|
+
|
386
|
+
|
387
|
+
|
388
|
+
</span>
|
389
|
+
|
390
|
+
|
391
|
+
|
392
|
+
|
393
|
+
|
394
|
+
|
395
|
+
|
396
|
+
|
397
|
+
|
398
|
+
|
399
|
+
|
400
|
+
|
401
|
+
<span class="summary_desc"><div class='inline'>
|
402
|
+
<p>any freeform text here.</p>
|
403
|
+
</div></span>
|
404
|
+
|
405
|
+
</li>
|
406
|
+
|
407
|
+
|
408
|
+
</ul>
|
409
|
+
|
410
|
+
|
411
|
+
|
412
|
+
|
413
|
+
|
414
|
+
<h2>
|
415
|
+
Class Method Summary
|
416
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
417
|
+
</h2>
|
418
|
+
|
419
|
+
<ul class="summary">
|
420
|
+
|
421
|
+
<li class="public ">
|
422
|
+
<span class="summary_signature">
|
423
|
+
|
424
|
+
<a href="#delete-class_method" title="delete (class method)">+ (Object) <strong>delete</strong>(id) </a>
|
425
|
+
|
426
|
+
|
427
|
+
|
428
|
+
</span>
|
429
|
+
|
430
|
+
|
431
|
+
|
432
|
+
|
433
|
+
|
434
|
+
|
435
|
+
|
436
|
+
|
437
|
+
|
438
|
+
<span class="summary_desc"><div class='inline'>
|
439
|
+
<p>Deletes Aceroute::Location of given id from Aceroute.</p>
|
440
|
+
</div></span>
|
441
|
+
|
442
|
+
</li>
|
443
|
+
|
444
|
+
|
445
|
+
</ul>
|
446
|
+
|
447
|
+
<h2>
|
448
|
+
Instance Method Summary
|
449
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
450
|
+
</h2>
|
451
|
+
|
452
|
+
<ul class="summary">
|
453
|
+
|
454
|
+
<li class="public ">
|
455
|
+
<span class="summary_signature">
|
456
|
+
|
457
|
+
<a href="#create%21-instance_method" title="#create! (instance method)">- (Aceroute::Order) <strong>create!</strong> </a>
|
458
|
+
|
459
|
+
|
460
|
+
|
461
|
+
</span>
|
462
|
+
|
463
|
+
|
464
|
+
|
465
|
+
|
466
|
+
|
467
|
+
|
468
|
+
|
469
|
+
|
470
|
+
|
471
|
+
<span class="summary_desc"><div class='inline'>
|
472
|
+
<p>Persists Aceroute::Order object to Aceroute API.</p>
|
473
|
+
</div></span>
|
474
|
+
|
475
|
+
</li>
|
476
|
+
|
477
|
+
|
478
|
+
<li class="public ">
|
479
|
+
<span class="summary_signature">
|
480
|
+
|
481
|
+
<a href="#destroy%21-instance_method" title="#destroy! (instance method)">- (Object) <strong>destroy!</strong>(id = nil) </a>
|
482
|
+
|
483
|
+
|
484
|
+
|
485
|
+
</span>
|
486
|
+
|
487
|
+
|
488
|
+
|
489
|
+
|
490
|
+
|
491
|
+
|
492
|
+
|
493
|
+
|
494
|
+
|
495
|
+
<span class="summary_desc"><div class='inline'>
|
496
|
+
<p>Deletes this Aceroute::Order object (self) from Aceroute.</p>
|
497
|
+
</div></span>
|
498
|
+
|
499
|
+
</li>
|
500
|
+
|
501
|
+
|
502
|
+
<li class="public ">
|
503
|
+
<span class="summary_signature">
|
504
|
+
|
505
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (Aceroute::Order) <strong>initialize</strong>(customer, location, start_time, description = nil, duration = 10, scheduled = true, worker = nil, summary = nil, purchase_order = nil) </a>
|
506
|
+
|
507
|
+
|
508
|
+
|
509
|
+
</span>
|
510
|
+
|
511
|
+
|
512
|
+
<span class="note title constructor">constructor</span>
|
513
|
+
|
514
|
+
|
515
|
+
|
516
|
+
|
517
|
+
|
518
|
+
|
519
|
+
|
520
|
+
|
521
|
+
<span class="summary_desc"><div class='inline'>
|
522
|
+
<p>Creates a new Aceroute::Order object.</p>
|
523
|
+
</div></span>
|
524
|
+
|
525
|
+
</li>
|
526
|
+
|
527
|
+
|
528
|
+
</ul>
|
529
|
+
|
530
|
+
|
531
|
+
|
532
|
+
|
533
|
+
|
534
|
+
|
535
|
+
|
536
|
+
|
537
|
+
<div id="constructor_details" class="method_details_list">
|
538
|
+
<h2>Constructor Details</h2>
|
539
|
+
|
540
|
+
<div class="method_details first">
|
541
|
+
<h3 class="signature first" id="initialize-instance_method">
|
542
|
+
|
543
|
+
- (<tt><span class='object_link'><a href="" title="Aceroute::Order (class)">Aceroute::Order</a></span></tt>) <strong>initialize</strong>(customer, location, start_time, description = nil, duration = 10, scheduled = true, worker = nil, summary = nil, purchase_order = nil)
|
544
|
+
|
545
|
+
|
546
|
+
|
547
|
+
|
548
|
+
|
549
|
+
</h3><div class="docstring">
|
550
|
+
<div class="discussion">
|
551
|
+
|
552
|
+
<p>Creates a new Aceroute::Order object. Note this does not persist the
|
553
|
+
Location to Aceroute, that can be done by calling the create! method on the
|
554
|
+
new object.</p>
|
555
|
+
|
556
|
+
|
557
|
+
</div>
|
558
|
+
</div>
|
559
|
+
<div class="tags">
|
560
|
+
<p class="tag_title">Parameters:</p>
|
561
|
+
<ul class="param">
|
562
|
+
|
563
|
+
<li>
|
564
|
+
|
565
|
+
<span class='name'>customer</span>
|
566
|
+
|
567
|
+
|
568
|
+
<span class='type'>(<tt><span class='object_link'><a href="Customer.html" title="Aceroute::Customer (class)">Aceroute::Customer</a></span></tt>)</span>
|
569
|
+
|
570
|
+
|
571
|
+
|
572
|
+
—
|
573
|
+
<div class='inline'>
|
574
|
+
<p>recipient of this Order</p>
|
575
|
+
</div>
|
576
|
+
|
577
|
+
</li>
|
578
|
+
|
579
|
+
<li>
|
580
|
+
|
581
|
+
<span class='name'>location</span>
|
582
|
+
|
583
|
+
|
584
|
+
<span class='type'>(<tt><span class='object_link'><a href="Location.html" title="Aceroute::Location (class)">Aceroute::Location</a></span></tt>)</span>
|
585
|
+
|
586
|
+
|
587
|
+
|
588
|
+
—
|
589
|
+
<div class='inline'>
|
590
|
+
<p>location of this Order (delivery destination)</p>
|
591
|
+
</div>
|
592
|
+
|
593
|
+
</li>
|
594
|
+
|
595
|
+
<li>
|
596
|
+
|
597
|
+
<span class='name'>start_time</span>
|
598
|
+
|
599
|
+
|
600
|
+
<span class='type'>(<tt>Integer</tt>)</span>
|
601
|
+
|
602
|
+
|
603
|
+
|
604
|
+
—
|
605
|
+
<div class='inline'>
|
606
|
+
<p>start time of Order, in msec since epoch (note: msec not sec)</p>
|
607
|
+
</div>
|
608
|
+
|
609
|
+
</li>
|
610
|
+
|
611
|
+
<li>
|
612
|
+
|
613
|
+
<span class='name'>description</span>
|
614
|
+
|
615
|
+
|
616
|
+
<span class='type'>(<tt>String</tt>)</span>
|
617
|
+
|
618
|
+
|
619
|
+
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
620
|
+
|
621
|
+
|
622
|
+
—
|
623
|
+
<div class='inline'>
|
624
|
+
<p>description of Order (e.g., contents of order)</p>
|
625
|
+
</div>
|
626
|
+
|
627
|
+
</li>
|
628
|
+
|
629
|
+
<li>
|
630
|
+
|
631
|
+
<span class='name'>duration</span>
|
632
|
+
|
633
|
+
|
634
|
+
<span class='type'>(<tt>Integer</tt>)</span>
|
635
|
+
|
636
|
+
|
637
|
+
<em class="default">(defaults to: <tt>10</tt>)</em>
|
638
|
+
|
639
|
+
|
640
|
+
—
|
641
|
+
<div class='inline'>
|
642
|
+
<p>duration of Order in minutes (time to service customer); used to aid in
|
643
|
+
route optimization. Defaults to 10 minutes</p>
|
644
|
+
</div>
|
645
|
+
|
646
|
+
</li>
|
647
|
+
|
648
|
+
<li>
|
649
|
+
|
650
|
+
<span class='name'>scheduled</span>
|
651
|
+
|
652
|
+
|
653
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
654
|
+
|
655
|
+
|
656
|
+
<em class="default">(defaults to: <tt>true</tt>)</em>
|
657
|
+
|
658
|
+
|
659
|
+
—
|
660
|
+
<div class='inline'>
|
661
|
+
<p>whether this Order is scheduled or not; defaults to true</p>
|
662
|
+
</div>
|
663
|
+
|
664
|
+
</li>
|
665
|
+
|
666
|
+
<li>
|
667
|
+
|
668
|
+
<span class='name'>worker</span>
|
669
|
+
|
670
|
+
|
671
|
+
<span class='type'>(<tt>Integer</tt>)</span>
|
672
|
+
|
673
|
+
|
674
|
+
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
675
|
+
|
676
|
+
|
677
|
+
—
|
678
|
+
<div class='inline'>
|
679
|
+
<p>Worker ID of aceroute worker to assign this Order to; defaults to nil (not
|
680
|
+
implemented)</p>
|
681
|
+
</div>
|
682
|
+
|
683
|
+
</li>
|
684
|
+
|
685
|
+
<li>
|
686
|
+
|
687
|
+
<span class='name'>summary</span>
|
688
|
+
|
689
|
+
|
690
|
+
<span class='type'>(<tt>String</tt>)</span>
|
691
|
+
|
692
|
+
|
693
|
+
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
694
|
+
|
695
|
+
|
696
|
+
—
|
697
|
+
<div class='inline'>
|
698
|
+
<p>Summary of order, to be displated in app. Defaults to none.</p>
|
699
|
+
</div>
|
700
|
+
|
701
|
+
</li>
|
702
|
+
|
703
|
+
<li>
|
704
|
+
|
705
|
+
<span class='name'>purchase_order</span>
|
706
|
+
|
707
|
+
|
708
|
+
<span class='type'>(<tt>String</tt>)</span>
|
709
|
+
|
710
|
+
|
711
|
+
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
712
|
+
|
713
|
+
|
714
|
+
—
|
715
|
+
<div class='inline'>
|
716
|
+
<p>arbitrary string to indicate PO or other note, if needed</p>
|
717
|
+
</div>
|
718
|
+
|
719
|
+
</li>
|
720
|
+
|
721
|
+
</ul>
|
722
|
+
|
723
|
+
|
724
|
+
</div><table class="source_code">
|
725
|
+
<tr>
|
726
|
+
<td>
|
727
|
+
<pre class="lines">
|
728
|
+
|
729
|
+
|
730
|
+
24
|
731
|
+
25
|
732
|
+
26
|
733
|
+
27
|
734
|
+
28
|
735
|
+
29
|
736
|
+
30
|
737
|
+
31
|
738
|
+
32
|
739
|
+
33
|
740
|
+
34
|
741
|
+
35
|
742
|
+
36
|
743
|
+
37</pre>
|
744
|
+
</td>
|
745
|
+
<td>
|
746
|
+
<pre class="code"><span class="info file"># File 'lib/aceroute/order.rb', line 24</span>
|
747
|
+
|
748
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_customer'>customer</span><span class='comma'>,</span> <span class='id identifier rubyid_location'>location</span><span class='comma'>,</span> <span class='id identifier rubyid_start_time'>start_time</span><span class='comma'>,</span> <span class='id identifier rubyid_description'>description</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_duration'>duration</span> <span class='op'>=</span> <span class='int'>10</span><span class='comma'>,</span>
|
749
|
+
<span class='id identifier rubyid_scheduled'>scheduled</span> <span class='op'>=</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='id identifier rubyid_worker'>worker</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_summary'>summary</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_purchase_order'>purchase_order</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
750
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_customer'>customer</span> <span class='op'>=</span> <span class='id identifier rubyid_customer'>customer</span>
|
751
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_location'>location</span> <span class='op'>=</span> <span class='id identifier rubyid_location'>location</span>
|
752
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_start_time'>start_time</span> <span class='op'>=</span> <span class='id identifier rubyid_start_time'>start_time</span>
|
753
|
+
<span class='comment'>#FIXME: taking a DateTime argument is friendlier
|
754
|
+
</span> <span class='comment'>#self.start_time = start_time.to_i * 1000 #DateTime object
|
755
|
+
</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_description'>description</span> <span class='op'>=</span> <span class='id identifier rubyid_description'>description</span>
|
756
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_duration'>duration</span> <span class='op'>=</span> <span class='id identifier rubyid_duration'>duration</span>
|
757
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_scheduled'>scheduled</span> <span class='op'>=</span> <span class='id identifier rubyid_scheduled'>scheduled</span>
|
758
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_worker'>worker</span> <span class='op'>=</span> <span class='id identifier rubyid_worker'>worker</span>
|
759
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_summary'>summary</span> <span class='op'>=</span> <span class='id identifier rubyid_summary'>summary</span>
|
760
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_purchase_order'>purchase_order</span> <span class='op'>=</span> <span class='id identifier rubyid_purchase_order'>purchase_order</span>
|
761
|
+
<span class='kw'>end</span></pre>
|
762
|
+
</td>
|
763
|
+
</tr>
|
764
|
+
</table>
|
765
|
+
</div>
|
766
|
+
|
767
|
+
</div>
|
768
|
+
|
769
|
+
<div id="instance_attr_details" class="attr_details">
|
770
|
+
<h2>Instance Attribute Details</h2>
|
771
|
+
|
772
|
+
|
773
|
+
<span id="cid=-instance_method"></span>
|
774
|
+
<div class="method_details first">
|
775
|
+
<h3 class="signature first" id="cid-instance_method">
|
776
|
+
|
777
|
+
- (<tt>Object</tt>) <strong>cid</strong>
|
778
|
+
|
779
|
+
|
780
|
+
|
781
|
+
|
782
|
+
|
783
|
+
</h3><div class="docstring">
|
784
|
+
<div class="discussion">
|
785
|
+
|
786
|
+
<p>Returns the value of attribute cid</p>
|
787
|
+
|
788
|
+
|
789
|
+
</div>
|
790
|
+
</div>
|
791
|
+
<div class="tags">
|
792
|
+
|
793
|
+
|
794
|
+
</div><table class="source_code">
|
795
|
+
<tr>
|
796
|
+
<td>
|
797
|
+
<pre class="lines">
|
798
|
+
|
799
|
+
|
800
|
+
5
|
801
|
+
6
|
802
|
+
7</pre>
|
803
|
+
</td>
|
804
|
+
<td>
|
805
|
+
<pre class="code"><span class="info file"># File 'lib/aceroute/order.rb', line 5</span>
|
806
|
+
|
807
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_cid'>cid</span>
|
808
|
+
<span class='ivar'>@cid</span>
|
809
|
+
<span class='kw'>end</span></pre>
|
810
|
+
</td>
|
811
|
+
</tr>
|
812
|
+
</table>
|
813
|
+
</div>
|
814
|
+
|
815
|
+
|
816
|
+
<span id="customer=-instance_method"></span>
|
817
|
+
<div class="method_details ">
|
818
|
+
<h3 class="signature " id="customer-instance_method">
|
819
|
+
|
820
|
+
- (<tt>Object</tt>) <strong>customer</strong>
|
821
|
+
|
822
|
+
|
823
|
+
|
824
|
+
|
825
|
+
|
826
|
+
</h3><div class="docstring">
|
827
|
+
<div class="discussion">
|
828
|
+
|
829
|
+
<p>in msec (not sec) since epoch</p>
|
830
|
+
|
831
|
+
|
832
|
+
</div>
|
833
|
+
</div>
|
834
|
+
<div class="tags">
|
835
|
+
|
836
|
+
|
837
|
+
</div><table class="source_code">
|
838
|
+
<tr>
|
839
|
+
<td>
|
840
|
+
<pre class="lines">
|
841
|
+
|
842
|
+
|
843
|
+
3
|
844
|
+
4
|
845
|
+
5</pre>
|
846
|
+
</td>
|
847
|
+
<td>
|
848
|
+
<pre class="code"><span class="info file"># File 'lib/aceroute/order.rb', line 3</span>
|
849
|
+
|
850
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_customer'>customer</span>
|
851
|
+
<span class='ivar'>@customer</span>
|
852
|
+
<span class='kw'>end</span></pre>
|
853
|
+
</td>
|
854
|
+
</tr>
|
855
|
+
</table>
|
856
|
+
</div>
|
857
|
+
|
858
|
+
|
859
|
+
<span id="description=-instance_method"></span>
|
860
|
+
<div class="method_details ">
|
861
|
+
<h3 class="signature " id="description-instance_method">
|
862
|
+
|
863
|
+
- (<tt>Object</tt>) <strong>description</strong>
|
864
|
+
|
865
|
+
|
866
|
+
|
867
|
+
|
868
|
+
|
869
|
+
</h3><div class="docstring">
|
870
|
+
<div class="discussion">
|
871
|
+
|
872
|
+
<p>any freeform text here</p>
|
873
|
+
|
874
|
+
|
875
|
+
</div>
|
876
|
+
</div>
|
877
|
+
<div class="tags">
|
878
|
+
|
879
|
+
|
880
|
+
</div><table class="source_code">
|
881
|
+
<tr>
|
882
|
+
<td>
|
883
|
+
<pre class="lines">
|
884
|
+
|
885
|
+
|
886
|
+
4
|
887
|
+
5
|
888
|
+
6</pre>
|
889
|
+
</td>
|
890
|
+
<td>
|
891
|
+
<pre class="code"><span class="info file"># File 'lib/aceroute/order.rb', line 4</span>
|
892
|
+
|
893
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_description'>description</span>
|
894
|
+
<span class='ivar'>@description</span>
|
895
|
+
<span class='kw'>end</span></pre>
|
896
|
+
</td>
|
897
|
+
</tr>
|
898
|
+
</table>
|
899
|
+
</div>
|
900
|
+
|
901
|
+
|
902
|
+
<span id="duration=-instance_method"></span>
|
903
|
+
<div class="method_details ">
|
904
|
+
<h3 class="signature " id="duration-instance_method">
|
905
|
+
|
906
|
+
- (<tt>Object</tt>) <strong>duration</strong>
|
907
|
+
|
908
|
+
|
909
|
+
|
910
|
+
|
911
|
+
|
912
|
+
</h3><div class="docstring">
|
913
|
+
<div class="discussion">
|
914
|
+
|
915
|
+
<p>any freeform text here</p>
|
916
|
+
|
917
|
+
|
918
|
+
</div>
|
919
|
+
</div>
|
920
|
+
<div class="tags">
|
921
|
+
|
922
|
+
|
923
|
+
</div><table class="source_code">
|
924
|
+
<tr>
|
925
|
+
<td>
|
926
|
+
<pre class="lines">
|
927
|
+
|
928
|
+
|
929
|
+
4
|
930
|
+
5
|
931
|
+
6</pre>
|
932
|
+
</td>
|
933
|
+
<td>
|
934
|
+
<pre class="code"><span class="info file"># File 'lib/aceroute/order.rb', line 4</span>
|
935
|
+
|
936
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_duration'>duration</span>
|
937
|
+
<span class='ivar'>@duration</span>
|
938
|
+
<span class='kw'>end</span></pre>
|
939
|
+
</td>
|
940
|
+
</tr>
|
941
|
+
</table>
|
942
|
+
</div>
|
943
|
+
|
944
|
+
|
945
|
+
<span id="id=-instance_method"></span>
|
946
|
+
<div class="method_details ">
|
947
|
+
<h3 class="signature " id="id-instance_method">
|
948
|
+
|
949
|
+
- (<tt>Object</tt>) <strong>id</strong>
|
950
|
+
|
951
|
+
|
952
|
+
|
953
|
+
|
954
|
+
|
955
|
+
</h3><div class="docstring">
|
956
|
+
<div class="discussion">
|
957
|
+
|
958
|
+
<p>Returns the value of attribute id</p>
|
959
|
+
|
960
|
+
|
961
|
+
</div>
|
962
|
+
</div>
|
963
|
+
<div class="tags">
|
964
|
+
|
965
|
+
|
966
|
+
</div><table class="source_code">
|
967
|
+
<tr>
|
968
|
+
<td>
|
969
|
+
<pre class="lines">
|
970
|
+
|
971
|
+
|
972
|
+
5
|
973
|
+
6
|
974
|
+
7</pre>
|
975
|
+
</td>
|
976
|
+
<td>
|
977
|
+
<pre class="code"><span class="info file"># File 'lib/aceroute/order.rb', line 5</span>
|
978
|
+
|
979
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_id'>id</span>
|
980
|
+
<span class='ivar'>@id</span>
|
981
|
+
<span class='kw'>end</span></pre>
|
982
|
+
</td>
|
983
|
+
</tr>
|
984
|
+
</table>
|
985
|
+
</div>
|
986
|
+
|
987
|
+
|
988
|
+
<span id="location=-instance_method"></span>
|
989
|
+
<div class="method_details ">
|
990
|
+
<h3 class="signature " id="location-instance_method">
|
991
|
+
|
992
|
+
- (<tt>Object</tt>) <strong>location</strong>
|
993
|
+
|
994
|
+
|
995
|
+
|
996
|
+
|
997
|
+
|
998
|
+
</h3><div class="docstring">
|
999
|
+
<div class="discussion">
|
1000
|
+
|
1001
|
+
<p>in msec (not sec) since epoch</p>
|
1002
|
+
|
1003
|
+
|
1004
|
+
</div>
|
1005
|
+
</div>
|
1006
|
+
<div class="tags">
|
1007
|
+
|
1008
|
+
|
1009
|
+
</div><table class="source_code">
|
1010
|
+
<tr>
|
1011
|
+
<td>
|
1012
|
+
<pre class="lines">
|
1013
|
+
|
1014
|
+
|
1015
|
+
3
|
1016
|
+
4
|
1017
|
+
5</pre>
|
1018
|
+
</td>
|
1019
|
+
<td>
|
1020
|
+
<pre class="code"><span class="info file"># File 'lib/aceroute/order.rb', line 3</span>
|
1021
|
+
|
1022
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_location'>location</span>
|
1023
|
+
<span class='ivar'>@location</span>
|
1024
|
+
<span class='kw'>end</span></pre>
|
1025
|
+
</td>
|
1026
|
+
</tr>
|
1027
|
+
</table>
|
1028
|
+
</div>
|
1029
|
+
|
1030
|
+
|
1031
|
+
<span id="purchase_order=-instance_method"></span>
|
1032
|
+
<div class="method_details ">
|
1033
|
+
<h3 class="signature " id="purchase_order-instance_method">
|
1034
|
+
|
1035
|
+
- (<tt>Object</tt>) <strong>purchase_order</strong>
|
1036
|
+
|
1037
|
+
|
1038
|
+
|
1039
|
+
|
1040
|
+
|
1041
|
+
</h3><div class="docstring">
|
1042
|
+
<div class="discussion">
|
1043
|
+
|
1044
|
+
<p>any freeform text here</p>
|
1045
|
+
|
1046
|
+
|
1047
|
+
</div>
|
1048
|
+
</div>
|
1049
|
+
<div class="tags">
|
1050
|
+
|
1051
|
+
|
1052
|
+
</div><table class="source_code">
|
1053
|
+
<tr>
|
1054
|
+
<td>
|
1055
|
+
<pre class="lines">
|
1056
|
+
|
1057
|
+
|
1058
|
+
4
|
1059
|
+
5
|
1060
|
+
6</pre>
|
1061
|
+
</td>
|
1062
|
+
<td>
|
1063
|
+
<pre class="code"><span class="info file"># File 'lib/aceroute/order.rb', line 4</span>
|
1064
|
+
|
1065
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_purchase_order'>purchase_order</span>
|
1066
|
+
<span class='ivar'>@purchase_order</span>
|
1067
|
+
<span class='kw'>end</span></pre>
|
1068
|
+
</td>
|
1069
|
+
</tr>
|
1070
|
+
</table>
|
1071
|
+
</div>
|
1072
|
+
|
1073
|
+
|
1074
|
+
<span id="scheduled=-instance_method"></span>
|
1075
|
+
<div class="method_details ">
|
1076
|
+
<h3 class="signature " id="scheduled-instance_method">
|
1077
|
+
|
1078
|
+
- (<tt>Object</tt>) <strong>scheduled</strong>
|
1079
|
+
|
1080
|
+
|
1081
|
+
|
1082
|
+
|
1083
|
+
|
1084
|
+
</h3><div class="docstring">
|
1085
|
+
<div class="discussion">
|
1086
|
+
|
1087
|
+
<p>any freeform text here</p>
|
1088
|
+
|
1089
|
+
|
1090
|
+
</div>
|
1091
|
+
</div>
|
1092
|
+
<div class="tags">
|
1093
|
+
|
1094
|
+
|
1095
|
+
</div><table class="source_code">
|
1096
|
+
<tr>
|
1097
|
+
<td>
|
1098
|
+
<pre class="lines">
|
1099
|
+
|
1100
|
+
|
1101
|
+
4
|
1102
|
+
5
|
1103
|
+
6</pre>
|
1104
|
+
</td>
|
1105
|
+
<td>
|
1106
|
+
<pre class="code"><span class="info file"># File 'lib/aceroute/order.rb', line 4</span>
|
1107
|
+
|
1108
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_scheduled'>scheduled</span>
|
1109
|
+
<span class='ivar'>@scheduled</span>
|
1110
|
+
<span class='kw'>end</span></pre>
|
1111
|
+
</td>
|
1112
|
+
</tr>
|
1113
|
+
</table>
|
1114
|
+
</div>
|
1115
|
+
|
1116
|
+
|
1117
|
+
<span id="start_time=-instance_method"></span>
|
1118
|
+
<div class="method_details ">
|
1119
|
+
<h3 class="signature " id="start_time-instance_method">
|
1120
|
+
|
1121
|
+
- (<tt>Object</tt>) <strong>start_time</strong>
|
1122
|
+
|
1123
|
+
|
1124
|
+
|
1125
|
+
|
1126
|
+
|
1127
|
+
</h3><div class="docstring">
|
1128
|
+
<div class="discussion">
|
1129
|
+
|
1130
|
+
<p>in msec (not sec) since epoch</p>
|
1131
|
+
|
1132
|
+
|
1133
|
+
</div>
|
1134
|
+
</div>
|
1135
|
+
<div class="tags">
|
1136
|
+
|
1137
|
+
|
1138
|
+
</div><table class="source_code">
|
1139
|
+
<tr>
|
1140
|
+
<td>
|
1141
|
+
<pre class="lines">
|
1142
|
+
|
1143
|
+
|
1144
|
+
3
|
1145
|
+
4
|
1146
|
+
5</pre>
|
1147
|
+
</td>
|
1148
|
+
<td>
|
1149
|
+
<pre class="code"><span class="info file"># File 'lib/aceroute/order.rb', line 3</span>
|
1150
|
+
|
1151
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_start_time'>start_time</span>
|
1152
|
+
<span class='ivar'>@start_time</span>
|
1153
|
+
<span class='kw'>end</span></pre>
|
1154
|
+
</td>
|
1155
|
+
</tr>
|
1156
|
+
</table>
|
1157
|
+
</div>
|
1158
|
+
|
1159
|
+
|
1160
|
+
<span id="summary=-instance_method"></span>
|
1161
|
+
<div class="method_details ">
|
1162
|
+
<h3 class="signature " id="summary-instance_method">
|
1163
|
+
|
1164
|
+
- (<tt>Object</tt>) <strong>summary</strong>
|
1165
|
+
|
1166
|
+
|
1167
|
+
|
1168
|
+
|
1169
|
+
|
1170
|
+
</h3><div class="docstring">
|
1171
|
+
<div class="discussion">
|
1172
|
+
|
1173
|
+
<p>any freeform text here</p>
|
1174
|
+
|
1175
|
+
|
1176
|
+
</div>
|
1177
|
+
</div>
|
1178
|
+
<div class="tags">
|
1179
|
+
|
1180
|
+
|
1181
|
+
</div><table class="source_code">
|
1182
|
+
<tr>
|
1183
|
+
<td>
|
1184
|
+
<pre class="lines">
|
1185
|
+
|
1186
|
+
|
1187
|
+
4
|
1188
|
+
5
|
1189
|
+
6</pre>
|
1190
|
+
</td>
|
1191
|
+
<td>
|
1192
|
+
<pre class="code"><span class="info file"># File 'lib/aceroute/order.rb', line 4</span>
|
1193
|
+
|
1194
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_summary'>summary</span>
|
1195
|
+
<span class='ivar'>@summary</span>
|
1196
|
+
<span class='kw'>end</span></pre>
|
1197
|
+
</td>
|
1198
|
+
</tr>
|
1199
|
+
</table>
|
1200
|
+
</div>
|
1201
|
+
|
1202
|
+
|
1203
|
+
<span id="worker=-instance_method"></span>
|
1204
|
+
<div class="method_details ">
|
1205
|
+
<h3 class="signature " id="worker-instance_method">
|
1206
|
+
|
1207
|
+
- (<tt>Object</tt>) <strong>worker</strong>
|
1208
|
+
|
1209
|
+
|
1210
|
+
|
1211
|
+
|
1212
|
+
|
1213
|
+
</h3><div class="docstring">
|
1214
|
+
<div class="discussion">
|
1215
|
+
|
1216
|
+
<p>any freeform text here</p>
|
1217
|
+
|
1218
|
+
|
1219
|
+
</div>
|
1220
|
+
</div>
|
1221
|
+
<div class="tags">
|
1222
|
+
|
1223
|
+
|
1224
|
+
</div><table class="source_code">
|
1225
|
+
<tr>
|
1226
|
+
<td>
|
1227
|
+
<pre class="lines">
|
1228
|
+
|
1229
|
+
|
1230
|
+
4
|
1231
|
+
5
|
1232
|
+
6</pre>
|
1233
|
+
</td>
|
1234
|
+
<td>
|
1235
|
+
<pre class="code"><span class="info file"># File 'lib/aceroute/order.rb', line 4</span>
|
1236
|
+
|
1237
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_worker'>worker</span>
|
1238
|
+
<span class='ivar'>@worker</span>
|
1239
|
+
<span class='kw'>end</span></pre>
|
1240
|
+
</td>
|
1241
|
+
</tr>
|
1242
|
+
</table>
|
1243
|
+
</div>
|
1244
|
+
|
1245
|
+
</div>
|
1246
|
+
|
1247
|
+
|
1248
|
+
<div id="class_method_details" class="method_details_list">
|
1249
|
+
<h2>Class Method Details</h2>
|
1250
|
+
|
1251
|
+
|
1252
|
+
<div class="method_details first">
|
1253
|
+
<h3 class="signature first" id="delete-class_method">
|
1254
|
+
|
1255
|
+
+ (<tt>Object</tt>) <strong>delete</strong>(id)
|
1256
|
+
|
1257
|
+
|
1258
|
+
|
1259
|
+
|
1260
|
+
|
1261
|
+
</h3><div class="docstring">
|
1262
|
+
<div class="discussion">
|
1263
|
+
|
1264
|
+
<p>Deletes Aceroute::Location of given id from Aceroute</p>
|
1265
|
+
|
1266
|
+
|
1267
|
+
</div>
|
1268
|
+
</div>
|
1269
|
+
<div class="tags">
|
1270
|
+
<p class="tag_title">Parameters:</p>
|
1271
|
+
<ul class="param">
|
1272
|
+
|
1273
|
+
<li>
|
1274
|
+
|
1275
|
+
<span class='name'>id</span>
|
1276
|
+
|
1277
|
+
|
1278
|
+
<span class='type'>(<tt>Integer</tt>)</span>
|
1279
|
+
|
1280
|
+
|
1281
|
+
|
1282
|
+
</li>
|
1283
|
+
|
1284
|
+
</ul>
|
1285
|
+
|
1286
|
+
|
1287
|
+
</div><table class="source_code">
|
1288
|
+
<tr>
|
1289
|
+
<td>
|
1290
|
+
<pre class="lines">
|
1291
|
+
|
1292
|
+
|
1293
|
+
73
|
1294
|
+
74
|
1295
|
+
75
|
1296
|
+
76
|
1297
|
+
77</pre>
|
1298
|
+
</td>
|
1299
|
+
<td>
|
1300
|
+
<pre class="code"><span class="info file"># File 'lib/aceroute/order.rb', line 73</span>
|
1301
|
+
|
1302
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='id identifier rubyid_id'>id</span><span class='rparen'>)</span>
|
1303
|
+
<span class='id identifier rubyid_req'>req</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'><data><del><id></span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_id'>id</span><span class='embexpr_end'>}</span><span class='tstring_content'></id></del></data></span><span class='tstring_end'>"</span></span>
|
1304
|
+
<span class='id identifier rubyid_ret'>ret</span> <span class='op'>=</span> <span class='const'>Aceroute</span><span class='op'>::</span><span class='id identifier rubyid_call_api'>call_api</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>order.delete</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_req'>req</span><span class='rparen'>)</span>
|
1305
|
+
<span class='id identifier rubyid_ret'>ret</span><span class='period'>.</span><span class='id identifier rubyid_success'>success</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>true</span><span class='tstring_end'>"</span></span> <span class='op'>?</span> <span class='kw'>true</span> <span class='op'>:</span> <span class='kw'>false</span> <span class='comment'>#maybe raise error here instead
|
1306
|
+
</span><span class='kw'>end</span></pre>
|
1307
|
+
</td>
|
1308
|
+
</tr>
|
1309
|
+
</table>
|
1310
|
+
</div>
|
1311
|
+
|
1312
|
+
</div>
|
1313
|
+
|
1314
|
+
<div id="instance_method_details" class="method_details_list">
|
1315
|
+
<h2>Instance Method Details</h2>
|
1316
|
+
|
1317
|
+
|
1318
|
+
<div class="method_details first">
|
1319
|
+
<h3 class="signature first" id="create!-instance_method">
|
1320
|
+
|
1321
|
+
- (<tt><span class='object_link'><a href="" title="Aceroute::Order (class)">Aceroute::Order</a></span></tt>) <strong>create!</strong>
|
1322
|
+
|
1323
|
+
|
1324
|
+
|
1325
|
+
|
1326
|
+
|
1327
|
+
</h3><div class="docstring">
|
1328
|
+
<div class="discussion">
|
1329
|
+
|
1330
|
+
<p>Persists Aceroute::Order object to Aceroute API.</p>
|
1331
|
+
|
1332
|
+
|
1333
|
+
</div>
|
1334
|
+
</div>
|
1335
|
+
<div class="tags">
|
1336
|
+
|
1337
|
+
<p class="tag_title">Returns:</p>
|
1338
|
+
<ul class="return">
|
1339
|
+
|
1340
|
+
<li>
|
1341
|
+
|
1342
|
+
|
1343
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="Aceroute::Order (class)">Aceroute::Order</a></span></tt>)</span>
|
1344
|
+
|
1345
|
+
|
1346
|
+
|
1347
|
+
</li>
|
1348
|
+
|
1349
|
+
</ul>
|
1350
|
+
|
1351
|
+
</div><table class="source_code">
|
1352
|
+
<tr>
|
1353
|
+
<td>
|
1354
|
+
<pre class="lines">
|
1355
|
+
|
1356
|
+
|
1357
|
+
43
|
1358
|
+
44
|
1359
|
+
45
|
1360
|
+
46
|
1361
|
+
47
|
1362
|
+
48
|
1363
|
+
49
|
1364
|
+
50
|
1365
|
+
51
|
1366
|
+
52
|
1367
|
+
53
|
1368
|
+
54
|
1369
|
+
55
|
1370
|
+
56
|
1371
|
+
57
|
1372
|
+
58
|
1373
|
+
59
|
1374
|
+
60
|
1375
|
+
61
|
1376
|
+
62</pre>
|
1377
|
+
</td>
|
1378
|
+
<td>
|
1379
|
+
<pre class="code"><span class="info file"># File 'lib/aceroute/order.rb', line 43</span>
|
1380
|
+
|
1381
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_create!'>create!</span>
|
1382
|
+
<span class='id identifier rubyid_recs'>recs</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'><data>
|
1383
|
+
<event>
|
1384
|
+
<cid></span><span class='embexpr_beg'>#{</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_customer'>customer</span><span class='period'>.</span><span class='id identifier rubyid_cid'>cid</span><span class='embexpr_end'>}</span><span class='tstring_content'></cid>
|
1385
|
+
<nm></span><span class='embexpr_beg'>#{</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_description'>description</span><span class='embexpr_end'>}</span><span class='tstring_content'></nm>
|
1386
|
+
<dur></span><span class='embexpr_beg'>#{</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_duration'>duration</span><span class='embexpr_end'>}</span><span class='tstring_content'></dur>
|
1387
|
+
<schd></span><span class='embexpr_beg'>#{</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_scheduled'>scheduled</span> <span class='op'>?</span> <span class='int'>1</span> <span class='op'>:</span> <span class='int'>0</span><span class='embexpr_end'>}</span><span class='tstring_content'></schd>
|
1388
|
+
<start_epoch></span><span class='embexpr_beg'>#{</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_start_time'>start_time</span><span class='embexpr_end'>}</span><span class='tstring_content'></start_epoch>
|
1389
|
+
<lid></span><span class='embexpr_beg'>#{</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_location'>location</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span><span class='embexpr_end'>}</span><span class='tstring_content'></lid>
|
1390
|
+
<cntid></span><span class='embexpr_beg'>#{</span><span class='int'>0</span><span class='embexpr_end'>}</span><span class='tstring_content'></cntid>
|
1391
|
+
<rid></span><span class='embexpr_beg'>#{</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_worker'>worker</span><span class='embexpr_end'>}</span><span class='tstring_content'></rid>
|
1392
|
+
<dtl></span><span class='embexpr_beg'>#{</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_summary'>summary</span><span class='embexpr_end'>}</span><span class='tstring_content'></dtl>
|
1393
|
+
<po></span><span class='embexpr_beg'>#{</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_purchase_order'>purchase_order</span><span class='embexpr_end'>}</span><span class='tstring_content'></po>
|
1394
|
+
</event>
|
1395
|
+
</data></span><span class='tstring_end'>"</span></span>
|
1396
|
+
<span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='const'>Aceroute</span><span class='op'>::</span><span class='id identifier rubyid_call_api'>call_api</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>order.create</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_recs'>recs</span><span class='rparen'>)</span>
|
1397
|
+
<span class='id identifier rubyid_order'>order</span> <span class='op'>=</span> <span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_event'>event</span>
|
1398
|
+
<span class='id identifier rubyid_update_attrs'>update_attrs</span><span class='lparen'>(</span><span class='id identifier rubyid_order'>order</span><span class='rparen'>)</span>
|
1399
|
+
<span class='kw'>return</span> <span class='kw'>self</span>
|
1400
|
+
<span class='kw'>end</span></pre>
|
1401
|
+
</td>
|
1402
|
+
</tr>
|
1403
|
+
</table>
|
1404
|
+
</div>
|
1405
|
+
|
1406
|
+
<div class="method_details ">
|
1407
|
+
<h3 class="signature " id="destroy!-instance_method">
|
1408
|
+
|
1409
|
+
- (<tt>Object</tt>) <strong>destroy!</strong>(id = nil)
|
1410
|
+
|
1411
|
+
|
1412
|
+
|
1413
|
+
|
1414
|
+
|
1415
|
+
</h3><div class="docstring">
|
1416
|
+
<div class="discussion">
|
1417
|
+
|
1418
|
+
<p>Deletes this Aceroute::Order object (self) from Aceroute</p>
|
1419
|
+
|
1420
|
+
|
1421
|
+
</div>
|
1422
|
+
</div>
|
1423
|
+
<div class="tags">
|
1424
|
+
|
1425
|
+
|
1426
|
+
</div><table class="source_code">
|
1427
|
+
<tr>
|
1428
|
+
<td>
|
1429
|
+
<pre class="lines">
|
1430
|
+
|
1431
|
+
|
1432
|
+
66
|
1433
|
+
67
|
1434
|
+
68</pre>
|
1435
|
+
</td>
|
1436
|
+
<td>
|
1437
|
+
<pre class="code"><span class="info file"># File 'lib/aceroute/order.rb', line 66</span>
|
1438
|
+
|
1439
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_destroy!'>destroy!</span><span class='lparen'>(</span><span class='id identifier rubyid_id'>id</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
1440
|
+
<span class='const'>Order</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='id identifier rubyid_id'>id</span> <span class='op'>?</span> <span class='id identifier rubyid_id'>id</span> <span class='op'>:</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span><span class='rparen'>)</span>
|
1441
|
+
<span class='kw'>end</span></pre>
|
1442
|
+
</td>
|
1443
|
+
</tr>
|
1444
|
+
</table>
|
1445
|
+
</div>
|
1446
|
+
|
1447
|
+
</div>
|
1448
|
+
|
1449
|
+
</div>
|
1450
|
+
|
1451
|
+
<div id="footer">
|
1452
|
+
Generated on Sun Dec 4 11:17:52 2016 by
|
1453
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1454
|
+
0.8.7.6 (ruby-2.3.1).
|
1455
|
+
</div>
|
1456
|
+
|
1457
|
+
</body>
|
1458
|
+
</html>
|