Skip to content

SearchProductsResponse

// RB2 Core Connect
namespace CoreConnect.Commerce.Catalog;
/// <summary>
/// The search products response.
/// </summary>
public class SearchProductsResponse
{
/// <summary>
/// The products.
/// </summary>
public IEnumerable<Product>? Products { get; set; }
/// <summary>
/// Gets or sets the filters.
/// </summary>
public IEnumerable<Facets>? Facets { get; set; }
/// <summary>
/// Gets or sets the categories filters.
/// </summary>
public IEnumerable<CategoryFacets>? CategoriesFacets { get; set; }
/// <summary>
/// Gets or sets the products response totals.
/// </summary>
public ProductsResponseTotals? ProductsResponseTotals { get; set; }
/// <summary>
/// Category Resolve response.
/// </summary>
public Category? CategoryResolveSearch { get; set; }
}
public class CategoryFacets
{
/// <summary>
/// Gets or sets the category.
/// </summary>
public Category? Category { get; set; }
/// <summary>
/// Gets or sets the product count.
/// </summary>
public int? ProductCount { get; set; }
/// <summary>
/// Gets or sets the filters.
/// </summary>
public IEnumerable<Facets>? Facets { get; set; }
}
/// <summary>
/// The filters.
/// </summary>
public class Facets
{
public Facets(string name, List<Options> options, string? friendlyName = null)
{
Name = name;
Options = options;
FriendlyName = friendlyName;
}
/// <summary>
/// Gets or sets the name.
/// </summary>
public string Name { get; set; }
/// <summary>
/// Gets or sets the friendly name.
/// </summary>
public string? FriendlyName { get; set; }
/// <summary>
/// Gets or sets the options.
/// </summary>
public List<Options> Options { get; set; }
}
/// <summary>
/// The options.
/// </summary>
public class Options
{
/// <summary>
/// Gets or sets the name.
/// </summary>
public string? Name { get; set; }
/// <summary>
/// Gets or sets the value.
/// </summary>
public string? Value { get; set; }
/// <summary>
/// Gets or sets the count.
/// </summary>
public int? Count { get; set; }
}