| @@ 130-144 (lines=15) @@ | ||
| 127 | return $response; |
|
| 128 | } |
|
| 129 | ||
| 130 | public static function createMember($params) |
|
| 131 | { |
|
| 132 | $excludeFields = array('session_guid', 'member_id', 'token', 'payload', 'webinar_date', |
|
| 133 | 'company_name', 'config_key', 'config_value', 'api_key'); |
|
| 134 | ||
| 135 | $allBodyFields = Route4Me::getObjectProperties(new Member(), $excludeFields); |
|
| 136 | ||
| 137 | $response = Route4Me::makeRequst(array( |
|
| 138 | 'url' => Endpoint::USER_V4, |
|
| 139 | 'method' => 'POST', |
|
| 140 | 'body' => Route4Me::generateRequestParameters($allBodyFields, $params) |
|
| 141 | )); |
|
| 142 | ||
| 143 | return $response; |
|
| 144 | } |
|
| 145 | ||
| 146 | public static function getRandomMemberByType($memberType) |
|
| 147 | { |
|
| @@ 174-188 (lines=15) @@ | ||
| 171 | } |
|
| 172 | ||
| 173 | ||
| 174 | public static function updateMember($body) |
|
| 175 | { |
|
| 176 | $excludeFields = array('session_guid', 'token', 'payload', 'webinar_date', |
|
| 177 | 'company_name', 'config_key', 'config_value', 'api_key'); |
|
| 178 | ||
| 179 | $allBodyFields = Route4Me::getObjectProperties(new Member(), $excludeFields); |
|
| 180 | ||
| 181 | $response = Route4Me::makeRequst(array( |
|
| 182 | 'url' => Endpoint::USER_V4, |
|
| 183 | 'method' => 'PUT', |
|
| 184 | 'body' => Route4Me::generateRequestParameters($allBodyFields, $body) |
|
| 185 | )); |
|
| 186 | ||
| 187 | return $response; |
|
| 188 | } |
|
| 189 | ||
| 190 | public static function deleteMember($body) |
|
| 191 | { |
|
| @@ 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 | { |
|
| @@ 192-206 (lines=15) @@ | ||
| 189 | return $response; |
|
| 190 | } |
|
| 191 | ||
| 192 | public static function updateOrder($params) |
|
| 193 | { |
|
| 194 | $excludeFields = array('route_id', 'redirect', 'optimization_problem_id', |
|
| 195 | 'order_ids', 'fields', 'offset', 'limit', 'query', 'created_timestamp'); |
|
| 196 | ||
| 197 | $allBodyFields = Route4Me::getObjectProperties(new Order(), $excludeFields); |
|
| 198 | ||
| 199 | $response = Route4Me::makeRequst(array( |
|
| 200 | 'url' => Endpoint::ORDER_V4, |
|
| 201 | 'method' => 'PUT', |
|
| 202 | 'body' => Route4Me::generateRequestParameters($allBodyFields, $params) |
|
| 203 | )); |
|
| 204 | ||
| 205 | return $response; |
|
| 206 | } |
|
| 207 | ||
| 208 | public static function searchOrder($params) |
|
| 209 | { |
|
| @@ 31-43 (lines=13) @@ | ||
| 28 | return $vendorsParameters; |
|
| 29 | } |
|
| 30 | ||
| 31 | public static function GetTelematicsVendors($params) { |
|
| 32 | Route4Me::setBaseUrl(Endpoint::TELEMATICS_VENDORS); |
|
| 33 | ||
| 34 | $allQueryFields = array('vendor_id', 'is_integrated', 'page', 'per_page', 'country', 'feature', 'search', 'vendors'); |
|
| 35 | ||
| 36 | $vendors = Route4Me::makeRequst(array( |
|
| 37 | 'url' => "", |
|
| 38 | 'method' => 'GET', |
|
| 39 | 'query' => Route4Me::generateRequestParameters($allQueryFields, $params) |
|
| 40 | )); |
|
| 41 | ||
| 42 | return $vendors; |
|
| 43 | } |
|
| 44 | ||
| 45 | public static function GetRandomVendorID($offset, $limit) { |
|
| 46 | $allVendors = self::GetTelematicsVendors(null); |
|