/// <summary>
        /// Get Ukrainian settlements list by sended request parameters.
        /// Represents 'getSettlements' method of 'AddressGeneral' model. Each response page contains only 150 settlements.
        /// Documentation: https://devcenter.novaposhta.ua/docs/services/556d7ccaa0fe4f08e8f7ce43/operations/56248fffa0fe4f0da0550ea8
        /// </summary>
        /// <param name="name">Settlement name</param>
        /// <param name="address">Settlement address key, should be located inside settlement</param>
        /// <param name="region">Settlement region key</param>
        /// <param name="area">Settlement area key. Unfortunately this field don't use areas keys.</param>
        /// <param name="warehouse">Warehouses availability</param>
        /// <param name="page">Page number</param>
        /// <returns>Settlements collection</returns>
        public virtual IResponseEnvelope <SettlementsGetResponse.Settlement> GetSettlements(string name = "", Guid?address = null, Guid?region = null, Guid?area = null, bool warehouse = true, int page = 1)
        {
            var request = new SettlementsGetRequest()
            {
                AreaRef      = area,
                Ref          = address,
                RegionRef    = region,
                Warehouse    = warehouse ? 1 : 0,
                FindByString = name,
                Page         = page
            };

            return(GetSettlements(request));
        }
        /// <summary>
        /// Get Ukrainian settlements list by sended request parameters.
        /// Represents 'getSettlements' method of 'AddressGeneral' model. Each response page contains only 150 settlements.
        /// Documentation: https://devcenter.novaposhta.ua/docs/services/556d7ccaa0fe4f08e8f7ce43/operations/56248fffa0fe4f0da0550ea8
        /// </summary>
        /// <param name="request">GEt settlements request</param>
        /// <returns>List of finded settlements</returns>
        public virtual IResponseEnvelope <SettlementsGetResponse.Settlement> GetSettlements(SettlementsGetRequest request)
        {
            var fullRequest = new RequestEnvelope <SettlementsGetRequest>(request)
            {
                ApiKey       = _novaPoshtaGateway.ApiKey,
                CalledMethod = "getSettlements",
                ModelName    = "AddressGeneral"
            };

            var response = _novaPoshtaGateway.CreateRequest <SettlementsGetRequest, SettlementsGetResponse>(fullRequest);

            return(response);
        }