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 ( 5f270e...733b13 )
by Igor
09:47 queued 13s
created
src/Route4Me/Members/MemberConfiguration.php 1 patch
Indentation   +106 added lines, -106 removed lines patch added patch discarded remove patch
@@ -13,152 +13,152 @@
 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
-    public static function fromArray(array $params)
47
-    {
48
-        $memberConfiguration = new Self();
46
+	public static function fromArray(array $params)
47
+	{
48
+		$memberConfiguration = new Self();
49 49
 
50
-        foreach ($params as $key => $value) {
51
-            if (property_exists($memberConfiguration, $key)) {
52
-                $memberConfiguration->{$key} = $value;
53
-            } else {
54
-                throw new BadParam("Correct parameter must be provided. Wrong Parameter: $key");
55
-            }
56
-        }
50
+		foreach ($params as $key => $value) {
51
+			if (property_exists($memberConfiguration, $key)) {
52
+				$memberConfiguration->{$key} = $value;
53
+			} else {
54
+				throw new BadParam("Correct parameter must be provided. Wrong Parameter: $key");
55
+			}
56
+		}
57 57
 
58
-        return $memberConfiguration;
59
-    }
58
+		return $memberConfiguration;
59
+	}
60 60
 
61
-    /*
61
+	/*
62 62
     * Create new member configuration key-value pair.
63 63
     * @param array $params
64 64
      *       Contains key-value pair:  'config_key': 'config_value'
65 65
      * @param string $errorText
66 66
      *        Error message text
67 67
     */
68
-    public function CreateNewConfigurationData($params, &$errorText)
69
-    {
70
-        $allBodyFields = ['config_key', 'config_value'];
71
-
72
-        $response = null;
73
-
74
-        try {
75
-            $response = Route4Me::makeRequst([
76
-                'url' => Endpoint::CONFIGURATION_SETTINGS,
77
-                'method' => 'POST',
78
-                'body' => Route4Me::generateRequestParameters($allBodyFields, $params),
79
-            ]);
80
-        } catch (Exception $ex) {
81
-            $errorText = $ex->getMessage();
82
-        } finally {
83
-            return $response;
84
-        }
85
-    }
86
-
87
-    /*
68
+	public function CreateNewConfigurationData($params, &$errorText)
69
+	{
70
+		$allBodyFields = ['config_key', 'config_value'];
71
+
72
+		$response = null;
73
+
74
+		try {
75
+			$response = Route4Me::makeRequst([
76
+				'url' => Endpoint::CONFIGURATION_SETTINGS,
77
+				'method' => 'POST',
78
+				'body' => Route4Me::generateRequestParameters($allBodyFields, $params),
79
+			]);
80
+		} catch (Exception $ex) {
81
+			$errorText = $ex->getMessage();
82
+		} finally {
83
+			return $response;
84
+		}
85
+	}
86
+
87
+	/*
88 88
      * Update the value of the specified key.
89 89
      * @param array $params
90 90
      *       Contains key-value pair:  'config_key': 'config_value'.
91 91
      * @param string $errorText
92 92
      *        Error message text
93 93
      */
94
-    public function UpdateConfigurationData($params, &$errorText)
95
-    {
96
-        $allBodyFields = ['config_key', 'config_value'];
97
-
98
-        $response = null;
99
-
100
-        try {
101
-            $response = Route4Me::makeRequst([
102
-                'url' => Endpoint::CONFIGURATION_SETTINGS,
103
-                'method' => 'PUT',
104
-                'body' => Route4Me::generateRequestParameters($allBodyFields, $params)
105
-            ]);
106
-        } catch (Exception $ex) {
107
-            $errorText = $ex->getMessage();
108
-        } finally {
109
-            return $response;
110
-        }
111
-    }
112
-
113
-    /*
94
+	public function UpdateConfigurationData($params, &$errorText)
95
+	{
96
+		$allBodyFields = ['config_key', 'config_value'];
97
+
98
+		$response = null;
99
+
100
+		try {
101
+			$response = Route4Me::makeRequst([
102
+				'url' => Endpoint::CONFIGURATION_SETTINGS,
103
+				'method' => 'PUT',
104
+				'body' => Route4Me::generateRequestParameters($allBodyFields, $params)
105
+			]);
106
+		} catch (Exception $ex) {
107
+			$errorText = $ex->getMessage();
108
+		} finally {
109
+			return $response;
110
+		}
111
+	}
112
+
113
+	/*
114 114
      * Removes specified member configuration key.
115 115
      * @param array $params
116 116
      *       Contains key-value pair:  'config_key': 'config_value'.
117 117
      * @param string $errorText
118 118
      *        Error message text
119 119
      */
120
-    public function RemoveConfigurationData($params, &$errorText)
121
-    {
122
-        if (!isset($params['config_key'])) {
123
-            $errorText = 'The parameter config_key is not specified';
124
-            return null;
125
-        }
126
-
127
-        $response = null;
128
-
129
-        try {
130
-            $response = Route4Me::makeRequst([
131
-                'url' => Endpoint::CONFIGURATION_SETTINGS,
132
-                'method' => 'DELETE',
133
-                'body' => [
134
-                    'config_key' => isset($params['config_key']) ? $params['config_key'] : null
135
-                ],
136
-            ]);
137
-        } catch (Exception $ex) {
138
-            $errorText = $ex->getMessage();
139
-        } finally {
140
-            return $response;
141
-        }
142
-    }
143
-
144
-    /*
120
+	public function RemoveConfigurationData($params, &$errorText)
121
+	{
122
+		if (!isset($params['config_key'])) {
123
+			$errorText = 'The parameter config_key is not specified';
124
+			return null;
125
+		}
126
+
127
+		$response = null;
128
+
129
+		try {
130
+			$response = Route4Me::makeRequst([
131
+				'url' => Endpoint::CONFIGURATION_SETTINGS,
132
+				'method' => 'DELETE',
133
+				'body' => [
134
+					'config_key' => isset($params['config_key']) ? $params['config_key'] : null
135
+				],
136
+			]);
137
+		} catch (Exception $ex) {
138
+			$errorText = $ex->getMessage();
139
+		} finally {
140
+			return $response;
141
+		}
142
+	}
143
+
144
+	/*
145 145
      * Retrieves configuration data from a member account.
146 146
      * param array $params
147 147
      *       If specified, it contains the key 'config_key' and retrieved only corresponding configuration data,
148 148
      *       if not, all member configuration data retrieved.
149 149
      */
150
-    public function GetConfigurationData($params=null)
151
-    {
152
-        $allQueryFields = ['config_key'];
153
-
154
-        $response = Route4Me::makeRequst([
155
-            'url' => Endpoint::CONFIGURATION_SETTINGS,
156
-            'method' => 'GET',
157
-            'query' => [
158
-                'config_key' => isset($params['config_key']) ? $params['config_key'] : null
159
-            ],
160
-        ]);
161
-
162
-        return $response;
163
-    }
150
+	public function GetConfigurationData($params=null)
151
+	{
152
+		$allQueryFields = ['config_key'];
153
+
154
+		$response = Route4Me::makeRequst([
155
+			'url' => Endpoint::CONFIGURATION_SETTINGS,
156
+			'method' => 'GET',
157
+			'query' => [
158
+				'config_key' => isset($params['config_key']) ? $params['config_key'] : null
159
+			],
160
+		]);
161
+
162
+		return $response;
163
+	}
164 164
 }
165 165
\ No newline at end of file
Please login to merge, or discard this patch.
src/Route4Me/Members/ResultsResponseV4.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -9,22 +9,22 @@
 block discarded – undo
9 9
  */
10 10
 class ResultsResponseV4 extends \Route4Me\Common
11 11
 {
12
-    /** @var MemberResponseV4[] $results */
13
-    public $results;
12
+	/** @var MemberResponseV4[] $results */
13
+	public $results;
14 14
 
15
-    /** @var int $total */
16
-    public $total;
15
+	/** @var int $total */
16
+	public $total;
17 17
 
18
-    public static function fromArray(array $params)
19
-    {
20
-        $resultsResponseV4 = new self();
18
+	public static function fromArray(array $params)
19
+	{
20
+		$resultsResponseV4 = new self();
21 21
 
22
-        foreach ($params as $key => $value) {
23
-            if (property_exists($resultsResponseV4, $key)) {
24
-                $resultsResponseV4->{$key} = $value;
25
-            }
26
-        }
22
+		foreach ($params as $key => $value) {
23
+			if (property_exists($resultsResponseV4, $key)) {
24
+				$resultsResponseV4->{$key} = $value;
25
+			}
26
+		}
27 27
 
28
-        return $resultsResponseV4;
29
-    }
28
+		return $resultsResponseV4;
29
+	}
30 30
 }
31 31
\ No newline at end of file
Please login to merge, or discard this patch.
src/Route4Me/Members/MemberResponseV4.php 1 patch
Indentation   +132 added lines, -132 removed lines patch added patch discarded remove patch
@@ -9,137 +9,137 @@
 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;
131
-
132
-    public static function fromArray(array $params)
133
-    {
134
-        $memberResponseV4 = new self();
135
-
136
-        foreach ($params as $key => $value) {
137
-            if (property_exists($memberResponseV4, $key)) {
138
-                $memberResponseV4->{$key} = $value;
139
-            }
140
-        }
141
-
142
-        return $memberResponseV4;
143
-    }
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
+
132
+	public static function fromArray(array $params)
133
+	{
134
+		$memberResponseV4 = new self();
135
+
136
+		foreach ($params as $key => $value) {
137
+			if (property_exists($memberResponseV4, $key)) {
138
+				$memberResponseV4->{$key} = $value;
139
+			}
140
+		}
141
+
142
+		return $memberResponseV4;
143
+	}
144 144
 
145 145
 }
146 146
\ No newline at end of file
Please login to merge, or discard this patch.
src/Route4Me/Members/Member.php 1 patch
Indentation   +356 added lines, -356 removed lines patch added patch discarded remove patch
@@ -8,360 +8,360 @@
 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 fromArray(array $params)
75
-    {
76
-        $member = new self();
77
-
78
-        foreach ($params as $key => $value) {
79
-            if (property_exists($member, $key)) {
80
-                $member->{$key} = $value;
81
-            }
82
-        }
83
-
84
-        return $member;
85
-    }
86
-
87
-    public static function getUsers()
88
-    {
89
-        $response = Route4Me::makeRequst([
90
-            'url' => Endpoint::USER_V4,
91
-            'method' => 'GET',
92
-        ]);
93
-
94
-        return $response;
95
-    }
96
-
97
-    public static function getUser($params)
98
-    {
99
-        $response = Route4Me::makeRequst([
100
-            'url' => Endpoint::USER_V4,
101
-            'method' => 'GET',
102
-            'query' => [
103
-                'member_id' => isset($params['member_id']) ? $params['member_id'] : null,
104
-            ],
105
-        ]);
106
-
107
-        return $response;
108
-    }
109
-
110
-    public static function getUserLocations($param)
111
-    {
112
-        $response = Route4Me::makeRequst([
113
-            'url' => Endpoint::VIEW_USER_LOCATIONS,
114
-            'method' => 'GET',
115
-            'query' => [
116
-                'query' => $param,
117
-            ],
118
-        ]);
119
-
120
-        return $response;
121
-    }
122
-
123
-    public static function addDeviceRecord($params)
124
-    {
125
-        $allQueryFields = ['device_id', 'device_type'];
126
-        $allBodyFields = ['device_id', 'device_type', 'format'];
127
-
128
-        $response = Route4Me::makeRequst([
129
-            'url' => Endpoint::VERIFY_DEVICE_LICENSE,
130
-            'method' => 'POST',
131
-            'query' => Route4Me::generateRequestParameters($allQueryFields, $params),
132
-            'body' => Route4Me::generateRequestParameters($allBodyFields, $params),
133
-        ]);
134
-
135
-        return $response;
136
-    }
137
-
138
-    public static function createMember($params)
139
-    {
140
-        $excludeFields = ['session_guid', 'member_id', 'token', 'payload', 'webinar_date',
141
-        'company_name', 'config_key', 'config_value', 'api_key', ];
142
-
143
-        $allBodyFields = Route4Me::getObjectProperties(new self(), $excludeFields);
144
-
145
-        $response = Route4Me::makeRequst([
146
-            'url' => Endpoint::USER_V4,
147
-            'method' => 'POST',
148
-            'body' => Route4Me::generateRequestParameters($allBodyFields, $params),
149
-        ]);
150
-
151
-        return $response;
152
-    }
153
-
154
-    public static function getRandomMemberByType($memberType)
155
-    {
156
-        $members = self::getUsers();
157
-
158
-        if (is_null($members) || !isset($members['results'])) {
159
-            return null;
160
-        }
161
-
162
-        $memberIDs = [];
163
-
164
-        foreach ($members['results'] as $memb) {
165
-            if (isset($memb['member_id']) && isset($memb['member_type'])) {
166
-                if ($memberType == $memb['member_type']) {
167
-                    $memberIDs[] = $memb['member_id'];
168
-                }
169
-            }
170
-        }
171
-
172
-        if (sizeof($memberIDs) < 1) {
173
-            return null;
174
-        }
175
-
176
-        $randomIndex = rand(0, sizeof($memberIDs) - 1);
177
-
178
-        return $memberIDs[$randomIndex];
179
-    }
180
-
181
-    public static function updateMember($body)
182
-    {
183
-        $excludeFields = ['session_guid', 'token', 'payload', 'webinar_date',
184
-        'company_name', 'config_key', 'config_value', 'api_key', ];
185
-
186
-        $allBodyFields = Route4Me::getObjectProperties(new self(), $excludeFields);
187
-
188
-        $response = Route4Me::makeRequst([
189
-            'url' => Endpoint::USER_V4,
190
-            'method' => 'PUT',
191
-            'body' => Route4Me::generateRequestParameters($allBodyFields, $body),
192
-        ]);
193
-
194
-        return $response;
195
-    }
196
-
197
-    public static function deleteMember($body, &$errorText)
198
-    {
199
-        $response = null;
200
-
201
-        try {
202
-            $response = Route4Me::makeRequst([
203
-                'url' => Endpoint::USER_V4,
204
-                'method' => 'DELETE',
205
-                'body' => [
206
-                    'member_id' => isset($body->member_id) ? $body->member_id : null,
207
-                ],
208
-            ]);
209
-        } catch (Exception $ex) {
210
-            $errorText = $ex->getMessage();
211
-            $response = null;
212
-        } finally {
213
-            return $response;
214
-        }
215
-    }
216
-
217
-    public static function newAccountRegistration($params, &$errorText)
218
-    {
219
-        $allQueryFields = ['plan'];
220
-        $allBodyFields = ['strEmail', 'strPassword_1', 'strPassword_2', 'strFirstName',
221
-        'strLastName', 'format', 'strIndustry', 'chkTerms', 'device_type', 'strSubAccountType',
222
-        'blDisableMarketing', 'blDisableAccountActivationEmail', ];
223
-
224
-        $response = null;
225
-
226
-        try {
227
-            $response = Route4Me::makeRequst([
228
-                'url' => Endpoint::REGISTER_ACTION,
229
-                'method' => 'POST',
230
-                'query' => Route4Me::generateRequestParameters($allQueryFields, $params),
231
-                'body' => Route4Me::generateRequestParameters($allBodyFields, $params),
232
-                'HTTPHEADER' => 'Content-Type: multipart/form-data',
233
-            ]);
234
-        } catch (Exception $ex) {
235
-            $response = null;
236
-            $errorText = "Cannot registrate new account <br> ".$ex->getMessage();
237
-        } finally {
238
-            return $response;
239
-        }
240
-    }
241
-
242
-    public static function validateSession($params)
243
-    {
244
-        $allQueryFields = ['session_guid', 'member_id', 'format'];
245
-
246
-        $response = Route4Me::makeRequst([
247
-            'url' => Endpoint::VALIDATE_SESSION,
248
-            'method' => 'GET',
249
-            'query' => Route4Me::generateRequestParameters($allQueryFields, $params),
250
-        ]);
251
-
252
-        return $response;
253
-    }
254
-
255
-    public static function memberAuthentication($params)
256
-    {
257
-        $allBodyFields = ['strEmail', 'strPassword', 'format'];
258
-
259
-        $response = Route4Me::makeRequst([
260
-            'url' => Endpoint::AUTHENTICATE,
261
-            'method' => 'POST',
262
-            'body' => Route4Me::generateRequestParameters($allBodyFields, $params),
263
-            'HTTPHEADER' => 'Content-Type: multipart/form-data',
264
-        ]);
265
-
266
-        return $response;
267
-    }
268
-
269
-    public static function webinarRegistration($params)
270
-    {
271
-        $allBodyFields = ['email_address', 'first_name', 'last_name', 'phone_number',
272
-        'company_name', 'member_id', 'webinar_date', ];
273
-
274
-        $response = null;
275
-
276
-        try {
277
-            $response = Route4Me::makeRequst([
278
-                'url' => Endpoint::WEBINAR_REGISTER,
279
-                'method' => 'POST',
280
-                'body' => Route4Me::generateRequestParameters($allBodyFields, $params),
281
-            ]);
282
-        } catch (Exception $ex) {
283
-            $response = null;
284
-        } finally {
285
-            return $response;
286
-        }
287
-    }
288
-
289
-    public static function purchaseUserLicense($params)
290
-    {
291
-        $allQueryFields = ['device_id'];
292
-        $allBodyFields = ['member_id', 'session_guid', 'device_id', 'device_type',
293
-        'subscription_name', 'token', 'payload', 'format', ];
294
-
295
-        $response = Route4Me::makeRequst([
296
-            'url' => Endpoint::USER_LICENSE,
297
-            'method' => 'POST',
298
-            'query' => Route4Me::generateRequestParameters($allQueryFields, $params),
299
-            'body' => Route4Me::generateRequestParameters($allBodyFields, $params),
300
-        ]);
301
-
302
-        return $response;
303
-    }
304
-
305
-    public static function newMemberConfigKey($params)
306
-    {
307
-        $allBodyFields = ['config_key', 'config_value'];
308
-
309
-        $response = Route4Me::makeRequst([
310
-            'url' => Endpoint::CONFIGURATION_SETTINGS,
311
-            'method' => 'POST',
312
-            'body' => Route4Me::generateRequestParameters($allBodyFields, $params),
313
-        ]);
314
-
315
-        return $response;
316
-    }
317
-
318
-    public static function removeMemberConfigKey($params)
319
-    {
320
-        $allBodyFields = ['config_key'];
321
-
322
-        $response = Route4Me::makeRequst([
323
-            'url' => Endpoint::CONFIGURATION_SETTINGS,
324
-            'method' => 'DELETE',
325
-            'body' => Route4Me::generateRequestParameters($allBodyFields, $params),
326
-        ]);
327
-
328
-        return $response;
329
-    }
330
-
331
-    public static function getMemberConfigData($params)
332
-    {
333
-        $allQueryFields = ['config_key'];
334
-
335
-        $response = Route4Me::makeRequst([
336
-            'url' => Endpoint::CONFIGURATION_SETTINGS,
337
-            'method' => 'GET',
338
-            'query' => Route4Me::generateRequestParameters($allQueryFields, $params),
339
-        ]);
340
-
341
-        return $response;
342
-    }
343
-
344
-    public static function updateMemberConfigKey($params)
345
-    {
346
-        $allBodyFields = ['config_key', 'config_value'];
347
-
348
-        $response = Route4Me::makeRequst([
349
-            'url' => Endpoint::CONFIGURATION_SETTINGS,
350
-            'method' => 'PUT',
351
-            'body' => Route4Me::generateRequestParameters($allBodyFields, $params),
352
-        ]);
353
-
354
-        return $response;
355
-    }
356
-
357
-    public static function getMemberCapabilities()
358
-    {
359
-        $response = Route4Me::makeRequst([
360
-            'url' => Endpoint::MEMBER_CAPABILITIES,
361
-            'method' => 'GET',
362
-            'query' => Route4Me::generateRequestParameters([], null),
363
-        ]);
364
-
365
-        return $response;
366
-    }
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 fromArray(array $params)
75
+	{
76
+		$member = new self();
77
+
78
+		foreach ($params as $key => $value) {
79
+			if (property_exists($member, $key)) {
80
+				$member->{$key} = $value;
81
+			}
82
+		}
83
+
84
+		return $member;
85
+	}
86
+
87
+	public static function getUsers()
88
+	{
89
+		$response = Route4Me::makeRequst([
90
+			'url' => Endpoint::USER_V4,
91
+			'method' => 'GET',
92
+		]);
93
+
94
+		return $response;
95
+	}
96
+
97
+	public static function getUser($params)
98
+	{
99
+		$response = Route4Me::makeRequst([
100
+			'url' => Endpoint::USER_V4,
101
+			'method' => 'GET',
102
+			'query' => [
103
+				'member_id' => isset($params['member_id']) ? $params['member_id'] : null,
104
+			],
105
+		]);
106
+
107
+		return $response;
108
+	}
109
+
110
+	public static function getUserLocations($param)
111
+	{
112
+		$response = Route4Me::makeRequst([
113
+			'url' => Endpoint::VIEW_USER_LOCATIONS,
114
+			'method' => 'GET',
115
+			'query' => [
116
+				'query' => $param,
117
+			],
118
+		]);
119
+
120
+		return $response;
121
+	}
122
+
123
+	public static function addDeviceRecord($params)
124
+	{
125
+		$allQueryFields = ['device_id', 'device_type'];
126
+		$allBodyFields = ['device_id', 'device_type', 'format'];
127
+
128
+		$response = Route4Me::makeRequst([
129
+			'url' => Endpoint::VERIFY_DEVICE_LICENSE,
130
+			'method' => 'POST',
131
+			'query' => Route4Me::generateRequestParameters($allQueryFields, $params),
132
+			'body' => Route4Me::generateRequestParameters($allBodyFields, $params),
133
+		]);
134
+
135
+		return $response;
136
+	}
137
+
138
+	public static function createMember($params)
139
+	{
140
+		$excludeFields = ['session_guid', 'member_id', 'token', 'payload', 'webinar_date',
141
+		'company_name', 'config_key', 'config_value', 'api_key', ];
142
+
143
+		$allBodyFields = Route4Me::getObjectProperties(new self(), $excludeFields);
144
+
145
+		$response = Route4Me::makeRequst([
146
+			'url' => Endpoint::USER_V4,
147
+			'method' => 'POST',
148
+			'body' => Route4Me::generateRequestParameters($allBodyFields, $params),
149
+		]);
150
+
151
+		return $response;
152
+	}
153
+
154
+	public static function getRandomMemberByType($memberType)
155
+	{
156
+		$members = self::getUsers();
157
+
158
+		if (is_null($members) || !isset($members['results'])) {
159
+			return null;
160
+		}
161
+
162
+		$memberIDs = [];
163
+
164
+		foreach ($members['results'] as $memb) {
165
+			if (isset($memb['member_id']) && isset($memb['member_type'])) {
166
+				if ($memberType == $memb['member_type']) {
167
+					$memberIDs[] = $memb['member_id'];
168
+				}
169
+			}
170
+		}
171
+
172
+		if (sizeof($memberIDs) < 1) {
173
+			return null;
174
+		}
175
+
176
+		$randomIndex = rand(0, sizeof($memberIDs) - 1);
177
+
178
+		return $memberIDs[$randomIndex];
179
+	}
180
+
181
+	public static function updateMember($body)
182
+	{
183
+		$excludeFields = ['session_guid', 'token', 'payload', 'webinar_date',
184
+		'company_name', 'config_key', 'config_value', 'api_key', ];
185
+
186
+		$allBodyFields = Route4Me::getObjectProperties(new self(), $excludeFields);
187
+
188
+		$response = Route4Me::makeRequst([
189
+			'url' => Endpoint::USER_V4,
190
+			'method' => 'PUT',
191
+			'body' => Route4Me::generateRequestParameters($allBodyFields, $body),
192
+		]);
193
+
194
+		return $response;
195
+	}
196
+
197
+	public static function deleteMember($body, &$errorText)
198
+	{
199
+		$response = null;
200
+
201
+		try {
202
+			$response = Route4Me::makeRequst([
203
+				'url' => Endpoint::USER_V4,
204
+				'method' => 'DELETE',
205
+				'body' => [
206
+					'member_id' => isset($body->member_id) ? $body->member_id : null,
207
+				],
208
+			]);
209
+		} catch (Exception $ex) {
210
+			$errorText = $ex->getMessage();
211
+			$response = null;
212
+		} finally {
213
+			return $response;
214
+		}
215
+	}
216
+
217
+	public static function newAccountRegistration($params, &$errorText)
218
+	{
219
+		$allQueryFields = ['plan'];
220
+		$allBodyFields = ['strEmail', 'strPassword_1', 'strPassword_2', 'strFirstName',
221
+		'strLastName', 'format', 'strIndustry', 'chkTerms', 'device_type', 'strSubAccountType',
222
+		'blDisableMarketing', 'blDisableAccountActivationEmail', ];
223
+
224
+		$response = null;
225
+
226
+		try {
227
+			$response = Route4Me::makeRequst([
228
+				'url' => Endpoint::REGISTER_ACTION,
229
+				'method' => 'POST',
230
+				'query' => Route4Me::generateRequestParameters($allQueryFields, $params),
231
+				'body' => Route4Me::generateRequestParameters($allBodyFields, $params),
232
+				'HTTPHEADER' => 'Content-Type: multipart/form-data',
233
+			]);
234
+		} catch (Exception $ex) {
235
+			$response = null;
236
+			$errorText = "Cannot registrate new account <br> ".$ex->getMessage();
237
+		} finally {
238
+			return $response;
239
+		}
240
+	}
241
+
242
+	public static function validateSession($params)
243
+	{
244
+		$allQueryFields = ['session_guid', 'member_id', 'format'];
245
+
246
+		$response = Route4Me::makeRequst([
247
+			'url' => Endpoint::VALIDATE_SESSION,
248
+			'method' => 'GET',
249
+			'query' => Route4Me::generateRequestParameters($allQueryFields, $params),
250
+		]);
251
+
252
+		return $response;
253
+	}
254
+
255
+	public static function memberAuthentication($params)
256
+	{
257
+		$allBodyFields = ['strEmail', 'strPassword', 'format'];
258
+
259
+		$response = Route4Me::makeRequst([
260
+			'url' => Endpoint::AUTHENTICATE,
261
+			'method' => 'POST',
262
+			'body' => Route4Me::generateRequestParameters($allBodyFields, $params),
263
+			'HTTPHEADER' => 'Content-Type: multipart/form-data',
264
+		]);
265
+
266
+		return $response;
267
+	}
268
+
269
+	public static function webinarRegistration($params)
270
+	{
271
+		$allBodyFields = ['email_address', 'first_name', 'last_name', 'phone_number',
272
+		'company_name', 'member_id', 'webinar_date', ];
273
+
274
+		$response = null;
275
+
276
+		try {
277
+			$response = Route4Me::makeRequst([
278
+				'url' => Endpoint::WEBINAR_REGISTER,
279
+				'method' => 'POST',
280
+				'body' => Route4Me::generateRequestParameters($allBodyFields, $params),
281
+			]);
282
+		} catch (Exception $ex) {
283
+			$response = null;
284
+		} finally {
285
+			return $response;
286
+		}
287
+	}
288
+
289
+	public static function purchaseUserLicense($params)
290
+	{
291
+		$allQueryFields = ['device_id'];
292
+		$allBodyFields = ['member_id', 'session_guid', 'device_id', 'device_type',
293
+		'subscription_name', 'token', 'payload', 'format', ];
294
+
295
+		$response = Route4Me::makeRequst([
296
+			'url' => Endpoint::USER_LICENSE,
297
+			'method' => 'POST',
298
+			'query' => Route4Me::generateRequestParameters($allQueryFields, $params),
299
+			'body' => Route4Me::generateRequestParameters($allBodyFields, $params),
300
+		]);
301
+
302
+		return $response;
303
+	}
304
+
305
+	public static function newMemberConfigKey($params)
306
+	{
307
+		$allBodyFields = ['config_key', 'config_value'];
308
+
309
+		$response = Route4Me::makeRequst([
310
+			'url' => Endpoint::CONFIGURATION_SETTINGS,
311
+			'method' => 'POST',
312
+			'body' => Route4Me::generateRequestParameters($allBodyFields, $params),
313
+		]);
314
+
315
+		return $response;
316
+	}
317
+
318
+	public static function removeMemberConfigKey($params)
319
+	{
320
+		$allBodyFields = ['config_key'];
321
+
322
+		$response = Route4Me::makeRequst([
323
+			'url' => Endpoint::CONFIGURATION_SETTINGS,
324
+			'method' => 'DELETE',
325
+			'body' => Route4Me::generateRequestParameters($allBodyFields, $params),
326
+		]);
327
+
328
+		return $response;
329
+	}
330
+
331
+	public static function getMemberConfigData($params)
332
+	{
333
+		$allQueryFields = ['config_key'];
334
+
335
+		$response = Route4Me::makeRequst([
336
+			'url' => Endpoint::CONFIGURATION_SETTINGS,
337
+			'method' => 'GET',
338
+			'query' => Route4Me::generateRequestParameters($allQueryFields, $params),
339
+		]);
340
+
341
+		return $response;
342
+	}
343
+
344
+	public static function updateMemberConfigKey($params)
345
+	{
346
+		$allBodyFields = ['config_key', 'config_value'];
347
+
348
+		$response = Route4Me::makeRequst([
349
+			'url' => Endpoint::CONFIGURATION_SETTINGS,
350
+			'method' => 'PUT',
351
+			'body' => Route4Me::generateRequestParameters($allBodyFields, $params),
352
+		]);
353
+
354
+		return $response;
355
+	}
356
+
357
+	public static function getMemberCapabilities()
358
+	{
359
+		$response = Route4Me::makeRequst([
360
+			'url' => Endpoint::MEMBER_CAPABILITIES,
361
+			'method' => 'GET',
362
+			'query' => Route4Me::generateRequestParameters([], null),
363
+		]);
364
+
365
+		return $response;
366
+	}
367 367
 }
Please login to merge, or discard this patch.
src/Route4Me/Constants.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,6 +6,6 @@
 block discarded – undo
6 6
 
7 7
 class Constants
8 8
 {
9
-    const API_KEY = '11111111111111111111111111111111';
10
-    const DEMO_API_KEY = '11111111111111111111111111111111';
9
+	const API_KEY = '11111111111111111111111111111111';
10
+	const DEMO_API_KEY = '11111111111111111111111111111111';
11 11
 }
12 12
\ No newline at end of file
Please login to merge, or discard this patch.
src/Route4Me/RouteParameters.php 1 patch
Indentation   +528 added lines, -528 removed lines patch added patch discarded remove patch
@@ -11,532 +11,532 @@
 block discarded – undo
11 11
  */
12 12
 class RouteParameters extends Common
13 13
 {
14
-    /**
15
-     * Let the R4M API know if this SDK request is comming
16
-     * from a file upload within your environment (for analytics).
17
-     * @var Boolean
18
-     */
19
-    public $is_upload;
20
-
21
-    /**
22
-     * The tour type of this route. rt is short for round trip,
23
-     * the optimization engine changes its behavior for round trip
24
-     * @var Boolean
25
-     */
26
-    public $rt;
27
-
28
-    /**
29
-     * The name of this route. this route name will be accessible in the search API,
30
-     * and also will be displayed on the mobile device of a user.
31
-     * @var string
32
-     */
33
-    public $route_name;
34
-
35
-    /**
36
-     * The route start date in UTC, unix timestamp seconds.
37
-     * Used to show users when the route will begin, also used for reporting and analytics.
38
-     * @var integer
39
-     */
40
-    public $route_date;
41
-
42
-    /**
43
-     * Offset in seconds relative to the route start date (i.e. 9AM would be 60 * 60 * 9)
44
-     * @var integer
45
-     */
46
-    public $route_time;
47
-
48
-    /**
49
-     * @deprecated 'Always false'
50
-     * @var string
51
-     */
52
-    public $shared_publicly;
53
-
54
-    /**
55
-     * By disabling optimization, the route optimization engine
56
-     * will not resequence the stops in your.
57
-     * @var disable_optimization
58
-     */
59
-    public $disable_optimization;
60
-
61
-    /**
62
-     * Gets or sets the optimize parameter.<br>
63
-     * Availabale values:
64
-     * - Distance,
65
-     * - Time,
66
-     * - timeWithTraffic
67
-     * @var string
68
-     */
69
-    public $optimize;
70
-
71
-    /**
72
-     * When the tour type is not round trip (rt = false),
73
-     * enable lock last so that the final destination is fixed.
74
-     * @var Boolean
75
-     */
76
-    public $lock_last;
77
-
78
-    /**
79
-     * Vehicle capacity.
80
-     * @var integer
81
-     */
82
-    public $vehicle_capacity;
83
-
84
-    /**
85
-     * Maximum distance for a single vehicle in the route (always in miles)
86
-     * @var integer
87
-     */
88
-    public $vehicle_max_distance_mi;
89
-
90
-    /**
91
-     * The distance measurement unit for the route.
92
-     * km or mi, the route4me api will convert all measurements into these units.
93
-     * @var string
94
-     */
95
-    public $distance_unit;
96
-
97
-    /**
98
-     * The mode of travel that the directions should be optimized for.<br>
99
-     *  Available values:
100
-     * - Driving
101
-     * - Walking
102
-     * @var string
103
-     */
104
-    public $travel_mode;
105
-
106
-    /**
107
-     * Options which let the user choose which road obstacles to avoid.<br>
108
-     * This has no impact on route sequencing.<br>
109
-     * Available values:
110
-     * - Highways
111
-     * - Tolls
112
-     * - minimizeHighways
113
-     * - minimizeTolls
114
-     * - highways,tolls
115
-     * - "".
116
-     * @var string
117
-     */
118
-    public $avoid;
119
-
120
-    /**
121
-     * The vehicle ID
122
-     * @var string
123
-     */
124
-    public $vehicle_id;
125
-
126
-    /**
127
-     * The latitude of the device making this sdk request.
128
-     * @var double
129
-     */
130
-    public $dev_lat;
131
-
132
-    /**
133
-     * The longitude of the device making this sdk request.
134
-     * @var double
135
-     */
136
-    public $dev_lng;
137
-
138
-    /**
139
-     * When using a multiple driver algorithm, this is the maximum permissible duration of a generated route.<br>
140
-     * The optimization system will automatically create more routes when the route_max_duration is exceeded for a route.<br>
141
-     * However it will create an 'unrouted' list of addresses if the maximum number of drivers is exceeded.
142
-     * @var long
143
-     */
144
-    public $route_max_duration;
145
-
146
-    /**
147
-     * The parameter specifies fine-tuning of an optimization process by route duration.
148
-     * @var double
149
-     */
150
-    public $target_duration;
151
-
152
-    /**
153
-     * The parameter specifies fine-tuning of an optimization process by route distance.
154
-     * @var double
155
-     */
156
-    public $target_distance;
157
-
158
-    /**
159
-     * The parameter specifies fine-tuning of an optimization process by waiting time.
160
-     * @var double
161
-     */
162
-    public $target_wait_by_tail_size;
163
-
164
-    /**
165
-     * The email address to notify upon completion of an optimization request.
166
-     * @var string
167
-     */
168
-    public $route_email;
169
-
170
-    /**
171
-     * @deprecated All routes are stored by default at this time
172
-     * @var
173
-     */
174
-    public $store_route = true;
175
-
176
-    /**
177
-     * Metric system
178
-     * @see Enum\Metric
179
-     * @var integer
180
-     */
181
-    public $metric;
182
-
183
-    /**
184
-     * The algorithm type to use when optimizing the route.
185
-     * @see Enum\AlgorithmType
186
-     * @var integer
187
-     */
188
-    public $algorithm_type;
189
-
190
-    /**
191
-     * The route owner's member ID.<br>
192
-     * In order for users in your organization to have routes assigned to them,
193
-     * you must provide their member ID within the Route4Me system.<br>
194
-     * A list of member IDs can be retrieved with view_users API method.
195
-     * @var integer
196
-     */
197
-    public $member_id;
198
-
199
-    /**
200
-     * Specify the ip address of the remote user making this optimization request.
201
-     * @var long
202
-     */
203
-    public $ip;
204
-
205
-    /**
206
-     * The method to use when compute the distance between the points in a route.<br>
207
-     * Available values: from 1 to 12.
208
-     * @var integer
209
-     */
210
-    public $dm;
211
-
212
-    /**
213
-     * Directions method.
214
-     * @var integer
215
-     */
216
-    public $dirm;
217
-
218
-    /**
219
-     * Legacy feature which permits a user to request an example number of optimized routes.
220
-     * @var integer
221
-     */
222
-    public $parts;
223
-
224
-    /**
225
-     * 32 Character MD5 String ID of the device that was used to plan this route.
226
-     * @deprecated Always null
227
-     * @var string
228
-     */
229
-    public $device_id;
230
-
231
-    /**
232
-     * The type of device making this request.
233
-     * @see Enum\DeviceType
234
-     * @var string
235
-     */
236
-    public $device_type;
237
-
238
-    /**
239
-     * If true, the vehicle has a trailer.<br>
240
-     * For routes that have trucking directions enabled, directions generated<br>
241
-     * will ensure compliance so that road directions generated do not take the vehicle
242
-     * where trailers are prohibited.
243
-     * @var Boolean
244
-     */
245
-    public $has_trailer;
246
-
247
-    /**
248
-     * The vehicle's trailer weight.<br>
249
-     * For routes that have trucking directions enabled, directions generated<br>
250
-     * will ensure compliance so that road directions generated do not take the vehicle<br>
251
-     * on roads where the weight of the vehicle in tons exceeds this value.
252
-     * @var double
253
-     */
254
-    public $trailer_weight_t;
255
-
256
-    /**
257
-     * If travel_mode is Trucking, specifies the truck weight.
258
-     * @var double
259
-     */
260
-    public $limited_weight_t;
261
-
262
-    /**
263
-     * The vehicle's weight per axle (tons)
264
-     * @var double
265
-     */
266
-    public $weight_per_axle_t;
267
-
268
-    /**
269
-     * Comma-delimited list of the truck hazardous goods.
270
-     * @var string
271
-     */
272
-    public $truck_hazardous_goods;
273
-
274
-    /**
275
-     * Truck axles number.
276
-     * @var integer
277
-     */
278
-    public $truck_axles;
279
-
280
-    /**
281
-     * Truck toll road usage. enum: ["YES", "NO"]
282
-     * @var string
283
-     */
284
-    public $truck_toll_road_usage;
285
-
286
-    /**
287
-     * Truck avoid ferries. enum: ["YES", "NO"]
288
-     * @var string
289
-     */
290
-    public $truck_avoid_ferries;
291
-
292
-    /**
293
-     * Truck highway only. enum: ["YES", "NO"]
294
-     * @var string
295
-     */
296
-    public $truck_hwy_only;
297
-
298
-    /**
299
-     * Truck of the type Long Combination Vehicle. enum: ["YES", "NO"]
300
-     * @var string
301
-     */
302
-    public $truck_lcv;
303
-
304
-    /**
305
-     * Avoid international borders. enum: ["YES", "NO"]
306
-     * @var string
307
-     */
308
-    public $truck_borders;
309
-
310
-    /**
311
-     * Truck side street adherence.<br>
312
-     *  enum: ["OFF", "MINIMAL","MODERATE","AVERAGE","STRICT","ADHERE","STRONGLYHERE"]
313
-     * @var string
314
-     */
315
-    public $truck_side_street_adherence;
316
-
317
-    /**
318
-     * Truck configuration.
319
-     * enum: ["NONE","PASSENGER","28_DOUBLETRAILER","48_STRAIGHT_TRUCK",
320
-     * "48_SEMI_TRAILER","53_SEMI_TRAILER","FULLSIZEVAN","26_STRAIGHT_TRUCK"]
321
-     * @var string
322
-     */
323
-    public $truck_config;
324
-
325
-    /**
326
-     * Truck dimension unit. enum: ["mi","km"]
327
-     * @var string
328
-     */
329
-    public $truck_dim_unit;
330
-
331
-    /**
332
-     * Truck type.
333
-     *  enum: ["suv","pickup_truck","van","18wheeler","cabin","waste_disposal",
334
-     * "tree_cutting","bigrig","cement_mixer","livestock_carrier","dairy", "tractor_trailer"]
335
-     * @var string
336
-     */
337
-    public $truck_type;
338
-
339
-    /**
340
-     * If travel_mode = 'Trucking', specifies the truck weight (required)
341
-     * @var double
342
-     */
343
-    public $truck_weight;
344
-
345
-    /**
346
-     * Maximum cargo weight a vehicle can cary.
347
-     * @var double
348
-     */
349
-    public $vehicle_max_cargo_weight;
350
-
351
-    /**
352
-     * Maximum cargo volume a vehicle can cary.
353
-     * @var double
354
-     */
355
-    public $vehicle_max_cargo_volume;
356
-
357
-    /**
358
-     * Maximum allowed revenue from a subtour.
359
-     * @var integer
360
-     */
361
-    public $subtour_max_revenue;
362
-
363
-    /**
364
-     * An array of the Avoidance zones IDs.
365
-     * @var string[]
366
-     */
367
-    public $avoidance_zones = [];
368
-
369
-    /**
370
-     * The vehicle ID, to be assigned to the route.
371
-     * @deprecated All new routes should be assigned to a member_id
372
-     * @var string
373
-     */
374
-    public $driver_id;
375
-
376
-    /**
377
-     * Minimum number of optimized routes.
378
-     * @var integer
379
-     */
380
-    public $parts_min;
381
-
382
-    /**
383
-     * If true, the vehicle will first drive then wait between stops.
384
-     * @var Boolean
385
-     */
386
-    public $first_drive_then_wait_between_stops;
387
-
388
-    /**
389
-     * The truck height.<br>
390
-     * For routes that have trucking directions enabled, directions generated<br>
391
-     * will ensure compliance of this maximum height of truck when generating
392
-     * road network driving directions.
393
-     * @var double
394
-     */
395
-    public $truck_height;
396
-
397
-    /**
398
-     * The truck width.<br>
399
-     * For routes that have trucking directions enabled, directions generated
400
-     * will ensure compliance of this width of the truck when generating road network
401
-     * driving directions.
402
-     * @var double
403
-     */
404
-    public $truck_width;
405
-
406
-    /**
407
-     * The truck length.<br>
408
-     * For routes that have trucking directions enabled, directions generated
409
-     * will ensure compliance of this length of the truck when generating
410
-     * road network driving directions.
411
-     * @var double
412
-     */
413
-    public $truck_length;
414
-
415
-    /**
416
-     * The optimization quality.<br>
417
-     * Available values:
418
-     * - 1 - Generate Optimized Routes As Quickly as Possible;
419
-     * - 2 - Generate Routes That Look Better On A Map;
420
-     * - 3 - Generate The Shortest And Quickest Possible Routes.
421
-     * @var integer
422
-     */
423
-    public $optimization_quality;
424
-
425
-    /**
426
-     * The maximum number of stops permitted per created subroute.
427
-     * @var integer
428
-     */
429
-    public $max_tour_size;
430
-
431
-    /**
432
-     * The minimum number of stops permitted per created subroute.
433
-     * @var integer
434
-     */
435
-    public $min_tour_size;
436
-
437
-    /**
438
-     * If equal to 1, uturn is allowed for the vehicle.
439
-     * @var integer
440
-     */
441
-    public $uturn;
442
-
443
-    /**
444
-     * If equal to 1, leftturn is allowed for the vehicle.
445
-     * @var integer
446
-     */
447
-    public $leftturn;
448
-
449
-    /**
450
-     * If equal to 1, rightturn is allowed for the vehicle.
451
-     * @var integer
452
-     */
453
-    public $rightturn;
454
-
455
-    /**
456
-     * Route travel time slowdown (e.g. 25 (means 25% slowdown)).
457
-     * @note the parameter is read-only and it can be set
458
-     * with the parameter Slowdowns.TravelTime.
459
-     * @var integer
460
-     */
461
-    public $route_time_multiplier;
462
-
463
-    /**
464
-     * Route service time slowdown (e.g. 10 (means 10% slowdown)).
465
-     * @note the parameter is read-only and it can be set
466
-     * with the parameter Slowdowns.TravelTime.
467
-     * @var integer
468
-     */
469
-    public $route_service_time_multiplier;
470
-
471
-    /**
472
-     * Optimization engine (e.g. '1','2' etc)
473
-     * @var string
474
-     */
475
-    public $optimization_engine;
476
-
477
-    /**
478
-     * Override addresses
479
-     * @var OverrideAddresses
480
-     */
481
-    public $override_addresses;
482
-
483
-    /**
484
-     * Address bundling rules
485
-     * @var V5\Addresses\AddressBundling
486
-     */
487
-    public $bundling;
488
-
489
-    /**
490
-     * Advanced route constraints
491
-     * @var RouteAdvancedConstraints
492
-     */
493
-    public $advanced_constraints = [];
494
-
495
-    /**
496
-     * If true, the time windows ignored.
497
-     * @var Boolean
498
-     */
499
-    public $ignore_tw;
500
-
501
-    /**
502
-     * If true, the start time is dynamic.
503
-     * @var Boolean
504
-     */
505
-    public $is_dynamic_start_time;
506
-
507
-    /**
508
-     * @deprecated The parameter 'route_type' isn't included in route parameters.
509
-     * @var string
510
-     */
511
-    public $route_type;
512
-
513
-    /**
514
-     * Slowdown of the optimization parameters.
515
-     * @note This is only query parameter.
516
-     * @note This parameter is used in the optimization creation/generation process.
517
-     * @var SlowdownParams
518
-     */
519
-    public $slowdowns;
520
-
521
-    public static function fromArray(array $params)
522
-    {
523
-        $routeParams = new self();
524
-        foreach ($params as $key => $value) {
525
-            if (property_exists($routeParams, $key)) {
526
-                $routeParams->{$key} = $value;
527
-            }
528
-        }
529
-
530
-        return $routeParams;
531
-    }
532
-
533
-    public function setAddressBundle($addressBundle)
534
-    {
535
-        $this->bundling = $addressBundle;
536
-    }
537
-
538
-    public function getAddressBundle()
539
-    {
540
-        return $this->bundling;
541
-    }
14
+	/**
15
+	 * Let the R4M API know if this SDK request is comming
16
+	 * from a file upload within your environment (for analytics).
17
+	 * @var Boolean
18
+	 */
19
+	public $is_upload;
20
+
21
+	/**
22
+	 * The tour type of this route. rt is short for round trip,
23
+	 * the optimization engine changes its behavior for round trip
24
+	 * @var Boolean
25
+	 */
26
+	public $rt;
27
+
28
+	/**
29
+	 * The name of this route. this route name will be accessible in the search API,
30
+	 * and also will be displayed on the mobile device of a user.
31
+	 * @var string
32
+	 */
33
+	public $route_name;
34
+
35
+	/**
36
+	 * The route start date in UTC, unix timestamp seconds.
37
+	 * Used to show users when the route will begin, also used for reporting and analytics.
38
+	 * @var integer
39
+	 */
40
+	public $route_date;
41
+
42
+	/**
43
+	 * Offset in seconds relative to the route start date (i.e. 9AM would be 60 * 60 * 9)
44
+	 * @var integer
45
+	 */
46
+	public $route_time;
47
+
48
+	/**
49
+	 * @deprecated 'Always false'
50
+	 * @var string
51
+	 */
52
+	public $shared_publicly;
53
+
54
+	/**
55
+	 * By disabling optimization, the route optimization engine
56
+	 * will not resequence the stops in your.
57
+	 * @var disable_optimization
58
+	 */
59
+	public $disable_optimization;
60
+
61
+	/**
62
+	 * Gets or sets the optimize parameter.<br>
63
+	 * Availabale values:
64
+	 * - Distance,
65
+	 * - Time,
66
+	 * - timeWithTraffic
67
+	 * @var string
68
+	 */
69
+	public $optimize;
70
+
71
+	/**
72
+	 * When the tour type is not round trip (rt = false),
73
+	 * enable lock last so that the final destination is fixed.
74
+	 * @var Boolean
75
+	 */
76
+	public $lock_last;
77
+
78
+	/**
79
+	 * Vehicle capacity.
80
+	 * @var integer
81
+	 */
82
+	public $vehicle_capacity;
83
+
84
+	/**
85
+	 * Maximum distance for a single vehicle in the route (always in miles)
86
+	 * @var integer
87
+	 */
88
+	public $vehicle_max_distance_mi;
89
+
90
+	/**
91
+	 * The distance measurement unit for the route.
92
+	 * km or mi, the route4me api will convert all measurements into these units.
93
+	 * @var string
94
+	 */
95
+	public $distance_unit;
96
+
97
+	/**
98
+	 * The mode of travel that the directions should be optimized for.<br>
99
+	 *  Available values:
100
+	 * - Driving
101
+	 * - Walking
102
+	 * @var string
103
+	 */
104
+	public $travel_mode;
105
+
106
+	/**
107
+	 * Options which let the user choose which road obstacles to avoid.<br>
108
+	 * This has no impact on route sequencing.<br>
109
+	 * Available values:
110
+	 * - Highways
111
+	 * - Tolls
112
+	 * - minimizeHighways
113
+	 * - minimizeTolls
114
+	 * - highways,tolls
115
+	 * - "".
116
+	 * @var string
117
+	 */
118
+	public $avoid;
119
+
120
+	/**
121
+	 * The vehicle ID
122
+	 * @var string
123
+	 */
124
+	public $vehicle_id;
125
+
126
+	/**
127
+	 * The latitude of the device making this sdk request.
128
+	 * @var double
129
+	 */
130
+	public $dev_lat;
131
+
132
+	/**
133
+	 * The longitude of the device making this sdk request.
134
+	 * @var double
135
+	 */
136
+	public $dev_lng;
137
+
138
+	/**
139
+	 * When using a multiple driver algorithm, this is the maximum permissible duration of a generated route.<br>
140
+	 * The optimization system will automatically create more routes when the route_max_duration is exceeded for a route.<br>
141
+	 * However it will create an 'unrouted' list of addresses if the maximum number of drivers is exceeded.
142
+	 * @var long
143
+	 */
144
+	public $route_max_duration;
145
+
146
+	/**
147
+	 * The parameter specifies fine-tuning of an optimization process by route duration.
148
+	 * @var double
149
+	 */
150
+	public $target_duration;
151
+
152
+	/**
153
+	 * The parameter specifies fine-tuning of an optimization process by route distance.
154
+	 * @var double
155
+	 */
156
+	public $target_distance;
157
+
158
+	/**
159
+	 * The parameter specifies fine-tuning of an optimization process by waiting time.
160
+	 * @var double
161
+	 */
162
+	public $target_wait_by_tail_size;
163
+
164
+	/**
165
+	 * The email address to notify upon completion of an optimization request.
166
+	 * @var string
167
+	 */
168
+	public $route_email;
169
+
170
+	/**
171
+	 * @deprecated All routes are stored by default at this time
172
+	 * @var
173
+	 */
174
+	public $store_route = true;
175
+
176
+	/**
177
+	 * Metric system
178
+	 * @see Enum\Metric
179
+	 * @var integer
180
+	 */
181
+	public $metric;
182
+
183
+	/**
184
+	 * The algorithm type to use when optimizing the route.
185
+	 * @see Enum\AlgorithmType
186
+	 * @var integer
187
+	 */
188
+	public $algorithm_type;
189
+
190
+	/**
191
+	 * The route owner's member ID.<br>
192
+	 * In order for users in your organization to have routes assigned to them,
193
+	 * you must provide their member ID within the Route4Me system.<br>
194
+	 * A list of member IDs can be retrieved with view_users API method.
195
+	 * @var integer
196
+	 */
197
+	public $member_id;
198
+
199
+	/**
200
+	 * Specify the ip address of the remote user making this optimization request.
201
+	 * @var long
202
+	 */
203
+	public $ip;
204
+
205
+	/**
206
+	 * The method to use when compute the distance between the points in a route.<br>
207
+	 * Available values: from 1 to 12.
208
+	 * @var integer
209
+	 */
210
+	public $dm;
211
+
212
+	/**
213
+	 * Directions method.
214
+	 * @var integer
215
+	 */
216
+	public $dirm;
217
+
218
+	/**
219
+	 * Legacy feature which permits a user to request an example number of optimized routes.
220
+	 * @var integer
221
+	 */
222
+	public $parts;
223
+
224
+	/**
225
+	 * 32 Character MD5 String ID of the device that was used to plan this route.
226
+	 * @deprecated Always null
227
+	 * @var string
228
+	 */
229
+	public $device_id;
230
+
231
+	/**
232
+	 * The type of device making this request.
233
+	 * @see Enum\DeviceType
234
+	 * @var string
235
+	 */
236
+	public $device_type;
237
+
238
+	/**
239
+	 * If true, the vehicle has a trailer.<br>
240
+	 * For routes that have trucking directions enabled, directions generated<br>
241
+	 * will ensure compliance so that road directions generated do not take the vehicle
242
+	 * where trailers are prohibited.
243
+	 * @var Boolean
244
+	 */
245
+	public $has_trailer;
246
+
247
+	/**
248
+	 * The vehicle's trailer weight.<br>
249
+	 * For routes that have trucking directions enabled, directions generated<br>
250
+	 * will ensure compliance so that road directions generated do not take the vehicle<br>
251
+	 * on roads where the weight of the vehicle in tons exceeds this value.
252
+	 * @var double
253
+	 */
254
+	public $trailer_weight_t;
255
+
256
+	/**
257
+	 * If travel_mode is Trucking, specifies the truck weight.
258
+	 * @var double
259
+	 */
260
+	public $limited_weight_t;
261
+
262
+	/**
263
+	 * The vehicle's weight per axle (tons)
264
+	 * @var double
265
+	 */
266
+	public $weight_per_axle_t;
267
+
268
+	/**
269
+	 * Comma-delimited list of the truck hazardous goods.
270
+	 * @var string
271
+	 */
272
+	public $truck_hazardous_goods;
273
+
274
+	/**
275
+	 * Truck axles number.
276
+	 * @var integer
277
+	 */
278
+	public $truck_axles;
279
+
280
+	/**
281
+	 * Truck toll road usage. enum: ["YES", "NO"]
282
+	 * @var string
283
+	 */
284
+	public $truck_toll_road_usage;
285
+
286
+	/**
287
+	 * Truck avoid ferries. enum: ["YES", "NO"]
288
+	 * @var string
289
+	 */
290
+	public $truck_avoid_ferries;
291
+
292
+	/**
293
+	 * Truck highway only. enum: ["YES", "NO"]
294
+	 * @var string
295
+	 */
296
+	public $truck_hwy_only;
297
+
298
+	/**
299
+	 * Truck of the type Long Combination Vehicle. enum: ["YES", "NO"]
300
+	 * @var string
301
+	 */
302
+	public $truck_lcv;
303
+
304
+	/**
305
+	 * Avoid international borders. enum: ["YES", "NO"]
306
+	 * @var string
307
+	 */
308
+	public $truck_borders;
309
+
310
+	/**
311
+	 * Truck side street adherence.<br>
312
+	 *  enum: ["OFF", "MINIMAL","MODERATE","AVERAGE","STRICT","ADHERE","STRONGLYHERE"]
313
+	 * @var string
314
+	 */
315
+	public $truck_side_street_adherence;
316
+
317
+	/**
318
+	 * Truck configuration.
319
+	 * enum: ["NONE","PASSENGER","28_DOUBLETRAILER","48_STRAIGHT_TRUCK",
320
+	 * "48_SEMI_TRAILER","53_SEMI_TRAILER","FULLSIZEVAN","26_STRAIGHT_TRUCK"]
321
+	 * @var string
322
+	 */
323
+	public $truck_config;
324
+
325
+	/**
326
+	 * Truck dimension unit. enum: ["mi","km"]
327
+	 * @var string
328
+	 */
329
+	public $truck_dim_unit;
330
+
331
+	/**
332
+	 * Truck type.
333
+	 *  enum: ["suv","pickup_truck","van","18wheeler","cabin","waste_disposal",
334
+	 * "tree_cutting","bigrig","cement_mixer","livestock_carrier","dairy", "tractor_trailer"]
335
+	 * @var string
336
+	 */
337
+	public $truck_type;
338
+
339
+	/**
340
+	 * If travel_mode = 'Trucking', specifies the truck weight (required)
341
+	 * @var double
342
+	 */
343
+	public $truck_weight;
344
+
345
+	/**
346
+	 * Maximum cargo weight a vehicle can cary.
347
+	 * @var double
348
+	 */
349
+	public $vehicle_max_cargo_weight;
350
+
351
+	/**
352
+	 * Maximum cargo volume a vehicle can cary.
353
+	 * @var double
354
+	 */
355
+	public $vehicle_max_cargo_volume;
356
+
357
+	/**
358
+	 * Maximum allowed revenue from a subtour.
359
+	 * @var integer
360
+	 */
361
+	public $subtour_max_revenue;
362
+
363
+	/**
364
+	 * An array of the Avoidance zones IDs.
365
+	 * @var string[]
366
+	 */
367
+	public $avoidance_zones = [];
368
+
369
+	/**
370
+	 * The vehicle ID, to be assigned to the route.
371
+	 * @deprecated All new routes should be assigned to a member_id
372
+	 * @var string
373
+	 */
374
+	public $driver_id;
375
+
376
+	/**
377
+	 * Minimum number of optimized routes.
378
+	 * @var integer
379
+	 */
380
+	public $parts_min;
381
+
382
+	/**
383
+	 * If true, the vehicle will first drive then wait between stops.
384
+	 * @var Boolean
385
+	 */
386
+	public $first_drive_then_wait_between_stops;
387
+
388
+	/**
389
+	 * The truck height.<br>
390
+	 * For routes that have trucking directions enabled, directions generated<br>
391
+	 * will ensure compliance of this maximum height of truck when generating
392
+	 * road network driving directions.
393
+	 * @var double
394
+	 */
395
+	public $truck_height;
396
+
397
+	/**
398
+	 * The truck width.<br>
399
+	 * For routes that have trucking directions enabled, directions generated
400
+	 * will ensure compliance of this width of the truck when generating road network
401
+	 * driving directions.
402
+	 * @var double
403
+	 */
404
+	public $truck_width;
405
+
406
+	/**
407
+	 * The truck length.<br>
408
+	 * For routes that have trucking directions enabled, directions generated
409
+	 * will ensure compliance of this length of the truck when generating
410
+	 * road network driving directions.
411
+	 * @var double
412
+	 */
413
+	public $truck_length;
414
+
415
+	/**
416
+	 * The optimization quality.<br>
417
+	 * Available values:
418
+	 * - 1 - Generate Optimized Routes As Quickly as Possible;
419
+	 * - 2 - Generate Routes That Look Better On A Map;
420
+	 * - 3 - Generate The Shortest And Quickest Possible Routes.
421
+	 * @var integer
422
+	 */
423
+	public $optimization_quality;
424
+
425
+	/**
426
+	 * The maximum number of stops permitted per created subroute.
427
+	 * @var integer
428
+	 */
429
+	public $max_tour_size;
430
+
431
+	/**
432
+	 * The minimum number of stops permitted per created subroute.
433
+	 * @var integer
434
+	 */
435
+	public $min_tour_size;
436
+
437
+	/**
438
+	 * If equal to 1, uturn is allowed for the vehicle.
439
+	 * @var integer
440
+	 */
441
+	public $uturn;
442
+
443
+	/**
444
+	 * If equal to 1, leftturn is allowed for the vehicle.
445
+	 * @var integer
446
+	 */
447
+	public $leftturn;
448
+
449
+	/**
450
+	 * If equal to 1, rightturn is allowed for the vehicle.
451
+	 * @var integer
452
+	 */
453
+	public $rightturn;
454
+
455
+	/**
456
+	 * Route travel time slowdown (e.g. 25 (means 25% slowdown)).
457
+	 * @note the parameter is read-only and it can be set
458
+	 * with the parameter Slowdowns.TravelTime.
459
+	 * @var integer
460
+	 */
461
+	public $route_time_multiplier;
462
+
463
+	/**
464
+	 * Route service time slowdown (e.g. 10 (means 10% slowdown)).
465
+	 * @note the parameter is read-only and it can be set
466
+	 * with the parameter Slowdowns.TravelTime.
467
+	 * @var integer
468
+	 */
469
+	public $route_service_time_multiplier;
470
+
471
+	/**
472
+	 * Optimization engine (e.g. '1','2' etc)
473
+	 * @var string
474
+	 */
475
+	public $optimization_engine;
476
+
477
+	/**
478
+	 * Override addresses
479
+	 * @var OverrideAddresses
480
+	 */
481
+	public $override_addresses;
482
+
483
+	/**
484
+	 * Address bundling rules
485
+	 * @var V5\Addresses\AddressBundling
486
+	 */
487
+	public $bundling;
488
+
489
+	/**
490
+	 * Advanced route constraints
491
+	 * @var RouteAdvancedConstraints
492
+	 */
493
+	public $advanced_constraints = [];
494
+
495
+	/**
496
+	 * If true, the time windows ignored.
497
+	 * @var Boolean
498
+	 */
499
+	public $ignore_tw;
500
+
501
+	/**
502
+	 * If true, the start time is dynamic.
503
+	 * @var Boolean
504
+	 */
505
+	public $is_dynamic_start_time;
506
+
507
+	/**
508
+	 * @deprecated The parameter 'route_type' isn't included in route parameters.
509
+	 * @var string
510
+	 */
511
+	public $route_type;
512
+
513
+	/**
514
+	 * Slowdown of the optimization parameters.
515
+	 * @note This is only query parameter.
516
+	 * @note This parameter is used in the optimization creation/generation process.
517
+	 * @var SlowdownParams
518
+	 */
519
+	public $slowdowns;
520
+
521
+	public static function fromArray(array $params)
522
+	{
523
+		$routeParams = new self();
524
+		foreach ($params as $key => $value) {
525
+			if (property_exists($routeParams, $key)) {
526
+				$routeParams->{$key} = $value;
527
+			}
528
+		}
529
+
530
+		return $routeParams;
531
+	}
532
+
533
+	public function setAddressBundle($addressBundle)
534
+	{
535
+		$this->bundling = $addressBundle;
536
+	}
537
+
538
+	public function getAddressBundle()
539
+	{
540
+		return $this->bundling;
541
+	}
542 542
 }
Please login to merge, or discard this patch.
src/Route4Me/Exception/myErrorHandler.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@
 block discarded – undo
4 4
 
5 5
 class myErrorHandler extends \Exception
6 6
 {
7
-    public function proc_error($errno, $errstr, $errfile, $errline)
8
-    {
9
-        echo "Error No: $errno,  line: $errline --- ".$errstr.'<br>';
10
-    }
7
+	public function proc_error($errno, $errstr, $errfile, $errline)
8
+	{
9
+		echo "Error No: $errno,  line: $errline --- ".$errstr.'<br>';
10
+	}
11 11
 }
Please login to merge, or discard this patch.
src/Route4Me/Geocoding.php 1 patch
Indentation   +78 added lines, -78 removed lines patch added patch discarded remove patch
@@ -6,109 +6,109 @@
 block discarded – undo
6 6
 
7 7
 class Geocoding extends Common
8 8
 {
9
-    public $strExportFormat;
10
-    public $format;
11
-    public $addresses;
12
-    public $pk;
13
-    public $offset;
14
-    public $limit;
15
-    public $housenumber;
16
-    public $zipcode;
9
+	public $strExportFormat;
10
+	public $format;
11
+	public $addresses;
12
+	public $pk;
13
+	public $offset;
14
+	public $limit;
15
+	public $housenumber;
16
+	public $zipcode;
17 17
 
18
-    public static function fromArray(array $params)
19
-    {
20
-        $geocoding = new self();
18
+	public static function fromArray(array $params)
19
+	{
20
+		$geocoding = new self();
21 21
 
22
-        foreach ($params as $key => $value) {
23
-            if (property_exists($geocoding, $key)) {
24
-                $geocoding->{$key} = $value;
25
-            }
26
-        }
22
+		foreach ($params as $key => $value) {
23
+			if (property_exists($geocoding, $key)) {
24
+				$geocoding->{$key} = $value;
25
+			}
26
+		}
27 27
 
28
-        return $geocoding;
29
-    }
28
+		return $geocoding;
29
+	}
30 30
 
31
-    public static function forwardGeocoding($params)
32
-    {
33
-        $allBodyFields = ['strExportFormat', 'addresses'];
31
+	public static function forwardGeocoding($params)
32
+	{
33
+		$allBodyFields = ['strExportFormat', 'addresses'];
34 34
 
35
-        $fgCoding = Route4Me::makeRequst([
36
-            'url'           => Endpoint::GEOCODER,
37
-            'method'        => 'POST',
38
-            'body'          => Route4Me::generateRequestParameters($allBodyFields, $params),
39
-            'HTTPHEADER'    => 'Content-Type: multipart/form-data',
40
-        ]);
35
+		$fgCoding = Route4Me::makeRequst([
36
+			'url'           => Endpoint::GEOCODER,
37
+			'method'        => 'POST',
38
+			'body'          => Route4Me::generateRequestParameters($allBodyFields, $params),
39
+			'HTTPHEADER'    => 'Content-Type: multipart/form-data',
40
+		]);
41 41
 
42
-        return $fgCoding;
43
-    }
42
+		return $fgCoding;
43
+	}
44 44
 
45
-    public static function reverseGeocoding($params)
46
-    {
47
-        $allQueryFields = ['format', 'addresses', 'detailed'];
45
+	public static function reverseGeocoding($params)
46
+	{
47
+		$allQueryFields = ['format', 'addresses', 'detailed'];
48 48
 
49
-        $fgcoding = Route4Me::makeRequst([
50
-            'url'       => Endpoint::GEOCODER,
51
-            'method'    => 'POST',
52
-            'query'     => Route4Me::generateRequestParameters($allQueryFields, $params),
53
-        ]);
49
+		$fgcoding = Route4Me::makeRequst([
50
+			'url'       => Endpoint::GEOCODER,
51
+			'method'    => 'POST',
52
+			'query'     => Route4Me::generateRequestParameters($allQueryFields, $params),
53
+		]);
54 54
 
55
-        return $fgcoding;
56
-    }
55
+		return $fgcoding;
56
+	}
57 57
 
58
-    public static function getStreetData($params)
59
-    {
60
-        Route4Me::setBaseUrl(Endpoint::STREET_DATA);
58
+	public static function getStreetData($params)
59
+	{
60
+		Route4Me::setBaseUrl(Endpoint::STREET_DATA);
61 61
 
62
-        $allPathFields = ['pk', 'offset', 'limit'];
62
+		$allPathFields = ['pk', 'offset', 'limit'];
63 63
 
64
-        $url_query = Route4Me::generateUrlPath($allPathFields, $params);
64
+		$url_query = Route4Me::generateUrlPath($allPathFields, $params);
65 65
 
66
-        $query = [];
66
+		$query = [];
67 67
 
68
-        $response = Route4Me::makeRequst([
69
-            'url'       => $url_query,
70
-            'method'    => 'GET',
71
-            'query'     => $query,
72
-        ]);
68
+		$response = Route4Me::makeRequst([
69
+			'url'       => $url_query,
70
+			'method'    => 'GET',
71
+			'query'     => $query,
72
+		]);
73 73
 
74
-        return $response;
75
-    }
74
+		return $response;
75
+	}
76 76
 
77
-    public static function getZipCode($params)
78
-    {
79
-        Route4Me::setBaseUrl(Endpoint::STREET_DATA_ZIPCODE);
77
+	public static function getZipCode($params)
78
+	{
79
+		Route4Me::setBaseUrl(Endpoint::STREET_DATA_ZIPCODE);
80 80
 
81
-        $allPathFields = ['zipcode', 'offset', 'limit'];
81
+		$allPathFields = ['zipcode', 'offset', 'limit'];
82 82
 
83
-        $url_query = Route4Me::generateUrlPath($allPathFields, $params);
83
+		$url_query = Route4Me::generateUrlPath($allPathFields, $params);
84 84
 
85
-        $query = [];
85
+		$query = [];
86 86
 
87
-        $response = Route4Me::makeRequst([
88
-            'url'       => $url_query,
89
-            'method'    => 'GET',
90
-            'query'     => $query,
91
-        ]);
87
+		$response = Route4Me::makeRequst([
88
+			'url'       => $url_query,
89
+			'method'    => 'GET',
90
+			'query'     => $query,
91
+		]);
92 92
 
93
-        return $response;
94
-    }
93
+		return $response;
94
+	}
95 95
 
96
-    public static function getService($params)
97
-    {
98
-        Route4Me::setBaseUrl(Endpoint::STREET_DATA_SERVICE);
96
+	public static function getService($params)
97
+	{
98
+		Route4Me::setBaseUrl(Endpoint::STREET_DATA_SERVICE);
99 99
 
100
-        $allPathFields = ['zipcode', 'housenumber', 'offset', 'limit'];
100
+		$allPathFields = ['zipcode', 'housenumber', 'offset', 'limit'];
101 101
 
102
-        $url_query = Route4Me::generateUrlPath($allPathFields, $params);
102
+		$url_query = Route4Me::generateUrlPath($allPathFields, $params);
103 103
 
104
-        $query = [];
104
+		$query = [];
105 105
 
106
-        $response = Route4Me::makeRequst([
107
-            'url'       => $url_query,
108
-            'method'    => 'GET',
109
-            'query'     => $query,
110
-        ]);
106
+		$response = Route4Me::makeRequst([
107
+			'url'       => $url_query,
108
+			'method'    => 'GET',
109
+			'query'     => $query,
110
+		]);
111 111
 
112
-        return $response;
113
-    }
112
+		return $response;
113
+	}
114 114
 }
Please login to merge, or discard this patch.
src/Route4Me/Schedule/ScheduleMonthly.php 1 patch
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -11,27 +11,27 @@
 block discarded – undo
11 11
  */
12 12
 class ScheduleMonthly extends Common
13 13
 {
14
-    /**
15
-     * Repeat every month next 'Every' days.
16
-     * @var integer
17
-     */
18
-    public $every;
14
+	/**
15
+	 * Repeat every month next 'Every' days.
16
+	 * @var integer
17
+	 */
18
+	public $every;
19 19
 
20
-    /**
21
-     * Monthly schedule mode
22
-     * @var string
23
-     */
24
-    public $mode;
20
+	/**
21
+	 * Monthly schedule mode
22
+	 * @var string
23
+	 */
24
+	public $mode;
25 25
 
26
-    /**
27
-     * An array of month days for monthly schedule if the mode 'dates' was chosen.
28
-     * @var integer[]
29
-     */
30
-    public $dates = [];
26
+	/**
27
+	 * An array of month days for monthly schedule if the mode 'dates' was chosen.
28
+	 * @var integer[]
29
+	 */
30
+	public $dates = [];
31 31
 
32
-    /**
33
-     * Monthly schedule option if the mode 'nth' was chosen.
34
-     * @var ScheduleMonthlyNth
35
-     */
36
-    public $nth;
32
+	/**
33
+	 * Monthly schedule option if the mode 'nth' was chosen.
34
+	 * @var ScheduleMonthlyNth
35
+	 */
36
+	public $nth;
37 37
 }
38 38
\ No newline at end of file
Please login to merge, or discard this patch.