@plasma-platform/tm-service-orders
v2.1.9
Published
Service Orders Api
Downloads
5
Readme
Documentation
Table of Contents
OrdersService
messages
object with class service messages
changeOrderPhoneNumber
Orders - Change the phone number of the order
Parameters
params
object
Examples
(async () => {
const service = new Service(url, token);
const request = await service.changeOrderPhoneNumber(orderId);
})();
Returns Promise<any>
checkOrders
Check orders
Parameters
params
object params objectparams.productType
string Type of product. Allowed values: 'template', 'offer', 'membership'.params.productIds
string ID's of productsparams.orderIds
string ID's of ordersparams.userId
string Customer's IDparams.email
string Customer's emailparams.status
number Order statusparams.dateFrom
string Date range startparams.dateTo
string Date range endparams.paidOnly
boolean Search only paid ordersparams.strict
boolean Strict search mode
Examples
(async () => {
const service = new Service('http://service-orders.dev/api/v2/');
const request = await service.checkOrders(params);
})();
Returns Promise<any>
getListOfUserOrders
Get list of users orders
Parameters
params
object params objectparams.page
number page number to view.params.perPage
number records per page.params.productType
string type of product. Allowed values: 'template', 'offer', 'membership'.params.productIds
string ID's of products.params.orderIds
string ID's of orders.params.status
number order statusparams.email
number Customer's emailparams.dateFrom
number Date range startparams.dateTo
number Date range endparams.paidOnly
number Search only paid ordersparams.strict
number Strict search mode
Examples
(async () => {
const service = new Service('http://service-orders.dev/api/v2/', token);
const request = await service.getListOfUserOrders(params);
})();
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(orderId);
})();
Returns Promise<any>
getOrderByIdPublic
Orders - Get order public data
Parameters
orderId
string ID of order (required).
Examples
(async () => {
const service = new Service(url);
const request = await service.getOrderByIdPublic(orderId);
})();
Returns Promise<any>
checkDownloadLinkStatusByToken
Check download link status by access token
Parameters
params
object params object
Examples
(async () => {
const service = new Service('http://service-orders.dev/api/v1/', token);
const request = await service.checkDownloadLinkStatusByToken(params);
})();
Returns Promise<any>
restoreDownloadLinkStatusByToken
Restore download link status by access token
Parameters
params
object params object
Examples
(async () => {
const service = new Service('http://service-orders.dev/api/v1/', token);
const request = await service.restoreDownloadLinkStatusByToken(params);
})();
Returns Promise<any>