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);
        }
예제 #2
0
        public async Task <MunicipalitiesResponse> GetMunicipalities(MunicipalitiesRequest municipalitiesRequest)
        {
            var municipalities = await _taxOfficeClient.GetAllMunicipalities();

            return(municipalities);
        }