UNPKG

shopee-client

Version:
99 lines (98 loc) 5.01 kB
import BaseModule from "../BaseModule"; import GetOrderListRequest from "./request/GetOrderListRequest"; import GetOrderListResponse from "./response/GetOrderListResponse"; import GetOrderByStatusRequest from "./request/GetOrderByStatusRequest"; import GetOrderByStatusResponse from "./response/GetOrderByStatusResponse"; import GetOrderDetailResponse from "./response/GetOrderDetailResponse"; import GetEscrowDetailResponse from "./response/GetEscrowDetailResponse"; import CancelOrderRequest from "./request/CancelOrderRequest"; import CancelOrderResponse from "./response/CancelOrderResponse"; import AccceptBuyerCancelResponse from "./response/AccceptBuyerCancelResponse"; import RejectBuyerCancelResponse from "./response/RejectBuyerCancelResponse"; import GetForderInfoResponse from "./response/GetForderInfoResponse"; import GetEscrowReleasedOrderRequest from "./request/GetEscrowReleasedOrderRequest"; import GetEscrowReleasedOrderResponse from "./response/GetEscrowReleasedOrderResponse"; import SplitOrderRequest from "./request/SplitOrderRequest"; import SplitOrderResponse from "./response/SplitOrderResponse"; import UndoSplitResponse from "./response/UndoSplitResponse"; import PaginationRequest from "../category/request/PaginationRequest"; import GetUnbindOrderResponse from "./response/GetUnbindOrderResponse"; import MyIncomeResponse from "./response/MyIncomeResponse"; export default class OrderModule extends BaseModule { /** * GetOrdersList is the recommended call to use for order management. * Use this call to retrieve basic information of all orders which are updated within specific period of time. * More details of each order can be retrieved from GetOrderDetails. * [Only the recent one month orders can be fetch through this API. Please use GetOrderBySatus API to fetch more orders.] * @param request */ getOrderList(request: GetOrderListRequest): Promise<GetOrderListResponse>; /** * GetOrdersByStatus is the recommended call to use for order management. * Use this call to retrieve basic information of all orders which are specific status. * More details of each order can be retrieved from GetOrderDetails. * @param request */ getOrderByStatus(request: GetOrderByStatusRequest): Promise<GetOrderByStatusResponse>; /** * Use this call to retrieve detailed information about one or more orders based on OrderSN. * @param ordersn_list The set of ordersn. You can specify up to 50 ordersns in this call. */ getOrderDetail(ordersn_list: string[]): Promise<GetOrderDetailResponse>; /** * Use this call to retrieve detailed escrow information about one order based on OrderSN. * @param ordersn Shopee's unique identifier for an order. */ getEscrowDetail(ordersn: string): Promise<GetEscrowDetailResponse>; /** * Use this call to accept buyer cancellation * @param ordersn Shopee's unique identifier for an order. */ acceptBuyerCancel(ordersn: string): Promise<AccceptBuyerCancelResponse>; /** * Use this call to reject buyer cancellation * @param ordersn Shopee's unique identifier for an order. */ rejectBuyerCancel(ordersn: string): Promise<RejectBuyerCancelResponse>; /** * Use this call to retrieve detailed information of all the fulfill orders(forder) under a single regular order based on ordersn. * @param ordersn Shopee's unique identifier for an order. */ getForderInfo(ordersn: string): Promise<GetForderInfoResponse>; /** * Use this API to cancel split order from the seller side. * @param ordersn Shopee's unique identifier for an order. */ undoSplitOrder(ordersn: string): Promise<UndoSplitResponse>; /** * Use this call to add note for an order * @param ordersn Shopee's unique identifier for an order. * @param note The note seller made for own reference. */ addOrderNote(ordersn: string, note: string): Promise<GetEscrowDetailResponse>; /** * Use this API to fetch the accounting detail of order. * @param ordersn Shopee's unique identifier for an order. */ getIncome(ordersn: string): Promise<MyIncomeResponse>; /** * Use this call to cancel an order from the seller side. * @param request */ cancelOrder(request: CancelOrderRequest): Promise<CancelOrderResponse>; /** * Use this api to get orders' release time and escrow amount. * @param request */ getEscrowReleasedOrder(request: GetEscrowReleasedOrderRequest): Promise<GetEscrowReleasedOrderResponse>; /** * Use this API to split order into fulfillment orders. This feature is only enabled for whitelisted shops. * @param request */ splitOrder(request: SplitOrderRequest): Promise<SplitOrderResponse>; /** * Use this call to get a list of unbind orders. * @param request */ getUnbindOrderList(request: PaginationRequest): Promise<GetUnbindOrderResponse>; }