public void WhenBuildingUriWithCompanySearchRequest()
        {
            var request = new SearchRequest
            {
                Query = Query,
                ItemsPerPage = ItemsPerPage,
                StartIndex = StartIndex
            };

            _actualUri = _uriBuilder.Build(request);
        }
        public Uri Build(SearchRequest request)
        {
            var query = $"?q={Uri.EscapeDataString(request.Query)}";

            if (request.ItemsPerPage.HasValue)
            {
                query += "&items_per_page=" + request.ItemsPerPage.Value;
            }

            if (request.StartIndex.HasValue)
            {
                query += "&start_index=" + request.StartIndex.Value;
            }

            var pathAndQuery = _path + query;

            return new Uri(pathAndQuery, UriKind.Relative);
        }
 public Task<CompaniesHouseClientResponse<AllSearch>> SearchAllAsync(SearchRequest request, CancellationToken cancellationToken = default(CancellationToken))
 {
     return _companiesHouseSearchClient.SearchAsync<AllSearch>(request, cancellationToken);
 }
 public Task<CompaniesHouseClientResponse<DisqualifiedOfficerSearch>> SearchDisqualifiedOfficerAsync(SearchRequest request, CancellationToken cancellationToken = default(CancellationToken))
 {
     return _companiesHouseSearchClient.SearchAsync<DisqualifiedOfficerSearch>(request, cancellationToken);
 }