Provides methods to interact with saved quotes, including finding, searching, creating, and updating quotes.

interface SavedQuotes {
    BuildValidationErrors(validationErrors: any): string;
    Create(quote: SavedQuote): ResultObject;
    FindById(id: number): SavedQuote;
    GetTheActualPrice(quote: SavedQuote): number;
    StartSearch(): SavedQuoteSearch;
    Update(quote: SavedQuote): ResultObject;
}

Methods

  • Builds a human-readable string for validation errors.

    Parameters

    • validationErrors: any

      The validation errors object.

    Returns string

    A string representing the formatted validation errors.

  • Creates a new saved quote based on the provided data.

    Parameters

    • quote: SavedQuote

      The data object containing details for the new saved quote.

    Returns ResultObject

    A result object containing the outcome of the creation process.

  • Finds a saved quote by its unique identifier.

    Parameters

    • id: number

      The unique identifier of the saved quote.

    Returns SavedQuote

    The saved quote instance or null if not found.

  • Retrieves the actual price for a saved quote.

    Parameters

    Returns number

    The calculated price of the saved quote.

  • Updates an existing saved quote with the provided data.

    Parameters

    • quote: SavedQuote

      The data object containing the updated details.

    Returns ResultObject

    A result object containing the outcome of the update process.