GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Test Setup Failed
Push — master ( 311795...859c79 )
by Igor
06:22 queued 13s
created
src/Route4Me/V5/Addresses/AddressManifest.php 1 patch
Indentation   +82 added lines, -82 removed lines patch added patch discarded remove patch
@@ -10,87 +10,87 @@
 block discarded – undo
10 10
  */
11 11
 class AddressManifest extends \Route4Me\Common
12 12
 {
13
-    /** How much time is to be spent on service from the start in seconds.
14
-     * @var integer $running_service_time
15
-     */
16
-    public $running_service_time;
17
-
18
-    /** How much time is spent driving from the start in seconds.
19
-     * @var integer $running_travel_time
20
-     */
21
-    public $running_travel_time;
22
-
23
-    /** Running wait time.
24
-     * @var integer $running_wait_time
25
-     */
26
-    public $running_wait_time;
27
-
28
-    /** Distance traversed before reaching this address.
29
-     * @var double $running_distance
30
-     */
31
-    public $running_distance;
32
-
33
-    /** Expected fuel consumption from the start.
34
-     * @var double $fuel_from_start
35
-     */
36
-    public $fuel_from_start;
37
-
38
-    /** Expected fuel cost from start.
39
-     * @var double $fuel_cost_from_start
40
-     */
41
-    public $fuel_cost_from_start;
42
-
43
-    /** Projected arrival time UTC unixtime.
44
-     * @var integer $projected_arrival_time_ts
45
-     */
46
-    public $projected_arrival_time_ts;
47
-
48
-    /** Estimated departure time UTC unixtime.
49
-     * @var integer $projected_departure_time_ts
50
-     */
51
-    public $projected_departure_time_ts;
52
-
53
-    /** Time when the address was marked as visited UTC unixtime.
54
-     * This is actually equal to timestamp_last_visited most of the time.
55
-     * @var integer $actual_arrival_time_ts
56
-     */
57
-    public $actual_arrival_time_ts;
58
-
59
-    /** Time when the address was marked as departed UTC.
60
-     * This is actually equal to timestamp_last_departed most of the time.
61
-     * @var integer $actual_departure_time_ts
62
-     */
63
-    public $actual_departure_time_ts;
64
-
65
-    /** Estimated arrival time based on the current route progress,
66
-     * i.e. based on the last known actual_arrival_time.
67
-     * @var integer $estimated_arrival_time_ts
68
-     */
69
-    public $estimated_arrival_time_ts;
70
-
71
-    /** Estimated departure time based on the current route progress.
72
-     * @var integer $estimated_departure_time_ts
73
-     */
74
-    public $estimated_departure_time_ts;
75
-
76
-    /** Scheduled arrival time.
77
-     * @var integer $scheduled_arrival_time_ts
78
-     */
79
-    public $scheduled_arrival_time_ts;
80
-
81
-    /** Scheduled departure time.
82
-     * @var integer $scheduled_departure_time_ts
83
-     */
84
-    public $scheduled_departure_time_ts;
85
-
86
-    /** This is the difference between the originally projected arrival time and Actual Arrival Time.
87
-     * @var integer $time_impact
88
-     */
89
-    public $time_impact;
90
-
91
-    /** Distance traversed before reaching this address.
92
-     * @var double $udu_running_distance
93
-     */
94
-    public $udu_running_distance;
13
+	/** How much time is to be spent on service from the start in seconds.
14
+	 * @var integer $running_service_time
15
+	 */
16
+	public $running_service_time;
17
+
18
+	/** How much time is spent driving from the start in seconds.
19
+	 * @var integer $running_travel_time
20
+	 */
21
+	public $running_travel_time;
22
+
23
+	/** Running wait time.
24
+	 * @var integer $running_wait_time
25
+	 */
26
+	public $running_wait_time;
27
+
28
+	/** Distance traversed before reaching this address.
29
+	 * @var double $running_distance
30
+	 */
31
+	public $running_distance;
32
+
33
+	/** Expected fuel consumption from the start.
34
+	 * @var double $fuel_from_start
35
+	 */
36
+	public $fuel_from_start;
37
+
38
+	/** Expected fuel cost from start.
39
+	 * @var double $fuel_cost_from_start
40
+	 */
41
+	public $fuel_cost_from_start;
42
+
43
+	/** Projected arrival time UTC unixtime.
44
+	 * @var integer $projected_arrival_time_ts
45
+	 */
46
+	public $projected_arrival_time_ts;
47
+
48
+	/** Estimated departure time UTC unixtime.
49
+	 * @var integer $projected_departure_time_ts
50
+	 */
51
+	public $projected_departure_time_ts;
52
+
53
+	/** Time when the address was marked as visited UTC unixtime.
54
+	 * This is actually equal to timestamp_last_visited most of the time.
55
+	 * @var integer $actual_arrival_time_ts
56
+	 */
57
+	public $actual_arrival_time_ts;
58
+
59
+	/** Time when the address was marked as departed UTC.
60
+	 * This is actually equal to timestamp_last_departed most of the time.
61
+	 * @var integer $actual_departure_time_ts
62
+	 */
63
+	public $actual_departure_time_ts;
64
+
65
+	/** Estimated arrival time based on the current route progress,
66
+	 * i.e. based on the last known actual_arrival_time.
67
+	 * @var integer $estimated_arrival_time_ts
68
+	 */
69
+	public $estimated_arrival_time_ts;
70
+
71
+	/** Estimated departure time based on the current route progress.
72
+	 * @var integer $estimated_departure_time_ts
73
+	 */
74
+	public $estimated_departure_time_ts;
75
+
76
+	/** Scheduled arrival time.
77
+	 * @var integer $scheduled_arrival_time_ts
78
+	 */
79
+	public $scheduled_arrival_time_ts;
80
+
81
+	/** Scheduled departure time.
82
+	 * @var integer $scheduled_departure_time_ts
83
+	 */
84
+	public $scheduled_departure_time_ts;
85
+
86
+	/** This is the difference between the originally projected arrival time and Actual Arrival Time.
87
+	 * @var integer $time_impact
88
+	 */
89
+	public $time_impact;
90
+
91
+	/** Distance traversed before reaching this address.
92
+	 * @var double $udu_running_distance
93
+	 */
94
+	public $udu_running_distance;
95 95
 
96 96
 }
97 97
\ No newline at end of file
Please login to merge, or discard this patch.
src/Route4Me/V5/Addresses/GeoPoint.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -10,13 +10,13 @@
 block discarded – undo
10 10
  */
11 11
 class GeoPoint extends \Route4Me\Common
12 12
 {
13
-    /** Latitude
14
-     * @var double $lat
15
-     */
16
-    public $lat;
13
+	/** Latitude
14
+	 * @var double $lat
15
+	 */
16
+	public $lat;
17 17
 
18
-    /** Longitude
19
-     * @var double $lng
20
-     */
21
-    public $lng;
18
+	/** Longitude
19
+	 * @var double $lng
20
+	 */
21
+	public $lng;
22 22
 }
23 23
\ No newline at end of file
Please login to merge, or discard this patch.
src/Route4Me/V5/Addresses/OverrideAddresses.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -11,21 +11,21 @@
 block discarded – undo
11 11
  */
12 12
 class OverrideAddresses
13 13
 {
14
-    /**
15
-     * The service time specified or all the addresses in the route.
16
-     * @var long
17
-     */
18
-    public $time;
14
+	/**
15
+	 * The service time specified or all the addresses in the route.
16
+	 * @var long
17
+	 */
18
+	public $time;
19 19
 
20
-    /**
21
-     * Route address stop type
22
-     * @var string
23
-     */
24
-    public $address_stop_type;
20
+	/**
21
+	 * Route address stop type
22
+	 * @var string
23
+	 */
24
+	public $address_stop_type;
25 25
 
26
-    /**
27
-     * The address group
28
-     * @var string
29
-     */
30
-    public $group;
26
+	/**
27
+	 * The address group
28
+	 * @var string
29
+	 */
30
+	public $group;
31 31
 }
32 32
\ No newline at end of file
Please login to merge, or discard this patch.
src/Route4Me/V5/Addresses/Address.php 2 patches
Indentation   +664 added lines, -664 removed lines patch added patch discarded remove patch
@@ -14,668 +14,668 @@
 block discarded – undo
14 14
  */
15 15
 class Address extends \Route4Me\Common
16 16
 {
17
-    /**
18
-     * Route destination ID
19
-     * @var integer
20
-     */
21
-    public $route_destination_id;
22
-
23
-    /**
24
-     * Route alias
25
-     * @var string
26
-     */
27
-    public $alias;
28
-
29
-    /**
30
-     * The ID of the member inside the Route4Me system.
31
-     * @var integer
32
-     */
33
-    public $member_id;
34
-
35
-    /**
36
-     * Route destination address
37
-     * @var string
38
-     */
39
-    public $address;
40
-
41
-    /**
42
-     * Designate this stop as a depot.
43
-     * A route may have multiple depots/points of origin.
44
-     * @var boolean
45
-     */
46
-    public $is_depot;
47
-
48
-    /**
49
-     * Timeframe violation state
50
-     * @var integer
51
-     */
52
-    public $timeframe_violation_state;
53
-
54
-    /**
55
-     * Timeframe violation time
56
-     * @var integer
57
-     */
58
-    public $timeframe_violation_time;
59
-
60
-    /**
61
-     * Timeframe violation rate
62
-     * @var double
63
-     */
64
-    public $timeframe_violation_rate;
65
-
66
-    /**
67
-     * The latitude of this address
68
-     * @var double
69
-     */
70
-    public $lat;
71
-
72
-    /**
73
-     * The longitude of this address
74
-     * @var double
75
-     */
76
-    public $lng;
77
-
78
-    /**
79
-     * Curbside latitude.
80
-     * Generate optimal routes and driving directions to this curbside latitude.
81
-     * @var double
82
-     */
83
-    public $curbside_lat;
84
-
85
-    /**
86
-     * Curbside longitude.
87
-     * Generate optimal routes and driving directions to the curbside longitude.
88
-     * @var double
89
-     */
90
-    public $curbside_lng;
91
-
92
-    /**
93
-     * If present, the priority will sequence addresses in all the optimal routes so that
94
-     * higher priority addresses are general at the beginning of the route sequence.
95
-     * 1 is the highest priority, 100000 is the lowest.
96
-     * @var integer
97
-     */
98
-    public $priority;
99
-
100
-    /**
101
-     * The ID of the route being viewed, modified, or erased.
102
-     * @var string
103
-     */
104
-    public $route_id;
105
-
106
-    /**
107
-     * If this route was duplicated from an existing route,
108
-     * this value would have the original route's ID.
109
-     * @var string
110
-     */
111
-    public $original_route_id;
112
-
113
-    /**
114
-     * Route name of a depot address.
115
-     * @var string
116
-     */
117
-    public $route_name;
118
-
119
-    /**
120
-     * The ID of the optimization request that was used to initially instantiate this route.
121
-     * @var string
122
-     */
123
-    public $optimization_problem_id;
124
-
125
-    /**
126
-     * The destination's sequence number in the route.
127
-     * @var integer
128
-     */
129
-    public $sequence_no;
130
-
131
-    /**
132
-     * True if the address is geocoded.
133
-     * @var boolean
134
-     */
135
-    public $geocoded;
136
-
137
-    /**
138
-     * The preferred geocoding number.
139
-     * @var integer
140
-     */
141
-    public $preferred_geocoding;
142
-
143
-    /**
144
-     * True if geocoding failed.
145
-     * @var boolean
146
-     */
147
-    public $failed_geocoding;
148
-
149
-    /**
150
-     * An array containing Geocoding objects.
151
-     * @var Geocoding[]
152
-     */
153
-    public $geocodings = [];
154
-
155
-    /**
156
-     * When planning a route from the address book or using existing address book IDs,
157
-     * pass the address book ID (contact_id) for an address so that Route4Me can run
158
-     * analytics on the address book addresses that were used to plan routes, and to find previous visits to
159
-     * favorite addresses.
160
-     * @var integer
161
-     */
162
-    public $contact_id;
163
-
164
-    /**
165
-     * The address order ID
166
-     * @var integer
167
-     */
168
-    public $order_id;
169
-
170
-    /**
171
-     * Route address stop type
172
-     * @var string
173
-     */
174
-    public $address_stop_type;
175
-
176
-    /**
177
-     * The status flag to mark an address as visited (aka check in).
178
-     * @var boolean
179
-     */
180
-    public $is_visited;
181
-
182
-    /**
183
-     * The last known visited timestamp of this address.
184
-     * @var integer
185
-     */
186
-    public $timestamp_last_visited;
187
-
188
-    /**
189
-     * Latitude of the visited address
190
-     * @var double
191
-     */
192
-    public $visited_lat;
193
-
194
-    /**
195
-     * Longitude of the visited address
196
-     * @var double
197
-     */
198
-    public $visited_lng;
199
-
200
-    /**
201
-     * The status flag to mark an address as departed (aka check out).
202
-     * @var boolean
203
-     */
204
-    public $is_departed;
205
-
206
-    /**
207
-     * Departed address latitude
208
-     * @var double
209
-     */
210
-    public $departed_lat;
211
-
212
-    /** Departed address longitude
213
-     * @var double
214
-     */
215
-    public $departed_lng;
216
-
217
-    /**
218
-     * he last known departed timestamp of this address.
219
-     * @var integer
220
-     */
221
-    public $timestamp_last_departed;
222
-
223
-    /**
224
-     * The address group
225
-     * @var string
226
-     */
227
-    public $group;
228
-
229
-    /**
230
-     * Pass-through data about this route destination.<br>
231
-     * The data will be visible on the manifest, website, and mobile apps.
232
-     * @var string
233
-     */
234
-    public $customer_po;
235
-
236
-    /**
237
-     * Pass-through data about this route destination.<br>
238
-     * The data will be visible on the manifest, website, and mobile apps.
239
-     * @var string
240
-     */
241
-    public $invoice_no;
242
-
243
-    /**
244
-     * Pass-through data about this route destination.<br>
245
-     * The data will be visible on the manifest, website, and mobile apps.
246
-     * @var string
247
-     */
248
-    public $reference_no;
249
-
250
-    /**
251
-     * Pass-through data about this route destination.<br>
252
-     * The data will be visible on the manifest, website, and mobile apps.
253
-     * @var string
254
-     */
255
-    public $order_no;
256
-
257
-    /**
258
-     * The address cargo weight
259
-     * @var double
260
-     */
261
-    public $weight;
262
-
263
-    /**
264
-     * The address cost
265
-     * @var double
266
-     */
267
-    public $cost;
268
-
269
-    /**
270
-     * The address revenue
271
-     * @var double
272
-     */
273
-    public $revenue;
274
-
275
-    /**
276
-     * The cubic volume that this destination/order/line-item consumes/contains.<br>
277
-     * This is how much space it will take up on a vehicle.
278
-     * @var double
279
-     */
280
-    public $cube;
281
-
282
-    /**
283
-     * The number of pieces/palllets that this destination/order/line-item consumes/contains on a vehicle.
284
-     * @var integer
285
-     */
286
-    public $pieces;
287
-
288
-    /**
289
-     * First name
290
-     * @var string
291
-     */
292
-    public $first_name;
293
-
294
-    /**
295
-     * Last name
296
-     * @var string
297
-     */
298
-    public $last_name;
299
-
300
-    /**
301
-     * Pass-through data about this route destination.
302
-     * The data will be visible on the manifest, website, and mobile apps.
303
-     * Also used to email clients when vehicles are approaching (future capability).
304
-     * @var string
305
-     */
306
-    public $email;
307
-
308
-    /**
309
-     * Pass-through data about this route destination.
310
-     * The data will be visible on the manifest, website, and mobile apps.
311
-     * Also used to send SMS messages to clients when vehicles are approaching (future capability).
312
-     * @var string
313
-     */
314
-    public $phone;
315
-
316
-    /**
317
-     * The number of notes that are already associated with this address on the route.
318
-     * @var integer
319
-     */
320
-    public $destination_note_count;
321
-
322
-    /**
323
-     * Server-side generated amount of km/miles that
324
-     * it will take to get to the next location on the route.
325
-     * @var integer
326
-     */
327
-    public $drive_time_to_next_destination;
328
-
329
-    /**
330
-     * Abnormal traffic time to next destination.
331
-     * @var integer
332
-     */
333
-    public $abnormal_traffic_time_to_next_destination;
334
-
335
-    /**
336
-     * Uncongested time to next destination.
337
-     * @var integer
338
-     */
339
-    public $uncongested_time_to_next_destination;
340
-
341
-    /**
342
-     * Traffic time to next destination.
343
-     * @var integer
344
-     */
345
-    public $traffic_time_to_next_destination;
346
-
347
-    /**
348
-     * Server-side generated amount of seconds
349
-     * that it will take to get to the next location.
350
-     * @var double
351
-     */
352
-    public $distance_to_next_destination;
353
-
354
-    /**
355
-     * The unique socket channel name which
356
-     * should be used to get real time alerts.
357
-     * @var string
358
-     */
359
-    public $channel_name;
360
-
361
-    /**
362
-     * Alias of a pickup point.
363
-     * @var string
364
-     */
365
-    public $pickup;
366
-
367
-    /**
368
-     * Alias of the paired pickup point.
369
-     * @var string
370
-     */
371
-    public $dropoff;
372
-
373
-    /**
374
-     * If equal to 1, the pickup and dropoff addresses are joint
375
-     * (one by one despite the regular pickup-dropoff addresses
376
-     * when it's possible to have multiple pickup addresses with one dropoff address).
377
-     * @var integer
378
-     */
379
-    public $joint;
380
-
381
-    /**
382
-     * Generated time window start.
383
-     * @var integer
384
-     */
385
-    public $generated_time_window_start;
386
-
387
-    /**
388
-     * Estimated time window end based on the optimization engine,
389
-     * after all the sequencing has been completed.
390
-     * @var integer
391
-     */
392
-    public $generated_time_window_end;
393
-
394
-    /**
395
-     * The address time window start.
396
-     * @var integer
397
-     */
398
-    public $time_window_start;
399
-
400
-    /**
401
-     * The address time window end.
402
-     * @var integer
403
-     */
404
-    public $time_window_end;
405
-
406
-    /**
407
-     * The address time window start 2.
408
-     * @var integer
409
-     */
410
-    public $time_window_start_2;
411
-
412
-    /**
413
-     * The address time window end 2.
414
-     * @var integer
415
-     */
416
-    public $time_window_end_2;
417
-
418
-    /**
419
-     * Geofence detected visited timestamp
420
-     * @var integer
421
-     */
422
-    public $geofence_detected_visited_timestamp;
423
-
424
-    /**
425
-     * Geofence detected departed timestamp
426
-     * @var integer
427
-     */
428
-    public $geofence_detected_departed_timestamp;
429
-
430
-    /**
431
-     * Geofence detected service time
432
-     * @var integer
433
-     */
434
-    public $geofence_detected_service_time;
435
-
436
-    /**
437
-     * Geofence detected visited latitude
438
-     * @var double
439
-     */
440
-    public $geofence_detected_visited_lat;
441
-
442
-    /**
443
-     * Geofence detected visited longitude
444
-     * @var double
445
-     */
446
-    public $geofence_detected_visited_lng;
447
-
448
-    /**
449
-     * Geofence detected departed latitude
450
-     * @var double
451
-     */
452
-    public $geofence_detected_departed_lat;
453
-
454
-    /**
455
-     * Geofence detected departed longitude
456
-     * @var double
457
-     */
458
-    public $geofence_detected_departed_lng;
459
-
460
-    /**
461
-     * The expected amount of time that will be spent
462
-     * at this address by the driver/user.
463
-     * @var integer
464
-     */
465
-    public $time;
466
-
467
-    /**
468
-     * System-wide unique code, which permits end-users (recipients)
469
-     * to track the status of their order.
470
-     * @var string
471
-     */
472
-    public $tracking_number;
473
-
474
-    /**
475
-     * The address custom fields.
476
-     * @var array
477
-     */
478
-    public $custom_fields = [];
479
-
480
-    /**
481
-     * The custom fields configuration in JSON format.
482
-     * @var string
483
-     */
484
-    public $custom_fields_str_json;
485
-
486
-    /**
487
-     * The custom fields configuration.
488
-     * @var string[]
489
-     */
490
-    public $custom_fields_config = [];
491
-
492
-    /**
493
-     * The custom fields configuration in JSON format.
494
-     * @var string
495
-     */
496
-    public $custom_fields_config_str_json;
497
-
498
-    /**
499
-     * The address notes
500
-     * @var AddressNote[]
501
-     */
502
-    public $notes = [];
503
-
504
-    /**
505
-     * Bundle count
506
-     * @var integer
507
-     */
508
-    public $bundle_count;
509
-
510
-    /**
511
-     * Bundle items
512
-     * @var BundledItemResponse[]
513
-     */
514
-    public $bundle_items;
515
-
516
-    /**
517
-     * List of the order inventories
518
-     * @var OrderInventory[]
519
-     */
520
-    public $order_inventory;
521
-
522
-    /**
523
-     * UDU distance to next destination.
524
-     * @var double
525
-     */
526
-    public $udu_distance_to_next_destination;
527
-
528
-    /**
529
-     * Wait time to next destination.
530
-     * @var integer
531
-     */
532
-    public $wait_time_to_next_destination;
533
-
534
-    /**
535
-     * Manifest of a route address.
536
-     * @var AddressManifest
537
-     */
538
-    public $manifest;
539
-
540
-    /**
541
-     * An array of the required driver skills for the address.
542
-     * @var array
543
-     */
544
-    public $required_skills = [];
545
-
546
-    public $additional_status;
547
-
548
-    public function __construct()
549
-    {
550
-        // TO DO: replace with API 5 endpoint after finishing.
551
-        Route4Me::setBaseUrl(  Endpoint4::BASE_URL);
552
-    }
553
-
554
-    public static function fromArray(array $params)
555
-    {
556
-        $address = new self();
557
-
558
-        foreach ($params as $key => $value) {
559
-            if (property_exists($address, $key)) {
560
-                $address->{$key} = $value;
561
-            } else {
562
-                throw new BadParam("Correct parameter must be provided. Wrong Parameter: $key");
563
-            }
564
-        }
565
-
566
-        return $address;
567
-    }
568
-
569
-    public static function getAddress($routeId, $addressId)
570
-    {
571
-        $address = Route4Me::makeRequst([
572
-            'url' => Endpoint4::ADDRESS_V4,
573
-            'method' => 'GET',
574
-            'query' => [
575
-                'route_id' => $routeId,
576
-                'route_destination_id' => $addressId,
577
-            ],
578
-        ]);
579
-
580
-        return self::fromArray($address);
581
-    }
582
-
583
-    public function update()
584
-    {
585
-        $addressUpdate = Route4Me::makeRequst([
586
-            'url' => Endpoint4::ADDRESS_V4,
587
-            'method' => 'PUT',
588
-            'body' => $this->toArray(),
589
-            'query' => [
590
-                'route_id' => $this->route_id,
591
-                'route_destination_id' => $this->route_destination_id,
592
-            ],
593
-        ]);
594
-
595
-        return self::fromArray($addressUpdate);
596
-    }
597
-
598
-    /**
599
-     * Marks an address as marked as visited/as departed
600
-     * depending on which parameter is specified: 'is_visited' or 'is_departed'.
601
-     */
602
-    public function markAddress($params)
603
-    {
604
-        $allQueryFields = ['route_id', 'route_destination_id'];
605
-        $allBodyFields = ['is_visited', 'is_departed'];
606
-
607
-        $result = Route4Me::makeRequst([
608
-            'url' => Endpoint4::ADDRESS_V4,
609
-            'method' => 'PUT',
610
-            'query' => Route4Me::generateRequestParameters($allQueryFields, $params),
611
-            'body' => Route4Me::generateRequestParameters($allBodyFields, $params),
612
-        ]);
613
-
614
-        return $result;
615
-    }
616
-
617
-    /**
618
-     * Marks an address as departed.
619
-     */
620
-    public function markAsDeparted($params)
621
-    {
622
-        $allQueryFields = ['route_id', 'address_id', 'is_departed', 'member_id'];
623
-
624
-        $address = Route4Me::makeRequst([
625
-            'url' => Endpoint4::MARK_ADDRESS_DEPARTED,
626
-            'method' => 'PUT',
627
-            'query' => Route4Me::generateRequestParameters($allQueryFields, $params),
628
-        ]);
629
-
630
-        return $address;
631
-    }
632
-
633
-    /**
634
-     * Marks an address as visited.
635
-     */
636
-    public function markAsVisited($params)
637
-    {
638
-        $allQueryFields = ['route_id', 'address_id', 'is_visited', 'member_id'];
639
-
640
-        $address = Route4Me::makeRequst([
641
-            'url' => Endpoint4::UPDATE_ADDRESS_VISITED,
642
-            'method' => 'PUT',
643
-            'query' => Route4Me::generateRequestParameters($allQueryFields, $params),
644
-        ]);
645
-
646
-        return $address;
647
-    }
648
-
649
-    public function deleteAddress()
650
-    {
651
-        $address = Route4Me::makeRequst([
652
-            'url' => Endpoint4::ADDRESS_V4,
653
-            'method' => 'DELETE',
654
-            'query' => [
655
-                'route_id' => $this->route_id,
656
-                'route_destination_id' => $this->route_destination_id,
657
-            ],
658
-        ]);
659
-
660
-        return (bool)$address['deleted'];
661
-    }
662
-
663
-    public function moveDestinationToRoute($params)
664
-    {
665
-        $allBodyFields = ['to_route_id', 'route_destination_id', 'after_destination_id'];
666
-
667
-        $result = Route4Me::makeRequst([
668
-            'url' => Endpoint4::MOVE_ROUTE_DESTINATION,
669
-            'method' => 'POST',
670
-            'body' => Route4Me::generateRequestParameters($allBodyFields, $params),
671
-            'HTTPHEADER' => 'Content-Type: multipart/form-data',
672
-        ]);
673
-
674
-        return $result;
675
-    }
676
-
677
-    public function getAddressId()
678
-    {
679
-        return $this->route_destination_id;
680
-    }
17
+	/**
18
+	 * Route destination ID
19
+	 * @var integer
20
+	 */
21
+	public $route_destination_id;
22
+
23
+	/**
24
+	 * Route alias
25
+	 * @var string
26
+	 */
27
+	public $alias;
28
+
29
+	/**
30
+	 * The ID of the member inside the Route4Me system.
31
+	 * @var integer
32
+	 */
33
+	public $member_id;
34
+
35
+	/**
36
+	 * Route destination address
37
+	 * @var string
38
+	 */
39
+	public $address;
40
+
41
+	/**
42
+	 * Designate this stop as a depot.
43
+	 * A route may have multiple depots/points of origin.
44
+	 * @var boolean
45
+	 */
46
+	public $is_depot;
47
+
48
+	/**
49
+	 * Timeframe violation state
50
+	 * @var integer
51
+	 */
52
+	public $timeframe_violation_state;
53
+
54
+	/**
55
+	 * Timeframe violation time
56
+	 * @var integer
57
+	 */
58
+	public $timeframe_violation_time;
59
+
60
+	/**
61
+	 * Timeframe violation rate
62
+	 * @var double
63
+	 */
64
+	public $timeframe_violation_rate;
65
+
66
+	/**
67
+	 * The latitude of this address
68
+	 * @var double
69
+	 */
70
+	public $lat;
71
+
72
+	/**
73
+	 * The longitude of this address
74
+	 * @var double
75
+	 */
76
+	public $lng;
77
+
78
+	/**
79
+	 * Curbside latitude.
80
+	 * Generate optimal routes and driving directions to this curbside latitude.
81
+	 * @var double
82
+	 */
83
+	public $curbside_lat;
84
+
85
+	/**
86
+	 * Curbside longitude.
87
+	 * Generate optimal routes and driving directions to the curbside longitude.
88
+	 * @var double
89
+	 */
90
+	public $curbside_lng;
91
+
92
+	/**
93
+	 * If present, the priority will sequence addresses in all the optimal routes so that
94
+	 * higher priority addresses are general at the beginning of the route sequence.
95
+	 * 1 is the highest priority, 100000 is the lowest.
96
+	 * @var integer
97
+	 */
98
+	public $priority;
99
+
100
+	/**
101
+	 * The ID of the route being viewed, modified, or erased.
102
+	 * @var string
103
+	 */
104
+	public $route_id;
105
+
106
+	/**
107
+	 * If this route was duplicated from an existing route,
108
+	 * this value would have the original route's ID.
109
+	 * @var string
110
+	 */
111
+	public $original_route_id;
112
+
113
+	/**
114
+	 * Route name of a depot address.
115
+	 * @var string
116
+	 */
117
+	public $route_name;
118
+
119
+	/**
120
+	 * The ID of the optimization request that was used to initially instantiate this route.
121
+	 * @var string
122
+	 */
123
+	public $optimization_problem_id;
124
+
125
+	/**
126
+	 * The destination's sequence number in the route.
127
+	 * @var integer
128
+	 */
129
+	public $sequence_no;
130
+
131
+	/**
132
+	 * True if the address is geocoded.
133
+	 * @var boolean
134
+	 */
135
+	public $geocoded;
136
+
137
+	/**
138
+	 * The preferred geocoding number.
139
+	 * @var integer
140
+	 */
141
+	public $preferred_geocoding;
142
+
143
+	/**
144
+	 * True if geocoding failed.
145
+	 * @var boolean
146
+	 */
147
+	public $failed_geocoding;
148
+
149
+	/**
150
+	 * An array containing Geocoding objects.
151
+	 * @var Geocoding[]
152
+	 */
153
+	public $geocodings = [];
154
+
155
+	/**
156
+	 * When planning a route from the address book or using existing address book IDs,
157
+	 * pass the address book ID (contact_id) for an address so that Route4Me can run
158
+	 * analytics on the address book addresses that were used to plan routes, and to find previous visits to
159
+	 * favorite addresses.
160
+	 * @var integer
161
+	 */
162
+	public $contact_id;
163
+
164
+	/**
165
+	 * The address order ID
166
+	 * @var integer
167
+	 */
168
+	public $order_id;
169
+
170
+	/**
171
+	 * Route address stop type
172
+	 * @var string
173
+	 */
174
+	public $address_stop_type;
175
+
176
+	/**
177
+	 * The status flag to mark an address as visited (aka check in).
178
+	 * @var boolean
179
+	 */
180
+	public $is_visited;
181
+
182
+	/**
183
+	 * The last known visited timestamp of this address.
184
+	 * @var integer
185
+	 */
186
+	public $timestamp_last_visited;
187
+
188
+	/**
189
+	 * Latitude of the visited address
190
+	 * @var double
191
+	 */
192
+	public $visited_lat;
193
+
194
+	/**
195
+	 * Longitude of the visited address
196
+	 * @var double
197
+	 */
198
+	public $visited_lng;
199
+
200
+	/**
201
+	 * The status flag to mark an address as departed (aka check out).
202
+	 * @var boolean
203
+	 */
204
+	public $is_departed;
205
+
206
+	/**
207
+	 * Departed address latitude
208
+	 * @var double
209
+	 */
210
+	public $departed_lat;
211
+
212
+	/** Departed address longitude
213
+	 * @var double
214
+	 */
215
+	public $departed_lng;
216
+
217
+	/**
218
+	 * he last known departed timestamp of this address.
219
+	 * @var integer
220
+	 */
221
+	public $timestamp_last_departed;
222
+
223
+	/**
224
+	 * The address group
225
+	 * @var string
226
+	 */
227
+	public $group;
228
+
229
+	/**
230
+	 * Pass-through data about this route destination.<br>
231
+	 * The data will be visible on the manifest, website, and mobile apps.
232
+	 * @var string
233
+	 */
234
+	public $customer_po;
235
+
236
+	/**
237
+	 * Pass-through data about this route destination.<br>
238
+	 * The data will be visible on the manifest, website, and mobile apps.
239
+	 * @var string
240
+	 */
241
+	public $invoice_no;
242
+
243
+	/**
244
+	 * Pass-through data about this route destination.<br>
245
+	 * The data will be visible on the manifest, website, and mobile apps.
246
+	 * @var string
247
+	 */
248
+	public $reference_no;
249
+
250
+	/**
251
+	 * Pass-through data about this route destination.<br>
252
+	 * The data will be visible on the manifest, website, and mobile apps.
253
+	 * @var string
254
+	 */
255
+	public $order_no;
256
+
257
+	/**
258
+	 * The address cargo weight
259
+	 * @var double
260
+	 */
261
+	public $weight;
262
+
263
+	/**
264
+	 * The address cost
265
+	 * @var double
266
+	 */
267
+	public $cost;
268
+
269
+	/**
270
+	 * The address revenue
271
+	 * @var double
272
+	 */
273
+	public $revenue;
274
+
275
+	/**
276
+	 * The cubic volume that this destination/order/line-item consumes/contains.<br>
277
+	 * This is how much space it will take up on a vehicle.
278
+	 * @var double
279
+	 */
280
+	public $cube;
281
+
282
+	/**
283
+	 * The number of pieces/palllets that this destination/order/line-item consumes/contains on a vehicle.
284
+	 * @var integer
285
+	 */
286
+	public $pieces;
287
+
288
+	/**
289
+	 * First name
290
+	 * @var string
291
+	 */
292
+	public $first_name;
293
+
294
+	/**
295
+	 * Last name
296
+	 * @var string
297
+	 */
298
+	public $last_name;
299
+
300
+	/**
301
+	 * Pass-through data about this route destination.
302
+	 * The data will be visible on the manifest, website, and mobile apps.
303
+	 * Also used to email clients when vehicles are approaching (future capability).
304
+	 * @var string
305
+	 */
306
+	public $email;
307
+
308
+	/**
309
+	 * Pass-through data about this route destination.
310
+	 * The data will be visible on the manifest, website, and mobile apps.
311
+	 * Also used to send SMS messages to clients when vehicles are approaching (future capability).
312
+	 * @var string
313
+	 */
314
+	public $phone;
315
+
316
+	/**
317
+	 * The number of notes that are already associated with this address on the route.
318
+	 * @var integer
319
+	 */
320
+	public $destination_note_count;
321
+
322
+	/**
323
+	 * Server-side generated amount of km/miles that
324
+	 * it will take to get to the next location on the route.
325
+	 * @var integer
326
+	 */
327
+	public $drive_time_to_next_destination;
328
+
329
+	/**
330
+	 * Abnormal traffic time to next destination.
331
+	 * @var integer
332
+	 */
333
+	public $abnormal_traffic_time_to_next_destination;
334
+
335
+	/**
336
+	 * Uncongested time to next destination.
337
+	 * @var integer
338
+	 */
339
+	public $uncongested_time_to_next_destination;
340
+
341
+	/**
342
+	 * Traffic time to next destination.
343
+	 * @var integer
344
+	 */
345
+	public $traffic_time_to_next_destination;
346
+
347
+	/**
348
+	 * Server-side generated amount of seconds
349
+	 * that it will take to get to the next location.
350
+	 * @var double
351
+	 */
352
+	public $distance_to_next_destination;
353
+
354
+	/**
355
+	 * The unique socket channel name which
356
+	 * should be used to get real time alerts.
357
+	 * @var string
358
+	 */
359
+	public $channel_name;
360
+
361
+	/**
362
+	 * Alias of a pickup point.
363
+	 * @var string
364
+	 */
365
+	public $pickup;
366
+
367
+	/**
368
+	 * Alias of the paired pickup point.
369
+	 * @var string
370
+	 */
371
+	public $dropoff;
372
+
373
+	/**
374
+	 * If equal to 1, the pickup and dropoff addresses are joint
375
+	 * (one by one despite the regular pickup-dropoff addresses
376
+	 * when it's possible to have multiple pickup addresses with one dropoff address).
377
+	 * @var integer
378
+	 */
379
+	public $joint;
380
+
381
+	/**
382
+	 * Generated time window start.
383
+	 * @var integer
384
+	 */
385
+	public $generated_time_window_start;
386
+
387
+	/**
388
+	 * Estimated time window end based on the optimization engine,
389
+	 * after all the sequencing has been completed.
390
+	 * @var integer
391
+	 */
392
+	public $generated_time_window_end;
393
+
394
+	/**
395
+	 * The address time window start.
396
+	 * @var integer
397
+	 */
398
+	public $time_window_start;
399
+
400
+	/**
401
+	 * The address time window end.
402
+	 * @var integer
403
+	 */
404
+	public $time_window_end;
405
+
406
+	/**
407
+	 * The address time window start 2.
408
+	 * @var integer
409
+	 */
410
+	public $time_window_start_2;
411
+
412
+	/**
413
+	 * The address time window end 2.
414
+	 * @var integer
415
+	 */
416
+	public $time_window_end_2;
417
+
418
+	/**
419
+	 * Geofence detected visited timestamp
420
+	 * @var integer
421
+	 */
422
+	public $geofence_detected_visited_timestamp;
423
+
424
+	/**
425
+	 * Geofence detected departed timestamp
426
+	 * @var integer
427
+	 */
428
+	public $geofence_detected_departed_timestamp;
429
+
430
+	/**
431
+	 * Geofence detected service time
432
+	 * @var integer
433
+	 */
434
+	public $geofence_detected_service_time;
435
+
436
+	/**
437
+	 * Geofence detected visited latitude
438
+	 * @var double
439
+	 */
440
+	public $geofence_detected_visited_lat;
441
+
442
+	/**
443
+	 * Geofence detected visited longitude
444
+	 * @var double
445
+	 */
446
+	public $geofence_detected_visited_lng;
447
+
448
+	/**
449
+	 * Geofence detected departed latitude
450
+	 * @var double
451
+	 */
452
+	public $geofence_detected_departed_lat;
453
+
454
+	/**
455
+	 * Geofence detected departed longitude
456
+	 * @var double
457
+	 */
458
+	public $geofence_detected_departed_lng;
459
+
460
+	/**
461
+	 * The expected amount of time that will be spent
462
+	 * at this address by the driver/user.
463
+	 * @var integer
464
+	 */
465
+	public $time;
466
+
467
+	/**
468
+	 * System-wide unique code, which permits end-users (recipients)
469
+	 * to track the status of their order.
470
+	 * @var string
471
+	 */
472
+	public $tracking_number;
473
+
474
+	/**
475
+	 * The address custom fields.
476
+	 * @var array
477
+	 */
478
+	public $custom_fields = [];
479
+
480
+	/**
481
+	 * The custom fields configuration in JSON format.
482
+	 * @var string
483
+	 */
484
+	public $custom_fields_str_json;
485
+
486
+	/**
487
+	 * The custom fields configuration.
488
+	 * @var string[]
489
+	 */
490
+	public $custom_fields_config = [];
491
+
492
+	/**
493
+	 * The custom fields configuration in JSON format.
494
+	 * @var string
495
+	 */
496
+	public $custom_fields_config_str_json;
497
+
498
+	/**
499
+	 * The address notes
500
+	 * @var AddressNote[]
501
+	 */
502
+	public $notes = [];
503
+
504
+	/**
505
+	 * Bundle count
506
+	 * @var integer
507
+	 */
508
+	public $bundle_count;
509
+
510
+	/**
511
+	 * Bundle items
512
+	 * @var BundledItemResponse[]
513
+	 */
514
+	public $bundle_items;
515
+
516
+	/**
517
+	 * List of the order inventories
518
+	 * @var OrderInventory[]
519
+	 */
520
+	public $order_inventory;
521
+
522
+	/**
523
+	 * UDU distance to next destination.
524
+	 * @var double
525
+	 */
526
+	public $udu_distance_to_next_destination;
527
+
528
+	/**
529
+	 * Wait time to next destination.
530
+	 * @var integer
531
+	 */
532
+	public $wait_time_to_next_destination;
533
+
534
+	/**
535
+	 * Manifest of a route address.
536
+	 * @var AddressManifest
537
+	 */
538
+	public $manifest;
539
+
540
+	/**
541
+	 * An array of the required driver skills for the address.
542
+	 * @var array
543
+	 */
544
+	public $required_skills = [];
545
+
546
+	public $additional_status;
547
+
548
+	public function __construct()
549
+	{
550
+		// TO DO: replace with API 5 endpoint after finishing.
551
+		Route4Me::setBaseUrl(  Endpoint4::BASE_URL);
552
+	}
553
+
554
+	public static function fromArray(array $params)
555
+	{
556
+		$address = new self();
557
+
558
+		foreach ($params as $key => $value) {
559
+			if (property_exists($address, $key)) {
560
+				$address->{$key} = $value;
561
+			} else {
562
+				throw new BadParam("Correct parameter must be provided. Wrong Parameter: $key");
563
+			}
564
+		}
565
+
566
+		return $address;
567
+	}
568
+
569
+	public static function getAddress($routeId, $addressId)
570
+	{
571
+		$address = Route4Me::makeRequst([
572
+			'url' => Endpoint4::ADDRESS_V4,
573
+			'method' => 'GET',
574
+			'query' => [
575
+				'route_id' => $routeId,
576
+				'route_destination_id' => $addressId,
577
+			],
578
+		]);
579
+
580
+		return self::fromArray($address);
581
+	}
582
+
583
+	public function update()
584
+	{
585
+		$addressUpdate = Route4Me::makeRequst([
586
+			'url' => Endpoint4::ADDRESS_V4,
587
+			'method' => 'PUT',
588
+			'body' => $this->toArray(),
589
+			'query' => [
590
+				'route_id' => $this->route_id,
591
+				'route_destination_id' => $this->route_destination_id,
592
+			],
593
+		]);
594
+
595
+		return self::fromArray($addressUpdate);
596
+	}
597
+
598
+	/**
599
+	 * Marks an address as marked as visited/as departed
600
+	 * depending on which parameter is specified: 'is_visited' or 'is_departed'.
601
+	 */
602
+	public function markAddress($params)
603
+	{
604
+		$allQueryFields = ['route_id', 'route_destination_id'];
605
+		$allBodyFields = ['is_visited', 'is_departed'];
606
+
607
+		$result = Route4Me::makeRequst([
608
+			'url' => Endpoint4::ADDRESS_V4,
609
+			'method' => 'PUT',
610
+			'query' => Route4Me::generateRequestParameters($allQueryFields, $params),
611
+			'body' => Route4Me::generateRequestParameters($allBodyFields, $params),
612
+		]);
613
+
614
+		return $result;
615
+	}
616
+
617
+	/**
618
+	 * Marks an address as departed.
619
+	 */
620
+	public function markAsDeparted($params)
621
+	{
622
+		$allQueryFields = ['route_id', 'address_id', 'is_departed', 'member_id'];
623
+
624
+		$address = Route4Me::makeRequst([
625
+			'url' => Endpoint4::MARK_ADDRESS_DEPARTED,
626
+			'method' => 'PUT',
627
+			'query' => Route4Me::generateRequestParameters($allQueryFields, $params),
628
+		]);
629
+
630
+		return $address;
631
+	}
632
+
633
+	/**
634
+	 * Marks an address as visited.
635
+	 */
636
+	public function markAsVisited($params)
637
+	{
638
+		$allQueryFields = ['route_id', 'address_id', 'is_visited', 'member_id'];
639
+
640
+		$address = Route4Me::makeRequst([
641
+			'url' => Endpoint4::UPDATE_ADDRESS_VISITED,
642
+			'method' => 'PUT',
643
+			'query' => Route4Me::generateRequestParameters($allQueryFields, $params),
644
+		]);
645
+
646
+		return $address;
647
+	}
648
+
649
+	public function deleteAddress()
650
+	{
651
+		$address = Route4Me::makeRequst([
652
+			'url' => Endpoint4::ADDRESS_V4,
653
+			'method' => 'DELETE',
654
+			'query' => [
655
+				'route_id' => $this->route_id,
656
+				'route_destination_id' => $this->route_destination_id,
657
+			],
658
+		]);
659
+
660
+		return (bool)$address['deleted'];
661
+	}
662
+
663
+	public function moveDestinationToRoute($params)
664
+	{
665
+		$allBodyFields = ['to_route_id', 'route_destination_id', 'after_destination_id'];
666
+
667
+		$result = Route4Me::makeRequst([
668
+			'url' => Endpoint4::MOVE_ROUTE_DESTINATION,
669
+			'method' => 'POST',
670
+			'body' => Route4Me::generateRequestParameters($allBodyFields, $params),
671
+			'HTTPHEADER' => 'Content-Type: multipart/form-data',
672
+		]);
673
+
674
+		return $result;
675
+	}
676
+
677
+	public function getAddressId()
678
+	{
679
+		return $this->route_destination_id;
680
+	}
681 681
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -548,7 +548,7 @@
 block discarded – undo
548 548
     public function __construct()
549 549
     {
550 550
         // TO DO: replace with API 5 endpoint after finishing.
551
-        Route4Me::setBaseUrl(  Endpoint4::BASE_URL);
551
+        Route4Me::setBaseUrl(Endpoint4::BASE_URL);
552 552
     }
553 553
 
554 554
     public static function fromArray(array $params)
Please login to merge, or discard this patch.
src/Route4Me/V5/Country.php 1 patch
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -9,34 +9,34 @@
 block discarded – undo
9 9
  */
10 10
 class Country extends Common
11 11
 {
12
-    /**
13
-     * Country ID
14
-     * @var type string
15
-     */
16
-    public $id;
12
+	/**
13
+	 * Country ID
14
+	 * @var type string
15
+	 */
16
+	public $id;
17 17
     
18
-    /**
19
-     * Country code
20
-     * @var type string
21
-     */
22
-    public $country_code;
18
+	/**
19
+	 * Country code
20
+	 * @var type string
21
+	 */
22
+	public $country_code;
23 23
     
24
-    /**
25
-     * Country name
26
-     * @var type string
27
-     */
28
-    public $country_name;
24
+	/**
25
+	 * Country name
26
+	 * @var type string
27
+	 */
28
+	public $country_name;
29 29
     
30
-    public static function fromArray(array $params)
31
-    {
32
-        $thisParams = new self();
30
+	public static function fromArray(array $params)
31
+	{
32
+		$thisParams = new self();
33 33
 
34
-        foreach ($params as $key => $value) {
35
-            if (property_exists($thisParams, $key)) {
36
-                $thisParams->{$key} = $value;
37
-            }
38
-        }
34
+		foreach ($params as $key => $value) {
35
+			if (property_exists($thisParams, $key)) {
36
+				$thisParams->{$key} = $value;
37
+			}
38
+		}
39 39
 
40
-        return $thisParams;
41
-    }
40
+		return $thisParams;
41
+	}
42 42
 }
Please login to merge, or discard this patch.
src/Route4Me/V5/Vehicles/DataTypes/VehicleProfile.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
         //$vehicleProfileID = isset($params['vehicle_profile_id']) ? $params['vehicle_profile_id'] : null;
194 194
 
195 195
         $response = Route4Me::makeRequst([
196
-            'url' => Endpoint::VehicleProfiles . '/' . $vehicleProfileId,
196
+            'url' => Endpoint::VehicleProfiles.'/'.$vehicleProfileId,
197 197
             'method' => 'DELETE',
198 198
             'HTTPHEADER' => 'Content-Type: application/json; Accept: application/json',
199 199
         ]);
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
     public function getVehicleProfileById($vehicleProfileId)
243 243
     {
244 244
         $response = Route4Me::makeRequst([
245
-            'url' => Endpoint::VehicleProfiles . '/' . $vehicleProfileId,
245
+            'url' => Endpoint::VehicleProfiles.'/'.$vehicleProfileId,
246 246
             'method' => 'GET',
247 247
         ]);
248 248
 
Please login to merge, or discard this patch.
Indentation   +254 added lines, -254 removed lines patch added patch discarded remove patch
@@ -15,258 +15,258 @@
 block discarded – undo
15 15
  */
16 16
 class VehicleProfile extends Common
17 17
 {
18
-    /** Vehicle profile ID
19
-     * @var integer $vehicle_profile_id
20
-     */
21
-    public $vehicle_profile_id;
22
-
23
-    /** Root member ID
24
-     * @var integer $root_member_id
25
-     */
26
-    public $root_member_id;
27
-
28
-    /** Vehicle profile name
29
-     * @var string $name
30
-     */
31
-    public $name;
32
-
33
-    /** Vehicle height
34
-     * @var float $height
35
-     */
36
-    public $height;
37
-
38
-    /** Vehicle width
39
-     * @var float $width
40
-     */
41
-    public $width;
42
-
43
-    /** Vehicle length
44
-     * @var float $length
45
-     */
46
-    public $length;
47
-
48
-    /** Vehicle weight
49
-     * @var float $weight
50
-     */
51
-    public $weight;
52
-
53
-    /** Maximum weight per axle.
54
-     * @var float $max_weight_per_axle
55
-     */
56
-    public $max_weight_per_axle;
57
-
58
-    /** When the profile deleted
59
-     * @var string $deleted_at
60
-     */
61
-    public $deleted_at;
62
-
63
-    /** When the profile created
64
-     * @var string $created_at
65
-     */
66
-    public $created_at;
67
-
68
-    /** When the profile updated
69
-     * @var string $updated_at
70
-     */
71
-    public $updated_at;
72
-
73
-    /** A type of the fuel
74
-     * enum: ['unleaded 87','unleaded 89','unleaded 91',
75
-     * 'unleaded 93','diesel','electric','hybrid']
76
-     * @var string $fuel_type
77
-     */
78
-    public $fuel_type;
79
-
80
-    /** Fuel consumption city
81
-     * @var float $fuel_consumption_city
82
-     */
83
-    public $fuel_consumption_city;
84
-
85
-    /** Fuel consumption in the highway area
86
-     * @var float $fuel_consumption_highway
87
-     */
88
-    public $fuel_consumption_highway;
89
-
90
-    /** Type of a hazardous material.
91
-     * enum: ['general', 'explosives', 'flammable', 'inhalants', 'caustic', 'radioactive']
92
-     * @var string $hazmat_type
93
-     */
94
-    public $hazmat_type;
95
-
96
-    /** If true, the profile is predefined.
97
-     * @var boolean $is_predefined
98
-     */
99
-    public $is_predefined;
100
-
101
-    /** If true, the profile is default.
102
-     * @var boolean $is_default
103
-     */
104
-    public $is_default;
105
-
106
-    /** Height units (e.g. 'ft', 'm')
107
-     * @var string $height_units
108
-     */
109
-    public $height_units;
110
-
111
-    /** Width units (e.g. 'ft', 'm')
112
-     * @var string $width_units
113
-     */
114
-    public $width_units;
115
-
116
-    /** Length units (e.g. 'ft', 'm')
117
-     * @var string $length_units
118
-     */
119
-    public $length_units;
120
-
121
-    /** Weight units (e.g. 'lb', 'kg')
122
-     * @var string $weight_units
123
-     */
124
-    public $weight_units;
125
-
126
-    /** Maximum weight per axle units (e.g. 'lb', 'kg')
127
-     * @var string $max_weight_per_axle_units
128
-     */
129
-    public $max_weight_per_axle_units;
130
-
131
-    /** Fuel consumption units in the city area (e.g. mpg)
132
-     * @var string $fuel_consumption_city_unit
133
-     */
134
-    public $fuel_consumption_city_unit;
135
-
136
-    /** Fuel consumption units in the highway area (e.g. mpg)
137
-     * @var string $fuel_consumption_highway_unit
138
-     */
139
-    public $fuel_consumption_highway_unit;
140
-
141
-    /** Height UF value (e.g. "7'")
142
-     * @var string $height_uf_value
143
-     */
144
-    public $height_uf_value;
145
-
146
-    /** Width UF value (e.g. "8'")
147
-     * @var string $width_uf_value
148
-     */
149
-    public $width_uf_value;
150
-
151
-    /** Length UF value (e.g. "20'")
152
-     * @var string $length_uf_value
153
-     */
154
-    public $length_uf_value;
155
-
156
-    /** Weight UF value (e.g. "8,500lb")
157
-     * @var string $weight_uf_value
158
-     */
159
-    public $weight_uf_value;
160
-
161
-    /** Maximum weight per axle (UF value, e.g. "8,500lb")
162
-     * @var string $max_weight_per_axle_uf_value
163
-     */
164
-    public $max_weight_per_axle_uf_value;
165
-
166
-    /** Fuel consumption city (UF value, e.g. "20.01 mi/l")
167
-     * @var string $fuel_consumption_city_uf_value
168
-     */
169
-    public $fuel_consumption_city_uf_value;
170
-
171
-    /** Fuel consumption highway (UF value, e.g. "2,000.01 mpg")
172
-     * @var string $fuel_consumption_highway_uf_value
173
-     */
174
-    public $fuel_consumption_highway_uf_value;
175
-
176
-    public static function fromArray(array $params)
177
-    {
178
-        $vehicleProfile = new self();
179
-
180
-        foreach ($params as $key => $value) {
181
-            if (is_null(Common::getValue($params, $key))) {
182
-                continue;
183
-            }
184
-            if (property_exists($vehicleProfile, $key)) {
185
-                $vehicleProfile->$key = $value;
186
-            }
187
-        }
188
-
189
-        return $vehicleProfile;
190
-    }
191
-
192
-    public function __construct()
193
-    {
194
-        Route4Me::setBaseUrl("");
195
-    }
196
-
197
-    public function removeVehicleProfile($vehicleProfileId)
198
-    {
199
-        //$vehicleProfileID = isset($params['vehicle_profile_id']) ? $params['vehicle_profile_id'] : null;
200
-
201
-        $response = Route4Me::makeRequst([
202
-            'url' => Endpoint::VehicleProfiles . '/' . $vehicleProfileId,
203
-            'method' => 'DELETE',
204
-            'HTTPHEADER' => 'Content-Type: application/json; Accept: application/json',
205
-        ]);
206
-
207
-        return $response;
208
-    }
209
-
210
-    /**
211
-     * @param  $profileParams - an array from the VehicleParameters object.
212
-     * @return array          - an array of parameters of the vehicle profiles.
213
-     * @throws \Route4Me\Exception\ApiError
214
-     */
215
-    public function getVehicleProfiles($profileParams)
216
-    {
217
-        $allQueryFields = ['with_pagination', 'page', 'perPage'];
218
-
219
-        $response = Route4Me::makeRequst([
220
-            'url' => Endpoint::VehicleProfiles,
221
-            'method' => 'GET',
222
-            'query' => Route4Me::generateRequestParameters($allQueryFields, $profileParams),
223
-        ]);
224
-
225
-        return $response;
226
-    }
227
-
228
-    /**
229
-     * @param $profileParams - Vehicle profile body parameters
230
-     * @return array         - Created vehicle profile
231
-     * @throws \Route4Me\Exception\ApiError
232
-     */
233
-    public function createVehicleProfile($profileParams)
234
-    {
235
-        $excludeFields = [];
236
-        $allBodyFields = Route4Me::getObjectProperties(new VehicleProfile(), $excludeFields);
237
-
238
-        $response = Route4Me::makeRequst([
239
-            'url' => Endpoint::VehicleProfiles,
240
-            'method' => 'POST',
241
-            'body' => Route4Me::generateRequestParameters($allBodyFields, $profileParams),
242
-            'HTTPHEADERS' => ['Content-Type: application/json', 'Accept: application/json']
243
-        ]);
244
-
245
-        return $response;
246
-    }
247
-
248
-    public function getVehicleProfileById($vehicleProfileId)
249
-    {
250
-        $response = Route4Me::makeRequst([
251
-            'url' => Endpoint::VehicleProfiles . '/' . $vehicleProfileId,
252
-            'method' => 'GET',
253
-        ]);
254
-
255
-        return $response;
256
-    }
257
-
258
-    public function updateVehicleProfile($vehicleProfile)
259
-    {
260
-        $excludeFields = ['vehicle_profile_id', 'deleted_at', 'created_at', 'updated_at'];
261
-        $allBodyFields = Route4Me::getObjectProperties(new self(), $excludeFields);
262
-
263
-        $response = Route4Me::makeRequst([
264
-            'url' => Endpoint::VehicleProfiles.'/'.$vehicleProfile['vehicle_profile_id'],
265
-            'method' => 'PATCH',
266
-            'body' => Route4Me::generateRequestParameters($allBodyFields, $vehicleProfile),
267
-            'HTTPHEADER' => 'Content-Type: application/json'
268
-        ]);
269
-
270
-        return $response;
271
-    }
18
+	/** Vehicle profile ID
19
+	 * @var integer $vehicle_profile_id
20
+	 */
21
+	public $vehicle_profile_id;
22
+
23
+	/** Root member ID
24
+	 * @var integer $root_member_id
25
+	 */
26
+	public $root_member_id;
27
+
28
+	/** Vehicle profile name
29
+	 * @var string $name
30
+	 */
31
+	public $name;
32
+
33
+	/** Vehicle height
34
+	 * @var float $height
35
+	 */
36
+	public $height;
37
+
38
+	/** Vehicle width
39
+	 * @var float $width
40
+	 */
41
+	public $width;
42
+
43
+	/** Vehicle length
44
+	 * @var float $length
45
+	 */
46
+	public $length;
47
+
48
+	/** Vehicle weight
49
+	 * @var float $weight
50
+	 */
51
+	public $weight;
52
+
53
+	/** Maximum weight per axle.
54
+	 * @var float $max_weight_per_axle
55
+	 */
56
+	public $max_weight_per_axle;
57
+
58
+	/** When the profile deleted
59
+	 * @var string $deleted_at
60
+	 */
61
+	public $deleted_at;
62
+
63
+	/** When the profile created
64
+	 * @var string $created_at
65
+	 */
66
+	public $created_at;
67
+
68
+	/** When the profile updated
69
+	 * @var string $updated_at
70
+	 */
71
+	public $updated_at;
72
+
73
+	/** A type of the fuel
74
+	 * enum: ['unleaded 87','unleaded 89','unleaded 91',
75
+	 * 'unleaded 93','diesel','electric','hybrid']
76
+	 * @var string $fuel_type
77
+	 */
78
+	public $fuel_type;
79
+
80
+	/** Fuel consumption city
81
+	 * @var float $fuel_consumption_city
82
+	 */
83
+	public $fuel_consumption_city;
84
+
85
+	/** Fuel consumption in the highway area
86
+	 * @var float $fuel_consumption_highway
87
+	 */
88
+	public $fuel_consumption_highway;
89
+
90
+	/** Type of a hazardous material.
91
+	 * enum: ['general', 'explosives', 'flammable', 'inhalants', 'caustic', 'radioactive']
92
+	 * @var string $hazmat_type
93
+	 */
94
+	public $hazmat_type;
95
+
96
+	/** If true, the profile is predefined.
97
+	 * @var boolean $is_predefined
98
+	 */
99
+	public $is_predefined;
100
+
101
+	/** If true, the profile is default.
102
+	 * @var boolean $is_default
103
+	 */
104
+	public $is_default;
105
+
106
+	/** Height units (e.g. 'ft', 'm')
107
+	 * @var string $height_units
108
+	 */
109
+	public $height_units;
110
+
111
+	/** Width units (e.g. 'ft', 'm')
112
+	 * @var string $width_units
113
+	 */
114
+	public $width_units;
115
+
116
+	/** Length units (e.g. 'ft', 'm')
117
+	 * @var string $length_units
118
+	 */
119
+	public $length_units;
120
+
121
+	/** Weight units (e.g. 'lb', 'kg')
122
+	 * @var string $weight_units
123
+	 */
124
+	public $weight_units;
125
+
126
+	/** Maximum weight per axle units (e.g. 'lb', 'kg')
127
+	 * @var string $max_weight_per_axle_units
128
+	 */
129
+	public $max_weight_per_axle_units;
130
+
131
+	/** Fuel consumption units in the city area (e.g. mpg)
132
+	 * @var string $fuel_consumption_city_unit
133
+	 */
134
+	public $fuel_consumption_city_unit;
135
+
136
+	/** Fuel consumption units in the highway area (e.g. mpg)
137
+	 * @var string $fuel_consumption_highway_unit
138
+	 */
139
+	public $fuel_consumption_highway_unit;
140
+
141
+	/** Height UF value (e.g. "7'")
142
+	 * @var string $height_uf_value
143
+	 */
144
+	public $height_uf_value;
145
+
146
+	/** Width UF value (e.g. "8'")
147
+	 * @var string $width_uf_value
148
+	 */
149
+	public $width_uf_value;
150
+
151
+	/** Length UF value (e.g. "20'")
152
+	 * @var string $length_uf_value
153
+	 */
154
+	public $length_uf_value;
155
+
156
+	/** Weight UF value (e.g. "8,500lb")
157
+	 * @var string $weight_uf_value
158
+	 */
159
+	public $weight_uf_value;
160
+
161
+	/** Maximum weight per axle (UF value, e.g. "8,500lb")
162
+	 * @var string $max_weight_per_axle_uf_value
163
+	 */
164
+	public $max_weight_per_axle_uf_value;
165
+
166
+	/** Fuel consumption city (UF value, e.g. "20.01 mi/l")
167
+	 * @var string $fuel_consumption_city_uf_value
168
+	 */
169
+	public $fuel_consumption_city_uf_value;
170
+
171
+	/** Fuel consumption highway (UF value, e.g. "2,000.01 mpg")
172
+	 * @var string $fuel_consumption_highway_uf_value
173
+	 */
174
+	public $fuel_consumption_highway_uf_value;
175
+
176
+	public static function fromArray(array $params)
177
+	{
178
+		$vehicleProfile = new self();
179
+
180
+		foreach ($params as $key => $value) {
181
+			if (is_null(Common::getValue($params, $key))) {
182
+				continue;
183
+			}
184
+			if (property_exists($vehicleProfile, $key)) {
185
+				$vehicleProfile->$key = $value;
186
+			}
187
+		}
188
+
189
+		return $vehicleProfile;
190
+	}
191
+
192
+	public function __construct()
193
+	{
194
+		Route4Me::setBaseUrl("");
195
+	}
196
+
197
+	public function removeVehicleProfile($vehicleProfileId)
198
+	{
199
+		//$vehicleProfileID = isset($params['vehicle_profile_id']) ? $params['vehicle_profile_id'] : null;
200
+
201
+		$response = Route4Me::makeRequst([
202
+			'url' => Endpoint::VehicleProfiles . '/' . $vehicleProfileId,
203
+			'method' => 'DELETE',
204
+			'HTTPHEADER' => 'Content-Type: application/json; Accept: application/json',
205
+		]);
206
+
207
+		return $response;
208
+	}
209
+
210
+	/**
211
+	 * @param  $profileParams - an array from the VehicleParameters object.
212
+	 * @return array          - an array of parameters of the vehicle profiles.
213
+	 * @throws \Route4Me\Exception\ApiError
214
+	 */
215
+	public function getVehicleProfiles($profileParams)
216
+	{
217
+		$allQueryFields = ['with_pagination', 'page', 'perPage'];
218
+
219
+		$response = Route4Me::makeRequst([
220
+			'url' => Endpoint::VehicleProfiles,
221
+			'method' => 'GET',
222
+			'query' => Route4Me::generateRequestParameters($allQueryFields, $profileParams),
223
+		]);
224
+
225
+		return $response;
226
+	}
227
+
228
+	/**
229
+	 * @param $profileParams - Vehicle profile body parameters
230
+	 * @return array         - Created vehicle profile
231
+	 * @throws \Route4Me\Exception\ApiError
232
+	 */
233
+	public function createVehicleProfile($profileParams)
234
+	{
235
+		$excludeFields = [];
236
+		$allBodyFields = Route4Me::getObjectProperties(new VehicleProfile(), $excludeFields);
237
+
238
+		$response = Route4Me::makeRequst([
239
+			'url' => Endpoint::VehicleProfiles,
240
+			'method' => 'POST',
241
+			'body' => Route4Me::generateRequestParameters($allBodyFields, $profileParams),
242
+			'HTTPHEADERS' => ['Content-Type: application/json', 'Accept: application/json']
243
+		]);
244
+
245
+		return $response;
246
+	}
247
+
248
+	public function getVehicleProfileById($vehicleProfileId)
249
+	{
250
+		$response = Route4Me::makeRequst([
251
+			'url' => Endpoint::VehicleProfiles . '/' . $vehicleProfileId,
252
+			'method' => 'GET',
253
+		]);
254
+
255
+		return $response;
256
+	}
257
+
258
+	public function updateVehicleProfile($vehicleProfile)
259
+	{
260
+		$excludeFields = ['vehicle_profile_id', 'deleted_at', 'created_at', 'updated_at'];
261
+		$allBodyFields = Route4Me::getObjectProperties(new self(), $excludeFields);
262
+
263
+		$response = Route4Me::makeRequst([
264
+			'url' => Endpoint::VehicleProfiles.'/'.$vehicleProfile['vehicle_profile_id'],
265
+			'method' => 'PATCH',
266
+			'body' => Route4Me::generateRequestParameters($allBodyFields, $vehicleProfile),
267
+			'HTTPHEADER' => 'Content-Type: application/json'
268
+		]);
269
+
270
+		return $response;
271
+	}
272 272
 }
Please login to merge, or discard this patch.
src/Route4Me/V5/AccountProfile.php 1 patch
Indentation   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -9,46 +9,46 @@
 block discarded – undo
9 9
  */
10 10
 class AccountProfile extends Common
11 11
 {
12
-    /**
13
-     * Account profile email
14
-     * @var type string
15
-     */
16
-    public $email;
12
+	/**
13
+	 * Account profile email
14
+	 * @var type string
15
+	 */
16
+	public $email;
17 17
     
18
-    /**
19
-     * Account member ID
20
-     * @var type integer
21
-     */
22
-    public $member_id;
18
+	/**
19
+	 * Account member ID
20
+	 * @var type integer
21
+	 */
22
+	public $member_id;
23 23
     
24
-    /**
25
-     * Account API key
26
-     * @var type string
27
-     */
28
-    public $api_key;
24
+	/**
25
+	 * Account API key
26
+	 * @var type string
27
+	 */
28
+	public $api_key;
29 29
     
30
-    /**
31
-     * Account root member ID
32
-     * @var type integer
33
-     */
34
-    public $root_member_id;
30
+	/**
31
+	 * Account root member ID
32
+	 * @var type integer
33
+	 */
34
+	public $root_member_id;
35 35
     
36
-    /**
37
-     * Preferred units of the account.
38
-     * @var type string
39
-     */
40
-    public $preferred_units;
36
+	/**
37
+	 * Preferred units of the account.
38
+	 * @var type string
39
+	 */
40
+	public $preferred_units;
41 41
     
42
-    public static function fromArray(array $params)
43
-    {
44
-        $thisParams = new self();
42
+	public static function fromArray(array $params)
43
+	{
44
+		$thisParams = new self();
45 45
 
46
-        foreach ($params as $key => $value) {
47
-            if (property_exists($thisParams, $key)) {
48
-                $thisParams->{$key} = $value;
49
-            }
50
-        }
46
+		foreach ($params as $key => $value) {
47
+			if (property_exists($thisParams, $key)) {
48
+				$thisParams->{$key} = $value;
49
+			}
50
+		}
51 51
 
52
-        return $thisParams;
53
-    }
52
+		return $thisParams;
53
+	}
54 54
 }
Please login to merge, or discard this patch.
src/Route4Me/V5/TelematicsVendorFeature.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -9,10 +9,10 @@  discard block
 block discarded – undo
9 9
  */
10 10
 class TelematicsVendorFeature extends Common
11 11
 {
12
-    /**
13
-     * Feature ID
14
-     * @var type string
15
-     */
12
+	/**
13
+	 * Feature ID
14
+	 * @var type string
15
+	 */
16 16
    public $id;
17 17
    
18 18
    /**
@@ -33,16 +33,16 @@  discard block
 block discarded – undo
33 33
     */
34 34
    public $feature_group;
35 35
 
36
-    public static function fromArray(array $params)
37
-    {
38
-        $thisParams = new self();
36
+	public static function fromArray(array $params)
37
+	{
38
+		$thisParams = new self();
39 39
 
40
-        foreach ($params as $key => $value) {
41
-            if (property_exists($thisParams, $key)) {
42
-                $thisParams->{$key} = $value;
43
-            }
44
-        }
40
+		foreach ($params as $key => $value) {
41
+			if (property_exists($thisParams, $key)) {
42
+				$thisParams->{$key} = $value;
43
+			}
44
+		}
45 45
 
46
-        return $thisParams;
47
-    }
46
+		return $thisParams;
47
+	}
48 48
 }
Please login to merge, or discard this patch.
src/Route4Me/V5/DataObjectBase.php 1 patch
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -6,33 +6,33 @@
 block discarded – undo
6 6
 
7 7
 class DataObjectBase extends \Route4Me\Common
8 8
 {
9
-    /** @var string $optimization_problem_id
10
-     * Optimization problem ID
11
-     */
12
-    public $optimization_problem_id;
13
-
14
-    /** @var string $smart_optimization_id
15
-     * Smart Optimization Problem ID
16
-     */
17
-    public $smart_optimization_id;
18
-
19
-    /** @var long $created_timestamp
20
-     * When the optimization problem was created.
21
-     */
22
-    public $created_timestamp;
23
-
24
-    /** @var RouteParameters $parameters
25
-     * Route Parameters.
26
-     */
27
-    public $parameters = [];
28
-
29
-    /** @var Address[] $addresses
30
-     * An array ot the Address type objects.
31
-     */
32
-    public $addresses = [];
33
-
34
-    /** @var string[] $links
35
-     * The links to the GET operations for the optimization problem.
36
-     */
37
-    public $links = [];
9
+	/** @var string $optimization_problem_id
10
+	 * Optimization problem ID
11
+	 */
12
+	public $optimization_problem_id;
13
+
14
+	/** @var string $smart_optimization_id
15
+	 * Smart Optimization Problem ID
16
+	 */
17
+	public $smart_optimization_id;
18
+
19
+	/** @var long $created_timestamp
20
+	 * When the optimization problem was created.
21
+	 */
22
+	public $created_timestamp;
23
+
24
+	/** @var RouteParameters $parameters
25
+	 * Route Parameters.
26
+	 */
27
+	public $parameters = [];
28
+
29
+	/** @var Address[] $addresses
30
+	 * An array ot the Address type objects.
31
+	 */
32
+	public $addresses = [];
33
+
34
+	/** @var string[] $links
35
+	 * The links to the GET operations for the optimization problem.
36
+	 */
37
+	public $links = [];
38 38
 }
39 39
\ No newline at end of file
Please login to merge, or discard this patch.