useCustomerOrders
Category:
Customer & Account
Composable for fetching the orders list.
Types
ts
export function useCustomerOrders(): UseCustomerOrdersReturn
ts
export type UseCustomerOrdersReturn = {
/**
* All placed orders belonging to the logged-in customer
*/
orders: Ref<Schemas["Order"][]>;
/**
* Changes the current page of the orders list
*
* In order to change a page with additional parameters please use `loadOrders` method.
*/
changeCurrentPage(pageNumber: number | string): Promise<void>;
/**
* Fetches the orders list and assigns the result to the `orders` property
*/
loadOrders(parameters?: Schemas["Criteria"]): Promise<void>;
/**
* Current page number
*/
currentPage: ComputedRef<number>;
/**
* total pages
*/
totalPages: ComputedRef<number>;
/**
* Limit of orders per page
*/
limit: Ref<number>;
};