public async Task <APIResponse> DeleteBranch(int branchId) { try { var client = httpClientFactory.CreateClient(VendorServiceOperation.serviceName); var response = await client.DeleteAsync(servicesConfig.Vendor + VendorServiceOperation.DeleteBranch(branchId)); return(new APIResponse(response.StatusCode)); } catch (Exception ex) { logger.Error(ex, "Exception in method 'DeleteBranch()'"); var exMessage = ex.InnerException != null ? ex.InnerException.Message : ex.Message; return(new APIResponse(exMessage, HttpStatusCode.InternalServerError)); } }