| @@ 136-148 (lines=13) @@ | ||
| 133 | return $response; |
|
| 134 | } |
|
| 135 | ||
| 136 | public function createVehicle($params) |
|
| 137 | { |
|
| 138 | $allBodyFields = Route4Me::getObjectProperties(new Vehicle(), array('vehicle_id')); |
|
| 139 | ||
| 140 | $response = Route4Me::makeRequst(array( |
|
| 141 | 'url' => Endpoint::VEHICLE_V4, |
|
| 142 | 'method' => 'POST', |
|
| 143 | 'body' => Route4Me::generateRequestParameters($allBodyFields, $params), |
|
| 144 | 'HTTPHEADER' => 'Content-Type: application/json' |
|
| 145 | )); |
|
| 146 | ||
| 147 | return $response; |
|
| 148 | } |
|
| 149 | ||
| 150 | public function removeVehicle($params) |
|
| 151 | { |
|
| @@ 125-136 (lines=12) @@ | ||
| 122 | /** |
|
| 123 | * @param AddressBookLocation $params |
|
| 124 | */ |
|
| 125 | public static function addAdressBookLocation($params) |
|
| 126 | { |
|
| 127 | $allBodyFields = Route4Me::getObjectProperties(new AddressBookLocation(), array('address_id', 'in_route_count')); |
|
| 128 | ||
| 129 | $response = Route4Me::makeRequst(array( |
|
| 130 | 'url' => Endpoint::ADDRESS_BOOK_V4, |
|
| 131 | 'method' => 'POST', |
|
| 132 | 'body' => Route4Me::generateRequestParameters($allBodyFields, $params) |
|
| 133 | )); |
|
| 134 | ||
| 135 | return $response; |
|
| 136 | } |
|
| 137 | ||
| 138 | public function deleteAdressBookLocation($address_ids) |
|
| 139 | { |
|