@@ -4,6 +4,6 @@ |
||
4 | 4 | |
5 | 5 | class DistanceUnit |
6 | 6 | { |
7 | - const MILES = 'mi'; |
|
8 | - const KILOMETERS = 'km'; |
|
7 | + const MILES = 'mi'; |
|
8 | + const KILOMETERS = 'km'; |
|
9 | 9 | } |
@@ -4,7 +4,7 @@ |
||
4 | 4 | |
5 | 5 | class OptimizationType |
6 | 6 | { |
7 | - const DISTANCE = 'Distance'; |
|
8 | - const TIME = 'Time'; |
|
9 | - const TIME_WITH_TRAFFIC = 'timeWithTraffic'; |
|
7 | + const DISTANCE = 'Distance'; |
|
8 | + const TIME = 'Time'; |
|
9 | + const TIME_WITH_TRAFFIC = 'timeWithTraffic'; |
|
10 | 10 | } |
@@ -8,131 +8,131 @@ |
||
8 | 8 | |
9 | 9 | class OptimizationProblemParams extends \Route4Me\Common |
10 | 10 | { |
11 | - public $optimization_problem_id; |
|
12 | - public $reoptimize; |
|
13 | - public $addresses = []; |
|
14 | - public $depots = []; |
|
15 | - public $parameters; |
|
16 | - public $directions; |
|
17 | - public $format; |
|
18 | - public $route_path_output; |
|
19 | - public $optimized_callback_url; |
|
20 | - public $redirect = true; |
|
21 | - |
|
22 | - public static function fromArray($params) |
|
23 | - { |
|
24 | - $param = new self(); |
|
25 | - if (!isset($params['addresses'])) { |
|
26 | - throw new BadParam('addresses must be provided.'); |
|
27 | - } |
|
28 | - |
|
29 | - if (!isset($params['parameters'])) { |
|
30 | - throw new BadParam('parameters must be provided.'); |
|
31 | - } |
|
32 | - |
|
33 | - if ($params['parameters'] instanceof RouteParameters) { |
|
34 | - $param->setParameters($params['parameters']); |
|
35 | - } else { |
|
36 | - $param->setParameters(RouteParameters::fromArray($params['parameters'])); |
|
37 | - } |
|
38 | - |
|
39 | - foreach ($params['addresses'] as $address) { |
|
40 | - if (!($address instanceof AddressV5)) { |
|
41 | - $address = AddressV5::fromArray($address); |
|
42 | - } |
|
43 | - |
|
44 | - $param->addAddress($address); |
|
45 | - } |
|
46 | - |
|
47 | - if (isset($params['depots'] )) { |
|
48 | - foreach ($params['depots'] as $depot) { |
|
49 | - if (!($depot instanceof AddressV5)) { |
|
50 | - $depot = AddressV5::fromArray($depot); |
|
51 | - } |
|
52 | - |
|
53 | - $param->addAddress($address); |
|
54 | - } |
|
55 | - } |
|
56 | - |
|
57 | - $param->directions = self::getValue($params, 'directions'); |
|
58 | - $param->format = self::getValue($params, 'format'); |
|
59 | - $param->route_path_output = self::getValue($params, 'route_path_output'); |
|
60 | - $param->optimized_callback_url = self::getValue($params, 'optimized_callback_url'); |
|
61 | - $param->optimization_problem_id = self::getValue($params, 'optimization_problem_id'); |
|
62 | - $param->reoptimize = self::getValue($params, 'reoptimize'); |
|
63 | - $param->redirect = filter_var(self::getValue($params, 'redirect', true), FILTER_VALIDATE_BOOLEAN); |
|
64 | - |
|
65 | - return $param; |
|
66 | - } |
|
67 | - |
|
68 | - public function __construct() |
|
69 | - { |
|
70 | - $this->parameters = new RouteParameters(); |
|
71 | - } |
|
72 | - |
|
73 | - public function setParameters(RouteParameters $params) |
|
74 | - { |
|
75 | - $this->parameters = $params; |
|
76 | - |
|
77 | - return $this; |
|
78 | - } |
|
79 | - |
|
80 | - public function addAddress(AddressV5 $address) |
|
81 | - { |
|
82 | - $this->addresses[] = $address; |
|
83 | - |
|
84 | - return $this; |
|
85 | - } |
|
86 | - |
|
87 | - public function addDepot(AddressV5 $depot) |
|
88 | - { |
|
89 | - $this->depots[] = $depot; |
|
90 | - |
|
91 | - return $this; |
|
92 | - } |
|
93 | - |
|
94 | - public function getAddressesArray() |
|
95 | - { |
|
96 | - $addresses = []; |
|
97 | - |
|
98 | - foreach ($this->addresses as $address) { |
|
99 | - $addresses[] = $address->toArray(); |
|
100 | - } |
|
101 | - |
|
102 | - return $addresses; |
|
103 | - } |
|
104 | - |
|
105 | - public function getDepotsArray() |
|
106 | - { |
|
107 | - $depots = []; |
|
108 | - |
|
109 | - foreach ($this->depots as $depot) { |
|
110 | - $depots[] = $depot->toArray(); |
|
111 | - } |
|
112 | - |
|
113 | - return $depots; |
|
114 | - } |
|
115 | - |
|
116 | - public function getParametersArray() |
|
117 | - { |
|
118 | - return $this->parameters->toArray(); |
|
119 | - } |
|
120 | - |
|
121 | - public function setAddresses(array $addresses) |
|
122 | - { |
|
123 | - foreach ($addresses as $address) { |
|
124 | - $this->addAddress($address); |
|
125 | - } |
|
126 | - |
|
127 | - return $this; |
|
128 | - } |
|
129 | - |
|
130 | - public function setDepots(array $depots) |
|
131 | - { |
|
132 | - foreach ($depots as $depot) { |
|
133 | - $this->addDepot($depot); |
|
134 | - } |
|
135 | - |
|
136 | - return $this; |
|
137 | - } |
|
11 | + public $optimization_problem_id; |
|
12 | + public $reoptimize; |
|
13 | + public $addresses = []; |
|
14 | + public $depots = []; |
|
15 | + public $parameters; |
|
16 | + public $directions; |
|
17 | + public $format; |
|
18 | + public $route_path_output; |
|
19 | + public $optimized_callback_url; |
|
20 | + public $redirect = true; |
|
21 | + |
|
22 | + public static function fromArray($params) |
|
23 | + { |
|
24 | + $param = new self(); |
|
25 | + if (!isset($params['addresses'])) { |
|
26 | + throw new BadParam('addresses must be provided.'); |
|
27 | + } |
|
28 | + |
|
29 | + if (!isset($params['parameters'])) { |
|
30 | + throw new BadParam('parameters must be provided.'); |
|
31 | + } |
|
32 | + |
|
33 | + if ($params['parameters'] instanceof RouteParameters) { |
|
34 | + $param->setParameters($params['parameters']); |
|
35 | + } else { |
|
36 | + $param->setParameters(RouteParameters::fromArray($params['parameters'])); |
|
37 | + } |
|
38 | + |
|
39 | + foreach ($params['addresses'] as $address) { |
|
40 | + if (!($address instanceof AddressV5)) { |
|
41 | + $address = AddressV5::fromArray($address); |
|
42 | + } |
|
43 | + |
|
44 | + $param->addAddress($address); |
|
45 | + } |
|
46 | + |
|
47 | + if (isset($params['depots'] )) { |
|
48 | + foreach ($params['depots'] as $depot) { |
|
49 | + if (!($depot instanceof AddressV5)) { |
|
50 | + $depot = AddressV5::fromArray($depot); |
|
51 | + } |
|
52 | + |
|
53 | + $param->addAddress($address); |
|
54 | + } |
|
55 | + } |
|
56 | + |
|
57 | + $param->directions = self::getValue($params, 'directions'); |
|
58 | + $param->format = self::getValue($params, 'format'); |
|
59 | + $param->route_path_output = self::getValue($params, 'route_path_output'); |
|
60 | + $param->optimized_callback_url = self::getValue($params, 'optimized_callback_url'); |
|
61 | + $param->optimization_problem_id = self::getValue($params, 'optimization_problem_id'); |
|
62 | + $param->reoptimize = self::getValue($params, 'reoptimize'); |
|
63 | + $param->redirect = filter_var(self::getValue($params, 'redirect', true), FILTER_VALIDATE_BOOLEAN); |
|
64 | + |
|
65 | + return $param; |
|
66 | + } |
|
67 | + |
|
68 | + public function __construct() |
|
69 | + { |
|
70 | + $this->parameters = new RouteParameters(); |
|
71 | + } |
|
72 | + |
|
73 | + public function setParameters(RouteParameters $params) |
|
74 | + { |
|
75 | + $this->parameters = $params; |
|
76 | + |
|
77 | + return $this; |
|
78 | + } |
|
79 | + |
|
80 | + public function addAddress(AddressV5 $address) |
|
81 | + { |
|
82 | + $this->addresses[] = $address; |
|
83 | + |
|
84 | + return $this; |
|
85 | + } |
|
86 | + |
|
87 | + public function addDepot(AddressV5 $depot) |
|
88 | + { |
|
89 | + $this->depots[] = $depot; |
|
90 | + |
|
91 | + return $this; |
|
92 | + } |
|
93 | + |
|
94 | + public function getAddressesArray() |
|
95 | + { |
|
96 | + $addresses = []; |
|
97 | + |
|
98 | + foreach ($this->addresses as $address) { |
|
99 | + $addresses[] = $address->toArray(); |
|
100 | + } |
|
101 | + |
|
102 | + return $addresses; |
|
103 | + } |
|
104 | + |
|
105 | + public function getDepotsArray() |
|
106 | + { |
|
107 | + $depots = []; |
|
108 | + |
|
109 | + foreach ($this->depots as $depot) { |
|
110 | + $depots[] = $depot->toArray(); |
|
111 | + } |
|
112 | + |
|
113 | + return $depots; |
|
114 | + } |
|
115 | + |
|
116 | + public function getParametersArray() |
|
117 | + { |
|
118 | + return $this->parameters->toArray(); |
|
119 | + } |
|
120 | + |
|
121 | + public function setAddresses(array $addresses) |
|
122 | + { |
|
123 | + foreach ($addresses as $address) { |
|
124 | + $this->addAddress($address); |
|
125 | + } |
|
126 | + |
|
127 | + return $this; |
|
128 | + } |
|
129 | + |
|
130 | + public function setDepots(array $depots) |
|
131 | + { |
|
132 | + foreach ($depots as $depot) { |
|
133 | + $this->addDepot($depot); |
|
134 | + } |
|
135 | + |
|
136 | + return $this; |
|
137 | + } |
|
138 | 138 | } |
@@ -44,7 +44,7 @@ |
||
44 | 44 | $param->addAddress($address); |
45 | 45 | } |
46 | 46 | |
47 | - if (isset($params['depots'] )) { |
|
47 | + if (isset($params['depots'])) { |
|
48 | 48 | foreach ($params['depots'] as $depot) { |
49 | 49 | if (!($depot instanceof AddressV5)) { |
50 | 50 | $depot = AddressV5::fromArray($depot); |
@@ -13,154 +13,154 @@ |
||
13 | 13 | |
14 | 14 | class OptimizationProblem extends Common |
15 | 15 | { |
16 | - /** @var int $state |
|
17 | - * An optimization problem state. |
|
18 | - * Available values: |
|
19 | - * OptimizationStateNew = 0, |
|
20 | - * Initial = 1, |
|
21 | - * MatrixProcessing = 2, |
|
22 | - * Optimizing = 3, |
|
23 | - * Optimized = 4, |
|
24 | - * Error = 5, |
|
25 | - * ComputingDirections = 6, |
|
26 | - * OptimizationStateInQueue = 7 |
|
27 | - */ |
|
28 | - public $state; |
|
29 | - |
|
30 | - /** @var string[] $user_errors |
|
31 | - * An array of the user errors. |
|
32 | - */ |
|
33 | - public $user_errors; |
|
34 | - |
|
35 | - /** @var string[] $optimization_errors |
|
36 | - * An array of the optimization errors. |
|
37 | - */ |
|
38 | - public $optimization_errors; |
|
39 | - |
|
40 | - /** @var boolean $sent_to_background |
|
41 | - * If true it means the solution was not returned (it is being computed in the background). |
|
42 | - */ |
|
43 | - public $sent_to_background; |
|
44 | - |
|
45 | - /** @var long $scheduled_for |
|
46 | - * An Unix Timestamp the Optimization Problem was scheduled for. |
|
47 | - */ |
|
48 | - public $scheduled_for; |
|
49 | - |
|
50 | - /** @var Route[] $routes |
|
51 | - * An array ot the DataObjectRoute type objects. |
|
52 | - * The routes included in the optimization problem. |
|
53 | - */ |
|
54 | - public $routes; |
|
55 | - |
|
56 | - /** @var integer $total_addresses |
|
57 | - * Total number of the addresses in the optimization problem. |
|
58 | - */ |
|
59 | - public $total_addresses; |
|
60 | - |
|
61 | - public function __construct() |
|
62 | - { |
|
63 | - /** |
|
64 | - * TO DO: Replace endpoint after finishing Optimization Wrapper in API 5 |
|
65 | - */ |
|
66 | - \Route4Me\Route4Me::setBaseUrl(EndpointV4::BASE_URL); |
|
67 | - $this->parameters = new RouteParameters(); |
|
68 | - } |
|
69 | - |
|
70 | - public static function fromArray(array $params) |
|
71 | - { |
|
72 | - $problem = new self(); |
|
73 | - $routeClass = new Route(); |
|
74 | - |
|
75 | - |
|
76 | - $problem->optimization_problem_id = Common::getValue($params, 'optimization_problem_id'); |
|
77 | - $problem->user_errors = Common::getValue($params, 'user_errors', []); |
|
78 | - $problem->state = Common::getValue($params, 'state', []); |
|
79 | - $problem->sent_to_background = Common::getValue($params, 'sent_to_background', []); |
|
80 | - $problem->links = Common::getValue($params, 'links', []); |
|
81 | - |
|
82 | - if (isset($params['parameters'])) { |
|
83 | - $problem->parameters = RouteParameters::fromArray($params['parameters']); |
|
84 | - } |
|
85 | - |
|
86 | - if (isset($params['addresses'])) { |
|
87 | - $addresses = []; |
|
88 | - |
|
89 | - foreach ($params['addresses'] as $address) { |
|
90 | - $addresses[] = Address::fromArray($address); |
|
91 | - } |
|
92 | - |
|
93 | - $problem->addresses = $addresses; |
|
94 | - } |
|
95 | - |
|
96 | - if (isset($params['routes'])) { |
|
97 | - $routes = []; |
|
98 | - |
|
99 | - foreach ($params['routes'] as $route) { |
|
100 | - $routes[] = $routeClass::fromArray($route); |
|
101 | - } |
|
102 | - |
|
103 | - $problem->routes = $routes; |
|
104 | - } |
|
105 | - |
|
106 | - return $problem; |
|
107 | - } |
|
108 | - |
|
109 | - public static function optimize(OptimizationProblemParams $params) |
|
110 | - { |
|
111 | - $allQueryFields = ['redirect', 'directions', 'format', 'route_path_output', 'optimized_callback_url']; |
|
112 | - |
|
113 | - $optimize = Route4Me::makeRequst([ |
|
114 | - 'url' => \Route4Me\Enum\Endpoint::OPTIMIZATION_PROBLEM, |
|
115 | - 'method' => 'POST', |
|
116 | - 'query' => Route4Me::generateRequestParameters($allQueryFields, $params), |
|
117 | - 'body' => [ |
|
118 | - 'addresses' => $params->getAddressesArray(), |
|
119 | - 'depots' => $params->getDepotsArray(), |
|
120 | - 'parameters' => $params->getParametersArray(), |
|
121 | - ], |
|
122 | - ]); |
|
123 | - |
|
124 | - return self::fromArray($optimize); |
|
125 | - } |
|
126 | - |
|
127 | - public static function get($params) |
|
128 | - { |
|
129 | - $allQueryFields = ['state', 'limit', 'format', 'offset', |
|
130 | - 'optimization_problem_id', 'wait_for_final_state','start_date','end_date', ]; |
|
131 | - |
|
132 | - $result = Route4Me::makeRequst([ |
|
133 | - 'url' => \Route4Me\Enum\Endpoint::OPTIMIZATION_PROBLEM, |
|
134 | - 'method' => 'GET', |
|
135 | - 'query' => \Route4Me\Route4Me::generateRequestParameters($allQueryFields, $params), |
|
136 | - ]); |
|
137 | - |
|
138 | - if (isset($result['optimizations'])) { |
|
139 | - $problems = []; |
|
140 | - |
|
141 | - foreach ($result['optimizations'] as $problem) { |
|
142 | - $problems[] = self::fromArray($problem); |
|
143 | - } |
|
144 | - |
|
145 | - return $problems; |
|
146 | - } else { |
|
147 | - return self::fromArray($result); |
|
148 | - } |
|
149 | - } |
|
150 | - |
|
151 | - public function removeOptimization($params) |
|
152 | - { |
|
153 | - $allQueryFields = ['redirect']; |
|
154 | - $allBodyFields = ['optimization_problem_ids']; |
|
155 | - |
|
156 | - $response = Route4Me::makeRequst([ |
|
157 | - 'url' => \Route4Me\Enum\Endpoint::OPTIMIZATION_PROBLEM, |
|
158 | - 'method' => 'DELETE', |
|
159 | - 'query' => Route4Me::generateRequestParameters($allQueryFields, $params), |
|
160 | - 'body' => Route4Me::generateRequestParameters($allBodyFields, $params), |
|
161 | - ]); |
|
162 | - |
|
163 | - return $response; |
|
164 | - } |
|
16 | + /** @var int $state |
|
17 | + * An optimization problem state. |
|
18 | + * Available values: |
|
19 | + * OptimizationStateNew = 0, |
|
20 | + * Initial = 1, |
|
21 | + * MatrixProcessing = 2, |
|
22 | + * Optimizing = 3, |
|
23 | + * Optimized = 4, |
|
24 | + * Error = 5, |
|
25 | + * ComputingDirections = 6, |
|
26 | + * OptimizationStateInQueue = 7 |
|
27 | + */ |
|
28 | + public $state; |
|
29 | + |
|
30 | + /** @var string[] $user_errors |
|
31 | + * An array of the user errors. |
|
32 | + */ |
|
33 | + public $user_errors; |
|
34 | + |
|
35 | + /** @var string[] $optimization_errors |
|
36 | + * An array of the optimization errors. |
|
37 | + */ |
|
38 | + public $optimization_errors; |
|
39 | + |
|
40 | + /** @var boolean $sent_to_background |
|
41 | + * If true it means the solution was not returned (it is being computed in the background). |
|
42 | + */ |
|
43 | + public $sent_to_background; |
|
44 | + |
|
45 | + /** @var long $scheduled_for |
|
46 | + * An Unix Timestamp the Optimization Problem was scheduled for. |
|
47 | + */ |
|
48 | + public $scheduled_for; |
|
49 | + |
|
50 | + /** @var Route[] $routes |
|
51 | + * An array ot the DataObjectRoute type objects. |
|
52 | + * The routes included in the optimization problem. |
|
53 | + */ |
|
54 | + public $routes; |
|
55 | + |
|
56 | + /** @var integer $total_addresses |
|
57 | + * Total number of the addresses in the optimization problem. |
|
58 | + */ |
|
59 | + public $total_addresses; |
|
60 | + |
|
61 | + public function __construct() |
|
62 | + { |
|
63 | + /** |
|
64 | + * TO DO: Replace endpoint after finishing Optimization Wrapper in API 5 |
|
65 | + */ |
|
66 | + \Route4Me\Route4Me::setBaseUrl(EndpointV4::BASE_URL); |
|
67 | + $this->parameters = new RouteParameters(); |
|
68 | + } |
|
69 | + |
|
70 | + public static function fromArray(array $params) |
|
71 | + { |
|
72 | + $problem = new self(); |
|
73 | + $routeClass = new Route(); |
|
74 | + |
|
75 | + |
|
76 | + $problem->optimization_problem_id = Common::getValue($params, 'optimization_problem_id'); |
|
77 | + $problem->user_errors = Common::getValue($params, 'user_errors', []); |
|
78 | + $problem->state = Common::getValue($params, 'state', []); |
|
79 | + $problem->sent_to_background = Common::getValue($params, 'sent_to_background', []); |
|
80 | + $problem->links = Common::getValue($params, 'links', []); |
|
81 | + |
|
82 | + if (isset($params['parameters'])) { |
|
83 | + $problem->parameters = RouteParameters::fromArray($params['parameters']); |
|
84 | + } |
|
85 | + |
|
86 | + if (isset($params['addresses'])) { |
|
87 | + $addresses = []; |
|
88 | + |
|
89 | + foreach ($params['addresses'] as $address) { |
|
90 | + $addresses[] = Address::fromArray($address); |
|
91 | + } |
|
92 | + |
|
93 | + $problem->addresses = $addresses; |
|
94 | + } |
|
95 | + |
|
96 | + if (isset($params['routes'])) { |
|
97 | + $routes = []; |
|
98 | + |
|
99 | + foreach ($params['routes'] as $route) { |
|
100 | + $routes[] = $routeClass::fromArray($route); |
|
101 | + } |
|
102 | + |
|
103 | + $problem->routes = $routes; |
|
104 | + } |
|
105 | + |
|
106 | + return $problem; |
|
107 | + } |
|
108 | + |
|
109 | + public static function optimize(OptimizationProblemParams $params) |
|
110 | + { |
|
111 | + $allQueryFields = ['redirect', 'directions', 'format', 'route_path_output', 'optimized_callback_url']; |
|
112 | + |
|
113 | + $optimize = Route4Me::makeRequst([ |
|
114 | + 'url' => \Route4Me\Enum\Endpoint::OPTIMIZATION_PROBLEM, |
|
115 | + 'method' => 'POST', |
|
116 | + 'query' => Route4Me::generateRequestParameters($allQueryFields, $params), |
|
117 | + 'body' => [ |
|
118 | + 'addresses' => $params->getAddressesArray(), |
|
119 | + 'depots' => $params->getDepotsArray(), |
|
120 | + 'parameters' => $params->getParametersArray(), |
|
121 | + ], |
|
122 | + ]); |
|
123 | + |
|
124 | + return self::fromArray($optimize); |
|
125 | + } |
|
126 | + |
|
127 | + public static function get($params) |
|
128 | + { |
|
129 | + $allQueryFields = ['state', 'limit', 'format', 'offset', |
|
130 | + 'optimization_problem_id', 'wait_for_final_state','start_date','end_date', ]; |
|
131 | + |
|
132 | + $result = Route4Me::makeRequst([ |
|
133 | + 'url' => \Route4Me\Enum\Endpoint::OPTIMIZATION_PROBLEM, |
|
134 | + 'method' => 'GET', |
|
135 | + 'query' => \Route4Me\Route4Me::generateRequestParameters($allQueryFields, $params), |
|
136 | + ]); |
|
137 | + |
|
138 | + if (isset($result['optimizations'])) { |
|
139 | + $problems = []; |
|
140 | + |
|
141 | + foreach ($result['optimizations'] as $problem) { |
|
142 | + $problems[] = self::fromArray($problem); |
|
143 | + } |
|
144 | + |
|
145 | + return $problems; |
|
146 | + } else { |
|
147 | + return self::fromArray($result); |
|
148 | + } |
|
149 | + } |
|
150 | + |
|
151 | + public function removeOptimization($params) |
|
152 | + { |
|
153 | + $allQueryFields = ['redirect']; |
|
154 | + $allBodyFields = ['optimization_problem_ids']; |
|
155 | + |
|
156 | + $response = Route4Me::makeRequst([ |
|
157 | + 'url' => \Route4Me\Enum\Endpoint::OPTIMIZATION_PROBLEM, |
|
158 | + 'method' => 'DELETE', |
|
159 | + 'query' => Route4Me::generateRequestParameters($allQueryFields, $params), |
|
160 | + 'body' => Route4Me::generateRequestParameters($allBodyFields, $params), |
|
161 | + ]); |
|
162 | + |
|
163 | + return $response; |
|
164 | + } |
|
165 | 165 | |
166 | 166 | } |
167 | 167 | \ No newline at end of file |
@@ -127,7 +127,7 @@ |
||
127 | 127 | public static function get($params) |
128 | 128 | { |
129 | 129 | $allQueryFields = ['state', 'limit', 'format', 'offset', |
130 | - 'optimization_problem_id', 'wait_for_final_state','start_date','end_date', ]; |
|
130 | + 'optimization_problem_id', 'wait_for_final_state', 'start_date', 'end_date', ]; |
|
131 | 131 | |
132 | 132 | $result = Route4Me::makeRequst([ |
133 | 133 | 'url' => \Route4Me\Enum\Endpoint::OPTIMIZATION_PROBLEM, |
@@ -11,31 +11,31 @@ |
||
11 | 11 | */ |
12 | 12 | class AddressBundling extends Common |
13 | 13 | { |
14 | - /** |
|
15 | - * Address bundling mode |
|
16 | - * @see Enum\AddressBundlingModes\Mode |
|
17 | - * @var integer |
|
18 | - */ |
|
19 | - public $mode; |
|
14 | + /** |
|
15 | + * Address bundling mode |
|
16 | + * @see Enum\AddressBundlingModes\Mode |
|
17 | + * @var integer |
|
18 | + */ |
|
19 | + public $mode; |
|
20 | 20 | |
21 | - /** |
|
22 | - * Address bundling mode parameters: |
|
23 | - * - If Mode=3, contains an array of the field names of the Address object; |
|
24 | - * - If Mode=4, contains an array of the custom fields of the Address object. |
|
25 | - * @var string[] |
|
26 | - */ |
|
27 | - public $mode_params; |
|
21 | + /** |
|
22 | + * Address bundling mode parameters: |
|
23 | + * - If Mode=3, contains an array of the field names of the Address object; |
|
24 | + * - If Mode=4, contains an array of the custom fields of the Address object. |
|
25 | + * @var string[] |
|
26 | + */ |
|
27 | + public $mode_params; |
|
28 | 28 | |
29 | - /** |
|
30 | - * Address bundling merge mode |
|
31 | - * @see Enum\AddressBundlingModes\MergeMode |
|
32 | - * @var integer |
|
33 | - */ |
|
34 | - public $merge_mode; |
|
29 | + /** |
|
30 | + * Address bundling merge mode |
|
31 | + * @see Enum\AddressBundlingModes\MergeMode |
|
32 | + * @var integer |
|
33 | + */ |
|
34 | + public $merge_mode; |
|
35 | 35 | |
36 | - /** |
|
37 | - * Service time rules of the address bundling |
|
38 | - * @var ServiceTimeRulesClass |
|
39 | - */ |
|
40 | - public $service_time_rules; |
|
36 | + /** |
|
37 | + * Service time rules of the address bundling |
|
38 | + * @var ServiceTimeRulesClass |
|
39 | + */ |
|
40 | + public $service_time_rules; |
|
41 | 41 | } |
42 | 42 | \ No newline at end of file |
@@ -10,28 +10,28 @@ |
||
10 | 10 | */ |
11 | 11 | class AddressCustomNote extends \Route4Me\Common |
12 | 12 | { |
13 | - /** A unique ID (40 chars) of a custom note entry. |
|
14 | - * @var string $note_custom_entry_id |
|
15 | - */ |
|
16 | - public $note_custom_entry_id; |
|
13 | + /** A unique ID (40 chars) of a custom note entry. |
|
14 | + * @var string $note_custom_entry_id |
|
15 | + */ |
|
16 | + public $note_custom_entry_id; |
|
17 | 17 | |
18 | - /** The custom note ID. |
|
19 | - * @var string $note_id |
|
20 | - */ |
|
21 | - public $note_id; |
|
18 | + /** The custom note ID. |
|
19 | + * @var string $note_id |
|
20 | + */ |
|
21 | + public $note_id; |
|
22 | 22 | |
23 | - /** The custom note type ID. |
|
24 | - * @var string $note_custom_type_id |
|
25 | - */ |
|
26 | - public $note_custom_type_id; |
|
23 | + /** The custom note type ID. |
|
24 | + * @var string $note_custom_type_id |
|
25 | + */ |
|
26 | + public $note_custom_type_id; |
|
27 | 27 | |
28 | - /** The custom note value. |
|
29 | - * @var string $note_custom_value |
|
30 | - */ |
|
31 | - public $note_custom_value; |
|
28 | + /** The custom note value. |
|
29 | + * @var string $note_custom_value |
|
30 | + */ |
|
31 | + public $note_custom_value; |
|
32 | 32 | |
33 | - /** The custom note type. |
|
34 | - * @var string $note_custom_type |
|
35 | - */ |
|
36 | - public $note_custom_type; |
|
33 | + /** The custom note type. |
|
34 | + * @var string $note_custom_type |
|
35 | + */ |
|
36 | + public $note_custom_type; |
|
37 | 37 | } |
38 | 38 | \ No newline at end of file |
@@ -9,60 +9,60 @@ |
||
9 | 9 | */ |
10 | 10 | class Geocoding extends \Route4Me\Common |
11 | 11 | { |
12 | - /** A unique identifier for the geocoding |
|
13 | - * @var string $key |
|
14 | - */ |
|
15 | - public $key; |
|
12 | + /** A unique identifier for the geocoding |
|
13 | + * @var string $key |
|
14 | + */ |
|
15 | + public $key; |
|
16 | 16 | |
17 | - /** Specific description of the geocoding result |
|
18 | - * @var string $name |
|
19 | - */ |
|
20 | - public $name; |
|
17 | + /** Specific description of the geocoding result |
|
18 | + * @var string $name |
|
19 | + */ |
|
20 | + public $name; |
|
21 | 21 | |
22 | - /** Boundary box |
|
23 | - * @var double[] $bbox |
|
24 | - */ |
|
25 | - public $bbox = []; |
|
22 | + /** Boundary box |
|
23 | + * @var double[] $bbox |
|
24 | + */ |
|
25 | + public $bbox = []; |
|
26 | 26 | |
27 | - /** The latitude of the geocoded address |
|
28 | - * @var double $lat |
|
29 | - */ |
|
30 | - public $lat; |
|
27 | + /** The latitude of the geocoded address |
|
28 | + * @var double $lat |
|
29 | + */ |
|
30 | + public $lat; |
|
31 | 31 | |
32 | - /** The longitude of the geocoded address |
|
33 | - * @var double $lng |
|
34 | - */ |
|
35 | - public $lng; |
|
32 | + /** The longitude of the geocoded address |
|
33 | + * @var double $lng |
|
34 | + */ |
|
35 | + public $lng; |
|
36 | 36 | |
37 | - /** Confidance level in the address geocoding: |
|
38 | - * <para>high, medium, low</para> |
|
39 | - * @var string $confidence |
|
40 | - */ |
|
41 | - public $confidence; |
|
37 | + /** Confidance level in the address geocoding: |
|
38 | + * <para>high, medium, low</para> |
|
39 | + * @var string $confidence |
|
40 | + */ |
|
41 | + public $confidence; |
|
42 | 42 | |
43 | - /** The postal code of the geocoded address |
|
44 | - * @var string $postalCode |
|
45 | - */ |
|
46 | - public $postalCode; |
|
43 | + /** The postal code of the geocoded address |
|
44 | + * @var string $postalCode |
|
45 | + */ |
|
46 | + public $postalCode; |
|
47 | 47 | |
48 | - /** Country region |
|
49 | - * @var string $countryRegion |
|
50 | - */ |
|
51 | - public $countryRegion; |
|
48 | + /** Country region |
|
49 | + * @var string $countryRegion |
|
50 | + */ |
|
51 | + public $countryRegion; |
|
52 | 52 | |
53 | - /** The address curbside coordinates |
|
54 | - * @var GeoPoint $curbside_coordinates |
|
55 | - */ |
|
56 | - public $curbside_coordinates = []; |
|
53 | + /** The address curbside coordinates |
|
54 | + * @var GeoPoint $curbside_coordinates |
|
55 | + */ |
|
56 | + public $curbside_coordinates = []; |
|
57 | 57 | |
58 | - /** The address without number |
|
59 | - * @var string $address_without_number |
|
60 | - */ |
|
61 | - public $address_without_number; |
|
58 | + /** The address without number |
|
59 | + * @var string $address_without_number |
|
60 | + */ |
|
61 | + public $address_without_number; |
|
62 | 62 | |
63 | - /** The place ID |
|
64 | - * @var string $place_id |
|
65 | - */ |
|
66 | - public $place_id; |
|
63 | + /** The place ID |
|
64 | + * @var string $place_id |
|
65 | + */ |
|
66 | + public $place_id; |
|
67 | 67 | |
68 | 68 | } |
69 | 69 | \ No newline at end of file |
@@ -11,15 +11,15 @@ |
||
11 | 11 | */ |
12 | 12 | class SlowdownParams extends Common |
13 | 13 | { |
14 | - /** |
|
15 | - * Service time slowdowon (percent) |
|
16 | - * @var integer |
|
17 | - */ |
|
18 | - public $service_time; |
|
14 | + /** |
|
15 | + * Service time slowdowon (percent) |
|
16 | + * @var integer |
|
17 | + */ |
|
18 | + public $service_time; |
|
19 | 19 | |
20 | - /** |
|
21 | - * Travel time slowdowon (percent) |
|
22 | - * @var integer |
|
23 | - */ |
|
24 | - public $travel_time; |
|
20 | + /** |
|
21 | + * Travel time slowdowon (percent) |
|
22 | + * @var integer |
|
23 | + */ |
|
24 | + public $travel_time; |
|
25 | 25 | } |
26 | 26 | \ No newline at end of file |
@@ -11,31 +11,31 @@ |
||
11 | 11 | */ |
12 | 12 | class ServiceTimeRulesClass extends Common |
13 | 13 | { |
14 | - /** |
|
15 | - * Mode of a first item of the bundled addresses. |
|
16 | - * @see Enum\AddressBundlingModes\FirstItemMode |
|
17 | - * @var integer |
|
18 | - */ |
|
19 | - public $first_item_mode; |
|
14 | + /** |
|
15 | + * Mode of a first item of the bundled addresses. |
|
16 | + * @see Enum\AddressBundlingModes\FirstItemMode |
|
17 | + * @var integer |
|
18 | + */ |
|
19 | + public $first_item_mode; |
|
20 | 20 | |
21 | - /** |
|
22 | - * First item mode parameters.<br> |
|
23 | - * If FirstItemMode=CustomTime, contains custom service time in seconds. |
|
24 | - * @var integer[] |
|
25 | - */ |
|
26 | - public $first_item_mode_params; |
|
21 | + /** |
|
22 | + * First item mode parameters.<br> |
|
23 | + * If FirstItemMode=CustomTime, contains custom service time in seconds. |
|
24 | + * @var integer[] |
|
25 | + */ |
|
26 | + public $first_item_mode_params; |
|
27 | 27 | |
28 | - /** |
|
29 | - * Mode of the non-first items of the bundled addresses. |
|
30 | - * @see Enum\AddressBundlingModes\AddtionalItemsMode |
|
31 | - * @var integer |
|
32 | - */ |
|
33 | - public $additional_items_mode; |
|
28 | + /** |
|
29 | + * Mode of the non-first items of the bundled addresses. |
|
30 | + * @see Enum\AddressBundlingModes\AddtionalItemsMode |
|
31 | + * @var integer |
|
32 | + */ |
|
33 | + public $additional_items_mode; |
|
34 | 34 | |
35 | - /** |
|
36 | - * Additional items mode parameters:<br> |
|
37 | - * if AdditionalItemsMode=CustomTime, contains an array of the custom service times |
|
38 | - * @var integer[] |
|
39 | - */ |
|
40 | - public $additional_items_mode_params; |
|
35 | + /** |
|
36 | + * Additional items mode parameters:<br> |
|
37 | + * if AdditionalItemsMode=CustomTime, contains an array of the custom service times |
|
38 | + * @var integer[] |
|
39 | + */ |
|
40 | + public $additional_items_mode_params; |
|
41 | 41 | } |
42 | 42 | \ No newline at end of file |