Represents operations related to orders.

interface Orders {
    FindById: ((id: number) => Order);
    FindByOrderProductVariantId: ((id: number) => Order);
    RecordOrder: ((order: RecordOrderModel) => Result);
    SearchOrderByCustomTags: ((tagType: CustomTagType, phrase: string, pageIndex: number, pageSize: number, exactMatch: boolean, orderAscending: boolean) => PagedList<Order>);
    SearchOrderProductVariantByCustomTags: ((tagType: CustomTagType, phrase: string, pageIndex: number, pageSize: number, exactMatch: boolean, orderAscending: boolean) => PagedList<OrderProductVariant>);
    StartSearch: (() => OrderSearch);
    ValidateRecordOrder: ((order: RecordOrderModel) => Result);
}

Properties

FindById: ((id: number) => Order)

Finds an order by its ID.

Type declaration

    • (id): Order
    • Parameters

      • id: number

        The ID of the order to find.

      Returns Order

      The order matching the ID, or null if not found.

FindByOrderProductVariantId: ((id: number) => Order)

Finds an order by the ID of its product variant.

Type declaration

    • (id): Order
    • Parameters

      • id: number

        The ID of the product variant associated with the order.

      Returns Order

      The order associated with the product variant ID, or null if not found.

RecordOrder: ((order: RecordOrderModel) => Result)

Records an order based on the provided model and returns a result.

Type declaration

    • (order): Result
    • Parameters

      Returns Result

      A result indicating success or failure of the record operation.

SearchOrderByCustomTags: ((tagType: CustomTagType, phrase: string, pageIndex: number, pageSize: number, exactMatch: boolean, orderAscending: boolean) => PagedList<Order>)

Searches orders based on custom tags.

Type declaration

    • (tagType, phrase, pageIndex, pageSize, exactMatch, orderAscending): PagedList<Order>
    • Parameters

      • tagType: CustomTagType

        The type of custom tag to search by.

      • phrase: string

        The search phrase or keyword.

      • pageIndex: number

        The index of the page to retrieve (starting from 1).

      • pageSize: number

        The number of items per page.

      • exactMatch: boolean

        Indicates if the search should be an exact match.

      • orderAscending: boolean

        Indicates the sorting direction (true for ascending, false for descending).

      Returns PagedList<Order>

      A paged list of orders matching the search criteria.

SearchOrderProductVariantByCustomTags: ((tagType: CustomTagType, phrase: string, pageIndex: number, pageSize: number, exactMatch: boolean, orderAscending: boolean) => PagedList<OrderProductVariant>)

Searches order product variants based on custom tags.

Type declaration

    • (tagType, phrase, pageIndex, pageSize, exactMatch, orderAscending): PagedList<OrderProductVariant>
    • Parameters

      • tagType: CustomTagType

        The type of custom tag to search by.

      • phrase: string

        The search phrase or keyword.

      • pageIndex: number

        The index of the page to retrieve (starting from 1).

      • pageSize: number

        The number of items per page.

      • exactMatch: boolean

        Indicates if the search should be an exact match.

      • orderAscending: boolean

        Indicates the sorting direction (true for ascending, false for descending).

      Returns PagedList<OrderProductVariant>

      A paged list of order product variants matching the search criteria.

StartSearch: (() => OrderSearch)

Starts a search operation for orders.

Type declaration

ValidateRecordOrder: ((order: RecordOrderModel) => Result)

Validates a record order model and returns a result.

Type declaration

    • (order): Result
    • Parameters

      Returns Result

      A result indicating success or failure of the validation.