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 Failed
Push — master ( ce7ad9...c183ba )
by Igor
08:49 queued 18s
created
src/Route4Me/V5/Vehicles/DataTypes/VehicleOrderResponse.php 1 patch
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -11,28 +11,28 @@
 block discarded – undo
11 11
  */
12 12
 class VehicleOrderResponse extends Common
13 13
 {
14
-    /** Vehicle ID
15
-     * @var string $vehicle_id
16
-     */
17
-    public $vehicle_id;
14
+	/** Vehicle ID
15
+	 * @var string $vehicle_id
16
+	 */
17
+	public $vehicle_id;
18 18
 
19
-    /** Order ID
20
-     * @var integer $order_id
21
-     */
22
-    public $order_id;
19
+	/** Order ID
20
+	 * @var integer $order_id
21
+	 */
22
+	public $order_id;
23 23
 
24
-    public static function fromArray(array $params)
25
-    {
26
-        $ordParams = new self();
24
+	public static function fromArray(array $params)
25
+	{
26
+		$ordParams = new self();
27 27
 
28
-        foreach ($params as $key => $value) {
29
-            if (is_null(Common::getValue($params, $key))) {
30
-                continue;
31
-            }
32
-            if (property_exists($ordParams, $key)) {
33
-                $ordParams->$key = $value;
34
-            }
35
-        }
36
-        return $ordParams;
37
-    }
28
+		foreach ($params as $key => $value) {
29
+			if (is_null(Common::getValue($params, $key))) {
30
+				continue;
31
+			}
32
+			if (property_exists($ordParams, $key)) {
33
+				$ordParams->$key = $value;
34
+			}
35
+		}
36
+		return $ordParams;
37
+	}
38 38
 }
Please login to merge, or discard this patch.
src/Route4Me/V5/Vehicles/DataTypes/VehicleTemporary.php 1 patch
Indentation   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -11,43 +11,43 @@
 block discarded – undo
11 11
  */
12 12
 class VehicleTemporary extends Common
13 13
 {
14
-    /** The vehicle ID
15
-     * @var integer $vehicle_id
16
-     */
17
-    public $vehicle_id;
18
-
19
-    /** A license plate of the vehicle.
20
-     * @var string $vehicle_license_plate
21
-     */
22
-    public $vehicle_license_plate;
23
-
24
-    /** Member ID assigned to the temporary vehicle.
25
-     * @var string $assigned_member_id
26
-     */
27
-    public $assigned_member_id;
28
-
29
-    /** An expiration date of the temporary vehicle.
30
-     * @var string $expires_at
31
-     */
32
-    public $expires_at;
33
-
34
-    /** If true, an assignment forced.
35
-     * @var boolean $force_assignment
36
-     */
37
-    public $force_assignment;
38
-
39
-    public static function fromArray(array $params)
40
-    {
41
-        $vehicleTemp = new self();
42
-
43
-        foreach ($params as $key => $value) {
44
-            if (is_null(Common::getValue($params, $key))) {
45
-                continue;
46
-            }
47
-            if (property_exists($vehicleTemp, $key)) {
48
-                $vehicleTemp->$key = $value;
49
-            }
50
-        }
51
-        return $vehicleTemp;
52
-    }
14
+	/** The vehicle ID
15
+	 * @var integer $vehicle_id
16
+	 */
17
+	public $vehicle_id;
18
+
19
+	/** A license plate of the vehicle.
20
+	 * @var string $vehicle_license_plate
21
+	 */
22
+	public $vehicle_license_plate;
23
+
24
+	/** Member ID assigned to the temporary vehicle.
25
+	 * @var string $assigned_member_id
26
+	 */
27
+	public $assigned_member_id;
28
+
29
+	/** An expiration date of the temporary vehicle.
30
+	 * @var string $expires_at
31
+	 */
32
+	public $expires_at;
33
+
34
+	/** If true, an assignment forced.
35
+	 * @var boolean $force_assignment
36
+	 */
37
+	public $force_assignment;
38
+
39
+	public static function fromArray(array $params)
40
+	{
41
+		$vehicleTemp = new self();
42
+
43
+		foreach ($params as $key => $value) {
44
+			if (is_null(Common::getValue($params, $key))) {
45
+				continue;
46
+			}
47
+			if (property_exists($vehicleTemp, $key)) {
48
+				$vehicleTemp->$key = $value;
49
+			}
50
+		}
51
+		return $vehicleTemp;
52
+	}
53 53
 }
Please login to merge, or discard this patch.
src/Route4Me/V5/Vehicles/DataTypes/Vehicle.php 1 patch
Indentation   +390 added lines, -390 removed lines patch added patch discarded remove patch
@@ -18,394 +18,394 @@
 block discarded – undo
18 18
  */
19 19
 class Vehicle extends Common
20 20
 {
21
-    /** The vehicle ID
22
-     * @var string $vehicle_id
23
-     */
24
-    public $vehicle_id;
25
-
26
-    /** Member ID assigned to the vehicle.
27
-     * @var integer $member_id
28
-     */
29
-    public $member_id;
30
-
31
-    /** If true, the vehicle is marked as deleted.
32
-     * @var boolean $is_deleted
33
-     */
34
-    public $is_deleted;
35
-
36
-    /** Vehicle alias
37
-     * @var string $vehicle_alias
38
-     */
39
-    public $vehicle_alias;
40
-
41
-    /** Vehicle VIN
42
-     * @var string $vehicle_vin
43
-     */
44
-    public $vehicle_vin;
45
-
46
-    /** Vehicle registration state ID.
47
-     * @var integer $vehicle_reg_state_id
48
-     */
49
-    public $vehicle_reg_state_id;
50
-
51
-    /** Vehicle registration country ID.
52
-     * @var integer $vehicle_reg_country_id
53
-     */
54
-    public $vehicle_reg_country_id;
55
-
56
-    /** A license plate of the vehicle.
57
-     * @var string $vehicle_license_plate
58
-     */
59
-    public $vehicle_license_plate;
60
-
61
-    /** Vehicle type.
62
-     * <para>Availbale values:</para>
63
-     * sedan', 'suv', 'pickup_truck', 'van', '18wheeler', 'cabin', 'hatchback',
64
-     * '<para>motorcyle', 'waste_disposal', 'tree_cutting', 'bigrig', 'cement_mixer', </para>
65
-     * 'livestock_carrier', 'dairy','tractor_trailer'.
66
-     * @var string $vehicle_type_id
67
-     */
68
-    public $vehicle_type_id;
69
-
70
-    /** When the vehicle was added.
71
-     * @var string $timestamp_added
72
-     */
73
-    public $timestamp_added;
74
-
75
-    /** Vehicle maker brend.
76
-     * <para>Available values:</para>
77
-     * "american coleman", "bmw", "chevrolet", "ford", "freightliner", "gmc",
78
-     * <para>"hino", "honda", "isuzu", "kenworth", "mack", "mercedes-benz", "mitsubishi", </para>
79
-     * "navistar", "nissan", "peterbilt", "renault", "scania", "sterling", "toyota",
80
-     * <para>"volvo", "western star" </para>
81
-     * </value>"
82
-     * @var string $vehicle_make
83
-     */
84
-    public $vehicle_make;
85
-
86
-    /** Vehicle model year
87
-     * @var integer $vehicle_model_year
88
-     */
89
-    public $vehicle_model_year;
90
-
91
-    /** Vehicle model
92
-     * @var string $vehicle_model
93
-     */
94
-    public $vehicle_model;
95
-
96
-    /** The year, vehicle was acquired
97
-     * @var integer $vehicle_year_acquired
98
-     */
99
-    public $vehicle_year_acquired;
100
-
101
-    /** A cost of the new vehicle
102
-     * @var float $vehicle_cost_new
103
-     */
104
-    public $vehicle_cost_new;
105
-
106
-    /** If true, the vehicle was purchased new.
107
-     * @var boolean $purchased_new
108
-     */
109
-    public $purchased_new;
110
-
111
-    /** Start date of the license
112
-     * @var string $license_start_date
113
-     */
114
-    public $license_start_date;
115
-
116
-    /** End date of the license
117
-     * @var string $license_end_date
118
-     */
119
-    public $license_end_date;
120
-
121
-    /** If equal to '1', the vehicle is operational.
122
-     * @var boolean $is_operational
123
-     */
124
-    public $is_operational;
125
-
126
-    /** A type of the fuel
127
-     * @var string $fuel_type
128
-     * enum: ['unleaded 87','unleaded 89','unleaded 91','unleaded 93','diesel','electric','hybrid']
129
-     */
130
-    public $fuel_type;
131
-
132
-    /** External telematics vehicle IDs
133
-     * @var integer $external_telematics_vehicle_ids
134
-     */
135
-    public $external_telematics_vehicle_id;
136
-
137
-    /** When the vehcile was marked as deleted.
138
-     * @var integer $timestamp_removed
139
-     */
140
-    public $timestamp_removed;
141
-
142
-    /** Vehicle profile ID
143
-     * @var integer $vehicle_profile_id
144
-     */
145
-    public $vehicle_profile_id;
146
-
147
-    /** Fuel consumption city
148
-     * @var float $fuel_consumption_city
149
-     */
150
-    public $fuel_consumption_city;
151
-
152
-    /** Fuel consumption in the highway area
153
-     * @var float $fuel_consumption_highway
154
-     */
155
-    public $fuel_consumption_highway;
156
-
157
-    /** Fuel consumption units in the city area (e.g. mi/l)
158
-     * @var string $fuel_consumption_city_unit
159
-     */
160
-    public $fuel_consumption_city_unit;
161
-
162
-    /** Fuel consumption units in the highway area (e.g. mi/l)
163
-     * @var string $fuel_consumption_highway_unit
164
-     */
165
-    public $fuel_consumption_highway_unit;
166
-
167
-    /** Miles per gallon in the city area
168
-     * @var float $mpg_city
169
-     */
170
-    public $mpg_city;
171
-
172
-    /** Miles per gallon in the highway area
173
-     * @var float $mpg_highway
174
-     */
175
-    public $mpg_highway;
176
-
177
-    /** Fuel consumption UF value in the city area (e.g. '20.01 mi/l')
178
-     * @var string $fuel_consumption_city_uf_value
179
-     */
180
-    public $fuel_consumption_city_uf_value;
181
-
182
-    /** Fuel consumption UF value in the highway area (e.g. '2,000.01 mpg')
183
-     * @var string $fuel_consumption_highway_uf_value
184
-     */
185
-    public $fuel_consumption_highway_uf_value;
186
-
187
-    public static function fromArray(array $params)
188
-    {
189
-        $vehicle = new self();
190
-
191
-        foreach ($params as $key => $value) {
192
-            if (is_null(Common::getValue($params, $key))) {
193
-                continue;
194
-            }
195
-            if (property_exists($vehicle, $key)) {
196
-                $vehicle->$key = $value;
197
-            }
198
-        }
199
-
200
-        return $vehicle;
201
-    }
202
-
203
-    public function __construct()
204
-    {
205
-        Route4Me::setBaseUrl("");
206
-    }
207
-
208
-    /** Creates a vehicle
209
-     * @param  $vehicleParams - an array of vehicle's parameters or Vehicle object
210
-     * @return array          - a vehicle object or failure info.
211
-     */
212
-    public function createVehicle($vehicleParams)
213
-    {
214
-        $excludeFields = ['vehicle_id', 'is_deleted', 'created_time', 'timestamp_added', 'timestamp_removed'];
215
-        $allBodyFields = Route4Me::getObjectProperties(new self(), $excludeFields);
216
-
217
-        $response = Route4Me::makeRequst([
218
-            'url' => Endpoint::Vehicles,
219
-            'method' => 'POST',
220
-            'body' => Route4Me::generateRequestParameters($allBodyFields, $vehicleParams),
221
-            'HTTPHEADERS' => ['Content-Type: application/json', 'Accept: application/json']
222
-        ]);
223
-
224
-        return $response;
225
-    }
226
-
227
-    /** Removes a vehicle by specified vehicle ID.
228
-     * @param  string $vehicleID - Vehicle ID
229
-     * @return array             - an array of parameers of removed vehicle object.
230
-     * @throws \Route4Me\Exception\ApiError
231
-     */
232
-    public function removeVehicle($vehicleParams)
233
-    {
234
-        $vehicleId = $vehicleParams['vehicle_id'];
235
-
236
-        $response = Route4Me::makeRequst([
237
-            'url' => Endpoint::Vehicles . '/' . $vehicleId,
238
-            'method' => 'DELETE'
239
-        ]);
240
-
241
-        return $response;
242
-    }
243
-
244
-    /** Returns the VehiclesPaginated type object containing an array of the vehicles.
245
-     * @param  $params - an array of pagginated parameters or VehicleParameters object.
246
-     * @return array   - an array of the Vehicle objects.
247
-     * @throws \Route4Me\Exception\ApiError
248
-     */
249
-    public function getVehiclesPaginatedList($params)
250
-    {
251
-        $allQueryFields = ['with_pagination', 'page', 'perPage'];
252
-
253
-        $response = Route4Me::makeRequst([
254
-            'url' => Endpoint::Vehicles,
255
-            'method' => 'GET',
256
-            'query' => Route4Me::generateRequestParameters($allQueryFields, $params),
257
-        ]);
258
-
259
-        return $response;
260
-    }
261
-
262
-    /** Creates temporary vehicle in the database.
263
-     * @param  $vehicleParams - an array of parameters or VehicleTemporary object.
264
-     * @return array          - an array of parameters of VehicleTemporary.
265
-     * @throws \Route4Me\Exception\ApiError
266
-     */
267
-    public function createTemporaryVehicle($vehicleParams)
268
-    {
269
-        $excludeFields = [];
270
-        $allBodyFields = Route4Me::getObjectProperties(new VehicleTemporary(), $excludeFields);
271
-
272
-        $response = Route4Me::makeRequst([
273
-            'url' => Endpoint::VehicleTemporary,
274
-            'method' => 'POST',
275
-            'body' => Route4Me::generateRequestParameters($allBodyFields, $vehicleParams),
276
-            'HTTPHEADERS' => ['Content-Type: application/json', 'Accept: application/json']
277
-        ]);
278
-
279
-        return $response;
280
-    }
281
-
282
-    /** Execute a vehicle order.
283
-     * @param  $vehicleParams - an array of order parameters or VehicleOrderParameters object
284
-     * @return array          - an array of parameters of VehicleOrderResponse.
285
-     * @throws \Route4Me\Exception\ApiError
286
-     */
287
-    public function executeVehicleOrder($vehicleParams)
288
-    {
289
-        $excludeFields = [];
290
-        $allBodyFields = Route4Me::getObjectProperties(new VehicleOrderParameters(), $excludeFields);
291
-
292
-        $response = Route4Me::makeRequst([
293
-            'url' => Endpoint::VehicleExecuteOrder,
294
-            'method' => 'POST',
295
-            'body' => Route4Me::generateRequestParameters($allBodyFields, $vehicleParams),
296
-            'HTTPHEADERS' => ['Content-Type: application/json', 'Accept: application/json']
297
-        ]);
298
-
299
-        return $response;
300
-    }
301
-
302
-    /** Get latest vehicle locations by specified vehicle IDs.
303
-     * @param  $vehicleParams - Vehicle query parameters containing vehicle IDs
304
-     * @return array          - Data with vehicles
305
-     * @throws \Route4Me\Exception\ApiError
306
-     */
307
-    public function getVehicleLocations($vehicleParams)
308
-    {
309
-        $allQueryFields = ['ids'];
310
-
311
-        $response = Route4Me::makeRequst([
312
-            'url' => Endpoint::VehicleLocation,
313
-            'method' => 'GET',
314
-            'query' => Route4Me::generateRequestParameters($allQueryFields, $vehicleParams),
315
-        ]);
316
-
317
-        return $response;
318
-    }
319
-
320
-    /** Get the Vehicle by specifying vehicle ID.
321
-     * @param  $vehicleParams - Vehicle query parameters containing vehicle ID.
322
-     * @return array          - an array of parameters of Vehicle.
323
-     * @throws \Route4Me\Exception\ApiError
324
-     */
325
-    public function getVehicleById($vehicleParams)
326
-    {
327
-        $allQueryFields = ['vehicle_id'];
328
-
329
-        $response = Route4Me::makeRequst([
330
-            'url' => Endpoint::Vehicles.'/'.$vehicleParams['vehicle_id'],
331
-            'method' => 'GET',
332
-            'query' => null,
333
-        ]);
334
-
335
-        return $response;
336
-    }
337
-
338
-    /** Get the Vehicle track by specifying vehicle ID.
339
-     * @param  $vehicleParams - Vehicle query parameters containing vehicle ID.
340
-     * @return array          - an array of parameters of VehicleTrackResponse.
341
-     * @throws \Route4Me\Exception\ApiError
342
-     */
343
-    public function getVehicleTrack($vehicleParams)
344
-    {
345
-        $response = Route4Me::makeRequst([
346
-            'url' => Endpoint::Vehicles.'/'.$vehicleParams['vehicle_id'].'/track',
347
-            'method' => 'GET',
348
-            'query' => null,
349
-        ]);
350
-
351
-        return $response;
352
-    }
353
-
354
-    /** Get the Vehicle Profile by license plate.
355
-     * @param  $vehicleParams - Vehicle query parameters containing 'vehicle_license_plate'.
356
-     * @return array          - an array of parameters of Vehicle
357
-     * @throws \Route4Me\Exception\ApiError
358
-     */
359
-    public function getVehicleByLicensePlate($vehicleParams)
360
-    {
361
-        $allQueryFields = ['vehicle_license_plate'];
362
-
363
-        $response = Route4Me::makeRequst([
364
-            'url' => Endpoint::VehicleLicense,
365
-            'method' => 'GET',
366
-            'query' => Route4Me::generateRequestParameters($allQueryFields, $vehicleParams),
367
-        ]);
368
-
369
-        return $response;
370
-    }
371
-
372
-    /** Search for the Vehicle by sending the corresponding body payload.
373
-     * @param  $searchParams - query parameters or VehicleSearchParameters object.
374
-     * @return array         - an array of Vehicles
375
-     * @throws \Route4Me\Exception\ApiError
376
-     */
377
-    public function searchVehicles($searchParams)
378
-    {
379
-        $excludeFields = [];
380
-        $allBodyFields = Route4Me::getObjectProperties(new VehicleSearchParameters(), $excludeFields);
381
-
382
-        $response = Route4Me::makeRequst([
383
-            'url' => Endpoint::VehicleSearch,
384
-            'method' => 'POST',
385
-            'body' => Route4Me::generateRequestParameters($allBodyFields, $searchParams),
386
-            'HTTPHEADERS' => ['Content-Type: application/json', 'Accept: application/json']
387
-        ]);
388
-
389
-        return $response;
390
-    }
391
-
392
-    /** Update the Vehicle Profile by specifying the path parameter ID and by sending.
393
-     * @param  $vehicleParams - an array of vehicle's parameters or Vehicle object.
394
-     * @return array          - an array of parameters of Vehicle
395
-     * @throws \Route4Me\Exception\ApiError
396
-     */
397
-    public function updateVehicle($vehicleParams)
398
-    {
399
-        $excludeFields = ['vehicle_id', 'is_deleted', 'created_time', 'timestamp_added', 'timestamp_removed'];
400
-        $allBodyFields = Route4Me::getObjectProperties(new self(), $excludeFields);
401
-
402
-        $response = Route4Me::makeRequst([
403
-            'url' => Endpoint::Vehicles.'/'.$vehicleParams['vehicle_id'],
404
-            'method' => 'PATCH',
405
-            'body' => Route4Me::generateRequestParameters($allBodyFields, $vehicleParams),
406
-            'HTTPHEADER' => 'Content-Type: application/json'
407
-        ]);
408
-
409
-        return $response;
410
-    }
21
+	/** The vehicle ID
22
+	 * @var string $vehicle_id
23
+	 */
24
+	public $vehicle_id;
25
+
26
+	/** Member ID assigned to the vehicle.
27
+	 * @var integer $member_id
28
+	 */
29
+	public $member_id;
30
+
31
+	/** If true, the vehicle is marked as deleted.
32
+	 * @var boolean $is_deleted
33
+	 */
34
+	public $is_deleted;
35
+
36
+	/** Vehicle alias
37
+	 * @var string $vehicle_alias
38
+	 */
39
+	public $vehicle_alias;
40
+
41
+	/** Vehicle VIN
42
+	 * @var string $vehicle_vin
43
+	 */
44
+	public $vehicle_vin;
45
+
46
+	/** Vehicle registration state ID.
47
+	 * @var integer $vehicle_reg_state_id
48
+	 */
49
+	public $vehicle_reg_state_id;
50
+
51
+	/** Vehicle registration country ID.
52
+	 * @var integer $vehicle_reg_country_id
53
+	 */
54
+	public $vehicle_reg_country_id;
55
+
56
+	/** A license plate of the vehicle.
57
+	 * @var string $vehicle_license_plate
58
+	 */
59
+	public $vehicle_license_plate;
60
+
61
+	/** Vehicle type.
62
+	 * <para>Availbale values:</para>
63
+	 * sedan', 'suv', 'pickup_truck', 'van', '18wheeler', 'cabin', 'hatchback',
64
+	 * '<para>motorcyle', 'waste_disposal', 'tree_cutting', 'bigrig', 'cement_mixer', </para>
65
+	 * 'livestock_carrier', 'dairy','tractor_trailer'.
66
+	 * @var string $vehicle_type_id
67
+	 */
68
+	public $vehicle_type_id;
69
+
70
+	/** When the vehicle was added.
71
+	 * @var string $timestamp_added
72
+	 */
73
+	public $timestamp_added;
74
+
75
+	/** Vehicle maker brend.
76
+	 * <para>Available values:</para>
77
+	 * "american coleman", "bmw", "chevrolet", "ford", "freightliner", "gmc",
78
+	 * <para>"hino", "honda", "isuzu", "kenworth", "mack", "mercedes-benz", "mitsubishi", </para>
79
+	 * "navistar", "nissan", "peterbilt", "renault", "scania", "sterling", "toyota",
80
+	 * <para>"volvo", "western star" </para>
81
+	 * </value>"
82
+	 * @var string $vehicle_make
83
+	 */
84
+	public $vehicle_make;
85
+
86
+	/** Vehicle model year
87
+	 * @var integer $vehicle_model_year
88
+	 */
89
+	public $vehicle_model_year;
90
+
91
+	/** Vehicle model
92
+	 * @var string $vehicle_model
93
+	 */
94
+	public $vehicle_model;
95
+
96
+	/** The year, vehicle was acquired
97
+	 * @var integer $vehicle_year_acquired
98
+	 */
99
+	public $vehicle_year_acquired;
100
+
101
+	/** A cost of the new vehicle
102
+	 * @var float $vehicle_cost_new
103
+	 */
104
+	public $vehicle_cost_new;
105
+
106
+	/** If true, the vehicle was purchased new.
107
+	 * @var boolean $purchased_new
108
+	 */
109
+	public $purchased_new;
110
+
111
+	/** Start date of the license
112
+	 * @var string $license_start_date
113
+	 */
114
+	public $license_start_date;
115
+
116
+	/** End date of the license
117
+	 * @var string $license_end_date
118
+	 */
119
+	public $license_end_date;
120
+
121
+	/** If equal to '1', the vehicle is operational.
122
+	 * @var boolean $is_operational
123
+	 */
124
+	public $is_operational;
125
+
126
+	/** A type of the fuel
127
+	 * @var string $fuel_type
128
+	 * enum: ['unleaded 87','unleaded 89','unleaded 91','unleaded 93','diesel','electric','hybrid']
129
+	 */
130
+	public $fuel_type;
131
+
132
+	/** External telematics vehicle IDs
133
+	 * @var integer $external_telematics_vehicle_ids
134
+	 */
135
+	public $external_telematics_vehicle_id;
136
+
137
+	/** When the vehcile was marked as deleted.
138
+	 * @var integer $timestamp_removed
139
+	 */
140
+	public $timestamp_removed;
141
+
142
+	/** Vehicle profile ID
143
+	 * @var integer $vehicle_profile_id
144
+	 */
145
+	public $vehicle_profile_id;
146
+
147
+	/** Fuel consumption city
148
+	 * @var float $fuel_consumption_city
149
+	 */
150
+	public $fuel_consumption_city;
151
+
152
+	/** Fuel consumption in the highway area
153
+	 * @var float $fuel_consumption_highway
154
+	 */
155
+	public $fuel_consumption_highway;
156
+
157
+	/** Fuel consumption units in the city area (e.g. mi/l)
158
+	 * @var string $fuel_consumption_city_unit
159
+	 */
160
+	public $fuel_consumption_city_unit;
161
+
162
+	/** Fuel consumption units in the highway area (e.g. mi/l)
163
+	 * @var string $fuel_consumption_highway_unit
164
+	 */
165
+	public $fuel_consumption_highway_unit;
166
+
167
+	/** Miles per gallon in the city area
168
+	 * @var float $mpg_city
169
+	 */
170
+	public $mpg_city;
171
+
172
+	/** Miles per gallon in the highway area
173
+	 * @var float $mpg_highway
174
+	 */
175
+	public $mpg_highway;
176
+
177
+	/** Fuel consumption UF value in the city area (e.g. '20.01 mi/l')
178
+	 * @var string $fuel_consumption_city_uf_value
179
+	 */
180
+	public $fuel_consumption_city_uf_value;
181
+
182
+	/** Fuel consumption UF value in the highway area (e.g. '2,000.01 mpg')
183
+	 * @var string $fuel_consumption_highway_uf_value
184
+	 */
185
+	public $fuel_consumption_highway_uf_value;
186
+
187
+	public static function fromArray(array $params)
188
+	{
189
+		$vehicle = new self();
190
+
191
+		foreach ($params as $key => $value) {
192
+			if (is_null(Common::getValue($params, $key))) {
193
+				continue;
194
+			}
195
+			if (property_exists($vehicle, $key)) {
196
+				$vehicle->$key = $value;
197
+			}
198
+		}
199
+
200
+		return $vehicle;
201
+	}
202
+
203
+	public function __construct()
204
+	{
205
+		Route4Me::setBaseUrl("");
206
+	}
207
+
208
+	/** Creates a vehicle
209
+	 * @param  $vehicleParams - an array of vehicle's parameters or Vehicle object
210
+	 * @return array          - a vehicle object or failure info.
211
+	 */
212
+	public function createVehicle($vehicleParams)
213
+	{
214
+		$excludeFields = ['vehicle_id', 'is_deleted', 'created_time', 'timestamp_added', 'timestamp_removed'];
215
+		$allBodyFields = Route4Me::getObjectProperties(new self(), $excludeFields);
216
+
217
+		$response = Route4Me::makeRequst([
218
+			'url' => Endpoint::Vehicles,
219
+			'method' => 'POST',
220
+			'body' => Route4Me::generateRequestParameters($allBodyFields, $vehicleParams),
221
+			'HTTPHEADERS' => ['Content-Type: application/json', 'Accept: application/json']
222
+		]);
223
+
224
+		return $response;
225
+	}
226
+
227
+	/** Removes a vehicle by specified vehicle ID.
228
+	 * @param  string $vehicleID - Vehicle ID
229
+	 * @return array             - an array of parameers of removed vehicle object.
230
+	 * @throws \Route4Me\Exception\ApiError
231
+	 */
232
+	public function removeVehicle($vehicleParams)
233
+	{
234
+		$vehicleId = $vehicleParams['vehicle_id'];
235
+
236
+		$response = Route4Me::makeRequst([
237
+			'url' => Endpoint::Vehicles . '/' . $vehicleId,
238
+			'method' => 'DELETE'
239
+		]);
240
+
241
+		return $response;
242
+	}
243
+
244
+	/** Returns the VehiclesPaginated type object containing an array of the vehicles.
245
+	 * @param  $params - an array of pagginated parameters or VehicleParameters object.
246
+	 * @return array   - an array of the Vehicle objects.
247
+	 * @throws \Route4Me\Exception\ApiError
248
+	 */
249
+	public function getVehiclesPaginatedList($params)
250
+	{
251
+		$allQueryFields = ['with_pagination', 'page', 'perPage'];
252
+
253
+		$response = Route4Me::makeRequst([
254
+			'url' => Endpoint::Vehicles,
255
+			'method' => 'GET',
256
+			'query' => Route4Me::generateRequestParameters($allQueryFields, $params),
257
+		]);
258
+
259
+		return $response;
260
+	}
261
+
262
+	/** Creates temporary vehicle in the database.
263
+	 * @param  $vehicleParams - an array of parameters or VehicleTemporary object.
264
+	 * @return array          - an array of parameters of VehicleTemporary.
265
+	 * @throws \Route4Me\Exception\ApiError
266
+	 */
267
+	public function createTemporaryVehicle($vehicleParams)
268
+	{
269
+		$excludeFields = [];
270
+		$allBodyFields = Route4Me::getObjectProperties(new VehicleTemporary(), $excludeFields);
271
+
272
+		$response = Route4Me::makeRequst([
273
+			'url' => Endpoint::VehicleTemporary,
274
+			'method' => 'POST',
275
+			'body' => Route4Me::generateRequestParameters($allBodyFields, $vehicleParams),
276
+			'HTTPHEADERS' => ['Content-Type: application/json', 'Accept: application/json']
277
+		]);
278
+
279
+		return $response;
280
+	}
281
+
282
+	/** Execute a vehicle order.
283
+	 * @param  $vehicleParams - an array of order parameters or VehicleOrderParameters object
284
+	 * @return array          - an array of parameters of VehicleOrderResponse.
285
+	 * @throws \Route4Me\Exception\ApiError
286
+	 */
287
+	public function executeVehicleOrder($vehicleParams)
288
+	{
289
+		$excludeFields = [];
290
+		$allBodyFields = Route4Me::getObjectProperties(new VehicleOrderParameters(), $excludeFields);
291
+
292
+		$response = Route4Me::makeRequst([
293
+			'url' => Endpoint::VehicleExecuteOrder,
294
+			'method' => 'POST',
295
+			'body' => Route4Me::generateRequestParameters($allBodyFields, $vehicleParams),
296
+			'HTTPHEADERS' => ['Content-Type: application/json', 'Accept: application/json']
297
+		]);
298
+
299
+		return $response;
300
+	}
301
+
302
+	/** Get latest vehicle locations by specified vehicle IDs.
303
+	 * @param  $vehicleParams - Vehicle query parameters containing vehicle IDs
304
+	 * @return array          - Data with vehicles
305
+	 * @throws \Route4Me\Exception\ApiError
306
+	 */
307
+	public function getVehicleLocations($vehicleParams)
308
+	{
309
+		$allQueryFields = ['ids'];
310
+
311
+		$response = Route4Me::makeRequst([
312
+			'url' => Endpoint::VehicleLocation,
313
+			'method' => 'GET',
314
+			'query' => Route4Me::generateRequestParameters($allQueryFields, $vehicleParams),
315
+		]);
316
+
317
+		return $response;
318
+	}
319
+
320
+	/** Get the Vehicle by specifying vehicle ID.
321
+	 * @param  $vehicleParams - Vehicle query parameters containing vehicle ID.
322
+	 * @return array          - an array of parameters of Vehicle.
323
+	 * @throws \Route4Me\Exception\ApiError
324
+	 */
325
+	public function getVehicleById($vehicleParams)
326
+	{
327
+		$allQueryFields = ['vehicle_id'];
328
+
329
+		$response = Route4Me::makeRequst([
330
+			'url' => Endpoint::Vehicles.'/'.$vehicleParams['vehicle_id'],
331
+			'method' => 'GET',
332
+			'query' => null,
333
+		]);
334
+
335
+		return $response;
336
+	}
337
+
338
+	/** Get the Vehicle track by specifying vehicle ID.
339
+	 * @param  $vehicleParams - Vehicle query parameters containing vehicle ID.
340
+	 * @return array          - an array of parameters of VehicleTrackResponse.
341
+	 * @throws \Route4Me\Exception\ApiError
342
+	 */
343
+	public function getVehicleTrack($vehicleParams)
344
+	{
345
+		$response = Route4Me::makeRequst([
346
+			'url' => Endpoint::Vehicles.'/'.$vehicleParams['vehicle_id'].'/track',
347
+			'method' => 'GET',
348
+			'query' => null,
349
+		]);
350
+
351
+		return $response;
352
+	}
353
+
354
+	/** Get the Vehicle Profile by license plate.
355
+	 * @param  $vehicleParams - Vehicle query parameters containing 'vehicle_license_plate'.
356
+	 * @return array          - an array of parameters of Vehicle
357
+	 * @throws \Route4Me\Exception\ApiError
358
+	 */
359
+	public function getVehicleByLicensePlate($vehicleParams)
360
+	{
361
+		$allQueryFields = ['vehicle_license_plate'];
362
+
363
+		$response = Route4Me::makeRequst([
364
+			'url' => Endpoint::VehicleLicense,
365
+			'method' => 'GET',
366
+			'query' => Route4Me::generateRequestParameters($allQueryFields, $vehicleParams),
367
+		]);
368
+
369
+		return $response;
370
+	}
371
+
372
+	/** Search for the Vehicle by sending the corresponding body payload.
373
+	 * @param  $searchParams - query parameters or VehicleSearchParameters object.
374
+	 * @return array         - an array of Vehicles
375
+	 * @throws \Route4Me\Exception\ApiError
376
+	 */
377
+	public function searchVehicles($searchParams)
378
+	{
379
+		$excludeFields = [];
380
+		$allBodyFields = Route4Me::getObjectProperties(new VehicleSearchParameters(), $excludeFields);
381
+
382
+		$response = Route4Me::makeRequst([
383
+			'url' => Endpoint::VehicleSearch,
384
+			'method' => 'POST',
385
+			'body' => Route4Me::generateRequestParameters($allBodyFields, $searchParams),
386
+			'HTTPHEADERS' => ['Content-Type: application/json', 'Accept: application/json']
387
+		]);
388
+
389
+		return $response;
390
+	}
391
+
392
+	/** Update the Vehicle Profile by specifying the path parameter ID and by sending.
393
+	 * @param  $vehicleParams - an array of vehicle's parameters or Vehicle object.
394
+	 * @return array          - an array of parameters of Vehicle
395
+	 * @throws \Route4Me\Exception\ApiError
396
+	 */
397
+	public function updateVehicle($vehicleParams)
398
+	{
399
+		$excludeFields = ['vehicle_id', 'is_deleted', 'created_time', 'timestamp_added', 'timestamp_removed'];
400
+		$allBodyFields = Route4Me::getObjectProperties(new self(), $excludeFields);
401
+
402
+		$response = Route4Me::makeRequst([
403
+			'url' => Endpoint::Vehicles.'/'.$vehicleParams['vehicle_id'],
404
+			'method' => 'PATCH',
405
+			'body' => Route4Me::generateRequestParameters($allBodyFields, $vehicleParams),
406
+			'HTTPHEADER' => 'Content-Type: application/json'
407
+		]);
408
+
409
+		return $response;
410
+	}
411 411
 }
Please login to merge, or discard this patch.
src/Route4Me/Members/MemberAuthenticationResponse.php 1 patch
Indentation   +177 added lines, -177 removed lines patch added patch discarded remove patch
@@ -10,181 +10,181 @@
 block discarded – undo
10 10
  */
11 11
 class MemberAuthenticationResponse extends \Route4Me\Common
12 12
 {
13
-    /** @var boolean $status
14
-     * True, if authentication process was finished successfuly.
15
-     */
16
-    public $status;
17
-
18
-    /** @var string $geocoding_service
19
-     * Geocoding service
20
-     */
21
-    public $geocoding_service;
22
-
23
-    /** @var int $session_id
24
-     * Session ID
25
-     */
26
-    public $session_id;
27
-
28
-    /** @var string $session_guid
29
-     * Session guid
30
-     */
31
-    public $session_guid;
32
-
33
-    /** @var int $member_id
34
-     * Member ID
35
-     */
36
-    public $member_id;
37
-
38
-    /** @var string $api_key
39
-     * API key of an user
40
-     */
41
-    public $api_key;
42
-
43
-    /** @var int $tracking_ttl
44
-     * Tracking TTL
45
-     */
46
-    public $tracking_ttl;
47
-
48
-    /** @var string $update_channel_name
49
-     * Update channel name
50
-     */
51
-    public $update_channel_name;
52
-
53
-    /** @var string $geofence_polygon_shape
54
-     * Geofence polygon shape. ENUM('circle', 'poly', 'rect').
55
-     */
56
-    public $geofence_polygon_shape ;
57
-
58
-    /** @var int $geofence_polygon_size
59
-     * Geofence polygon size
60
-     */
61
-    public $geofence_polygon_size;
62
-
63
-    /** @var int $geofence_time_onsite_trigger_secs
64
-     * Geofence time onsite trigger in seconds.
65
-     */
66
-    public $geofence_time_onsite_trigger_secs;
67
-
68
-    /** @var int $geofence_minimum_trigger_speed
69
-     * Geofence minimum trigger speed.
70
-     */
71
-    public $geofence_minimum_trigger_speed;
72
-
73
-    /** @var boolean $is_subscription_past_due
74
-     * If true, subscription is past due.
75
-     */
76
-    public $is_subscription_past_due;
77
-
78
-    /** @var string $visited_departed_enabled
79
-     * if true, triggering of the visited and departed activities is enabled.
80
-     */
81
-    public $visited_departed_enabled;
82
-
83
-    /** @var string $long_press_enabled
84
-     * if true, long press is enabled.
85
-     */
86
-    public $long_press_enabled;
87
-
88
-    /** @var string $account_type_id
89
-     * The account type ID
90
-     */
91
-    public $account_type_id;
92
-
93
-    /** @var string $account_type_alias
94
-     * Account type alias.
95
-     */
96
-    public $account_type_alias;
97
-
98
-    /** @var string $member_type
99
-     * A type of the member.
100
-     * Available values:
101
-     * 'PRIMARY_ACCOUNT',
102
-     * 'SUB_ACCOUNT_ADMIN',
103
-     * 'SUB_ACCOUNT_REGIONAL_MANAGER',
104
-     * 'SUB_ACCOUNT_DISPATCHER',
105
-     * 'SUB_ACCOUNT_PLANNER',
106
-     * 'SUB_ACCOUNT_DRIVER',
107
-     * 'SUB_ACCOUNT_ANALYST',
108
-     * 'SUB_ACCOUNT_VENDOR',
109
-     * 'SUB_ACCOUNT_CUSTOMER_SERVICE'
110
-     */
111
-    public $member_type;
112
-
113
-    /** @var string $max_stops_per_route
114
-     * Maximum stops per route.
115
-     */
116
-    public $max_stops_per_route;
117
-
118
-    /** @var string $max_routes
119
-     * Maximum number of the routes.
120
-     */
121
-    public $max_routes;
122
-
123
-    /** @var int $routes_planned
124
-     * Number of the planned routes by an user.
125
-     */
126
-    public $routes_planned;
127
-
128
-    /** @var string $preferred_units
129
-     * Preferred units. Enum('km', 'mi').
130
-     */
131
-    public $preferred_units;
132
-
133
-    /** @var string $preferred_language
134
-     * Preferred language. Enum('en', 'fr').
135
-     */
136
-    public $preferred_language;
137
-
138
-    /** @var string $HIDE_ROUTED_ADDRESSES
139
-     * If true, routed addresses will be hidden.
140
-     */
141
-    public $HIDE_ROUTED_ADDRESSES;
142
-
143
-    /** @var string $HIDE_VISITED_ADDRESSES
144
-     * If true, visited addresses will be hidden.
145
-     */
146
-    public $HIDE_VISITED_ADDRESSES;
147
-
148
-    /** @var string $HIDE_NONFUTURE_ROUTES
149
-     * If equal to true, nonfuture addresses will be hidden.
150
-     */
151
-    public $HIDE_NONFUTURE_ROUTES;
152
-
153
-    /** @var string $READONLY_USER
154
-     * If equal to true, user can only read data.
155
-     */
156
-    public $READONLY_USER;
157
-
158
-    /** @var int $auto_logout_ts
159
-     * Time in seconds. If a user is inactive during this period, he will be logout.
160
-     */
161
-    public $auto_logout_ts;
162
-
163
-    /** @var string $last_known_member_payment_device
164
-     * Last known member payment device (e.g. 'web')
165
-     */
166
-    public $last_known_member_payment_device;
167
-
168
-    /** @var int $account_expires_timestamp
169
-     * Account expire date
170
-     */
171
-    public $account_expires_timestamp;
172
-
173
-    /** @var boolean $account_past_due
174
-     * Account past due
175
-     */
176
-    public $account_past_due;
177
-
178
-    /** @var array  $licensed_modules
179
-     * Licensed module. e.g.:
180
-     * 'MODULE__ROUTE_EDITOR_CUSTOM_DATA_EDITING',
181
-     * 'MODULE__VOICE_NAVIGATION:TRUE',
182
-     * 'MODULE__VOICE_NAVIGATION'
183
-     */
184
-    public $licensed_modules;
185
-
186
-    /** @var int $last_active_timestamp
187
-     * Last active timestamp
188
-     */
189
-    public $last_active_timestamp;
13
+	/** @var boolean $status
14
+	 * True, if authentication process was finished successfuly.
15
+	 */
16
+	public $status;
17
+
18
+	/** @var string $geocoding_service
19
+	 * Geocoding service
20
+	 */
21
+	public $geocoding_service;
22
+
23
+	/** @var int $session_id
24
+	 * Session ID
25
+	 */
26
+	public $session_id;
27
+
28
+	/** @var string $session_guid
29
+	 * Session guid
30
+	 */
31
+	public $session_guid;
32
+
33
+	/** @var int $member_id
34
+	 * Member ID
35
+	 */
36
+	public $member_id;
37
+
38
+	/** @var string $api_key
39
+	 * API key of an user
40
+	 */
41
+	public $api_key;
42
+
43
+	/** @var int $tracking_ttl
44
+	 * Tracking TTL
45
+	 */
46
+	public $tracking_ttl;
47
+
48
+	/** @var string $update_channel_name
49
+	 * Update channel name
50
+	 */
51
+	public $update_channel_name;
52
+
53
+	/** @var string $geofence_polygon_shape
54
+	 * Geofence polygon shape. ENUM('circle', 'poly', 'rect').
55
+	 */
56
+	public $geofence_polygon_shape ;
57
+
58
+	/** @var int $geofence_polygon_size
59
+	 * Geofence polygon size
60
+	 */
61
+	public $geofence_polygon_size;
62
+
63
+	/** @var int $geofence_time_onsite_trigger_secs
64
+	 * Geofence time onsite trigger in seconds.
65
+	 */
66
+	public $geofence_time_onsite_trigger_secs;
67
+
68
+	/** @var int $geofence_minimum_trigger_speed
69
+	 * Geofence minimum trigger speed.
70
+	 */
71
+	public $geofence_minimum_trigger_speed;
72
+
73
+	/** @var boolean $is_subscription_past_due
74
+	 * If true, subscription is past due.
75
+	 */
76
+	public $is_subscription_past_due;
77
+
78
+	/** @var string $visited_departed_enabled
79
+	 * if true, triggering of the visited and departed activities is enabled.
80
+	 */
81
+	public $visited_departed_enabled;
82
+
83
+	/** @var string $long_press_enabled
84
+	 * if true, long press is enabled.
85
+	 */
86
+	public $long_press_enabled;
87
+
88
+	/** @var string $account_type_id
89
+	 * The account type ID
90
+	 */
91
+	public $account_type_id;
92
+
93
+	/** @var string $account_type_alias
94
+	 * Account type alias.
95
+	 */
96
+	public $account_type_alias;
97
+
98
+	/** @var string $member_type
99
+	 * A type of the member.
100
+	 * Available values:
101
+	 * 'PRIMARY_ACCOUNT',
102
+	 * 'SUB_ACCOUNT_ADMIN',
103
+	 * 'SUB_ACCOUNT_REGIONAL_MANAGER',
104
+	 * 'SUB_ACCOUNT_DISPATCHER',
105
+	 * 'SUB_ACCOUNT_PLANNER',
106
+	 * 'SUB_ACCOUNT_DRIVER',
107
+	 * 'SUB_ACCOUNT_ANALYST',
108
+	 * 'SUB_ACCOUNT_VENDOR',
109
+	 * 'SUB_ACCOUNT_CUSTOMER_SERVICE'
110
+	 */
111
+	public $member_type;
112
+
113
+	/** @var string $max_stops_per_route
114
+	 * Maximum stops per route.
115
+	 */
116
+	public $max_stops_per_route;
117
+
118
+	/** @var string $max_routes
119
+	 * Maximum number of the routes.
120
+	 */
121
+	public $max_routes;
122
+
123
+	/** @var int $routes_planned
124
+	 * Number of the planned routes by an user.
125
+	 */
126
+	public $routes_planned;
127
+
128
+	/** @var string $preferred_units
129
+	 * Preferred units. Enum('km', 'mi').
130
+	 */
131
+	public $preferred_units;
132
+
133
+	/** @var string $preferred_language
134
+	 * Preferred language. Enum('en', 'fr').
135
+	 */
136
+	public $preferred_language;
137
+
138
+	/** @var string $HIDE_ROUTED_ADDRESSES
139
+	 * If true, routed addresses will be hidden.
140
+	 */
141
+	public $HIDE_ROUTED_ADDRESSES;
142
+
143
+	/** @var string $HIDE_VISITED_ADDRESSES
144
+	 * If true, visited addresses will be hidden.
145
+	 */
146
+	public $HIDE_VISITED_ADDRESSES;
147
+
148
+	/** @var string $HIDE_NONFUTURE_ROUTES
149
+	 * If equal to true, nonfuture addresses will be hidden.
150
+	 */
151
+	public $HIDE_NONFUTURE_ROUTES;
152
+
153
+	/** @var string $READONLY_USER
154
+	 * If equal to true, user can only read data.
155
+	 */
156
+	public $READONLY_USER;
157
+
158
+	/** @var int $auto_logout_ts
159
+	 * Time in seconds. If a user is inactive during this period, he will be logout.
160
+	 */
161
+	public $auto_logout_ts;
162
+
163
+	/** @var string $last_known_member_payment_device
164
+	 * Last known member payment device (e.g. 'web')
165
+	 */
166
+	public $last_known_member_payment_device;
167
+
168
+	/** @var int $account_expires_timestamp
169
+	 * Account expire date
170
+	 */
171
+	public $account_expires_timestamp;
172
+
173
+	/** @var boolean $account_past_due
174
+	 * Account past due
175
+	 */
176
+	public $account_past_due;
177
+
178
+	/** @var array  $licensed_modules
179
+	 * Licensed module. e.g.:
180
+	 * 'MODULE__ROUTE_EDITOR_CUSTOM_DATA_EDITING',
181
+	 * 'MODULE__VOICE_NAVIGATION:TRUE',
182
+	 * 'MODULE__VOICE_NAVIGATION'
183
+	 */
184
+	public $licensed_modules;
185
+
186
+	/** @var int $last_active_timestamp
187
+	 * Last active timestamp
188
+	 */
189
+	public $last_active_timestamp;
190 190
 }
Please login to merge, or discard this patch.
src/Route4Me/Members/MemberResponseV4.php 1 patch
Indentation   +119 added lines, -119 removed lines patch added patch discarded remove patch
@@ -9,123 +9,123 @@
 block discarded – undo
9 9
  */
10 10
 class MemberResponseV4 extends \Route4Me\Common
11 11
 {
12
-    /** @var string $HIDE_NONFUTURE_ROUTES
13
-     * If true, the nonfuture routes will be hidden ('TRUE', 'FALSE').
14
-     */
15
-    public $HIDE_NONFUTURE_ROUTES;
16
-
17
-    /** @var string $HIDE_ROUTED_ADDRESSES
18
-     * If true, the routed addresses will be hidden ('TRUE', 'FALSE').
19
-     */
20
-    public $HIDE_ROUTED_ADDRESSES;
21
-
22
-    /** @var string $HIDE_VISITED_ADDRESSES
23
-     * If true, the visited addresses will be hidden ('TRUE', 'FALSE').
24
-     */
25
-    public $HIDE_VISITED_ADDRESSES;
26
-
27
-    /** @var string $member_id
28
-     * The member ID
29
-     */
30
-    public $member_id;
31
-
32
-    /** @var string $OWNER_MEMBER_ID
33
-     * The user's account owner ID.
34
-     */
35
-    public $OWNER_MEMBER_ID;
36
-
37
-    /** @var string $READONLY_USER
38
-     * If true, the user has read-only access type ('TRUE', 'FALSE').
39
-     */
40
-    public $READONLY_USER;
41
-
42
-    /** @var string $SHOW_ALL_DRIVERS
43
-     * If true, all drivers are visible to the user ('TRUE', 'FALSE').
44
-     */
45
-    public $SHOW_ALL_DRIVERS;
46
-
47
-    /** @var string $SHOW_ALL_VEHICLES
48
-     * If true, all vehicles are visible to the user ('1', '0').
49
-     */
50
-    public $SHOW_ALL_VEHICLES;
51
-
52
-    /** @var string $date_of_birth
53
-     * Birthdate of the user.
54
-     */
55
-    public $date_of_birth;
56
-
57
-    /** @var string $member_email
58
-     * User's email.
59
-     */
60
-    public $member_email;
61
-
62
-    /** @var stringn $member_first_name
63
-     * User's first name.
64
-     */
65
-    public $member_first_name;
66
-
67
-    /** @var string $member_last_name
68
-     * User's last name.
69
-     */
70
-    public $member_last_name;
71
-
72
-    /** @var string $member_phone
73
-     * User's phone number.
74
-     */
75
-    public $member_phone;
76
-
77
-    /** @var string $member_picture
78
-     * A link to the user's picture.
79
-     */
80
-    public $member_picture;
81
-
82
-    /** @var string $member_type
83
-     * Member type. Available values:
84
-     * PRIMARY_ACCOUNT, SUB_ACCOUNT_ADMIN, SUB_ACCOUNT_REGIONAL_MANAGER,
85
-     * SUB_ACCOUNT_DISPATCHER, SUB_ACCOUNT_PLANNER, SUB_ACCOUNT_DRIVER
86
-     */
87
-    public $member_type;
88
-
89
-    /** @var string $member_zipcode
90
-     * User zipcode.
91
-     */
92
-    public $member_zipcode;
93
-
94
-    /** @var string $preferred_language
95
-     * Preferred language (en, fr).
96
-     */
97
-    public $preferred_language;
98
-
99
-    /** @var string $preferred_units
100
-     * Preferred unit (mi, km).
101
-     */
102
-    public $preferred_units;
103
-
104
-    /** @var string $timezone
105
-     * Member's location timezone.
106
-     */
107
-    public $timezone;
108
-
109
-    /** @var string $user_reg_country_id
110
-     * Registration country ID of a user.
111
-     */
112
-    public $user_reg_country_id;
113
-
114
-    /** @var string $user_reg_state_id
115
-     * Registration state ID of a user.
116
-     */
117
-    public $user_reg_state_id;
118
-
119
-    /** @var int $level
120
-     * Subordination level. 0 is the highest level.
121
-     */
122
-    public $level;
123
-
124
-    /** @var array $custom_data
125
-     * The user's custom data.
126
-     */
127
-    public $custom_data;
128
-
129
-    /** @var string  $api_key*/
130
-    public $api_key;
12
+	/** @var string $HIDE_NONFUTURE_ROUTES
13
+	 * If true, the nonfuture routes will be hidden ('TRUE', 'FALSE').
14
+	 */
15
+	public $HIDE_NONFUTURE_ROUTES;
16
+
17
+	/** @var string $HIDE_ROUTED_ADDRESSES
18
+	 * If true, the routed addresses will be hidden ('TRUE', 'FALSE').
19
+	 */
20
+	public $HIDE_ROUTED_ADDRESSES;
21
+
22
+	/** @var string $HIDE_VISITED_ADDRESSES
23
+	 * If true, the visited addresses will be hidden ('TRUE', 'FALSE').
24
+	 */
25
+	public $HIDE_VISITED_ADDRESSES;
26
+
27
+	/** @var string $member_id
28
+	 * The member ID
29
+	 */
30
+	public $member_id;
31
+
32
+	/** @var string $OWNER_MEMBER_ID
33
+	 * The user's account owner ID.
34
+	 */
35
+	public $OWNER_MEMBER_ID;
36
+
37
+	/** @var string $READONLY_USER
38
+	 * If true, the user has read-only access type ('TRUE', 'FALSE').
39
+	 */
40
+	public $READONLY_USER;
41
+
42
+	/** @var string $SHOW_ALL_DRIVERS
43
+	 * If true, all drivers are visible to the user ('TRUE', 'FALSE').
44
+	 */
45
+	public $SHOW_ALL_DRIVERS;
46
+
47
+	/** @var string $SHOW_ALL_VEHICLES
48
+	 * If true, all vehicles are visible to the user ('1', '0').
49
+	 */
50
+	public $SHOW_ALL_VEHICLES;
51
+
52
+	/** @var string $date_of_birth
53
+	 * Birthdate of the user.
54
+	 */
55
+	public $date_of_birth;
56
+
57
+	/** @var string $member_email
58
+	 * User's email.
59
+	 */
60
+	public $member_email;
61
+
62
+	/** @var stringn $member_first_name
63
+	 * User's first name.
64
+	 */
65
+	public $member_first_name;
66
+
67
+	/** @var string $member_last_name
68
+	 * User's last name.
69
+	 */
70
+	public $member_last_name;
71
+
72
+	/** @var string $member_phone
73
+	 * User's phone number.
74
+	 */
75
+	public $member_phone;
76
+
77
+	/** @var string $member_picture
78
+	 * A link to the user's picture.
79
+	 */
80
+	public $member_picture;
81
+
82
+	/** @var string $member_type
83
+	 * Member type. Available values:
84
+	 * PRIMARY_ACCOUNT, SUB_ACCOUNT_ADMIN, SUB_ACCOUNT_REGIONAL_MANAGER,
85
+	 * SUB_ACCOUNT_DISPATCHER, SUB_ACCOUNT_PLANNER, SUB_ACCOUNT_DRIVER
86
+	 */
87
+	public $member_type;
88
+
89
+	/** @var string $member_zipcode
90
+	 * User zipcode.
91
+	 */
92
+	public $member_zipcode;
93
+
94
+	/** @var string $preferred_language
95
+	 * Preferred language (en, fr).
96
+	 */
97
+	public $preferred_language;
98
+
99
+	/** @var string $preferred_units
100
+	 * Preferred unit (mi, km).
101
+	 */
102
+	public $preferred_units;
103
+
104
+	/** @var string $timezone
105
+	 * Member's location timezone.
106
+	 */
107
+	public $timezone;
108
+
109
+	/** @var string $user_reg_country_id
110
+	 * Registration country ID of a user.
111
+	 */
112
+	public $user_reg_country_id;
113
+
114
+	/** @var string $user_reg_state_id
115
+	 * Registration state ID of a user.
116
+	 */
117
+	public $user_reg_state_id;
118
+
119
+	/** @var int $level
120
+	 * Subordination level. 0 is the highest level.
121
+	 */
122
+	public $level;
123
+
124
+	/** @var array $custom_data
125
+	 * The user's custom data.
126
+	 */
127
+	public $custom_data;
128
+
129
+	/** @var string  $api_key*/
130
+	public $api_key;
131 131
 }
Please login to merge, or discard this patch.
src/Route4Me/Members/Member.php 1 patch
Indentation   +343 added lines, -343 removed lines patch added patch discarded remove patch
@@ -8,347 +8,347 @@
 block discarded – undo
8 8
 
9 9
 class Member extends \Route4Me\Common
10 10
 {
11
-    public $device_id;
12
-    public $device_type;
13
-    public $format;
14
-
15
-    public $strEmail;
16
-    public $strPassword;
17
-    public $strPassword_1;
18
-    public $strPassword_2;
19
-    public $strFirstName;
20
-    public $strLastName;
21
-    public $strIndustry;
22
-    public $chkTerms;
23
-    public $plan;
24
-
25
-    public $session_guid;
26
-    public $member_id;
27
-
28
-    public $email_address;
29
-    public $first_name;
30
-    public $last_name;
31
-    public $phone_number;
32
-    public $company_name;
33
-    public $webinar_date;
34
-
35
-    public $subscription_name;
36
-    public $token;
37
-    public $payload;
38
-
39
-    public $HIDE_ROUTED_ADDRESSES;
40
-    public $member_phone;
41
-    public $member_zipcode;
42
-    public $route_count;
43
-    public $member_email;
44
-    public $HIDE_VISITED_ADDRESSES;
45
-    public $READONLY_USER;
46
-    public $member_type;
47
-    public $date_of_birth;
48
-    public $member_first_name;
49
-    public $member_password;
50
-    public $HIDE_NONFUTURE_ROUTES;
51
-    public $member_last_name;
52
-    public $SHOW_ALL_VEHICLES;
53
-    public $SHOW_ALL_DRIVERS;
54
-
55
-    public $config_key;
56
-    public $config_value;
57
-
58
-    public $preferred_units;
59
-    public $preferred_language;
60
-    public $timezone;
61
-    public $OWNER_MEMBER_ID;
62
-    public $user_reg_state_id;
63
-    public $user_reg_country_id;
64
-    public $member_picture;
65
-    public $api_key;
66
-    public $custom_data;
67
-    public $level;
68
-
69
-    public function __construct()
70
-    {
71
-        Route4Me::setBaseUrl(Endpoint::BASE_URL);
72
-    }
73
-
74
-    public static function getUsers()
75
-    {
76
-        $response = Route4Me::makeRequst([
77
-            'url' => Endpoint::USER_V4,
78
-            'method' => 'GET',
79
-        ]);
80
-
81
-        return $response;
82
-    }
83
-
84
-    public static function getUser($params)
85
-    {
86
-        $response = Route4Me::makeRequst([
87
-            'url' => Endpoint::USER_V4,
88
-            'method' => 'GET',
89
-            'query' => [
90
-                'member_id' => isset($params['member_id']) ? $params['member_id'] : null,
91
-            ],
92
-        ]);
93
-
94
-        return $response;
95
-    }
96
-
97
-    public static function getUserLocations($param)
98
-    {
99
-        $response = Route4Me::makeRequst([
100
-            'url' => Endpoint::VIEW_USER_LOCATIONS,
101
-            'method' => 'GET',
102
-            'query' => [
103
-                'query' => $param,
104
-            ],
105
-        ]);
106
-
107
-        return $response;
108
-    }
109
-
110
-    public static function addDeviceRecord($params)
111
-    {
112
-        $allQueryFields = ['device_id', 'device_type'];
113
-        $allBodyFields = ['device_id', 'device_type', 'format'];
114
-
115
-        $response = Route4Me::makeRequst([
116
-            'url' => Endpoint::VERIFY_DEVICE_LICENSE,
117
-            'method' => 'POST',
118
-            'query' => Route4Me::generateRequestParameters($allQueryFields, $params),
119
-            'body' => Route4Me::generateRequestParameters($allBodyFields, $params),
120
-        ]);
121
-
122
-        return $response;
123
-    }
124
-
125
-    public static function createMember($params)
126
-    {
127
-        $excludeFields = ['session_guid', 'member_id', 'token', 'payload', 'webinar_date',
128
-        'company_name', 'config_key', 'config_value', 'api_key', ];
129
-
130
-        $allBodyFields = Route4Me::getObjectProperties(new self(), $excludeFields);
131
-
132
-        $response = Route4Me::makeRequst([
133
-            'url' => Endpoint::USER_V4,
134
-            'method' => 'POST',
135
-            'body' => Route4Me::generateRequestParameters($allBodyFields, $params),
136
-        ]);
137
-
138
-        return $response;
139
-    }
140
-
141
-    public static function getRandomMemberByType($memberType)
142
-    {
143
-        $members = self::getUsers();
144
-
145
-        if (is_null($members) || !isset($members['results'])) {
146
-            return null;
147
-        }
148
-
149
-        $memberIDs = [];
150
-
151
-        foreach ($members['results'] as $memb) {
152
-            if (isset($memb['member_id']) && isset($memb['member_type'])) {
153
-                if ($memberType == $memb['member_type']) {
154
-                    $memberIDs[] = $memb['member_id'];
155
-                }
156
-            }
157
-        }
158
-
159
-        if (sizeof($memberIDs) < 1) {
160
-            return null;
161
-        }
162
-
163
-        $randomIndex = rand(0, sizeof($memberIDs) - 1);
164
-
165
-        return $memberIDs[$randomIndex];
166
-    }
167
-
168
-    public static function updateMember($body)
169
-    {
170
-        $excludeFields = ['session_guid', 'token', 'payload', 'webinar_date',
171
-        'company_name', 'config_key', 'config_value', 'api_key', ];
172
-
173
-        $allBodyFields = Route4Me::getObjectProperties(new self(), $excludeFields);
174
-
175
-        $response = Route4Me::makeRequst([
176
-            'url' => Endpoint::USER_V4,
177
-            'method' => 'PUT',
178
-            'body' => Route4Me::generateRequestParameters($allBodyFields, $body),
179
-        ]);
180
-
181
-        return $response;
182
-    }
183
-
184
-    public static function deleteMember($body, &$errorText)
185
-    {
186
-        $response = null;
187
-
188
-        try {
189
-            $response = Route4Me::makeRequst([
190
-                'url' => Endpoint::USER_V4,
191
-                'method' => 'DELETE',
192
-                'body' => [
193
-                    'member_id' => isset($body->member_id) ? $body->member_id : null,
194
-                ],
195
-            ]);
196
-        } catch (\Exception $ex) {
197
-            $errorText = $ex->getMessage();
198
-            $response = null;
199
-        } finally {
200
-            return $response;
201
-        }
202
-    }
203
-
204
-    public static function newAccountRegistration($params, &$errorText)
205
-    {
206
-        $allQueryFields = ['plan'];
207
-        $allBodyFields = ['strEmail', 'strPassword_1', 'strPassword_2', 'strFirstName',
208
-        'strLastName', 'format', 'strIndustry', 'chkTerms', 'device_type', 'strSubAccountType',
209
-        'blDisableMarketing', 'blDisableAccountActivationEmail', ];
210
-
211
-        $response = null;
212
-
213
-        try {
214
-            $response = Route4Me::makeRequst([
215
-                'url' => Endpoint::REGISTER_ACTION,
216
-                'method' => 'POST',
217
-                'query' => Route4Me::generateRequestParameters($allQueryFields, $params),
218
-                'body' => Route4Me::generateRequestParameters($allBodyFields, $params),
219
-                'HTTPHEADER' => 'Content-Type: multipart/form-data',
220
-            ]);
221
-        } catch (\Exception $ex) {
222
-            $response = null;
223
-            $errorText = "Cannot registrate new account <br> ".$ex->getMessage();
224
-        } finally {
225
-            return $response;
226
-        }
227
-    }
228
-
229
-    public static function validateSession($params)
230
-    {
231
-        $allQueryFields = ['session_guid', 'member_id', 'format'];
232
-
233
-        $response = Route4Me::makeRequst([
234
-            'url' => Endpoint::VALIDATE_SESSION,
235
-            'method' => 'GET',
236
-            'query' => Route4Me::generateRequestParameters($allQueryFields, $params),
237
-        ]);
238
-
239
-        return $response;
240
-    }
241
-
242
-    public static function memberAuthentication($params)
243
-    {
244
-        $allBodyFields = ['strEmail', 'strPassword', 'format'];
245
-
246
-        $response = Route4Me::makeRequst([
247
-            'url' => Endpoint::AUTHENTICATE,
248
-            'method' => 'POST',
249
-            'body' => Route4Me::generateRequestParameters($allBodyFields, $params),
250
-            'HTTPHEADER' => 'Content-Type: multipart/form-data',
251
-        ]);
252
-
253
-        return $response;
254
-    }
255
-
256
-    public static function webinarRegistration($params)
257
-    {
258
-        $allBodyFields = ['email_address', 'first_name', 'last_name', 'phone_number',
259
-        'company_name', 'member_id', 'webinar_date', ];
260
-
261
-        $response = null;
262
-
263
-        try {
264
-            $response = Route4Me::makeRequst([
265
-                'url' => Endpoint::WEBINAR_REGISTER,
266
-                'method' => 'POST',
267
-                'body' => Route4Me::generateRequestParameters($allBodyFields, $params),
268
-            ]);
269
-        } catch (\Exception $ex) {
270
-            $response = null;
271
-        } finally {
272
-            return $response;
273
-        }
274
-    }
275
-
276
-    public static function purchaseUserLicense($params)
277
-    {
278
-        $allQueryFields = ['device_id'];
279
-        $allBodyFields = ['member_id', 'session_guid', 'device_id', 'device_type',
280
-        'subscription_name', 'token', 'payload', 'format', ];
281
-
282
-        $response = Route4Me::makeRequst([
283
-            'url' => Endpoint::USER_LICENSE,
284
-            'method' => 'POST',
285
-            'query' => Route4Me::generateRequestParameters($allQueryFields, $params),
286
-            'body' => Route4Me::generateRequestParameters($allBodyFields, $params),
287
-        ]);
288
-
289
-        return $response;
290
-    }
291
-
292
-    public static function newMemberConfigKey($params)
293
-    {
294
-        $allBodyFields = ['config_key', 'config_value'];
295
-
296
-        $response = Route4Me::makeRequst([
297
-            'url' => Endpoint::CONFIGURATION_SETTINGS,
298
-            'method' => 'POST',
299
-            'body' => Route4Me::generateRequestParameters($allBodyFields, $params),
300
-        ]);
301
-
302
-        return $response;
303
-    }
304
-
305
-    public static function removeMemberConfigKey($params)
306
-    {
307
-        $allBodyFields = ['config_key'];
308
-
309
-        $response = Route4Me::makeRequst([
310
-            'url' => Endpoint::CONFIGURATION_SETTINGS,
311
-            'method' => 'DELETE',
312
-            'body' => Route4Me::generateRequestParameters($allBodyFields, $params),
313
-        ]);
314
-
315
-        return $response;
316
-    }
317
-
318
-    public static function getMemberConfigData($params)
319
-    {
320
-        $allQueryFields = ['config_key'];
321
-
322
-        $response = Route4Me::makeRequst([
323
-            'url' => Endpoint::CONFIGURATION_SETTINGS,
324
-            'method' => 'GET',
325
-            'query' => Route4Me::generateRequestParameters($allQueryFields, $params),
326
-        ]);
327
-
328
-        return $response;
329
-    }
330
-
331
-    public static function updateMemberConfigKey($params)
332
-    {
333
-        $allBodyFields = ['config_key', 'config_value'];
334
-
335
-        $response = Route4Me::makeRequst([
336
-            'url' => Endpoint::CONFIGURATION_SETTINGS,
337
-            'method' => 'PUT',
338
-            'body' => Route4Me::generateRequestParameters($allBodyFields, $params),
339
-        ]);
340
-
341
-        return $response;
342
-    }
343
-
344
-    public static function getMemberCapabilities()
345
-    {
346
-        $response = Route4Me::makeRequst([
347
-            'url' => Endpoint::MEMBER_CAPABILITIES,
348
-            'method' => 'GET',
349
-            'query' => Route4Me::generateRequestParameters([], null),
350
-        ]);
351
-
352
-        return $response;
353
-    }
11
+	public $device_id;
12
+	public $device_type;
13
+	public $format;
14
+
15
+	public $strEmail;
16
+	public $strPassword;
17
+	public $strPassword_1;
18
+	public $strPassword_2;
19
+	public $strFirstName;
20
+	public $strLastName;
21
+	public $strIndustry;
22
+	public $chkTerms;
23
+	public $plan;
24
+
25
+	public $session_guid;
26
+	public $member_id;
27
+
28
+	public $email_address;
29
+	public $first_name;
30
+	public $last_name;
31
+	public $phone_number;
32
+	public $company_name;
33
+	public $webinar_date;
34
+
35
+	public $subscription_name;
36
+	public $token;
37
+	public $payload;
38
+
39
+	public $HIDE_ROUTED_ADDRESSES;
40
+	public $member_phone;
41
+	public $member_zipcode;
42
+	public $route_count;
43
+	public $member_email;
44
+	public $HIDE_VISITED_ADDRESSES;
45
+	public $READONLY_USER;
46
+	public $member_type;
47
+	public $date_of_birth;
48
+	public $member_first_name;
49
+	public $member_password;
50
+	public $HIDE_NONFUTURE_ROUTES;
51
+	public $member_last_name;
52
+	public $SHOW_ALL_VEHICLES;
53
+	public $SHOW_ALL_DRIVERS;
54
+
55
+	public $config_key;
56
+	public $config_value;
57
+
58
+	public $preferred_units;
59
+	public $preferred_language;
60
+	public $timezone;
61
+	public $OWNER_MEMBER_ID;
62
+	public $user_reg_state_id;
63
+	public $user_reg_country_id;
64
+	public $member_picture;
65
+	public $api_key;
66
+	public $custom_data;
67
+	public $level;
68
+
69
+	public function __construct()
70
+	{
71
+		Route4Me::setBaseUrl(Endpoint::BASE_URL);
72
+	}
73
+
74
+	public static function getUsers()
75
+	{
76
+		$response = Route4Me::makeRequst([
77
+			'url' => Endpoint::USER_V4,
78
+			'method' => 'GET',
79
+		]);
80
+
81
+		return $response;
82
+	}
83
+
84
+	public static function getUser($params)
85
+	{
86
+		$response = Route4Me::makeRequst([
87
+			'url' => Endpoint::USER_V4,
88
+			'method' => 'GET',
89
+			'query' => [
90
+				'member_id' => isset($params['member_id']) ? $params['member_id'] : null,
91
+			],
92
+		]);
93
+
94
+		return $response;
95
+	}
96
+
97
+	public static function getUserLocations($param)
98
+	{
99
+		$response = Route4Me::makeRequst([
100
+			'url' => Endpoint::VIEW_USER_LOCATIONS,
101
+			'method' => 'GET',
102
+			'query' => [
103
+				'query' => $param,
104
+			],
105
+		]);
106
+
107
+		return $response;
108
+	}
109
+
110
+	public static function addDeviceRecord($params)
111
+	{
112
+		$allQueryFields = ['device_id', 'device_type'];
113
+		$allBodyFields = ['device_id', 'device_type', 'format'];
114
+
115
+		$response = Route4Me::makeRequst([
116
+			'url' => Endpoint::VERIFY_DEVICE_LICENSE,
117
+			'method' => 'POST',
118
+			'query' => Route4Me::generateRequestParameters($allQueryFields, $params),
119
+			'body' => Route4Me::generateRequestParameters($allBodyFields, $params),
120
+		]);
121
+
122
+		return $response;
123
+	}
124
+
125
+	public static function createMember($params)
126
+	{
127
+		$excludeFields = ['session_guid', 'member_id', 'token', 'payload', 'webinar_date',
128
+		'company_name', 'config_key', 'config_value', 'api_key', ];
129
+
130
+		$allBodyFields = Route4Me::getObjectProperties(new self(), $excludeFields);
131
+
132
+		$response = Route4Me::makeRequst([
133
+			'url' => Endpoint::USER_V4,
134
+			'method' => 'POST',
135
+			'body' => Route4Me::generateRequestParameters($allBodyFields, $params),
136
+		]);
137
+
138
+		return $response;
139
+	}
140
+
141
+	public static function getRandomMemberByType($memberType)
142
+	{
143
+		$members = self::getUsers();
144
+
145
+		if (is_null($members) || !isset($members['results'])) {
146
+			return null;
147
+		}
148
+
149
+		$memberIDs = [];
150
+
151
+		foreach ($members['results'] as $memb) {
152
+			if (isset($memb['member_id']) && isset($memb['member_type'])) {
153
+				if ($memberType == $memb['member_type']) {
154
+					$memberIDs[] = $memb['member_id'];
155
+				}
156
+			}
157
+		}
158
+
159
+		if (sizeof($memberIDs) < 1) {
160
+			return null;
161
+		}
162
+
163
+		$randomIndex = rand(0, sizeof($memberIDs) - 1);
164
+
165
+		return $memberIDs[$randomIndex];
166
+	}
167
+
168
+	public static function updateMember($body)
169
+	{
170
+		$excludeFields = ['session_guid', 'token', 'payload', 'webinar_date',
171
+		'company_name', 'config_key', 'config_value', 'api_key', ];
172
+
173
+		$allBodyFields = Route4Me::getObjectProperties(new self(), $excludeFields);
174
+
175
+		$response = Route4Me::makeRequst([
176
+			'url' => Endpoint::USER_V4,
177
+			'method' => 'PUT',
178
+			'body' => Route4Me::generateRequestParameters($allBodyFields, $body),
179
+		]);
180
+
181
+		return $response;
182
+	}
183
+
184
+	public static function deleteMember($body, &$errorText)
185
+	{
186
+		$response = null;
187
+
188
+		try {
189
+			$response = Route4Me::makeRequst([
190
+				'url' => Endpoint::USER_V4,
191
+				'method' => 'DELETE',
192
+				'body' => [
193
+					'member_id' => isset($body->member_id) ? $body->member_id : null,
194
+				],
195
+			]);
196
+		} catch (\Exception $ex) {
197
+			$errorText = $ex->getMessage();
198
+			$response = null;
199
+		} finally {
200
+			return $response;
201
+		}
202
+	}
203
+
204
+	public static function newAccountRegistration($params, &$errorText)
205
+	{
206
+		$allQueryFields = ['plan'];
207
+		$allBodyFields = ['strEmail', 'strPassword_1', 'strPassword_2', 'strFirstName',
208
+		'strLastName', 'format', 'strIndustry', 'chkTerms', 'device_type', 'strSubAccountType',
209
+		'blDisableMarketing', 'blDisableAccountActivationEmail', ];
210
+
211
+		$response = null;
212
+
213
+		try {
214
+			$response = Route4Me::makeRequst([
215
+				'url' => Endpoint::REGISTER_ACTION,
216
+				'method' => 'POST',
217
+				'query' => Route4Me::generateRequestParameters($allQueryFields, $params),
218
+				'body' => Route4Me::generateRequestParameters($allBodyFields, $params),
219
+				'HTTPHEADER' => 'Content-Type: multipart/form-data',
220
+			]);
221
+		} catch (\Exception $ex) {
222
+			$response = null;
223
+			$errorText = "Cannot registrate new account <br> ".$ex->getMessage();
224
+		} finally {
225
+			return $response;
226
+		}
227
+	}
228
+
229
+	public static function validateSession($params)
230
+	{
231
+		$allQueryFields = ['session_guid', 'member_id', 'format'];
232
+
233
+		$response = Route4Me::makeRequst([
234
+			'url' => Endpoint::VALIDATE_SESSION,
235
+			'method' => 'GET',
236
+			'query' => Route4Me::generateRequestParameters($allQueryFields, $params),
237
+		]);
238
+
239
+		return $response;
240
+	}
241
+
242
+	public static function memberAuthentication($params)
243
+	{
244
+		$allBodyFields = ['strEmail', 'strPassword', 'format'];
245
+
246
+		$response = Route4Me::makeRequst([
247
+			'url' => Endpoint::AUTHENTICATE,
248
+			'method' => 'POST',
249
+			'body' => Route4Me::generateRequestParameters($allBodyFields, $params),
250
+			'HTTPHEADER' => 'Content-Type: multipart/form-data',
251
+		]);
252
+
253
+		return $response;
254
+	}
255
+
256
+	public static function webinarRegistration($params)
257
+	{
258
+		$allBodyFields = ['email_address', 'first_name', 'last_name', 'phone_number',
259
+		'company_name', 'member_id', 'webinar_date', ];
260
+
261
+		$response = null;
262
+
263
+		try {
264
+			$response = Route4Me::makeRequst([
265
+				'url' => Endpoint::WEBINAR_REGISTER,
266
+				'method' => 'POST',
267
+				'body' => Route4Me::generateRequestParameters($allBodyFields, $params),
268
+			]);
269
+		} catch (\Exception $ex) {
270
+			$response = null;
271
+		} finally {
272
+			return $response;
273
+		}
274
+	}
275
+
276
+	public static function purchaseUserLicense($params)
277
+	{
278
+		$allQueryFields = ['device_id'];
279
+		$allBodyFields = ['member_id', 'session_guid', 'device_id', 'device_type',
280
+		'subscription_name', 'token', 'payload', 'format', ];
281
+
282
+		$response = Route4Me::makeRequst([
283
+			'url' => Endpoint::USER_LICENSE,
284
+			'method' => 'POST',
285
+			'query' => Route4Me::generateRequestParameters($allQueryFields, $params),
286
+			'body' => Route4Me::generateRequestParameters($allBodyFields, $params),
287
+		]);
288
+
289
+		return $response;
290
+	}
291
+
292
+	public static function newMemberConfigKey($params)
293
+	{
294
+		$allBodyFields = ['config_key', 'config_value'];
295
+
296
+		$response = Route4Me::makeRequst([
297
+			'url' => Endpoint::CONFIGURATION_SETTINGS,
298
+			'method' => 'POST',
299
+			'body' => Route4Me::generateRequestParameters($allBodyFields, $params),
300
+		]);
301
+
302
+		return $response;
303
+	}
304
+
305
+	public static function removeMemberConfigKey($params)
306
+	{
307
+		$allBodyFields = ['config_key'];
308
+
309
+		$response = Route4Me::makeRequst([
310
+			'url' => Endpoint::CONFIGURATION_SETTINGS,
311
+			'method' => 'DELETE',
312
+			'body' => Route4Me::generateRequestParameters($allBodyFields, $params),
313
+		]);
314
+
315
+		return $response;
316
+	}
317
+
318
+	public static function getMemberConfigData($params)
319
+	{
320
+		$allQueryFields = ['config_key'];
321
+
322
+		$response = Route4Me::makeRequst([
323
+			'url' => Endpoint::CONFIGURATION_SETTINGS,
324
+			'method' => 'GET',
325
+			'query' => Route4Me::generateRequestParameters($allQueryFields, $params),
326
+		]);
327
+
328
+		return $response;
329
+	}
330
+
331
+	public static function updateMemberConfigKey($params)
332
+	{
333
+		$allBodyFields = ['config_key', 'config_value'];
334
+
335
+		$response = Route4Me::makeRequst([
336
+			'url' => Endpoint::CONFIGURATION_SETTINGS,
337
+			'method' => 'PUT',
338
+			'body' => Route4Me::generateRequestParameters($allBodyFields, $params),
339
+		]);
340
+
341
+		return $response;
342
+	}
343
+
344
+	public static function getMemberCapabilities()
345
+	{
346
+		$response = Route4Me::makeRequst([
347
+			'url' => Endpoint::MEMBER_CAPABILITIES,
348
+			'method' => 'GET',
349
+			'query' => Route4Me::generateRequestParameters([], null),
350
+		]);
351
+
352
+		return $response;
353
+	}
354 354
 }
Please login to merge, or discard this patch.
src/Route4Me/Members/MemberConfiguration.php 1 patch
Indentation   +94 added lines, -94 removed lines patch added patch discarded remove patch
@@ -13,137 +13,137 @@
 block discarded – undo
13 13
 
14 14
 class MemberConfiguration extends \Route4Me\Common
15 15
 {
16
-    /*
16
+	/*
17 17
      * The member ID
18 18
      */
19
-    public $member_id;
19
+	public $member_id;
20 20
 
21
-    /*
21
+	/*
22 22
      * The member's config key
23 23
      */
24
-    public $config_key;
24
+	public $config_key;
25 25
 
26
-    /*
26
+	/*
27 27
      * The member's config value
28 28
      */
29
-    public $config_value;
29
+	public $config_value;
30 30
 
31
-    /*
31
+	/*
32 32
      * True, if the value is hidden.
33 33
      */
34
-    public $is_hidden_value;
34
+	public $is_hidden_value;
35 35
 
36
-    /*
36
+	/*
37 37
      * If true, the value is showable.
38 38
      */
39
-    public $can_unhide_value;
39
+	public $can_unhide_value;
40 40
 
41
-    public function __construct()
42
-    {
43
-        Route4Me::setBaseUrl(Endpoint::BASE_URL);
44
-    }
41
+	public function __construct()
42
+	{
43
+		Route4Me::setBaseUrl(Endpoint::BASE_URL);
44
+	}
45 45
 
46
-    /*
46
+	/*
47 47
     * Create new member configuration key-value pair.
48 48
     * @param array $params
49 49
      *       Contains key-value pair:  'config_key': 'config_value'
50 50
      * @param string $errorText
51 51
      *        Error message text
52 52
     */
53
-    public function CreateNewConfigurationData($params, &$errorText)
54
-    {
55
-        $allBodyFields = ['config_key', 'config_value'];
56
-
57
-        $response = null;
58
-
59
-        try {
60
-            $response = Route4Me::makeRequst([
61
-                'url' => Endpoint::CONFIGURATION_SETTINGS,
62
-                'method' => 'POST',
63
-                'body' => Route4Me::generateRequestParameters($allBodyFields, $params),
64
-            ]);
65
-        } catch (\Exception $ex) {
66
-            $errorText = $ex->getMessage();
67
-        } finally {
68
-            return $response;
69
-        }
70
-    }
71
-
72
-    /*
53
+	public function CreateNewConfigurationData($params, &$errorText)
54
+	{
55
+		$allBodyFields = ['config_key', 'config_value'];
56
+
57
+		$response = null;
58
+
59
+		try {
60
+			$response = Route4Me::makeRequst([
61
+				'url' => Endpoint::CONFIGURATION_SETTINGS,
62
+				'method' => 'POST',
63
+				'body' => Route4Me::generateRequestParameters($allBodyFields, $params),
64
+			]);
65
+		} catch (\Exception $ex) {
66
+			$errorText = $ex->getMessage();
67
+		} finally {
68
+			return $response;
69
+		}
70
+	}
71
+
72
+	/*
73 73
      * Update the value of the specified key.
74 74
      * @param array $params
75 75
      *       Contains key-value pair:  'config_key': 'config_value'.
76 76
      * @param string $errorText
77 77
      *        Error message text
78 78
      */
79
-    public function UpdateConfigurationData($params, &$errorText)
80
-    {
81
-        $allBodyFields = ['config_key', 'config_value'];
82
-
83
-        $response = null;
84
-
85
-        try {
86
-            $response = Route4Me::makeRequst([
87
-                'url' => Endpoint::CONFIGURATION_SETTINGS,
88
-                'method' => 'PUT',
89
-                'body' => Route4Me::generateRequestParameters($allBodyFields, $params)
90
-            ]);
91
-        } catch (\Exception $ex) {
92
-            $errorText = $ex->getMessage();
93
-        } finally {
94
-            return $response;
95
-        }
96
-    }
97
-
98
-    /*
79
+	public function UpdateConfigurationData($params, &$errorText)
80
+	{
81
+		$allBodyFields = ['config_key', 'config_value'];
82
+
83
+		$response = null;
84
+
85
+		try {
86
+			$response = Route4Me::makeRequst([
87
+				'url' => Endpoint::CONFIGURATION_SETTINGS,
88
+				'method' => 'PUT',
89
+				'body' => Route4Me::generateRequestParameters($allBodyFields, $params)
90
+			]);
91
+		} catch (\Exception $ex) {
92
+			$errorText = $ex->getMessage();
93
+		} finally {
94
+			return $response;
95
+		}
96
+	}
97
+
98
+	/*
99 99
      * Removes specified member configuration key.
100 100
      * @param array $params
101 101
      *       Contains key-value pair:  'config_key': 'config_value'.
102 102
      * @param string $errorText
103 103
      *        Error message text
104 104
      */
105
-    public function RemoveConfigurationData($params, &$errorText)
106
-    {
107
-        if (!isset($params['config_key'])) {
108
-            $errorText = 'The parameter config_key is not specified';
109
-            return null;
110
-        }
111
-
112
-        $response = null;
113
-
114
-        try {
115
-            $response = Route4Me::makeRequst([
116
-                'url' => Endpoint::CONFIGURATION_SETTINGS,
117
-                'method' => 'DELETE',
118
-                'body' => [
119
-                    'config_key' => isset($params['config_key']) ? $params['config_key'] : null
120
-                ],
121
-            ]);
122
-        } catch (\Exception $ex) {
123
-            $errorText = $ex->getMessage();
124
-        } finally {
125
-            return $response;
126
-        }
127
-    }
128
-
129
-    /*
105
+	public function RemoveConfigurationData($params, &$errorText)
106
+	{
107
+		if (!isset($params['config_key'])) {
108
+			$errorText = 'The parameter config_key is not specified';
109
+			return null;
110
+		}
111
+
112
+		$response = null;
113
+
114
+		try {
115
+			$response = Route4Me::makeRequst([
116
+				'url' => Endpoint::CONFIGURATION_SETTINGS,
117
+				'method' => 'DELETE',
118
+				'body' => [
119
+					'config_key' => isset($params['config_key']) ? $params['config_key'] : null
120
+				],
121
+			]);
122
+		} catch (\Exception $ex) {
123
+			$errorText = $ex->getMessage();
124
+		} finally {
125
+			return $response;
126
+		}
127
+	}
128
+
129
+	/*
130 130
      * Retrieves configuration data from a member account.
131 131
      * param array $params
132 132
      *       If specified, it contains the key 'config_key' and retrieved only corresponding configuration data,
133 133
      *       if not, all member configuration data retrieved.
134 134
      */
135
-    public function GetConfigurationData($params = null)
136
-    {
137
-        $allQueryFields = ['config_key'];
138
-
139
-        $response = Route4Me::makeRequst([
140
-            'url' => Endpoint::CONFIGURATION_SETTINGS,
141
-            'method' => 'GET',
142
-            'query' => [
143
-                'config_key' => isset($params['config_key']) ? $params['config_key'] : null
144
-            ],
145
-        ]);
146
-
147
-        return $response;
148
-    }
135
+	public function GetConfigurationData($params = null)
136
+	{
137
+		$allQueryFields = ['config_key'];
138
+
139
+		$response = Route4Me::makeRequst([
140
+			'url' => Endpoint::CONFIGURATION_SETTINGS,
141
+			'method' => 'GET',
142
+			'query' => [
143
+				'config_key' => isset($params['config_key']) ? $params['config_key'] : null
144
+			],
145
+		]);
146
+
147
+		return $response;
148
+	}
149 149
 }
Please login to merge, or discard this patch.
src/Route4Me/Members/MemberCapabilities.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -7,38 +7,38 @@
 block discarded – undo
7 7
  */
8 8
 class MemberCapabilities extends \Route4Me\Common
9 9
 {
10
-    /*
10
+	/*
11 11
      * Array of the avoidance zone IDs.
12 12
      */
13
-    public $avoid = [];
13
+	public $avoid = [];
14 14
 
15
-    /*
15
+	/*
16 16
      * Road avoid options: "Highways", "Tolls", "highways,tolls".
17 17
      */
18
-    public $avoid_roads = [];
18
+	public $avoid_roads = [];
19 19
 
20
-    /*
20
+	/*
21 21
      * Restriction options.
22 22
      */
23
-    public $features = [];
23
+	public $features = [];
24 24
 
25
-    /*
25
+	/*
26 26
      * Travel modes: "Highways", "Tolls", "highways,tolls".
27 27
      */
28
-    public $travelModes = [];
28
+	public $travelModes = [];
29 29
 
30
-    /*
30
+	/*
31 31
      * Navigate options
32 32
      */
33
-    public $navigateBy = [];
33
+	public $navigateBy = [];
34 34
 
35
-    /*
35
+	/*
36 36
      * Array of the license modules
37 37
      */
38
-    public $LicensedModules = [];
38
+	public $LicensedModules = [];
39 39
 
40
-    /*
40
+	/*
41 41
      * If true, the member subscription is commercial.
42 42
      */
43
-    public $commercial;
43
+	public $commercial;
44 44
 }
Please login to merge, or discard this patch.
src/Route4Me/Members/MemberResponse.php 1 patch
Indentation   +393 added lines, -393 removed lines patch added patch discarded remove patch
@@ -9,397 +9,397 @@
 block discarded – undo
9 9
  */
10 10
 class MemberResponse extends \Route4Me\Common
11 11
 {
12
-    /** @var boolean $authenticated
13
-     * A boolean flag indicating if the session is valid.
14
-     */
15
-    public $authenticated;
16
-
17
-    /** @var boolean $status
18
-     * Process status
19
-     */
20
-    public $status;
21
-
22
-    /** @var string $geocoding_service
23
-     * Geocoding service
24
-     */
25
-    public $geocoding_service;
26
-
27
-    /** @var string $session_id
28
-     * The integer session id of the current session.
29
-     */
30
-    public $session_id;
31
-
32
-    /** @var string $session_guid
33
-     * An MD5 hash string of the currently authenticated sesssion,
34
-     * important to use this with future requests.
35
-     */
36
-    public $session_guid;
37
-
38
-    /** @var string $member_first_name
39
-     * The first name of the user.
40
-     */
41
-    public $member_first_name;
42
-
43
-    /** @var string $member_last_name
44
-     * The last name of the user.
45
-     */
46
-    public $member_last_name;
47
-
48
-    /** @var int $member_timestamp_added
49
-     * The unix timestamp when the user joined the service.
50
-     */
51
-    public $member_timestamp_added;
52
-
53
-    /** @var string $industry
54
-     * The industry the authenticated user specified.
55
-     */
56
-    public $industry;
57
-
58
-    /** @var int $member_id
59
-     * Member ID
60
-     */
61
-    public $member_id;
62
-
63
-    /** @var string $member_email
64
-     * Member email
65
-     */
66
-    public $member_email;
67
-
68
-    /** @var boolean $is_trial
69
-     * If the user is currently a trial customer.
70
-     */
71
-    public $is_trial;
72
-
73
-    /** @var boolean $is_active
74
-     * If the user is currently an active customer.
75
-     */
76
-    public $is_active;
77
-
78
-    /** @var string $api_key
79
-     * User's API key
80
-     */
81
-    public $api_key;
82
-
83
-    /** @var int $tracking_ttl
84
-     * Tracking TTL
85
-     */
86
-    public $tracking_ttl;
87
-
88
-    /** @var boolean $hide_billing_section
89
-     * Hide billing section.
90
-     */
91
-    public $hide_billing_section;
92
-
93
-    /** @var string $last_known_member_payment_device
94
-     * Last known member payment device (e.g. 'web').
95
-     */
96
-    public $last_known_member_payment_device;
97
-
98
-    /** @var array $licensed_modules
99
-     * Licensed module. e.g.:
100
-     * 'MODULE__ROUTE_EDITOR_CUSTOM_DATA_EDITING',
101
-     * 'MODULE__VOICE_NAVIGATION:TRUE',
102
-     * 'MODULE__VOICE_NAVIGATION'
103
-     */
104
-    public $licensed_modules;
105
-
106
-    /** @var boolean $member_business_type
107
-     * Member business type (e.g. 'BUSINESS_EMPLOYEE').
108
-     */
109
-    public $member_business_type;
110
-
111
-    /** @var string $geofence_polygon_shape
112
-     * Geofence polygon shape. Available values:
113
-     * 'circle', 'poly', 'rect'.
114
-     */
115
-    public $geofence_polygon_shape;
116
-
117
-    /** @var int $geofence_polygon_size
118
-     * Geofence polygon size
119
-     */
120
-    public $geofence_polygon_size;
121
-
122
-    /** @var int $geofence_time_onsite_trigger_secs
123
-     * Geofence onsite trigger time (seconds).
124
-     */
125
-    public $geofence_time_onsite_trigger_secs;
126
-
127
-    /** @var int $geofence_minimum_trigger_speed
128
-     * Geofence's minimum trigger speed.
129
-     */
130
-    public $geofence_minimum_trigger_speed;
131
-
132
-    /** @var bool $is_subscription_past_due
133
-     * True if the subscription is past due.
134
-     */
135
-    public $is_subscription_past_due;
136
-
137
-    /** @var string $visited_departed_enabled
138
-     * If true, triggering of the visited and departed activities is enabled.
139
-     */
140
-    public $visited_departed_enabled;
141
-
142
-    /** @var string $long_press_enabled
143
-     * If true, long press is enabled.
144
-     */
145
-    public $long_press_enabled;
146
-
147
-    /** @var int $account_type_id
148
-     * The account type ID.
149
-     */
150
-    public $account_type_id;
151
-
152
-    /** @var string $current_price
153
-     * Current price (e.g. '0.000').
154
-     */
155
-    public $current_price;
156
-
157
-    /** @var int $initially_requested_account_type_id
158
-     * Initially Requested account type ID.
159
-     */
160
-    public $initially_requested_account_type_id;
161
-
162
-    /** @var string $account_type_alias
163
-     * Account type alias
164
-     */
165
-    public $account_type_alias;
166
-
167
-    /** @var string $member_type
168
-     * Member type. Available values:
169
-     * PRIMARY_ACCOUNT, SUB_ACCOUNT_ADMIN, SUB_ACCOUNT_REGIONAL_MANAGER,
170
-     * SUB_ACCOUNT_DISPATCHER, SUB_ACCOUNT_PLANNER, SUB_ACCOUNT_DRIVER,
171
-     * SUB_ACCOUNT_ANALYSTSUB_ACCOUNT_VENDORSUB_ACCOUNT_CUSTOMER_SERVICE
172
-     */
173
-    public $member_type;
174
-
175
-    /** @var string $OWNER_MEMBER_ID
176
-     * Parent user ID.
177
-     */
178
-    public $OWNER_MEMBER_ID;
179
-
180
-    /** @var string $ROOT_OWNER_MEMBER_ID
181
-     * Root owner member ID (e.g. '402088').
182
-     */
183
-    public $ROOT_OWNER_MEMBER_ID;
184
-
185
-    /** @var string $ROOT_OWNER_MEMBER_EMAIL
186
-     * Root owner member email.
187
-     */
188
-    public $ROOT_OWNER_MEMBER_EMAIL;
189
-
190
-    /** @var string $ROOT_OWNER_MEMBER_API_KEY
191
-     * Root owner member API key.
192
-     */
193
-    public $ROOT_OWNER_MEMBER_API_KEY;
194
-
195
-    /** @var string $geocodingMethod
196
-     * Geocoding method
197
-     */
198
-    public $geocodingMethod;
199
-
200
-    /** @var string $service_type
201
-     * Service type (e.g. 'pre5').
202
-     */
203
-    public $service_type;
204
-
205
-    /** @var string $validated_by
206
-     * Validated by (e.g. 'ADMIN_PANEL').
207
-     */
208
-    public $validated_by;
209
-
210
-    /** @var int $max_stops_per_route
211
-     * Maximum allowed number of the stops per route.
212
-     */
213
-    public $max_stops_per_route;
214
-
215
-    /** @var int $max_routes
216
-     * Maximum allowed number of the generated routes.
217
-     */
218
-    public $max_routes;
219
-
220
-    /** @var int $max_route
221
-     * Maximum allowed number of the generated routes.
222
-     */
223
-    public $max_route;
224
-
225
-    /** @var int $route_planned
226
-     * Planned route numbers
227
-     */
228
-    public $route_planned;
229
-
230
-    /** @var int $routes_planned
231
-     * Routes Planned
232
-     */
233
-    public $routes_planned;
234
-
235
-    /** @var int $total_routes_planned
236
-     * Total planned routes.
237
-     */
238
-    public $total_routes_planned;
239
-
240
-    /** @var int $authentication_count
241
-     * Authentication count.
242
-     */
243
-    public $authentication_count;
244
-
245
-    /** @var string $salesforce_unique_record_id
246
-     * Salesforce unique record ID.
247
-     */
248
-    public $salesforce_unique_record_id;
249
-
250
-    /** @var string $salesforce_account_id
251
-     * Salesforce account ID
252
-     */
253
-    public $salesforce_account_id;
254
-
255
-    /** @var string $salesforce_lead_id
256
-     * Salesforce lead ID
257
-     */
258
-    public $salesforce_lead_id;
259
-
260
-    /** @var int $max_api_optimization_addresses
261
-     * The maximun number of addresses the authenticated user
262
-     * can optimize in this billing cycle.
263
-     */
264
-    public $max_api_optimization_addresses;
265
-
266
-    /** @var int $max_api_geocoding_addresses
267
-     * The maximun number of geocodings the authenticated user
268
-     * can optimize in this billing cycle.
269
-     */
270
-    public $max_api_geocoding_addresses;
271
-
272
-    /** @var int $max_api_directions_addresses
273
-     * The maximum number of driving route transactions the authenticated
274
-     * user can execute in this billing cycle.
275
-     */
276
-    public $max_api_directions_addresses;
277
-
278
-    /** @var int $max_api_validation_addresses
279
-     * The maximun number of address validation transactions the authenticated
280
-     * user can execute in this billing cycle.
281
-     */
282
-    public $max_api_validation_addresses;
283
-
284
-    /** @var int $max_stops_per_unoptimized_route
285
-     * The maximum number of stops the authenticated user
286
-     * can put into a route with optimization disabled.
287
-     */
288
-    public $max_stops_per_unoptimized_route;
289
-
290
-    /** @var int $max_api_distance_tx
291
-     * The maximum number of distance transactions the authenticated
292
-     * user can execute in this billing cycle.
293
-     */
294
-    public $max_api_distance_tx;
295
-
296
-    /** @var boolean $blDisplayUpgradeTrackingHTML
297
-     * Display upgrade tracking HTML.
298
-     */
299
-    public $blDisplayUpgradeTrackingHTML;
300
-
301
-    /** @var int $intTrackingTrigger
302
-     * Tracking trigger (int).
303
-     */
304
-    public $intTrackingTrigger;
305
-
306
-    /** @var int $last_payment_ts
307
-     * The last unix timestamp when this user was successfully charged.
308
-     */
309
-    public $last_payment_ts;
310
-
311
-    /** @var int $last_failed_payment_ts
312
-     * The last unix timestamp when this user was failed to pay.
313
-     */
314
-    public $last_failed_payment_ts;
315
-
316
-    /** @var int $account_expires_timestamp
317
-     * Account expire date
318
-     */
319
-    public $account_expires_timestamp;
320
-
321
-    /** @var boolean $account_past_due
322
-     * Account past due
323
-     */
324
-    public $account_past_due;
325
-
326
-    /** @var string $ui_input_method
327
-     * UI input method
328
-     */
329
-    public $ui_input_method;
330
-
331
-    /** @var string $registration_app
332
-     * Registration application
333
-     */
334
-    public $registration_app;
335
-
336
-    /** @var string $registration_device
337
-     * Registration device
338
-     */
339
-    public $registration_device;
340
-
341
-    /** @var string $preferred_units
342
-     * Preferred units (mi, km)
343
-     */
344
-    public $preferred_units;
345
-
346
-    /** @var string $preferred_language
347
-     * Preferred language (en, fr)
348
-     */
349
-    public $preferred_language;
350
-
351
-    /** @var string $hide_routed_addresses
352
-     * If true, routed addresses will be hidden.
353
-     */
354
-    public $hide_routed_addresses;
355
-
356
-    /** @var string $show_superuser_addresses
357
-     * Show superuser addresses ('0', '1').
358
-     */
359
-    public $show_superuser_addresses;
360
-
361
-    /** @var string $appdirect_url
362
-     * Application direction URL
363
-     */
364
-    public $appdirect_url;
365
-
366
-    /** @var int $timestamp_trial_expiration
367
-     * Timestamp trial expiration
368
-     */
369
-    public $timestamp_trial_expiration;
370
-
371
-    /** @var string $update_channel_name
372
-     * Update channel name
373
-     */
374
-    public $update_channel_name;
375
-
376
-    /** @var int $max_subusers_cnt
377
-     * Maximum subusers count
378
-     */
379
-    public $max_subusers_cnt;
380
-
381
-    /** @var string $hide_visited_addresses
382
-     * If true, visited addresses will be hidden.
383
-     */
384
-    public $hide_visited_addresses;
385
-
386
-    /** @var string $HIDE_NONFUTURE_ROUTES
387
-     * If true, nonfuture routes will be hidden.
388
-     */
389
-    public $HIDE_NONFUTURE_ROUTES;
390
-
391
-    /** @var string $display_max_routes_future_days
392
-     * Display maximum routes future days ('0', '1').
393
-     */
394
-    public $display_max_routes_future_days;
395
-
396
-    /** @var string $READONLY_USER
397
-     * Readonly uer ('0', '1').
398
-     */
399
-    public $READONLY_USER;
400
-
401
-    /** @var int $auto_logout_ts
402
-     * Time in seconds. A user will be logged out after been inactive during specified by this parameter seconds.
403
-     */
404
-    public $auto_logout_ts;
12
+	/** @var boolean $authenticated
13
+	 * A boolean flag indicating if the session is valid.
14
+	 */
15
+	public $authenticated;
16
+
17
+	/** @var boolean $status
18
+	 * Process status
19
+	 */
20
+	public $status;
21
+
22
+	/** @var string $geocoding_service
23
+	 * Geocoding service
24
+	 */
25
+	public $geocoding_service;
26
+
27
+	/** @var string $session_id
28
+	 * The integer session id of the current session.
29
+	 */
30
+	public $session_id;
31
+
32
+	/** @var string $session_guid
33
+	 * An MD5 hash string of the currently authenticated sesssion,
34
+	 * important to use this with future requests.
35
+	 */
36
+	public $session_guid;
37
+
38
+	/** @var string $member_first_name
39
+	 * The first name of the user.
40
+	 */
41
+	public $member_first_name;
42
+
43
+	/** @var string $member_last_name
44
+	 * The last name of the user.
45
+	 */
46
+	public $member_last_name;
47
+
48
+	/** @var int $member_timestamp_added
49
+	 * The unix timestamp when the user joined the service.
50
+	 */
51
+	public $member_timestamp_added;
52
+
53
+	/** @var string $industry
54
+	 * The industry the authenticated user specified.
55
+	 */
56
+	public $industry;
57
+
58
+	/** @var int $member_id
59
+	 * Member ID
60
+	 */
61
+	public $member_id;
62
+
63
+	/** @var string $member_email
64
+	 * Member email
65
+	 */
66
+	public $member_email;
67
+
68
+	/** @var boolean $is_trial
69
+	 * If the user is currently a trial customer.
70
+	 */
71
+	public $is_trial;
72
+
73
+	/** @var boolean $is_active
74
+	 * If the user is currently an active customer.
75
+	 */
76
+	public $is_active;
77
+
78
+	/** @var string $api_key
79
+	 * User's API key
80
+	 */
81
+	public $api_key;
82
+
83
+	/** @var int $tracking_ttl
84
+	 * Tracking TTL
85
+	 */
86
+	public $tracking_ttl;
87
+
88
+	/** @var boolean $hide_billing_section
89
+	 * Hide billing section.
90
+	 */
91
+	public $hide_billing_section;
92
+
93
+	/** @var string $last_known_member_payment_device
94
+	 * Last known member payment device (e.g. 'web').
95
+	 */
96
+	public $last_known_member_payment_device;
97
+
98
+	/** @var array $licensed_modules
99
+	 * Licensed module. e.g.:
100
+	 * 'MODULE__ROUTE_EDITOR_CUSTOM_DATA_EDITING',
101
+	 * 'MODULE__VOICE_NAVIGATION:TRUE',
102
+	 * 'MODULE__VOICE_NAVIGATION'
103
+	 */
104
+	public $licensed_modules;
105
+
106
+	/** @var boolean $member_business_type
107
+	 * Member business type (e.g. 'BUSINESS_EMPLOYEE').
108
+	 */
109
+	public $member_business_type;
110
+
111
+	/** @var string $geofence_polygon_shape
112
+	 * Geofence polygon shape. Available values:
113
+	 * 'circle', 'poly', 'rect'.
114
+	 */
115
+	public $geofence_polygon_shape;
116
+
117
+	/** @var int $geofence_polygon_size
118
+	 * Geofence polygon size
119
+	 */
120
+	public $geofence_polygon_size;
121
+
122
+	/** @var int $geofence_time_onsite_trigger_secs
123
+	 * Geofence onsite trigger time (seconds).
124
+	 */
125
+	public $geofence_time_onsite_trigger_secs;
126
+
127
+	/** @var int $geofence_minimum_trigger_speed
128
+	 * Geofence's minimum trigger speed.
129
+	 */
130
+	public $geofence_minimum_trigger_speed;
131
+
132
+	/** @var bool $is_subscription_past_due
133
+	 * True if the subscription is past due.
134
+	 */
135
+	public $is_subscription_past_due;
136
+
137
+	/** @var string $visited_departed_enabled
138
+	 * If true, triggering of the visited and departed activities is enabled.
139
+	 */
140
+	public $visited_departed_enabled;
141
+
142
+	/** @var string $long_press_enabled
143
+	 * If true, long press is enabled.
144
+	 */
145
+	public $long_press_enabled;
146
+
147
+	/** @var int $account_type_id
148
+	 * The account type ID.
149
+	 */
150
+	public $account_type_id;
151
+
152
+	/** @var string $current_price
153
+	 * Current price (e.g. '0.000').
154
+	 */
155
+	public $current_price;
156
+
157
+	/** @var int $initially_requested_account_type_id
158
+	 * Initially Requested account type ID.
159
+	 */
160
+	public $initially_requested_account_type_id;
161
+
162
+	/** @var string $account_type_alias
163
+	 * Account type alias
164
+	 */
165
+	public $account_type_alias;
166
+
167
+	/** @var string $member_type
168
+	 * Member type. Available values:
169
+	 * PRIMARY_ACCOUNT, SUB_ACCOUNT_ADMIN, SUB_ACCOUNT_REGIONAL_MANAGER,
170
+	 * SUB_ACCOUNT_DISPATCHER, SUB_ACCOUNT_PLANNER, SUB_ACCOUNT_DRIVER,
171
+	 * SUB_ACCOUNT_ANALYSTSUB_ACCOUNT_VENDORSUB_ACCOUNT_CUSTOMER_SERVICE
172
+	 */
173
+	public $member_type;
174
+
175
+	/** @var string $OWNER_MEMBER_ID
176
+	 * Parent user ID.
177
+	 */
178
+	public $OWNER_MEMBER_ID;
179
+
180
+	/** @var string $ROOT_OWNER_MEMBER_ID
181
+	 * Root owner member ID (e.g. '402088').
182
+	 */
183
+	public $ROOT_OWNER_MEMBER_ID;
184
+
185
+	/** @var string $ROOT_OWNER_MEMBER_EMAIL
186
+	 * Root owner member email.
187
+	 */
188
+	public $ROOT_OWNER_MEMBER_EMAIL;
189
+
190
+	/** @var string $ROOT_OWNER_MEMBER_API_KEY
191
+	 * Root owner member API key.
192
+	 */
193
+	public $ROOT_OWNER_MEMBER_API_KEY;
194
+
195
+	/** @var string $geocodingMethod
196
+	 * Geocoding method
197
+	 */
198
+	public $geocodingMethod;
199
+
200
+	/** @var string $service_type
201
+	 * Service type (e.g. 'pre5').
202
+	 */
203
+	public $service_type;
204
+
205
+	/** @var string $validated_by
206
+	 * Validated by (e.g. 'ADMIN_PANEL').
207
+	 */
208
+	public $validated_by;
209
+
210
+	/** @var int $max_stops_per_route
211
+	 * Maximum allowed number of the stops per route.
212
+	 */
213
+	public $max_stops_per_route;
214
+
215
+	/** @var int $max_routes
216
+	 * Maximum allowed number of the generated routes.
217
+	 */
218
+	public $max_routes;
219
+
220
+	/** @var int $max_route
221
+	 * Maximum allowed number of the generated routes.
222
+	 */
223
+	public $max_route;
224
+
225
+	/** @var int $route_planned
226
+	 * Planned route numbers
227
+	 */
228
+	public $route_planned;
229
+
230
+	/** @var int $routes_planned
231
+	 * Routes Planned
232
+	 */
233
+	public $routes_planned;
234
+
235
+	/** @var int $total_routes_planned
236
+	 * Total planned routes.
237
+	 */
238
+	public $total_routes_planned;
239
+
240
+	/** @var int $authentication_count
241
+	 * Authentication count.
242
+	 */
243
+	public $authentication_count;
244
+
245
+	/** @var string $salesforce_unique_record_id
246
+	 * Salesforce unique record ID.
247
+	 */
248
+	public $salesforce_unique_record_id;
249
+
250
+	/** @var string $salesforce_account_id
251
+	 * Salesforce account ID
252
+	 */
253
+	public $salesforce_account_id;
254
+
255
+	/** @var string $salesforce_lead_id
256
+	 * Salesforce lead ID
257
+	 */
258
+	public $salesforce_lead_id;
259
+
260
+	/** @var int $max_api_optimization_addresses
261
+	 * The maximun number of addresses the authenticated user
262
+	 * can optimize in this billing cycle.
263
+	 */
264
+	public $max_api_optimization_addresses;
265
+
266
+	/** @var int $max_api_geocoding_addresses
267
+	 * The maximun number of geocodings the authenticated user
268
+	 * can optimize in this billing cycle.
269
+	 */
270
+	public $max_api_geocoding_addresses;
271
+
272
+	/** @var int $max_api_directions_addresses
273
+	 * The maximum number of driving route transactions the authenticated
274
+	 * user can execute in this billing cycle.
275
+	 */
276
+	public $max_api_directions_addresses;
277
+
278
+	/** @var int $max_api_validation_addresses
279
+	 * The maximun number of address validation transactions the authenticated
280
+	 * user can execute in this billing cycle.
281
+	 */
282
+	public $max_api_validation_addresses;
283
+
284
+	/** @var int $max_stops_per_unoptimized_route
285
+	 * The maximum number of stops the authenticated user
286
+	 * can put into a route with optimization disabled.
287
+	 */
288
+	public $max_stops_per_unoptimized_route;
289
+
290
+	/** @var int $max_api_distance_tx
291
+	 * The maximum number of distance transactions the authenticated
292
+	 * user can execute in this billing cycle.
293
+	 */
294
+	public $max_api_distance_tx;
295
+
296
+	/** @var boolean $blDisplayUpgradeTrackingHTML
297
+	 * Display upgrade tracking HTML.
298
+	 */
299
+	public $blDisplayUpgradeTrackingHTML;
300
+
301
+	/** @var int $intTrackingTrigger
302
+	 * Tracking trigger (int).
303
+	 */
304
+	public $intTrackingTrigger;
305
+
306
+	/** @var int $last_payment_ts
307
+	 * The last unix timestamp when this user was successfully charged.
308
+	 */
309
+	public $last_payment_ts;
310
+
311
+	/** @var int $last_failed_payment_ts
312
+	 * The last unix timestamp when this user was failed to pay.
313
+	 */
314
+	public $last_failed_payment_ts;
315
+
316
+	/** @var int $account_expires_timestamp
317
+	 * Account expire date
318
+	 */
319
+	public $account_expires_timestamp;
320
+
321
+	/** @var boolean $account_past_due
322
+	 * Account past due
323
+	 */
324
+	public $account_past_due;
325
+
326
+	/** @var string $ui_input_method
327
+	 * UI input method
328
+	 */
329
+	public $ui_input_method;
330
+
331
+	/** @var string $registration_app
332
+	 * Registration application
333
+	 */
334
+	public $registration_app;
335
+
336
+	/** @var string $registration_device
337
+	 * Registration device
338
+	 */
339
+	public $registration_device;
340
+
341
+	/** @var string $preferred_units
342
+	 * Preferred units (mi, km)
343
+	 */
344
+	public $preferred_units;
345
+
346
+	/** @var string $preferred_language
347
+	 * Preferred language (en, fr)
348
+	 */
349
+	public $preferred_language;
350
+
351
+	/** @var string $hide_routed_addresses
352
+	 * If true, routed addresses will be hidden.
353
+	 */
354
+	public $hide_routed_addresses;
355
+
356
+	/** @var string $show_superuser_addresses
357
+	 * Show superuser addresses ('0', '1').
358
+	 */
359
+	public $show_superuser_addresses;
360
+
361
+	/** @var string $appdirect_url
362
+	 * Application direction URL
363
+	 */
364
+	public $appdirect_url;
365
+
366
+	/** @var int $timestamp_trial_expiration
367
+	 * Timestamp trial expiration
368
+	 */
369
+	public $timestamp_trial_expiration;
370
+
371
+	/** @var string $update_channel_name
372
+	 * Update channel name
373
+	 */
374
+	public $update_channel_name;
375
+
376
+	/** @var int $max_subusers_cnt
377
+	 * Maximum subusers count
378
+	 */
379
+	public $max_subusers_cnt;
380
+
381
+	/** @var string $hide_visited_addresses
382
+	 * If true, visited addresses will be hidden.
383
+	 */
384
+	public $hide_visited_addresses;
385
+
386
+	/** @var string $HIDE_NONFUTURE_ROUTES
387
+	 * If true, nonfuture routes will be hidden.
388
+	 */
389
+	public $HIDE_NONFUTURE_ROUTES;
390
+
391
+	/** @var string $display_max_routes_future_days
392
+	 * Display maximum routes future days ('0', '1').
393
+	 */
394
+	public $display_max_routes_future_days;
395
+
396
+	/** @var string $READONLY_USER
397
+	 * Readonly uer ('0', '1').
398
+	 */
399
+	public $READONLY_USER;
400
+
401
+	/** @var int $auto_logout_ts
402
+	 * Time in seconds. A user will be logged out after been inactive during specified by this parameter seconds.
403
+	 */
404
+	public $auto_logout_ts;
405 405
 }
Please login to merge, or discard this patch.