Represents a search object for filtering and retrieving saved quotes.

interface SavedQuoteSearch {
    CreatedByCustomer(customerId: number): SavedQuoteSearch;
    ForCustomer(customerId: number): SavedQuoteSearch;
    GetAll(): PagedList<SavedQuote>;
    InCustomTag(customTag: string): SavedQuoteSearch;
    InStatus(statusId: number): SavedQuoteSearch;
    OnlyParents(): SavedQuoteSearch;
    OrderByColumn(orderBy: number): SavedQuoteSearch;
    OrderDirection(direction: number): SavedQuoteSearch;
    SearchTerm(searchTerm: string): SavedQuoteSearch;
    SetPageIndex(pageIndex: number): SavedQuoteSearch;
    SetPageSize(pageSize: number): SavedQuoteSearch;
    WithParentQuoteId(parentQuoteId: number): SavedQuoteSearch;
}

Methods

  • Filters results to include quotes created by a specific customer.

    Parameters

    • customerId: number

      The ID of the customer who created the quotes.

    Returns SavedQuoteSearch

    The updated search instance.

  • Filters results to include only quotes for a specific customer.

    Parameters

    • customerId: number

      The customer ID to filter by.

    Returns SavedQuoteSearch

    The updated search instance.

  • Filters results to include quotes with a specific custom tag.

    Parameters

    • customTag: string

      The custom tag to filter by.

    Returns SavedQuoteSearch

    The updated search instance.

  • Filters results to include quotes with a specific status ID.

    Parameters

    • statusId: number

      The status ID to filter by.

    Returns SavedQuoteSearch

    The updated search instance.

    An error if the status ID is invalid.

  • Sets the column by which the results are ordered.

    Parameters

    • orderBy: number

      The column to sort by, represented by an enumeration.

    Returns SavedQuoteSearch

    The updated search instance.

  • Sets the sorting direction for the search results.

    Parameters

    • direction: number

      The sorting direction (0 for Ascending, 1 for Descending).

    Returns SavedQuoteSearch

    The updated search instance.

  • Filters results based on a search term.

    Parameters

    • searchTerm: string

      The term to search for in quotes.

    Returns SavedQuoteSearch

    The updated search instance.

  • Sets the page index for paginated results.

    Parameters

    • pageIndex: number

      The page index to set.

    Returns SavedQuoteSearch

    The updated search instance.

  • Sets the page size for paginated results.

    Parameters

    • pageSize: number

      The number of results per page.

    Returns SavedQuoteSearch

    The updated search instance.

  • Filters results to include only quotes with the specified parent quote ID.

    Parameters

    • parentQuoteId: number

      The parent quote ID to filter by.

    Returns SavedQuoteSearch

    The updated search instance.