| @@ 57-69 (lines=13) @@ | ||
| 54 | return $avoidancezone; |
|
| 55 | } |
|
| 56 | ||
| 57 | public static function getAvoidanceZones($params) |
|
| 58 | { |
|
| 59 | $avoidancezones = Route4Me::makeRequst(array( |
|
| 60 | 'url' => self::$apiUrl, |
|
| 61 | 'method' => 'GET', |
|
| 62 | 'query' => array( |
|
| 63 | 'offset' => isset($params->offset) ? $params->offset: null, |
|
| 64 | 'limit' => isset($params->limit) ? $params->limit: null, |
|
| 65 | ) |
|
| 66 | )); |
|
| 67 | ||
| 68 | return $avoidancezones; |
|
| 69 | } |
|
| 70 | ||
| 71 | public static function addAvoidanceZone($params) |
|
| 72 | { |
|
| @@ 59-71 (lines=13) @@ | ||
| 56 | return $territory; |
|
| 57 | } |
|
| 58 | ||
| 59 | public static function getTerritories($params) |
|
| 60 | { |
|
| 61 | $response = Route4Me::makeRequst(array( |
|
| 62 | 'url' => self::$apiUrl, |
|
| 63 | 'method' => 'GET', |
|
| 64 | 'query' => array( |
|
| 65 | 'offset' => isset($params->offset) ? $params->offset: null, |
|
| 66 | 'limit' => isset($params->limit) ? $params->limit: null, |
|
| 67 | ) |
|
| 68 | )); |
|
| 69 | ||
| 70 | return $response; |
|
| 71 | } |
|
| 72 | ||
| 73 | public static function addTerritory($params) |
|
| 74 | { |
|
| @@ 287-298 (lines=12) @@ | ||
| 284 | return $response; |
|
| 285 | } |
|
| 286 | ||
| 287 | public static function newMemberConfigKey($body) |
|
| 288 | { |
|
| 289 | $response = Route4Me::makeRequst(array( |
|
| 290 | 'url' => self::$apiMemberConfig, |
|
| 291 | 'method' => 'POST', |
|
| 292 | 'body' => array( |
|
| 293 | 'config_key' => isset($body->config_key) ? $body->config_key: null, |
|
| 294 | 'config_value' => isset($body->config_value) ? $body->config_value : null |
|
| 295 | ) |
|
| 296 | )); |
|
| 297 | return $response; |
|
| 298 | } |
|
| 299 | ||
| 300 | public static function removeMemberConfigKey($body) |
|
| 301 | { |
|
| @@ 324-335 (lines=12) @@ | ||
| 321 | return $response; |
|
| 322 | } |
|
| 323 | ||
| 324 | public static function updateMemberConfigKey($body) |
|
| 325 | { |
|
| 326 | $response = Route4Me::makeRequst(array( |
|
| 327 | 'url' => self::$apiMemberConfig, |
|
| 328 | 'method' => 'PUT', |
|
| 329 | 'body' => array( |
|
| 330 | 'config_key' => isset($body->config_key) ? $body->config_key: null, |
|
| 331 | 'config_value' => isset($body->config_value) ? $body->config_value : null |
|
| 332 | ) |
|
| 333 | )); |
|
| 334 | return $response; |
|
| 335 | } |
|
| 336 | } |
|
| 337 | ?> |
|
| @@ 79-91 (lines=13) @@ | ||
| 76 | return $result; |
|
| 77 | } |
|
| 78 | ||
| 79 | public static function getAddressBookLocations($params) |
|
| 80 | { |
|
| 81 | $ablocations = Route4Me::makeRequst(array( |
|
| 82 | 'url' => self::$apiUrl, |
|
| 83 | 'method' => 'GET', |
|
| 84 | 'query' => array( |
|
| 85 | 'limit' => isset($params->limit) ? $params->limit: null, |
|
| 86 | 'offset' => isset($params->offset) ? $params->offset : null, |
|
| 87 | ) |
|
| 88 | )); |
|
| 89 | ||
| 90 | return $ablocations; |
|
| 91 | } |
|
| 92 | ||
| 93 | public static function getAddressBookLocationsByIds($ids) |
|
| 94 | { |
|
| @@ 95-108 (lines=14) @@ | ||
| 92 | return $response; |
|
| 93 | } |
|
| 94 | ||
| 95 | public static function addOrder2Route($params,$body) |
|
| 96 | { |
|
| 97 | $response = Route4Me::makeRequst(array( |
|
| 98 | 'url' => self::$apiUrlRoute, |
|
| 99 | 'method' => 'PUT', |
|
| 100 | 'query' => array( |
|
| 101 | 'route_id' => isset($params->route_id) ? $params->route_id: null, |
|
| 102 | 'redirect' => isset($params->redirect) ? $params->redirect : null |
|
| 103 | ), |
|
| 104 | 'body' => (array)$body |
|
| 105 | )); |
|
| 106 | ||
| 107 | return $response; |
|
| 108 | } |
|
| 109 | ||
| 110 | public static function addOrder2Destination($params,$body) |
|
| 111 | { |
|
| @@ 110-123 (lines=14) @@ | ||
| 107 | return $response; |
|
| 108 | } |
|
| 109 | ||
| 110 | public static function addOrder2Destination($params,$body) |
|
| 111 | { |
|
| 112 | $response = Route4Me::makeRequst(array( |
|
| 113 | 'url' => self::$apiUrlOpt, |
|
| 114 | 'method' => 'PUT', |
|
| 115 | 'query' => array( |
|
| 116 | 'optimization_problem_id' => isset($params->optimization_problem_id) ? $params->optimization_problem_id: null, |
|
| 117 | 'redirect' => isset($params->redirect) ? $params->redirect : null |
|
| 118 | ), |
|
| 119 | 'body' => (array)$body |
|
| 120 | )); |
|
| 121 | ||
| 122 | return $response; |
|
| 123 | } |
|
| 124 | ||
| 125 | public static function getOrder($params) |
|
| 126 | { |
|