tm-service-orders
v1.1.1
Published
TM service api
Downloads
1
Maintainers
Readme
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
props
objectpage
number page number to view.perPage
number records per page.productType
string type of product. Allowed values: 'template', 'offer', 'membership', 'weblium', 'subscription'.productIds
string ID's of products.orderIds
string ID's of orders.status
number 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
orderId
string 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
args
object Arguments for paymentsargs.page
number Page number to viewargs.perPage
number Records per pageargs.productType
string Type of productargs.productIds
string ID's of productsargs.ids
string ID's of ordersargs.userId
string Customer's IDargs.email
string Customer's emailargs.status
number Order statusargs.dateFrom
string Date range startargs.dateTo
string 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>