|
@@ 132-148 (lines=17) @@
|
| 129 |
|
return $response; |
| 130 |
|
} |
| 131 |
|
|
| 132 |
|
public static function getOrder($params) |
| 133 |
|
{ |
| 134 |
|
$query = array(); |
| 135 |
|
$allGetParameters = array('order_id', 'fields', 'day_added_YYMMDD', 'scheduled_for_YYMMDD', 'query', 'offset', 'limit' ); |
| 136 |
|
|
| 137 |
|
foreach ($allGetParameters as $getParameter) { |
| 138 |
|
if (isset($params->{$getParameter})) $query[$getParameter] = $params->{$getParameter}; |
| 139 |
|
} |
| 140 |
|
|
| 141 |
|
$response = Route4Me::makeRequst(array( |
| 142 |
|
'url' => Endpoint::ORDER_V4, |
| 143 |
|
'method' => 'GET', |
| 144 |
|
'query' => $query |
| 145 |
|
)); |
| 146 |
|
|
| 147 |
|
return $response; |
| 148 |
|
} |
| 149 |
|
|
| 150 |
|
public static function getOrders($params) |
| 151 |
|
{ |
|
@@ 230-246 (lines=17) @@
|
| 227 |
|
return $response; |
| 228 |
|
} |
| 229 |
|
|
| 230 |
|
public static function searchOrder($params) |
| 231 |
|
{ |
| 232 |
|
$query = array(); |
| 233 |
|
$allSearchParameters = array('fields', 'day_added_YYMMDD', 'scheduled_for_YYMMDD', 'query', 'offset', 'limit' ); |
| 234 |
|
|
| 235 |
|
foreach ($allSearchParameters as $searchParameter) { |
| 236 |
|
if (isset($params->{$searchParameter})) $query[$searchParameter] = $params->{$searchParameter}; |
| 237 |
|
} |
| 238 |
|
|
| 239 |
|
$response = Route4Me::makeRequst(array( |
| 240 |
|
'url' => Endpoint::ORDER_V4, |
| 241 |
|
'method' => 'GET', |
| 242 |
|
'query' => $query |
| 243 |
|
)); |
| 244 |
|
|
| 245 |
|
return $response; |
| 246 |
|
} |
| 247 |
|
|
| 248 |
|
public static function validateLatitude($lat) |
| 249 |
|
{ |