sendActivate method
Implementation
Future<ActivateResopnse> sendActivate(Activate activateHit) async {
// Create url
String urlString = Endpoints.DECISION_API + Endpoints.ACTIVATION;
var response = await service.sendHttpRequest(RequestType.Post, urlString,
Endpoints.getFSHeader(this.apiKey), jsonEncode(activateHit.toJson()),
timeoutMs: TIMEOUT_REQUEST);
switch (response.statusCode) {
case 200:
case 204:
Flagship.logger(Level.INFO, ACTIVATE_SUCCESS);
break;
default:
this.onCacheHit(activateHit);
Flagship.logger(Level.ERROR, ACTIVATE_FAILED);
}
return ActivateResopnse([], response.statusCode);
}