| @@ 111-124 (lines=14) @@ | ||
| 108 | return Address::fromArray($address); |
|
| 109 | } |
|
| 110 | ||
| 111 | public function markAddress($params, $body) |
|
| 112 | { |
|
| 113 | $result = Route4Me::makeRequst(array( |
|
| 114 | 'url' => self::$apiUrl, |
|
| 115 | 'method' => 'PUT', |
|
| 116 | 'query' => array( |
|
| 117 | 'route_id' => isset($params['route_id']) ? $params['route_id']: null, |
|
| 118 | 'route_destination_id' => isset($params['route_destination_id']) ? $params['route_destination_id'] : null, |
|
| 119 | ), |
|
| 120 | 'body' => $body |
|
| 121 | )); |
|
| 122 | ||
| 123 | return $result; |
|
| 124 | } |
|
| 125 | ||
| 126 | public function markAsDeparted($params) |
|
| 127 | { |
|
| @@ 34-49 (lines=16) @@ | ||
| 31 | return $geocoding; |
|
| 32 | } |
|
| 33 | ||
| 34 | public static function forwardGeocoding($params) |
|
| 35 | { |
|
| 36 | //Route4Me::simplePrint($params); |
|
| 37 | $query = array( |
|
| 38 | 'format' => isset($params['format']) ? $params['format']: null, |
|
| 39 | 'addresses' => isset($params['addresses']) ? $params['addresses'] : null, |
|
| 40 | ); |
|
| 41 | //var_dump($query); |
|
| 42 | $fgcoding = Route4Me::makeRequst(array( |
|
| 43 | 'url' => self::$apiUrl, |
|
| 44 | 'method' => 'POST', |
|
| 45 | 'query' => $query |
|
| 46 | )); |
|
| 47 | ||
| 48 | return $fgcoding; |
|
| 49 | } |
|
| 50 | ||
| 51 | public static function getStreetData($params) |
|
| 52 | { |
|
| @@ 201-213 (lines=13) @@ | ||
| 198 | return $rAddress; |
|
| 199 | } |
|
| 200 | ||
| 201 | public function removeAddress($params) |
|
| 202 | { |
|
| 203 | $response = Route4Me::makeRequst(array( |
|
| 204 | 'url' => self::$apiUrl_addr, |
|
| 205 | 'method' => 'DELETE', |
|
| 206 | 'query' => array( |
|
| 207 | 'optimization_problem_id' => isset($params['optimization_problem_id']) ? $params['optimization_problem_id'] : null, |
|
| 208 | 'route_destination_id' => isset($params['route_destination_id']) ? $params['route_destination_id'] : null, |
|
| 209 | ) |
|
| 210 | )); |
|
| 211 | ||
| 212 | return $response; |
|
| 213 | } |
|
| 214 | ||
| 215 | public function removeOptimization($params) |
|
| 216 | { |
|
| @@ 215-229 (lines=15) @@ | ||
| 212 | return $response; |
|
| 213 | } |
|
| 214 | ||
| 215 | public function removeOptimization($params) |
|
| 216 | { |
|
| 217 | $response = Route4Me::makeRequst(array( |
|
| 218 | 'url' => self::$apiUrl, |
|
| 219 | 'method' => 'DELETE', |
|
| 220 | 'query' => array( |
|
| 221 | 'redirect' => isset($params['redirect']) ? $params['redirect'] : null, |
|
| 222 | ), |
|
| 223 | 'body' => array( |
|
| 224 | 'optimization_problem_ids' => isset($params['optimization_problem_ids']) ? $params['optimization_problem_ids'] : null, |
|
| 225 | ) |
|
| 226 | )); |
|
| 227 | ||
| 228 | return $response; |
|
| 229 | } |
|
| 230 | ||
| 231 | public function getHybridOptimization($params) |
|
| 232 | { |
|
| @@ 231-243 (lines=13) @@ | ||
| 228 | return $response; |
|
| 229 | } |
|
| 230 | ||
| 231 | public function getHybridOptimization($params) |
|
| 232 | { |
|
| 233 | $optimize = Route4Me::makeRequst(array( |
|
| 234 | 'url' => self::$apiHybridUrl, |
|
| 235 | 'method' => 'GET', |
|
| 236 | 'query' => array( |
|
| 237 | 'target_date_string' => isset($params['target_date_string']) ? $params['target_date_string'] : null, |
|
| 238 | 'timezone_offset_minutes' => isset($params['timezone_offset_minutes']) ? $params['timezone_offset_minutes'] : null |
|
| 239 | ) |
|
| 240 | )); |
|
| 241 | ||
| 242 | return $optimize; |
|
| 243 | } |
|
| 244 | ||
| 245 | Public function addDepotsToHybrid($params) |
|
| 246 | { |
|
| @@ 45-57 (lines=13) @@ | ||
| 42 | return $territoryparameters; |
|
| 43 | } |
|
| 44 | ||
| 45 | public static function getTerritory($params) |
|
| 46 | { |
|
| 47 | $territory = Route4Me::makeRequst(array( |
|
| 48 | 'url' => self::$apiUrl, |
|
| 49 | 'method' => 'GET', |
|
| 50 | 'query' => array( |
|
| 51 | 'territory_id' => isset($params['territory_id']) ? $params['territory_id']: null, |
|
| 52 | 'addresses' => isset($params['addresses']) ? $params['addresses']: null, |
|
| 53 | ) |
|
| 54 | )); |
|
| 55 | ||
| 56 | return $territory; |
|
| 57 | } |
|
| 58 | ||
| 59 | public static function getTerritories($params) |
|
| 60 | { |
|