Previous Docs Version

The documentation you are viewing is for a previous version of the Vendr product. Click here to jump to the current stable version.

IOrderService

API reference for IOrderService in Vendr, the eCommerce solution for Umbraco v8+

IOrderService

Defines the Vendr Order service

public interface IOrderService : ICachedEntityService<OrderReadOnly>, IService

Inheritance

Namespace

Methods

DeleteOrder (1 of 4)

Deletes a Order

public void DeleteOrder(Guid orderId)

Parameters

Parameter Description
orderId
The ID of the Order to delete

DeleteOrder (2 of 4)

Deletes a Order

public void DeleteOrder(Order entity)

Parameters

Parameter Description
entity
The Order to delete

DeleteOrder (3 of 4)

Deletes a Order

public void DeleteOrder(Guid orderId, bool revertFinalized)

Parameters

Parameter Description
orderId
The ID of the Order to delete
revertFinalized
A boolean flag indicating whether to reverse the order finalization, undoing any stock reductions, discount code usages or gift card deductions

DeleteOrder (4 of 4)

Deletes a Order

public void DeleteOrder(Order entity, bool revertFinalized)

Parameters

Parameter Description
entity
The Order to delete
revertFinalized
A boolean flag indicating whether to reverse the order finalization, undoing any stock reductions, discount code usages or gift card deductions

GetAllOrdersForCustomer

Gets a list of all open or finalized OrderReadOnly entities for a given customer

public IEnumerable<OrderReadOnly> GetAllOrdersForCustomer(Guid storeId, 
    string customerReferenceOrEmail)

Parameters

Parameter Description
storeId
The ID of the Store the OrderReadOnly entities belong to
customerReferenceOrEmail
The unique reference or email address of the customer associated with the OrderReadOnly entities

Returns

A list of OrderReadOnly entities


GetFinalizedOrderCount

Get the total number of finalized Order entities in a given Store

public long GetFinalizedOrderCount(Guid storeId)

Parameters

Parameter Description
storeId
The ID of the Store to count from

Returns

A count of the number of finalized Order entities in the given Store


GetFinalizedOrdersForCustomer

Gets a list of finalized OrderReadOnly entities for a given customer

public IEnumerable<OrderReadOnly> GetFinalizedOrdersForCustomer(Guid storeId, 
    string customerReferenceOrEmail)

Parameters

Parameter Description
storeId
The ID of the Store the OrderReadOnly entities belong to
customerReferenceOrEmail
The unique reference or email address of the customer associated with the OrderReadOnly entities

Returns

A list of OrderReadOnly entities


GetOpenOrdersForCustomer

Gets a list of open OrderReadOnly entities for a given customer

public IEnumerable<OrderReadOnly> GetOpenOrdersForCustomer(Guid storeId, 
    string customerReferenceOrEmail)

Parameters

Parameter Description
storeId
The ID of the Store the OrderReadOnly entities belong to
customerReferenceOrEmail
The unique reference or email address of the customer associated with the OrderReadOnly entities

Returns

A list of OrderReadOnly entities


GetOrder (1 of 2)

Get an OrderReadOnly entity by ID

public OrderReadOnly GetOrder(Guid orderId)

Parameters

Parameter Description
orderId
The ID of the OrderReadOnly entity to fetch

Returns

An OrderReadOnly entity


GetOrder (2 of 2)

Get a OrderReadOnly entity by Store and cart or order number

public OrderReadOnly GetOrder(Guid storeId, string cartOrOrderNumber)

Parameters

Parameter Description
storeId
The ID of the Store the OrderReadOnly entity belongs to
cartOrOrderNumber
The cart or order number to search for

Returns

A OrderReadOnly entity


GetOrders

Gets a list of OrderReadOnly entities matching the given IDs

public IEnumerable<OrderReadOnly> GetOrders(Guid[] ids)

Parameters

Parameter Description
ids
The IDs of the OrderReadOnly entities to fetch

Returns

A list of OrderReadOnly entities


SaveOrder

Saves a Order

public void SaveOrder(Order entity)

Parameters

Parameter Description
entity
The Order to save

SearchOrders (1 of 4)

Search for OrderReadOnly entities

public PagedResult<OrderReadOnly> SearchOrders(IQuerySpecification<OrderReadOnly> query, 
    long currentPage = 1, long itemsPerPage = 50)

Parameters

Parameter Description
query
The query specification to perform
currentPage
The page of results of which to retrieve
itemsPerPage
The number of items per page to return

Returns

A paginated list of OrderReadOnly entities


SearchOrders (2 of 4)

Search for OrderReadOnly entities

public PagedResult<OrderReadOnly> SearchOrders(IQuerySpecification<OrderReadOnly> query, 
    ISortSpecification<OrderReadOnly> sort, long currentPage = 1, long itemsPerPage = 50)

Parameters

Parameter Description
query
The query specification to perform
sort
The sort order specification describinng the sort order in which to return the results
currentPage
The page of results of which to retrieve
itemsPerPage
The number of items per page to return

Returns

A paginated list of OrderReadOnly entities


SearchOrders (3 of 4)

Search for OrderReadOnly entities

public PagedResult<OrderReadOnly> SearchOrders(
    Func<IOrderQuerySpecificationFactory, IQuerySpecification<OrderReadOnly>> query, 
    long currentPage = 1, long itemsPerPage = 50)

Parameters

Parameter Description
query
The factory method to generate the query specification to perform
currentPage
The page of results of which to retrieve
itemsPerPage
The number of items per page to return

Returns

A paginated list of OrderReadOnly entities


SearchOrders (4 of 4)

Search for OrderReadOnly entities

public PagedResult<OrderReadOnly> SearchOrders(
    Func<IOrderQuerySpecificationFactory, IQuerySpecification<OrderReadOnly>> query, 
    Func<IOrderSortSpecificationFactory, ISortSpecification<OrderReadOnly>> sort, 
    long currentPage = 1, long itemsPerPage = 50)

Parameters

Parameter Description
query
The factory method to generate the query specification to perform
sort
The factory method to generate the sort order specification describinng the sort order in which to return the results
currentPage
The page of results of which to retrieve
itemsPerPage
The number of items per page to return

Returns

A paginated list of OrderReadOnly entities

Edit this page on GitHub

Site + logo design © 2025 Outfield Digital Ltd. Content contributions licensed under MIT.
Vendr® is a Registered Trademark of Outfield Digital Ltd.