/// <summary> /// Deletes the top up. /// </summary> /// <param name="topupId">The topup identifier.</param> /// <returns></returns> public async Task <APIResponse> DeleteTopUp(int topupId) { try { var client = httpClientFactory.CreateClient(VendorServiceOperation.serviceName); var response = await client.DeleteAsync(servicesConfig.Identity + VendorServiceOperation.DeleteTopUp(topupId)); return(JsonConvert.DeserializeObject <APIResponse>(await response.Content.ReadAsStringAsync())); } catch (Exception ex) { logger.Error(ex, "Exception in method 'DeleteTopUp()'"); var exMessage = ex.InnerException != null ? ex.InnerException.Message : ex.Message; return(new APIResponse(exMessage, HttpStatusCode.InternalServerError)); } }