public async Task <IEnumerable <Category> > GetCategoriesWithProducts(int pageSize, int pageNumber, CancellationToken cancellationToken = default)
        {
            EnsureArg.IsInRange(pageSize, 1, 100, nameof(pageSize));
            EnsureArg.IsGte(pageSize, 0, nameof(pageSize));

            var result = await dashboardsClient.ExecuteCustomScriptCustomerAsync(
                string.Format(PagedCategoryWithProductsQueryFormat, pageSize, pageNumber),
                GetHeaders(),
                cancellationToken);

            if (result.IsError)
            {
                throw new ApiException("Execution failed with error: ", (int)HttpStatusCode.BadRequest, result.ErrorMessage);
            }

            return(mapper.Map <IEnumerable <Category> >(result));
        }