UNPKG

@liquidcommerce/cloud-sdk

Version:

LiquidCommerce Cloud SDK

24 lines (23 loc) 1.06 kB
import type { OrderAuthenticatedService } from '../core'; import type { IOrder, IOrdersList, IOrdersListParams } from '../interfaces'; import type { IApiResponseWithData } from '../types'; export declare class OrderService { private client; constructor(client: OrderAuthenticatedService); /** * Fetches an order by its identifier. * * @param {string} identifier - The identifier of the order to fetch. * @returns {Promise<IApiResponseWithData<IOrder>>} A promise that resolves to the order data. * @throws {Error} If the fetch request fails. */ fetch(identifier: string): Promise<IApiResponseWithData<IOrder>>; /** * Lists orders within a specified date range. * * @param {IOrdersListParams} params - The parameters for listing orders. * @returns {Promise<IApiResponseWithData<IOrdersList>>} A promise that resolves to the paginated order list. * @throws {Error} If the list request fails. */ list(params: IOrdersListParams): Promise<IApiResponseWithData<IOrdersList>>; }