private static async Task <string> ValidateMunicipality(ITaxAgencyClient _taxOfficeClient, string municipality) { var municipalities = (await _taxOfficeClient.GetAllMunicipalities()); if (!municipalities.Municipality.Contains(municipality)) { throw new ApiException("Municipality not found", HttpStatusCode.NotFound); } return(municipality); }
public async Task <MunicipalitiesResponse> GetMunicipalities(MunicipalitiesRequest municipalitiesRequest) { var municipalities = await _taxOfficeClient.GetAllMunicipalities(); return(municipalities); }