@@ 45-56 (lines=12) @@ | ||
42 | return $activityparameters; |
|
43 | } |
|
44 | ||
45 | public static function getActivities($params) |
|
46 | { |
|
47 | $allQueryFields = array('route_id', 'team', 'limit', 'offset', 'start'); |
|
48 | ||
49 | $activity = Route4Me::makeRequst(array( |
|
50 | 'url' => Endpoint::GET_ACTIVITIES, |
|
51 | 'method' => 'GET', |
|
52 | 'query' => Route4Me::generateRequestParameters($allQueryFields, $params) |
|
53 | )); |
|
54 | ||
55 | return $activity; |
|
56 | } |
|
57 | ||
58 | public static function searcActivities($params) |
|
59 | { |
|
@@ 58-69 (lines=12) @@ | ||
55 | return $activity; |
|
56 | } |
|
57 | ||
58 | public static function searcActivities($params) |
|
59 | { |
|
60 | $allQueryFields = array('route_id', 'limit', 'offset', 'activity_type'); |
|
61 | ||
62 | $activity = Route4Me::makeRequst(array( |
|
63 | 'url' => Endpoint::GET_ACTIVITIES, |
|
64 | 'method' => 'GET', |
|
65 | 'query' => Route4Me::generateRequestParameters($allQueryFields, $params) |
|
66 | )); |
|
67 | ||
68 | return $activity; |
|
69 | } |
|
70 | ||
71 | public static function sendUserMessage($params) |
|
72 | { |
@@ 139-150 (lines=12) @@ | ||
136 | return $result; |
|
137 | } |
|
138 | ||
139 | public function markAsDeparted($params) |
|
140 | { |
|
141 | $allQueryFields = array('route_id', 'address_id', 'is_departed', 'member_id'); |
|
142 | ||
143 | $address = Route4Me::makeRequst(array( |
|
144 | 'url' => Endpoint::MARK_ADDRESS_DEPARTED, |
|
145 | 'method' => 'PUT', |
|
146 | 'query' => Route4Me::generateRequestParameters($allQueryFields, $params) |
|
147 | )); |
|
148 | ||
149 | return $address; |
|
150 | } |
|
151 | ||
152 | public function markAsVisited($params) |
|
153 | { |
|
@@ 152-163 (lines=12) @@ | ||
149 | return $address; |
|
150 | } |
|
151 | ||
152 | public function markAsVisited($params) |
|
153 | { |
|
154 | $allQueryFields = array('route_id', 'address_id', 'is_visited', 'member_id'); |
|
155 | ||
156 | $address = Route4Me::makeRequst(array( |
|
157 | 'url' => Endpoint::UPDATE_ADDRESS_VISITED, |
|
158 | 'method' => 'PUT', |
|
159 | 'query' => Route4Me::generateRequestParameters($allQueryFields, $params) |
|
160 | )); |
|
161 | ||
162 | return $address; |
|
163 | } |
|
164 | ||
165 | public function deleteAddress() |
|
166 | { |
|
@@ 179-191 (lines=13) @@ | ||
176 | return (bool)$address['deleted']; |
|
177 | } |
|
178 | ||
179 | public function moveDestinationToRoute($params) |
|
180 | { |
|
181 | $allBodyFields = array('to_route_id', 'route_destination_id', 'after_destination_id'); |
|
182 | ||
183 | $result = Route4Me::makeRequst(array( |
|
184 | 'url' => Endpoint::MOVE_ROUTE_DESTINATION, |
|
185 | 'method' => 'POST', |
|
186 | 'body' => Route4Me::generateRequestParameters($allBodyFields, $params), |
|
187 | 'HTTPHEADER' => 'Content-Type: multipart/form-data' |
|
188 | )); |
|
189 | ||
190 | return $result; |
|
191 | } |
|
192 | ||
193 | public function AddAddressNote($params) |
|
194 | { |
@@ 80-91 (lines=12) @@ | ||
77 | return $ablocations; |
|
78 | } |
|
79 | ||
80 | public static function searchAddressBookLocations($params) |
|
81 | { |
|
82 | $allQueryFields = array('display', 'query', 'fields', 'limit', 'offset'); |
|
83 | ||
84 | $result = Route4Me::makeRequst(array( |
|
85 | 'url' => Endpoint::ADDRESS_BOOK_V4, |
|
86 | 'method' => 'GET', |
|
87 | 'query' => Route4Me::generateRequestParameters($allQueryFields, $params) |
|
88 | )); |
|
89 | ||
90 | return $result; |
|
91 | } |
|
92 | ||
93 | public static function getAddressBookLocations($params) |
|
94 | { |
@@ 235-247 (lines=13) @@ | ||
232 | return $response; |
|
233 | } |
|
234 | ||
235 | public static function memberAuthentication($params) |
|
236 | { |
|
237 | $allBodyFields = array('strEmail', 'strPassword', 'format'); |
|
238 | ||
239 | $response = Route4Me::makeRequst(array( |
|
240 | 'url' => Endpoint::AUTHENTICATE, |
|
241 | 'method' => 'POST', |
|
242 | 'body' => Route4Me::generateRequestParameters($allBodyFields, $params), |
|
243 | 'HTTPHEADER' => 'Content-Type: multipart/form-data' |
|
244 | )); |
|
245 | ||
246 | return $response; |
|
247 | } |
|
248 | ||
249 | public static function webinarRegistration($params) |
|
250 | { |
|
@@ 249-261 (lines=13) @@ | ||
246 | return $response; |
|
247 | } |
|
248 | ||
249 | public static function webinarRegistration($params) |
|
250 | { |
|
251 | $allBodyFields = array('email_address', 'first_name', 'last_name', 'phone_number', |
|
252 | 'company_name', 'member_id', 'webinar_date'); |
|
253 | ||
254 | $response = Route4Me::makeRequst(array( |
|
255 | 'url' => Endpoint::WEBINAR_REGISTER, |
|
256 | 'method' => 'POST', |
|
257 | 'body' => Route4Me::generateRequestParameters($allBodyFields, $params) |
|
258 | )); |
|
259 | ||
260 | return $response; |
|
261 | } |
|
262 | ||
263 | public static function purchaseUserLicense($params) |
|
264 | { |
@@ 125-136 (lines=12) @@ | ||
122 | return $response; |
|
123 | } |
|
124 | ||
125 | public static function getOrder($params) |
|
126 | { |
|
127 | $allQueryFields = array('order_id', 'fields', 'day_added_YYMMDD', 'scheduled_for_YYMMDD', 'query', 'offset', 'limit'); |
|
128 | ||
129 | $response = Route4Me::makeRequst(array( |
|
130 | 'url' => Endpoint::ORDER_V4, |
|
131 | 'method' => 'GET', |
|
132 | 'query' => Route4Me::generateRequestParameters($allQueryFields, $params) |
|
133 | )); |
|
134 | ||
135 | return $response; |
|
136 | } |
|
137 | ||
138 | public static function getOrders($params) |
|
139 | { |
|
@@ 208-219 (lines=12) @@ | ||
205 | return $response; |
|
206 | } |
|
207 | ||
208 | public static function searchOrder($params) |
|
209 | { |
|
210 | $allQueryFields = array('fields', 'day_added_YYMMDD', 'scheduled_for_YYMMDD', 'query', 'offset', 'limit' ); |
|
211 | ||
212 | $response = Route4Me::makeRequst(array( |
|
213 | 'url' => Endpoint::ORDER_V4, |
|
214 | 'method' => 'GET', |
|
215 | 'query' => Route4Me::generateRequestParameters($allQueryFields, $params) |
|
216 | )); |
|
217 | ||
218 | return $response; |
|
219 | } |
|
220 | ||
221 | public static function validateCoordinate($coord) |
|
222 | { |
@@ 118-129 (lines=12) @@ | ||
115 | } |
|
116 | } |
|
117 | ||
118 | public function getRoutePoints($params) |
|
119 | { |
|
120 | $allQueryFields = array('route_id', 'route_path_output', 'compress_path_points', 'directions'); |
|
121 | ||
122 | $result = Route4Me::makeRequst(array( |
|
123 | 'url' => Endpoint::ROUTE_V4, |
|
124 | 'method' => 'GET', |
|
125 | 'query' => Route4Me::generateRequestParameters($allQueryFields, $params) |
|
126 | )); |
|
127 | ||
128 | return $result; |
|
129 | } |
|
130 | ||
131 | public function duplicateRoute($route_id) |
|
132 | { |
|
@@ 173-185 (lines=13) @@ | ||
170 | return $result; |
|
171 | } |
|
172 | ||
173 | public function mergeRoutes($params) |
|
174 | { |
|
175 | $allBodyFields = array('route_ids', 'depot_address', 'remove_origin', 'depot_lat', 'depot_lng'); |
|
176 | ||
177 | $result = Route4Me::makeRequst(array( |
|
178 | 'url' => Endpoint::ROUTES_MERGE, |
|
179 | 'method' => 'POST', |
|
180 | 'body' => Route4Me::generateRequestParameters($allBodyFields, $params), |
|
181 | 'HTTPHEADER' => 'Content-Type: multipart/form-data' |
|
182 | )); |
|
183 | ||
184 | return $result; |
|
185 | } |
|
186 | ||
187 | public function shareRoute($params) |
|
188 | { |
|
@@ 393-404 (lines=12) @@ | ||
390 | return Route::fromArray($route); |
|
391 | } |
|
392 | ||
393 | public function GetTrackingHistoryFromTimeRange(array $params) |
|
394 | { |
|
395 | $allQueryFields = array('route_id', 'format', 'time_period', 'start_date', 'end_date'); |
|
396 | ||
397 | $route = Route4Me::makeRequst(array( |
|
398 | 'url' => Endpoint::GET_DEVICE_LOCATION, |
|
399 | 'method' => 'GET', |
|
400 | 'query' => Route4Me::generateRequestParameters($allQueryFields, $params) |
|
401 | )); |
|
402 | ||
403 | return $route; |
|
404 | } |
|
405 | ||
406 | public function GetAssetTracking(array $params) |
|
407 | { |
@@ 67-78 (lines=12) @@ | ||
64 | return $response; |
|
65 | } |
|
66 | ||
67 | public static function addTerritory($params) |
|
68 | { |
|
69 | $allBodyFields = array('territory_name', 'member_id', 'territory_color', 'territory'); |
|
70 | ||
71 | $response = Route4Me::makeRequst(array( |
|
72 | 'url' => Endpoint::TERRITORY_V4, |
|
73 | 'method' => 'POST', |
|
74 | 'body' => Route4Me::generateRequestParameters($allBodyFields, $params) |
|
75 | )); |
|
76 | ||
77 | return $response; |
|
78 | } |
|
79 | ||
80 | public function deleteTerritory($territory_id) |
|
81 | { |