1.1.1 • Published 8 years ago
tm-service-orders v1.1.1
Documentation
OrdersService
messages
object with class service messages
checkDownloadLinkStatus
Download link status (check)
Parameters
orderId{string} - Order id (required).productId{number} - Product id (required).
Examples
(async () => {
const service = new Service('http://service-orders.dev/api/v1/', token);
const request = await service.checkDownloadLinkStatus('NDrMh3S3XvSt0LfbHoWh', 222);
})();Returns Promise<any>
restoreDownloadLinkStatus
Download link status (restore)
Parameters
orderId{string} - Order id (required).productId{number} - Product id (required).
Examples
(async () => {
const service = new Service('http://service-orders.dev/api/v1/', token);
const request = await service.restoreDownloadLinkStatus('NDrMh3S3XvSt0LfbHoWh', 222);
})();Returns Promise<any>
getListOfUserOrders
Get list of users orders
Parameters
propsobjectpagenumber page number to view.perPagenumber records per page.productTypestring type of product. Allowed values: 'template', 'offer', 'membership', 'weblium', 'subscription'.productIdsstring ID's of products.orderIdsstring ID's of orders.statusnumber order status
Examples
(async () => {
const service = new Service('http://service-orders.dev/api/v2/', token);
const request = await service.getListOfUserOrders({ page: 1, ids: 'NDrMh3S3XvSt0LfbHoWh' });
})();Returns Promise<any>
getOrderById
Get order by ID
Parameters
orderIdstring ID of order.
Examples
(async () => {
const service = new Service('http://service-orders.dev/api/v2/', token);
const request = await service.getOrderById('NDrMh3S3XvSt0LfbHoWh');
})();Returns Promise<any>
getOrderInfo
Get order info
Parameters
argsobject Arguments for paymentsargs.pagenumber Page number to viewargs.perPagenumber Records per pageargs.productTypestring Type of productargs.productIdsstring ID's of productsargs.idsstring ID's of ordersargs.userIdstring Customer's IDargs.emailstring Customer's emailargs.statusnumber Order statusargs.dateFromstring Date range startargs.dateTostring Date range end
Examples
(async () => {
const service = new Service('http://service-orders.dev/api/v2/', token);
const request = await service.getOrderById('NDrMh3S3XvSt0LfbHoWh');
})();Returns Promise<any>